Amaan Haque <amaanha...@microsoft.com> writes:
> I’m trying to create an AST representation of a query for the `INSERT` 
> operation. ...

> I found through logs that the error originates from line 2053 in 
> `NodeFuncs.c`. I can’t correlate the unrecognized node to any enum value in 
> `Nodes.h`. Any pointers on how to navigate that file would be greatly 
> appreciated!

I think most of us rely on gdb these days.  In community v16
I get:

(gdb) p (NodeTag) 444
$1 = T_String

You might have better luck identifying just where it's failing
if you recompile nodeFuncs.c with -O0.

The most obviously fishy thing I'm seeing in your code is

>     A_Expr *onConflictWhereExpr = makeSimpleA_Expr(AEXPR_OP, "<", (Node 
> *)conflictColumnRef,
>         (Node *)makeConst(INT8OID, -1, InvalidOid, sizeof(int64),
>         Int64GetDatum((int)myTimestamp), false, true), -1);

An A_Expr is only valid in raw_parser output, but what you seem
to be trying to construct is a post-parse-analysis tree.

                        regards, tom lane


Reply via email to