aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvvvv <vvvv@yandex-team.ru>2022-03-11 17:28:05 +0300
committervvvv <vvvv@yandex-team.ru>2022-03-11 17:28:05 +0300
commita097dbc38cdda181007f82b800a450be373aaf79 (patch)
tree668d96397b144b24ef7db41608f9e860b76dd0e8
parent274f5981ff75ed1d505aabb859d592b7e1731767 (diff)
downloadydb-a097dbc38cdda181007f82b800a450be373aaf79.tar.gz
YQL-13710 missing out nodes
ref:18841a8af6823a1834b443e6fdfbf8da3f73eef1
-rw-r--r--ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/nodes/outfuncs.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/nodes/outfuncs.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/nodes/outfuncs.c
index 0df9be16082..d532f9e1d79 100644
--- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/nodes/outfuncs.c
+++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/nodes/outfuncs.c
@@ -3489,6 +3489,20 @@ _outRawStmt(StringInfo str, const RawStmt *node)
}
static void
+_outInsertStmt(StringInfo str, const InsertStmt *node)
+{
+ WRITE_NODE_TYPE("INSERTSTMT");
+
+ WRITE_NODE_FIELD(relation);
+ WRITE_NODE_FIELD(cols);
+ WRITE_NODE_FIELD(selectStmt);
+ WRITE_NODE_FIELD(onConflictClause);
+ WRITE_NODE_FIELD(returningList);
+ WRITE_NODE_FIELD(withClause);
+ WRITE_ENUM_FIELD(override, OverridingKind);
+}
+
+static void
_outAConst(StringInfo str, const A_Const *node)
{
WRITE_NODE_TYPE("A_CONST");
@@ -3823,6 +3837,30 @@ _outPartitionRangeDatum(StringInfo str, const PartitionRangeDatum *node)
WRITE_LOCATION_FIELD(location);
}
+static void
+_outOnConflictClause(StringInfo str, const OnConflictClause *node)
+{
+ WRITE_NODE_TYPE("ONCONFLICTCLAUSE");
+
+ WRITE_ENUM_FIELD(action, OnConflictAction);
+ WRITE_NODE_FIELD(infer);
+ WRITE_NODE_FIELD(targetList);
+ WRITE_NODE_FIELD(whereClause);
+ WRITE_LOCATION_FIELD(location);
+}
+
+
+static void
+_outInferClause(StringInfo str, const InferClause *node)
+{
+ WRITE_NODE_TYPE("INFERCLAUSE");
+
+ WRITE_NODE_FIELD(indexElems);
+ WRITE_NODE_FIELD(whereClause);
+ WRITE_STRING_FIELD(conname);
+ WRITE_LOCATION_FIELD(location);
+}
+
/*
* outNode -
* converts a Node into ascii string and append it to 'str'
@@ -4444,6 +4482,9 @@ outNode(StringInfo str, const void *obj)
case T_RawStmt:
_outRawStmt(str, obj);
break;
+ case T_InsertStmt:
+ _outInsertStmt(str, obj);
+ break;
case T_A_Const:
_outAConst(str, obj);
break;
@@ -4522,6 +4563,12 @@ outNode(StringInfo str, const void *obj)
case T_PartitionRangeDatum:
_outPartitionRangeDatum(str, obj);
break;
+ case T_OnConflictClause:
+ _outOnConflictClause(str, obj);
+ break;
+ case T_InferClause:
+ _outInferClause(str, obj);
+ break;
default: