mirror of https://github.com/citusdata/citus.git
SqlValueFunction is dropped, TODO: what do to. See commit f193883fc9cebe8fa20359b0797832837a788112
parent
a0cf8361a4
commit
bdc20051ce
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "pg_config.h"
|
||||
|
||||
#if (PG_VERSION_NUM >= PG_VERSION_15) && (PG_VERSION_NUM < PG_VERSION_16)
|
||||
#if (PG_VERSION_NUM >= PG_VERSION_15) && (PG_VERSION_NUM <= PG_VERSION_16)
|
||||
|
||||
#include "postgres.h"
|
||||
|
||||
|
@ -5027,7 +5027,6 @@ isSimpleNode(Node *node, Node *parentNode, int prettyFlags)
|
|||
case T_RowExpr:
|
||||
case T_CoalesceExpr:
|
||||
case T_MinMaxExpr:
|
||||
case T_SQLValueFunction:
|
||||
case T_XmlExpr:
|
||||
case T_NextValueExpr:
|
||||
case T_NullIfExpr:
|
||||
|
@ -6026,67 +6025,6 @@ get_rule_expr(Node *node, deparse_context *context,
|
|||
}
|
||||
break;
|
||||
|
||||
case T_SQLValueFunction:
|
||||
{
|
||||
SQLValueFunction *svf = (SQLValueFunction *) node;
|
||||
|
||||
/*
|
||||
* Note: this code knows that typmod for time, timestamp, and
|
||||
* timestamptz just prints as integer.
|
||||
*/
|
||||
switch (svf->op)
|
||||
{
|
||||
case SVFOP_CURRENT_DATE:
|
||||
appendStringInfoString(buf, "CURRENT_DATE");
|
||||
break;
|
||||
case SVFOP_CURRENT_TIME:
|
||||
appendStringInfoString(buf, "CURRENT_TIME");
|
||||
break;
|
||||
case SVFOP_CURRENT_TIME_N:
|
||||
appendStringInfo(buf, "CURRENT_TIME(%d)", svf->typmod);
|
||||
break;
|
||||
case SVFOP_CURRENT_TIMESTAMP:
|
||||
appendStringInfoString(buf, "CURRENT_TIMESTAMP");
|
||||
break;
|
||||
case SVFOP_CURRENT_TIMESTAMP_N:
|
||||
appendStringInfo(buf, "CURRENT_TIMESTAMP(%d)",
|
||||
svf->typmod);
|
||||
break;
|
||||
case SVFOP_LOCALTIME:
|
||||
appendStringInfoString(buf, "LOCALTIME");
|
||||
break;
|
||||
case SVFOP_LOCALTIME_N:
|
||||
appendStringInfo(buf, "LOCALTIME(%d)", svf->typmod);
|
||||
break;
|
||||
case SVFOP_LOCALTIMESTAMP:
|
||||
appendStringInfoString(buf, "LOCALTIMESTAMP");
|
||||
break;
|
||||
case SVFOP_LOCALTIMESTAMP_N:
|
||||
appendStringInfo(buf, "LOCALTIMESTAMP(%d)",
|
||||
svf->typmod);
|
||||
break;
|
||||
case SVFOP_CURRENT_ROLE:
|
||||
appendStringInfoString(buf, "CURRENT_ROLE");
|
||||
break;
|
||||
case SVFOP_CURRENT_USER:
|
||||
appendStringInfoString(buf, "CURRENT_USER");
|
||||
break;
|
||||
case SVFOP_USER:
|
||||
appendStringInfoString(buf, "USER");
|
||||
break;
|
||||
case SVFOP_SESSION_USER:
|
||||
appendStringInfoString(buf, "SESSION_USER");
|
||||
break;
|
||||
case SVFOP_CURRENT_CATALOG:
|
||||
appendStringInfoString(buf, "CURRENT_CATALOG");
|
||||
break;
|
||||
case SVFOP_CURRENT_SCHEMA:
|
||||
appendStringInfoString(buf, "CURRENT_SCHEMA");
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case T_XmlExpr:
|
||||
{
|
||||
XmlExpr *xexpr = (XmlExpr *) node;
|
||||
|
@ -6616,7 +6554,6 @@ looks_like_function(Node *node)
|
|||
case T_NullIfExpr:
|
||||
case T_CoalesceExpr:
|
||||
case T_MinMaxExpr:
|
||||
case T_SQLValueFunction:
|
||||
case T_XmlExpr:
|
||||
/* these are all accepted by func_expr_common_subexpr */
|
||||
return true;
|
||||
|
|
|
@ -485,10 +485,11 @@ CitusIsMutableFunction(Node *node)
|
|||
return true;
|
||||
}
|
||||
|
||||
if (IsA(node, SQLValueFunction))
|
||||
//if (IsA(node, SQLValueFunction))
|
||||
{
|
||||
/* TODO: PG16 doesn have sqlvaluefunc, see commit f193883fc9cebe8fa20359b0797832837a788112*/
|
||||
/* all variants of SQLValueFunction are stable */
|
||||
return true;
|
||||
//return true;
|
||||
}
|
||||
|
||||
if (IsA(node, NextValueExpr))
|
||||
|
|
Loading…
Reference in New Issue