PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
parsenodes.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * parsenodes.h
4 * definitions for parse tree nodes
5 *
6 * Many of the node types used in parsetrees include a "location" field.
7 * This is a byte (not character) offset in the original source text, to be
8 * used for positioning an error cursor when there is an error related to
9 * the node. Access to the original source text is needed to make use of
10 * the location. At the topmost (statement) level, we also provide a
11 * statement length, likewise measured in bytes, for convenience in
12 * identifying statement boundaries in multi-statement source strings.
13 *
14 *
15 * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
16 * Portions Copyright (c) 1994, Regents of the University of California
17 *
18 * src/include/nodes/parsenodes.h
19 *
20 *-------------------------------------------------------------------------
21 */
22#ifndef PARSENODES_H
23#define PARSENODES_H
24
25#include "common/relpath.h"
26#include "nodes/bitmapset.h"
27#include "nodes/lockoptions.h"
28#include "nodes/primnodes.h"
29#include "nodes/value.h"
31
32
33/* Possible sources of a Query */
34typedef enum QuerySource
35{
36 QSRC_ORIGINAL, /* original parsetree (explicit query) */
37 QSRC_PARSER, /* added by parse analysis (now unused) */
38 QSRC_INSTEAD_RULE, /* added by unconditional INSTEAD rule */
39 QSRC_QUAL_INSTEAD_RULE, /* added by conditional INSTEAD rule */
40 QSRC_NON_INSTEAD_RULE, /* added by non-INSTEAD rule */
42
43/* Sort ordering options for ORDER BY and CREATE INDEX */
44typedef enum SortByDir
45{
49 SORTBY_USING, /* not allowed in CREATE INDEX ... */
51
52typedef enum SortByNulls
53{
58
59/* Options for [ ALL | DISTINCT ] */
60typedef enum SetQuantifier
61{
66
67/*
68 * Grantable rights are encoded so that we can OR them together in a bitmask.
69 * The present representation of AclItem limits us to 32 distinct rights,
70 * even though AclMode is defined as uint64. See utils/acl.h.
71 *
72 * Caution: changing these codes breaks stored ACLs, hence forces initdb.
73 */
74typedef uint64 AclMode; /* a bitmask of privilege bits */
75
76#define ACL_INSERT (1<<0) /* for relations */
77#define ACL_SELECT (1<<1)
78#define ACL_UPDATE (1<<2)
79#define ACL_DELETE (1<<3)
80#define ACL_TRUNCATE (1<<4)
81#define ACL_REFERENCES (1<<5)
82#define ACL_TRIGGER (1<<6)
83#define ACL_EXECUTE (1<<7) /* for functions */
84#define ACL_USAGE (1<<8) /* for various object types */
85#define ACL_CREATE (1<<9) /* for namespaces and databases */
86#define ACL_CREATE_TEMP (1<<10) /* for databases */
87#define ACL_CONNECT (1<<11) /* for databases */
88#define ACL_SET (1<<12) /* for configuration parameters */
89#define ACL_ALTER_SYSTEM (1<<13) /* for configuration parameters */
90#define ACL_MAINTAIN (1<<14) /* for relations */
91#define N_ACL_RIGHTS 15 /* 1 plus the last 1<<x */
92#define ACL_NO_RIGHTS 0
93/* Currently, SELECT ... FOR [KEY] UPDATE/SHARE requires UPDATE privileges */
94#define ACL_SELECT_FOR_UPDATE ACL_UPDATE
95
96
97/*****************************************************************************
98 * Query Tree
99 *****************************************************************************/
100
101/*
102 * Query -
103 * Parse analysis turns all statements into a Query tree
104 * for further processing by the rewriter and planner.
105 *
106 * Utility statements (i.e. non-optimizable statements) have the
107 * utilityStmt field set, and the rest of the Query is mostly dummy.
108 *
109 * Planning converts a Query tree into a Plan tree headed by a PlannedStmt
110 * node --- the Query structure is not used by the executor.
111 *
112 * All the fields ignored for the query jumbling are not semantically
113 * significant (such as alias names), as is ignored anything that can
114 * be deduced from child nodes (else we'd just be double-hashing that
115 * piece of information).
116 */
117typedef struct Query
118{
120
121 CmdType commandType; /* select|insert|update|delete|merge|utility */
122
123 /* where did I come from? */
124 QuerySource querySource pg_node_attr(query_jumble_ignore);
125
126 /*
127 * query identifier (can be set by plugins); ignored for equal, as it
128 * might not be set; also not stored. This is the result of the query
129 * jumble, hence ignored.
130 */
131 uint64 queryId pg_node_attr(equal_ignore, query_jumble_ignore, read_write_ignore, read_as(0));
132
133 /* do I set the command result tag? */
134 bool canSetTag pg_node_attr(query_jumble_ignore);
135
136 Node *utilityStmt; /* non-null if commandType == CMD_UTILITY */
137
138 /*
139 * rtable index of target relation for INSERT/UPDATE/DELETE/MERGE; 0 for
140 * SELECT. This is ignored in the query jumble as unrelated to the
141 * compilation of the query ID.
142 */
143 int resultRelation pg_node_attr(query_jumble_ignore);
144
145 /* has aggregates in tlist or havingQual */
146 bool hasAggs pg_node_attr(query_jumble_ignore);
147 /* has window functions in tlist */
148 bool hasWindowFuncs pg_node_attr(query_jumble_ignore);
149 /* has set-returning functions in tlist */
150 bool hasTargetSRFs pg_node_attr(query_jumble_ignore);
151 /* has subquery SubLink */
152 bool hasSubLinks pg_node_attr(query_jumble_ignore);
153 /* distinctClause is from DISTINCT ON */
154 bool hasDistinctOn pg_node_attr(query_jumble_ignore);
155 /* WITH RECURSIVE was specified */
156 bool hasRecursive pg_node_attr(query_jumble_ignore);
157 /* has INSERT/UPDATE/DELETE/MERGE in WITH */
158 bool hasModifyingCTE pg_node_attr(query_jumble_ignore);
159 /* FOR [KEY] UPDATE/SHARE was specified */
160 bool hasForUpdate pg_node_attr(query_jumble_ignore);
161 /* rewriter has applied some RLS policy */
162 bool hasRowSecurity pg_node_attr(query_jumble_ignore);
163 /* parser has added an RTE_GROUP RTE */
164 bool hasGroupRTE pg_node_attr(query_jumble_ignore);
165 /* is a RETURN statement */
166 bool isReturn pg_node_attr(query_jumble_ignore);
167
168 List *cteList; /* WITH list (of CommonTableExpr's) */
169
170 List *rtable; /* list of range table entries */
171
172 /*
173 * list of RTEPermissionInfo nodes for the rtable entries having
174 * perminfoindex > 0
175 */
176 List *rteperminfos pg_node_attr(query_jumble_ignore);
177 FromExpr *jointree; /* table join tree (FROM and WHERE clauses);
178 * also USING clause for MERGE */
179
180 List *mergeActionList; /* list of actions for MERGE (only) */
181
182 /*
183 * rtable index of target relation for MERGE to pull data. Initially, this
184 * is the same as resultRelation, but after query rewriting, if the target
185 * relation is a trigger-updatable view, this is the index of the expanded
186 * view subquery, whereas resultRelation is the index of the target view.
187 */
188 int mergeTargetRelation pg_node_attr(query_jumble_ignore);
189
190 /* join condition between source and target for MERGE */
192
193 List *targetList; /* target list (of TargetEntry) */
194
195 /* OVERRIDING clause */
196 OverridingKind override pg_node_attr(query_jumble_ignore);
197
198 OnConflictExpr *onConflict; /* ON CONFLICT DO [NOTHING | UPDATE] */
199
200 List *returningList; /* return-values list (of TargetEntry) */
201
202 List *groupClause; /* a list of SortGroupClause's */
203 bool groupDistinct; /* is the group by clause distinct? */
204
205 List *groupingSets; /* a list of GroupingSet's if present */
206
207 Node *havingQual; /* qualifications applied to groups */
208
209 List *windowClause; /* a list of WindowClause's */
210
211 List *distinctClause; /* a list of SortGroupClause's */
212
213 List *sortClause; /* a list of SortGroupClause's */
214
215 Node *limitOffset; /* # of result tuples to skip (int8 expr) */
216 Node *limitCount; /* # of result tuples to return (int8 expr) */
217 LimitOption limitOption; /* limit type */
218
219 List *rowMarks; /* a list of RowMarkClause's */
220
221 Node *setOperations; /* set-operation tree if this is top level of
222 * a UNION/INTERSECT/EXCEPT query */
223
224 /*
225 * A list of pg_constraint OIDs that the query depends on to be
226 * semantically valid
227 */
228 List *constraintDeps pg_node_attr(query_jumble_ignore);
229
230 /* a list of WithCheckOption's (added during rewrite) */
231 List *withCheckOptions pg_node_attr(query_jumble_ignore);
232
233 /*
234 * The following two fields identify the portion of the source text string
235 * containing this query. They are typically only populated in top-level
236 * Queries, not in sub-queries. When not set, they might both be zero, or
237 * both be -1 meaning "unknown".
238 */
239 /* start location, or -1 if unknown */
241 /* length in bytes; 0 means "rest of string" */
242 ParseLoc stmt_len pg_node_attr(query_jumble_ignore);
244
245
246/****************************************************************************
247 * Supporting data structures for Parse Trees
248 *
249 * Most of these node types appear in raw parsetrees output by the grammar,
250 * and get transformed to something else by the analyzer. A few of them
251 * are used as-is in transformed querytrees.
252 ****************************************************************************/
253
254/*
255 * TypeName - specifies a type in definitions
256 *
257 * For TypeName structures generated internally, it is often easier to
258 * specify the type by OID than by name. If "names" is NIL then the
259 * actual type OID is given by typeOid, otherwise typeOid is unused.
260 * Similarly, if "typmods" is NIL then the actual typmod is expected to
261 * be prespecified in typemod, otherwise typemod is unused.
262 *
263 * If pct_type is true, then names is actually a field name and we look up
264 * the type of that field. Otherwise (the normal case), names is a type
265 * name possibly qualified with schema and database name.
266 */
267typedef struct TypeName
268{
270 List *names; /* qualified name (list of String nodes) */
271 Oid typeOid; /* type identified by OID */
272 bool setof; /* is a set? */
273 bool pct_type; /* %TYPE specified? */
274 List *typmods; /* type modifier expression(s) */
275 int32 typemod; /* prespecified type modifier */
276 List *arrayBounds; /* array bounds */
277 ParseLoc location; /* token location, or -1 if unknown */
279
280/*
281 * ColumnRef - specifies a reference to a column, or possibly a whole tuple
282 *
283 * The "fields" list must be nonempty. It can contain String nodes
284 * (representing names) and A_Star nodes (representing occurrence of a '*').
285 * Currently, A_Star must appear only as the last list element --- the grammar
286 * is responsible for enforcing this!
287 *
288 * Note: any container subscripting or selection of fields from composite columns
289 * is represented by an A_Indirection node above the ColumnRef. However,
290 * for simplicity in the normal case, initial field selection from a table
291 * name is represented within ColumnRef and not by adding A_Indirection.
292 */
293typedef struct ColumnRef
294{
296 List *fields; /* field names (String nodes) or A_Star */
297 ParseLoc location; /* token location, or -1 if unknown */
299
300/*
301 * ParamRef - specifies a $n parameter reference
302 */
303typedef struct ParamRef
304{
306 int number; /* the number of the parameter */
307 ParseLoc location; /* token location, or -1 if unknown */
309
310/*
311 * A_Expr - infix, prefix, and postfix expressions
312 */
313typedef enum A_Expr_Kind
314{
315 AEXPR_OP, /* normal operator */
316 AEXPR_OP_ANY, /* scalar op ANY (array) */
317 AEXPR_OP_ALL, /* scalar op ALL (array) */
318 AEXPR_DISTINCT, /* IS DISTINCT FROM - name must be "=" */
319 AEXPR_NOT_DISTINCT, /* IS NOT DISTINCT FROM - name must be "=" */
320 AEXPR_NULLIF, /* NULLIF - name must be "=" */
321 AEXPR_IN, /* [NOT] IN - name must be "=" or "<>" */
322 AEXPR_LIKE, /* [NOT] LIKE - name must be "~~" or "!~~" */
323 AEXPR_ILIKE, /* [NOT] ILIKE - name must be "~~*" or "!~~*" */
324 AEXPR_SIMILAR, /* [NOT] SIMILAR - name must be "~" or "!~" */
325 AEXPR_BETWEEN, /* name must be "BETWEEN" */
326 AEXPR_NOT_BETWEEN, /* name must be "NOT BETWEEN" */
327 AEXPR_BETWEEN_SYM, /* name must be "BETWEEN SYMMETRIC" */
328 AEXPR_NOT_BETWEEN_SYM, /* name must be "NOT BETWEEN SYMMETRIC" */
330
331typedef struct A_Expr
332{
333 pg_node_attr(custom_read_write)
334
336 A_Expr_Kind kind; /* see above */
337 List *name; /* possibly-qualified name of operator */
338 Node *lexpr; /* left argument, or NULL if none */
339 Node *rexpr; /* right argument, or NULL if none */
340 ParseLoc location; /* token location, or -1 if unknown */
342
343/*
344 * A_Const - a literal constant
345 *
346 * Value nodes are inline for performance. You can treat 'val' as a node,
347 * as in IsA(&val, Integer). 'val' is not valid if isnull is true.
348 */
350{
357};
358
359typedef struct A_Const
360{
361 pg_node_attr(custom_copy_equal, custom_read_write, custom_query_jumble)
362
365 bool isnull; /* SQL NULL constant */
366 ParseLoc location; /* token location, or -1 if unknown */
368
369/*
370 * TypeCast - a CAST expression
371 */
372typedef struct TypeCast
373{
375 Node *arg; /* the expression being casted */
376 TypeName *typeName; /* the target type */
377 ParseLoc location; /* token location, or -1 if unknown */
379
380/*
381 * CollateClause - a COLLATE expression
382 */
383typedef struct CollateClause
384{
386 Node *arg; /* input expression */
387 List *collname; /* possibly-qualified collation name */
388 ParseLoc location; /* token location, or -1 if unknown */
390
391/*
392 * RoleSpec - a role name or one of a few special values.
393 */
394typedef enum RoleSpecType
395{
396 ROLESPEC_CSTRING, /* role name is stored as a C string */
397 ROLESPEC_CURRENT_ROLE, /* role spec is CURRENT_ROLE */
398 ROLESPEC_CURRENT_USER, /* role spec is CURRENT_USER */
399 ROLESPEC_SESSION_USER, /* role spec is SESSION_USER */
400 ROLESPEC_PUBLIC, /* role name is "public" */
402
403typedef struct RoleSpec
404{
406 RoleSpecType roletype; /* Type of this rolespec */
407 char *rolename; /* filled only for ROLESPEC_CSTRING */
408 ParseLoc location; /* token location, or -1 if unknown */
410
411/*
412 * FuncCall - a function or aggregate invocation
413 *
414 * agg_order (if not NIL) indicates we saw 'foo(... ORDER BY ...)', or if
415 * agg_within_group is true, it was 'foo(...) WITHIN GROUP (ORDER BY ...)'.
416 * agg_star indicates we saw a 'foo(*)' construct, while agg_distinct
417 * indicates we saw 'foo(DISTINCT ...)'. In any of these cases, the
418 * construct *must* be an aggregate call. Otherwise, it might be either an
419 * aggregate or some other kind of function. However, if FILTER or OVER is
420 * present it had better be an aggregate or window function.
421 *
422 * Normally, you'd initialize this via makeFuncCall() and then only change the
423 * parts of the struct its defaults don't match afterwards, as needed.
424 */
425typedef struct FuncCall
426{
428 List *funcname; /* qualified name of function */
429 List *args; /* the arguments (list of exprs) */
430 List *agg_order; /* ORDER BY (list of SortBy) */
431 Node *agg_filter; /* FILTER clause, if any */
432 struct WindowDef *over; /* OVER clause, if any */
433 bool agg_within_group; /* ORDER BY appeared in WITHIN GROUP */
434 bool agg_star; /* argument was really '*' */
435 bool agg_distinct; /* arguments were labeled DISTINCT */
436 bool func_variadic; /* last argument was labeled VARIADIC */
437 CoercionForm funcformat; /* how to display this node */
438 ParseLoc location; /* token location, or -1 if unknown */
440
441/*
442 * A_Star - '*' representing all columns of a table or compound field
443 *
444 * This can appear within ColumnRef.fields, A_Indirection.indirection, and
445 * ResTarget.indirection lists.
446 */
447typedef struct A_Star
448{
451
452/*
453 * A_Indices - array subscript or slice bounds ([idx] or [lidx:uidx])
454 *
455 * In slice case, either or both of lidx and uidx can be NULL (omitted).
456 * In non-slice case, uidx holds the single subscript and lidx is always NULL.
457 */
458typedef struct A_Indices
459{
461 bool is_slice; /* true if slice (i.e., colon present) */
462 Node *lidx; /* slice lower bound, if any */
463 Node *uidx; /* subscript, or slice upper bound if any */
465
466/*
467 * A_Indirection - select a field and/or array element from an expression
468 *
469 * The indirection list can contain A_Indices nodes (representing
470 * subscripting), String nodes (representing field selection --- the
471 * string value is the name of the field to select), and A_Star nodes
472 * (representing selection of all fields of a composite type).
473 * For example, a complex selection operation like
474 * (foo).field1[42][7].field2
475 * would be represented with a single A_Indirection node having a 4-element
476 * indirection list.
477 *
478 * Currently, A_Star must appear only as the last list element --- the grammar
479 * is responsible for enforcing this!
480 */
481typedef struct A_Indirection
482{
484 Node *arg; /* the thing being selected from */
485 List *indirection; /* subscripts and/or field names and/or * */
487
488/*
489 * A_ArrayExpr - an ARRAY[] construct
490 */
491typedef struct A_ArrayExpr
492{
494 List *elements; /* array element expressions */
495 ParseLoc location; /* token location, or -1 if unknown */
497
498/*
499 * ResTarget -
500 * result target (used in target list of pre-transformed parse trees)
501 *
502 * In a SELECT target list, 'name' is the column label from an
503 * 'AS ColumnLabel' clause, or NULL if there was none, and 'val' is the
504 * value expression itself. The 'indirection' field is not used.
505 *
506 * INSERT uses ResTarget in its target-column-names list. Here, 'name' is
507 * the name of the destination column, 'indirection' stores any subscripts
508 * attached to the destination, and 'val' is not used.
509 *
510 * In an UPDATE target list, 'name' is the name of the destination column,
511 * 'indirection' stores any subscripts attached to the destination, and
512 * 'val' is the expression to assign.
513 *
514 * See A_Indirection for more info about what can appear in 'indirection'.
515 */
516typedef struct ResTarget
517{
519 char *name; /* column name or NULL */
520 List *indirection; /* subscripts, field names, and '*', or NIL */
521 Node *val; /* the value expression to compute or assign */
522 ParseLoc location; /* token location, or -1 if unknown */
524
525/*
526 * MultiAssignRef - element of a row source expression for UPDATE
527 *
528 * In an UPDATE target list, when we have SET (a,b,c) = row-valued-expression,
529 * we generate separate ResTarget items for each of a,b,c. Their "val" trees
530 * are MultiAssignRef nodes numbered 1..n, linking to a common copy of the
531 * row-valued-expression (which parse analysis will process only once, when
532 * handling the MultiAssignRef with colno=1).
533 */
534typedef struct MultiAssignRef
535{
537 Node *source; /* the row-valued expression */
538 int colno; /* column number for this target (1..n) */
539 int ncolumns; /* number of targets in the construct */
541
542/*
543 * SortBy - for ORDER BY clause
544 */
545typedef struct SortBy
546{
548 Node *node; /* expression to sort on */
549 SortByDir sortby_dir; /* ASC/DESC/USING/default */
550 SortByNulls sortby_nulls; /* NULLS FIRST/LAST */
551 List *useOp; /* name of op to use, if SORTBY_USING */
552 ParseLoc location; /* operator location, or -1 if none/unknown */
554
555/*
556 * WindowDef - raw representation of WINDOW and OVER clauses
557 *
558 * For entries in a WINDOW list, "name" is the window name being defined.
559 * For OVER clauses, we use "name" for the "OVER window" syntax, or "refname"
560 * for the "OVER (window)" syntax, which is subtly different --- the latter
561 * implies overriding the window frame clause.
562 */
563typedef struct WindowDef
564{
566 char *name; /* window's own name */
567 char *refname; /* referenced window name, if any */
568 List *partitionClause; /* PARTITION BY expression list */
569 List *orderClause; /* ORDER BY (list of SortBy) */
570 int frameOptions; /* frame_clause options, see below */
571 Node *startOffset; /* expression for starting bound, if any */
572 Node *endOffset; /* expression for ending bound, if any */
573 ParseLoc location; /* parse location, or -1 if none/unknown */
575
576/*
577 * frameOptions is an OR of these bits. The NONDEFAULT and BETWEEN bits are
578 * used so that ruleutils.c can tell which properties were specified and
579 * which were defaulted; the correct behavioral bits must be set either way.
580 * The START_foo and END_foo options must come in pairs of adjacent bits for
581 * the convenience of gram.y, even though some of them are useless/invalid.
582 */
583#define FRAMEOPTION_NONDEFAULT 0x00001 /* any specified? */
584#define FRAMEOPTION_RANGE 0x00002 /* RANGE behavior */
585#define FRAMEOPTION_ROWS 0x00004 /* ROWS behavior */
586#define FRAMEOPTION_GROUPS 0x00008 /* GROUPS behavior */
587#define FRAMEOPTION_BETWEEN 0x00010 /* BETWEEN given? */
588#define FRAMEOPTION_START_UNBOUNDED_PRECEDING 0x00020 /* start is U. P. */
589#define FRAMEOPTION_END_UNBOUNDED_PRECEDING 0x00040 /* (disallowed) */
590#define FRAMEOPTION_START_UNBOUNDED_FOLLOWING 0x00080 /* (disallowed) */
591#define FRAMEOPTION_END_UNBOUNDED_FOLLOWING 0x00100 /* end is U. F. */
592#define FRAMEOPTION_START_CURRENT_ROW 0x00200 /* start is C. R. */
593#define FRAMEOPTION_END_CURRENT_ROW 0x00400 /* end is C. R. */
594#define FRAMEOPTION_START_OFFSET_PRECEDING 0x00800 /* start is O. P. */
595#define FRAMEOPTION_END_OFFSET_PRECEDING 0x01000 /* end is O. P. */
596#define FRAMEOPTION_START_OFFSET_FOLLOWING 0x02000 /* start is O. F. */
597#define FRAMEOPTION_END_OFFSET_FOLLOWING 0x04000 /* end is O. F. */
598#define FRAMEOPTION_EXCLUDE_CURRENT_ROW 0x08000 /* omit C.R. */
599#define FRAMEOPTION_EXCLUDE_GROUP 0x10000 /* omit C.R. & peers */
600#define FRAMEOPTION_EXCLUDE_TIES 0x20000 /* omit C.R.'s peers */
601
602#define FRAMEOPTION_START_OFFSET \
603 (FRAMEOPTION_START_OFFSET_PRECEDING | FRAMEOPTION_START_OFFSET_FOLLOWING)
604#define FRAMEOPTION_END_OFFSET \
605 (FRAMEOPTION_END_OFFSET_PRECEDING | FRAMEOPTION_END_OFFSET_FOLLOWING)
606#define FRAMEOPTION_EXCLUSION \
607 (FRAMEOPTION_EXCLUDE_CURRENT_ROW | FRAMEOPTION_EXCLUDE_GROUP | \
608 FRAMEOPTION_EXCLUDE_TIES)
609
610#define FRAMEOPTION_DEFAULTS \
611 (FRAMEOPTION_RANGE | FRAMEOPTION_START_UNBOUNDED_PRECEDING | \
612 FRAMEOPTION_END_CURRENT_ROW)
613
614/*
615 * RangeSubselect - subquery appearing in a FROM clause
616 */
617typedef struct RangeSubselect
618{
620 bool lateral; /* does it have LATERAL prefix? */
621 Node *subquery; /* the untransformed sub-select clause */
622 Alias *alias; /* table alias & optional column aliases */
624
625/*
626 * RangeFunction - function call appearing in a FROM clause
627 *
628 * functions is a List because we use this to represent the construct
629 * ROWS FROM(func1(...), func2(...), ...). Each element of this list is a
630 * two-element sublist, the first element being the untransformed function
631 * call tree, and the second element being a possibly-empty list of ColumnDef
632 * nodes representing any columndef list attached to that function within the
633 * ROWS FROM() syntax.
634 *
635 * alias and coldeflist represent any alias and/or columndef list attached
636 * at the top level. (We disallow coldeflist appearing both here and
637 * per-function, but that's checked in parse analysis, not by the grammar.)
638 */
639typedef struct RangeFunction
640{
642 bool lateral; /* does it have LATERAL prefix? */
643 bool ordinality; /* does it have WITH ORDINALITY suffix? */
644 bool is_rowsfrom; /* is result of ROWS FROM() syntax? */
645 List *functions; /* per-function information, see above */
646 Alias *alias; /* table alias & optional column aliases */
647 List *coldeflist; /* list of ColumnDef nodes to describe result
648 * of function returning RECORD */
650
651/*
652 * RangeTableFunc - raw form of "table functions" such as XMLTABLE
653 *
654 * Note: JSON_TABLE is also a "table function", but it uses JsonTable node,
655 * not RangeTableFunc.
656 */
657typedef struct RangeTableFunc
658{
660 bool lateral; /* does it have LATERAL prefix? */
661 Node *docexpr; /* document expression */
662 Node *rowexpr; /* row generator expression */
663 List *namespaces; /* list of namespaces as ResTarget */
664 List *columns; /* list of RangeTableFuncCol */
665 Alias *alias; /* table alias & optional column aliases */
666 ParseLoc location; /* token location, or -1 if unknown */
668
669/*
670 * RangeTableFuncCol - one column in a RangeTableFunc->columns
671 *
672 * If for_ordinality is true (FOR ORDINALITY), then the column is an int4
673 * column and the rest of the fields are ignored.
674 */
675typedef struct RangeTableFuncCol
676{
678 char *colname; /* name of generated column */
679 TypeName *typeName; /* type of generated column */
680 bool for_ordinality; /* does it have FOR ORDINALITY? */
681 bool is_not_null; /* does it have NOT NULL? */
682 Node *colexpr; /* column filter expression */
683 Node *coldefexpr; /* column default value expression */
684 ParseLoc location; /* token location, or -1 if unknown */
686
687/*
688 * RangeTableSample - TABLESAMPLE appearing in a raw FROM clause
689 *
690 * This node, appearing only in raw parse trees, represents
691 * <relation> TABLESAMPLE <method> (<params>) REPEATABLE (<num>)
692 * Currently, the <relation> can only be a RangeVar, but we might in future
693 * allow RangeSubselect and other options. Note that the RangeTableSample
694 * is wrapped around the node representing the <relation>, rather than being
695 * a subfield of it.
696 */
697typedef struct RangeTableSample
698{
700 Node *relation; /* relation to be sampled */
701 List *method; /* sampling method name (possibly qualified) */
702 List *args; /* argument(s) for sampling method */
703 Node *repeatable; /* REPEATABLE expression, or NULL if none */
704 ParseLoc location; /* method name location, or -1 if unknown */
706
707/*
708 * ColumnDef - column definition (used in various creates)
709 *
710 * If the column has a default value, we may have the value expression
711 * in either "raw" form (an untransformed parse tree) or "cooked" form
712 * (a post-parse-analysis, executable expression tree), depending on
713 * how this ColumnDef node was created (by parsing, or by inheritance
714 * from an existing relation). We should never have both in the same node!
715 *
716 * Similarly, we may have a COLLATE specification in either raw form
717 * (represented as a CollateClause with arg==NULL) or cooked form
718 * (the collation's OID).
719 *
720 * The constraints list may contain a CONSTR_DEFAULT item in a raw
721 * parsetree produced by gram.y, but transformCreateStmt will remove
722 * the item and set raw_default instead. CONSTR_DEFAULT items
723 * should not appear in any subsequent processing.
724 */
725typedef struct ColumnDef
726{
728 char *colname; /* name of column */
729 TypeName *typeName; /* type of column */
730 char *compression; /* compression method for column */
731 int16 inhcount; /* number of times column is inherited */
732 bool is_local; /* column has local (non-inherited) def'n */
733 bool is_not_null; /* NOT NULL constraint specified? */
734 bool is_from_type; /* column definition came from table type */
735 char storage; /* attstorage setting, or 0 for default */
736 char *storage_name; /* attstorage setting name or NULL for default */
737 Node *raw_default; /* default value (untransformed parse tree) */
738 Node *cooked_default; /* default value (transformed expr tree) */
739 char identity; /* attidentity setting */
740 RangeVar *identitySequence; /* to store identity sequence name for
741 * ALTER TABLE ... ADD COLUMN */
742 char generated; /* attgenerated setting */
743 CollateClause *collClause; /* untransformed COLLATE spec, if any */
744 Oid collOid; /* collation OID (InvalidOid if not set) */
745 List *constraints; /* other constraints on column */
746 List *fdwoptions; /* per-column FDW options */
747 ParseLoc location; /* parse location, or -1 if none/unknown */
749
750/*
751 * TableLikeClause - CREATE TABLE ( ... LIKE ... ) clause
752 */
753typedef struct TableLikeClause
754{
757 bits32 options; /* OR of TableLikeOption flags */
758 Oid relationOid; /* If table has been looked up, its OID */
760
761typedef enum TableLikeOption
762{
774
775/*
776 * IndexElem - index parameters (used in CREATE INDEX, and in ON CONFLICT)
777 *
778 * For a plain index attribute, 'name' is the name of the table column to
779 * index, and 'expr' is NULL. For an index expression, 'name' is NULL and
780 * 'expr' is the expression tree.
781 */
782typedef struct IndexElem
783{
785 char *name; /* name of attribute to index, or NULL */
786 Node *expr; /* expression to index, or NULL */
787 char *indexcolname; /* name for index column; NULL = default */
788 List *collation; /* name of collation; NIL = default */
789 List *opclass; /* name of desired opclass; NIL = default */
790 List *opclassopts; /* opclass-specific options, or NIL */
791 SortByDir ordering; /* ASC/DESC/default */
792 SortByNulls nulls_ordering; /* FIRST/LAST/default */
794
795/*
796 * DefElem - a generic "name = value" option definition
797 *
798 * In some contexts the name can be qualified. Also, certain SQL commands
799 * allow a SET/ADD/DROP action to be attached to option settings, so it's
800 * convenient to carry a field for that too. (Note: currently, it is our
801 * practice that the grammar allows namespace and action only in statements
802 * where they are relevant; C code can just ignore those fields in other
803 * statements.)
804 */
805typedef enum DefElemAction
806{
807 DEFELEM_UNSPEC, /* no action given */
812
813typedef struct DefElem
814{
816 char *defnamespace; /* NULL if unqualified name */
817 char *defname;
818 Node *arg; /* typically Integer, Float, String, or
819 * TypeName */
820 DefElemAction defaction; /* unspecified action, or SET/ADD/DROP */
821 ParseLoc location; /* token location, or -1 if unknown */
823
824/*
825 * LockingClause - raw representation of FOR [NO KEY] UPDATE/[KEY] SHARE
826 * options
827 *
828 * Note: lockedRels == NIL means "all relations in query". Otherwise it
829 * is a list of RangeVar nodes. (We use RangeVar mainly because it carries
830 * a location field --- currently, parse analysis insists on unqualified
831 * names in LockingClause.)
832 */
833typedef struct LockingClause
834{
836 List *lockedRels; /* FOR [KEY] UPDATE/SHARE relations */
838 LockWaitPolicy waitPolicy; /* NOWAIT and SKIP LOCKED */
840
841/*
842 * XMLSERIALIZE (in raw parse tree only)
843 */
844typedef struct XmlSerialize
845{
847 XmlOptionType xmloption; /* DOCUMENT or CONTENT */
850 bool indent; /* [NO] INDENT */
851 ParseLoc location; /* token location, or -1 if unknown */
853
854/* Partitioning related definitions */
855
856/*
857 * PartitionElem - parse-time representation of a single partition key
858 *
859 * expr can be either a raw expression tree or a parse-analyzed expression.
860 * We don't store these on-disk, though.
861 */
862typedef struct PartitionElem
863{
865 char *name; /* name of column to partition on, or NULL */
866 Node *expr; /* expression to partition on, or NULL */
867 List *collation; /* name of collation; NIL = default */
868 List *opclass; /* name of desired opclass; NIL = default */
869 ParseLoc location; /* token location, or -1 if unknown */
871
873{
878
879/*
880 * PartitionSpec - parse-time representation of a partition key specification
881 *
882 * This represents the key space we will be partitioning on.
883 */
884typedef struct PartitionSpec
885{
888 List *partParams; /* List of PartitionElems */
889 ParseLoc location; /* token location, or -1 if unknown */
891
892/*
893 * PartitionBoundSpec - a partition bound specification
894 *
895 * This represents the portion of the partition key space assigned to a
896 * particular partition. These are stored on disk in pg_class.relpartbound.
897 */
899{
901
902 char strategy; /* see PARTITION_STRATEGY codes above */
903 bool is_default; /* is it a default partition bound? */
904
905 /* Partitioning info for HASH strategy: */
908
909 /* Partitioning info for LIST strategy: */
910 List *listdatums; /* List of Consts (or A_Consts in raw tree) */
911
912 /* Partitioning info for RANGE strategy: */
913 List *lowerdatums; /* List of PartitionRangeDatums */
914 List *upperdatums; /* List of PartitionRangeDatums */
915
916 ParseLoc location; /* token location, or -1 if unknown */
917};
918
919/*
920 * PartitionRangeDatum - one of the values in a range partition bound
921 *
922 * This can be MINVALUE, MAXVALUE or a specific bounded value.
923 */
925{
926 PARTITION_RANGE_DATUM_MINVALUE = -1, /* less than any other value */
927 PARTITION_RANGE_DATUM_VALUE = 0, /* a specific (bounded) value */
928 PARTITION_RANGE_DATUM_MAXVALUE = 1, /* greater than any other value */
930
932{
934
936 Node *value; /* Const (or A_Const in raw tree), if kind is
937 * PARTITION_RANGE_DATUM_VALUE, else NULL */
938
939 ParseLoc location; /* token location, or -1 if unknown */
941
942/*
943 * PartitionCmd - info for ALTER TABLE/INDEX ATTACH/DETACH PARTITION commands
944 */
945typedef struct PartitionCmd
946{
948 RangeVar *name; /* name of partition to attach/detach */
949 PartitionBoundSpec *bound; /* FOR VALUES, if attaching */
952
953/****************************************************************************
954 * Nodes for a Query tree
955 ****************************************************************************/
956
957/*--------------------
958 * RangeTblEntry -
959 * A range table is a List of RangeTblEntry nodes.
960 *
961 * A range table entry may represent a plain relation, a sub-select in
962 * FROM, or the result of a JOIN clause. (Only explicit JOIN syntax
963 * produces an RTE, not the implicit join resulting from multiple FROM
964 * items. This is because we only need the RTE to deal with SQL features
965 * like outer joins and join-output-column aliasing.) Other special
966 * RTE types also exist, as indicated by RTEKind.
967 *
968 * Note that we consider RTE_RELATION to cover anything that has a pg_class
969 * entry. relkind distinguishes the sub-cases.
970 *
971 * alias is an Alias node representing the AS alias-clause attached to the
972 * FROM expression, or NULL if no clause.
973 *
974 * eref is the table reference name and column reference names (either
975 * real or aliases). Note that system columns (OID etc) are not included
976 * in the column list.
977 * eref->aliasname is required to be present, and should generally be used
978 * to identify the RTE for error messages etc.
979 *
980 * In RELATION RTEs, the colnames in both alias and eref are indexed by
981 * physical attribute number; this means there must be colname entries for
982 * dropped columns. When building an RTE we insert empty strings ("") for
983 * dropped columns. Note however that a stored rule may have nonempty
984 * colnames for columns dropped since the rule was created (and for that
985 * matter the colnames might be out of date due to column renamings).
986 * The same comments apply to FUNCTION RTEs when a function's return type
987 * is a named composite type.
988 *
989 * In JOIN RTEs, the colnames in both alias and eref are one-to-one with
990 * joinaliasvars entries. A JOIN RTE will omit columns of its inputs when
991 * those columns are known to be dropped at parse time. Again, however,
992 * a stored rule might contain entries for columns dropped since the rule
993 * was created. (This is only possible for columns not actually referenced
994 * in the rule.) When loading a stored rule, we replace the joinaliasvars
995 * items for any such columns with null pointers. (We can't simply delete
996 * them from the joinaliasvars list, because that would affect the attnums
997 * of Vars referencing the rest of the list.)
998 *
999 * inFromCl marks those range variables that are listed in the FROM clause.
1000 * It's false for RTEs that are added to a query behind the scenes, such
1001 * as the NEW and OLD variables for a rule, or the subqueries of a UNION.
1002 * This flag is not used during parsing (except in transformLockingClause,
1003 * q.v.); the parser now uses a separate "namespace" data structure to
1004 * control visibility. But it is needed by ruleutils.c to determine
1005 * whether RTEs should be shown in decompiled queries.
1006 *
1007 * securityQuals is a list of security barrier quals (boolean expressions),
1008 * to be tested in the listed order before returning a row from the
1009 * relation. It is always NIL in parser output. Entries are added by the
1010 * rewriter to implement security-barrier views and/or row-level security.
1011 * Note that the planner turns each boolean expression into an implicitly
1012 * AND'ed sublist, as is its usual habit with qualification expressions.
1013 *--------------------
1014 */
1015typedef enum RTEKind
1016{
1017 RTE_RELATION, /* ordinary relation reference */
1018 RTE_SUBQUERY, /* subquery in FROM */
1019 RTE_JOIN, /* join */
1020 RTE_FUNCTION, /* function in FROM */
1021 RTE_TABLEFUNC, /* TableFunc(.., column list) */
1022 RTE_VALUES, /* VALUES (<exprlist>), (<exprlist>), ... */
1023 RTE_CTE, /* common table expr (WITH list element) */
1024 RTE_NAMEDTUPLESTORE, /* tuplestore, e.g. for AFTER triggers */
1025 RTE_RESULT, /* RTE represents an empty FROM clause; such
1026 * RTEs are added by the planner, they're not
1027 * present during parsing or rewriting */
1028 RTE_GROUP, /* the grouping step */
1030
1031typedef struct RangeTblEntry
1032{
1033 pg_node_attr(custom_read_write)
1034
1035 NodeTag type;
1036
1037 /*
1038 * Fields valid in all RTEs:
1039 *
1040 * put alias + eref first to make dump more legible
1041 */
1042 /* user-written alias clause, if any */
1043 Alias *alias pg_node_attr(query_jumble_ignore);
1044 /* expanded reference names */
1045 Alias *eref pg_node_attr(query_jumble_ignore);
1046
1047 RTEKind rtekind; /* see above */
1048
1049 /*
1050 * Fields valid for a plain relation RTE (else zero):
1051 *
1052 * inh is true for relation references that should be expanded to include
1053 * inheritance children, if the rel has any. In the parser, this will
1054 * only be true for RTE_RELATION entries. The planner also uses this
1055 * field to mark RTE_SUBQUERY entries that contain UNION ALL queries that
1056 * it has flattened into pulled-up subqueries (creating a structure much
1057 * like the effects of inheritance).
1058 *
1059 * rellockmode is really LOCKMODE, but it's declared int to avoid having
1060 * to include lock-related headers here. It must be RowExclusiveLock if
1061 * the RTE is an INSERT/UPDATE/DELETE/MERGE target, else RowShareLock if
1062 * the RTE is a SELECT FOR UPDATE/FOR SHARE target, else AccessShareLock.
1063 *
1064 * Note: in some cases, rule expansion may result in RTEs that are marked
1065 * with RowExclusiveLock even though they are not the target of the
1066 * current query; this happens if a DO ALSO rule simply scans the original
1067 * target table. We leave such RTEs with their original lockmode so as to
1068 * avoid getting an additional, lesser lock.
1069 *
1070 * perminfoindex is 1-based index of the RTEPermissionInfo belonging to
1071 * this RTE in the containing struct's list of same; 0 if permissions need
1072 * not be checked for this RTE.
1073 *
1074 * As a special case, relid, relkind, rellockmode, and perminfoindex can
1075 * also be set (nonzero) in an RTE_SUBQUERY RTE. This occurs when we
1076 * convert an RTE_RELATION RTE naming a view into an RTE_SUBQUERY
1077 * containing the view's query. We still need to perform run-time locking
1078 * and permission checks on the view, even though it's not directly used
1079 * in the query anymore, and the most expedient way to do that is to
1080 * retain these fields from the old state of the RTE.
1081 *
1082 * As a special case, RTE_NAMEDTUPLESTORE can also set relid to indicate
1083 * that the tuple format of the tuplestore is the same as the referenced
1084 * relation. This allows plans referencing AFTER trigger transition
1085 * tables to be invalidated if the underlying table is altered.
1086 */
1087 /* OID of the relation */
1089 /* inheritance requested? */
1090 bool inh;
1091 /* relation kind (see pg_class.relkind) */
1092 char relkind pg_node_attr(query_jumble_ignore);
1093 /* lock level that query requires on the rel */
1094 int rellockmode pg_node_attr(query_jumble_ignore);
1095 /* index of RTEPermissionInfo entry, or 0 */
1096 Index perminfoindex pg_node_attr(query_jumble_ignore);
1097 /* sampling info, or NULL */
1099
1100 /*
1101 * Fields valid for a subquery RTE (else NULL):
1102 */
1103 /* the sub-query */
1105 /* is from security_barrier view? */
1106 bool security_barrier pg_node_attr(query_jumble_ignore);
1107
1108 /*
1109 * Fields valid for a join RTE (else NULL/zero):
1110 *
1111 * joinaliasvars is a list of (usually) Vars corresponding to the columns
1112 * of the join result. An alias Var referencing column K of the join
1113 * result can be replaced by the K'th element of joinaliasvars --- but to
1114 * simplify the task of reverse-listing aliases correctly, we do not do
1115 * that until planning time. In detail: an element of joinaliasvars can
1116 * be a Var of one of the join's input relations, or such a Var with an
1117 * implicit coercion to the join's output column type, or a COALESCE
1118 * expression containing the two input column Vars (possibly coerced).
1119 * Elements beyond the first joinmergedcols entries are always just Vars,
1120 * and are never referenced from elsewhere in the query (that is, join
1121 * alias Vars are generated only for merged columns). We keep these
1122 * entries only because they're needed in expandRTE() and similar code.
1123 *
1124 * Vars appearing within joinaliasvars are marked with varnullingrels sets
1125 * that describe the nulling effects of this join and lower ones. This is
1126 * essential for FULL JOIN cases, because the COALESCE expression only
1127 * describes the semantics correctly if its inputs have been nulled by the
1128 * join. For other cases, it allows expandRTE() to generate a valid
1129 * representation of the join's output without consulting additional
1130 * parser state.
1131 *
1132 * Within a Query loaded from a stored rule, it is possible for non-merged
1133 * joinaliasvars items to be null pointers, which are placeholders for
1134 * (necessarily unreferenced) columns dropped since the rule was made.
1135 * Also, once planning begins, joinaliasvars items can be almost anything,
1136 * as a result of subquery-flattening substitutions.
1137 *
1138 * joinleftcols is an integer list of physical column numbers of the left
1139 * join input rel that are included in the join; likewise joinrighttcols
1140 * for the right join input rel. (Which rels those are can be determined
1141 * from the associated JoinExpr.) If the join is USING/NATURAL, then the
1142 * first joinmergedcols entries in each list identify the merged columns.
1143 * The merged columns come first in the join output, then remaining
1144 * columns of the left input, then remaining columns of the right.
1145 *
1146 * Note that input columns could have been dropped after creation of a
1147 * stored rule, if they are not referenced in the query (in particular,
1148 * merged columns could not be dropped); this is not accounted for in
1149 * joinleftcols/joinrighttcols.
1150 */
1152 /* number of merged (JOIN USING) columns */
1153 int joinmergedcols pg_node_attr(query_jumble_ignore);
1154 /* list of alias-var expansions */
1155 List *joinaliasvars pg_node_attr(query_jumble_ignore);
1156 /* left-side input column numbers */
1157 List *joinleftcols pg_node_attr(query_jumble_ignore);
1158 /* right-side input column numbers */
1159 List *joinrightcols pg_node_attr(query_jumble_ignore);
1160
1161 /*
1162 * join_using_alias is an alias clause attached directly to JOIN/USING. It
1163 * is different from the alias field (below) in that it does not hide the
1164 * range variables of the tables being joined.
1165 */
1166 Alias *join_using_alias pg_node_attr(query_jumble_ignore);
1167
1168 /*
1169 * Fields valid for a function RTE (else NIL/zero):
1170 *
1171 * When funcordinality is true, the eref->colnames list includes an alias
1172 * for the ordinality column. The ordinality column is otherwise
1173 * implicit, and must be accounted for "by hand" in places such as
1174 * expandRTE().
1175 */
1176 /* list of RangeTblFunction nodes */
1178 /* is this called WITH ORDINALITY? */
1180
1181 /*
1182 * Fields valid for a TableFunc RTE (else NULL):
1183 */
1185
1186 /*
1187 * Fields valid for a values RTE (else NIL):
1188 */
1189 /* list of expression lists */
1191
1192 /*
1193 * Fields valid for a CTE RTE (else NULL/zero):
1194 */
1195 /* name of the WITH list item */
1196 char *ctename;
1197 /* number of query levels up */
1199 /* is this a recursive self-reference? */
1200 bool self_reference pg_node_attr(query_jumble_ignore);
1201
1202 /*
1203 * Fields valid for CTE, VALUES, ENR, and TableFunc RTEs (else NIL):
1204 *
1205 * We need these for CTE RTEs so that the types of self-referential
1206 * columns are well-defined. For VALUES RTEs, storing these explicitly
1207 * saves having to re-determine the info by scanning the values_lists. For
1208 * ENRs, we store the types explicitly here (we could get the information
1209 * from the catalogs if 'relid' was supplied, but we'd still need these
1210 * for TupleDesc-based ENRs, so we might as well always store the type
1211 * info here). For TableFuncs, these fields are redundant with data in
1212 * the TableFunc node, but keeping them here allows some code sharing with
1213 * the other cases.
1214 *
1215 * For ENRs only, we have to consider the possibility of dropped columns.
1216 * A dropped column is included in these lists, but it will have zeroes in
1217 * all three lists (as well as an empty-string entry in eref). Testing
1218 * for zero coltype is the standard way to detect a dropped column.
1219 */
1220 /* OID list of column type OIDs */
1221 List *coltypes pg_node_attr(query_jumble_ignore);
1222 /* integer list of column typmods */
1223 List *coltypmods pg_node_attr(query_jumble_ignore);
1224 /* OID list of column collation OIDs */
1225 List *colcollations pg_node_attr(query_jumble_ignore);
1226
1227 /*
1228 * Fields valid for ENR RTEs (else NULL/zero):
1229 */
1230 /* name of ephemeral named relation */
1231 char *enrname;
1232 /* estimated or actual from caller */
1233 Cardinality enrtuples pg_node_attr(query_jumble_ignore);
1234
1235 /*
1236 * Fields valid for a GROUP RTE (else NIL):
1237 */
1238 /* list of grouping expressions */
1239 List *groupexprs pg_node_attr(query_jumble_ignore);
1240
1241 /*
1242 * Fields valid in all RTEs:
1243 */
1244 /* was LATERAL specified? */
1245 bool lateral pg_node_attr(query_jumble_ignore);
1246 /* present in FROM clause? */
1247 bool inFromCl pg_node_attr(query_jumble_ignore);
1248 /* security barrier quals to apply, if any */
1249 List *securityQuals pg_node_attr(query_jumble_ignore);
1251
1252/*
1253 * RTEPermissionInfo
1254 * Per-relation information for permission checking. Added to the Query
1255 * node by the parser when adding the corresponding RTE to the query
1256 * range table and subsequently editorialized on by the rewriter if
1257 * needed after rule expansion.
1258 *
1259 * Only the relations directly mentioned in the query are checked for
1260 * access permissions by the core executor, so only their RTEPermissionInfos
1261 * are present in the Query. However, extensions may want to check inheritance
1262 * children too, depending on the value of rte->inh, so it's copied in 'inh'
1263 * for their perusal.
1264 *
1265 * requiredPerms and checkAsUser specify run-time access permissions checks
1266 * to be performed at query startup. The user must have *all* of the
1267 * permissions that are OR'd together in requiredPerms (never 0!). If
1268 * checkAsUser is not zero, then do the permissions checks using the access
1269 * rights of that user, not the current effective user ID. (This allows rules
1270 * to act as setuid gateways.)
1271 *
1272 * For SELECT/INSERT/UPDATE permissions, if the user doesn't have table-wide
1273 * permissions then it is sufficient to have the permissions on all columns
1274 * identified in selectedCols (for SELECT) and/or insertedCols and/or
1275 * updatedCols (INSERT with ON CONFLICT DO UPDATE may have all 3).
1276 * selectedCols, insertedCols and updatedCols are bitmapsets, which cannot have
1277 * negative integer members, so we subtract FirstLowInvalidHeapAttributeNumber
1278 * from column numbers before storing them in these fields. A whole-row Var
1279 * reference is represented by setting the bit for InvalidAttrNumber.
1280 *
1281 * updatedCols is also used in some other places, for example, to determine
1282 * which triggers to fire and in FDWs to know which changed columns they need
1283 * to ship off.
1284 */
1285typedef struct RTEPermissionInfo
1286{
1288
1289 Oid relid; /* relation OID */
1290 bool inh; /* separately check inheritance children? */
1291 AclMode requiredPerms; /* bitmask of required access permissions */
1292 Oid checkAsUser; /* if valid, check access as this role */
1293 Bitmapset *selectedCols; /* columns needing SELECT permission */
1294 Bitmapset *insertedCols; /* columns needing INSERT permission */
1295 Bitmapset *updatedCols; /* columns needing UPDATE permission */
1297
1298/*
1299 * RangeTblFunction -
1300 * RangeTblEntry subsidiary data for one function in a FUNCTION RTE.
1301 *
1302 * If the function had a column definition list (required for an
1303 * otherwise-unspecified RECORD result), funccolnames lists the names given
1304 * in the definition list, funccoltypes lists their declared column types,
1305 * funccoltypmods lists their typmods, funccolcollations their collations.
1306 * Otherwise, those fields are NIL.
1307 *
1308 * Notice we don't attempt to store info about the results of functions
1309 * returning named composite types, because those can change from time to
1310 * time. We do however remember how many columns we thought the type had
1311 * (including dropped columns!), so that we can successfully ignore any
1312 * columns added after the query was parsed.
1313 *
1314 * The query jumbling only needs to track the function expression.
1315 */
1316typedef struct RangeTblFunction
1317{
1319
1320 Node *funcexpr; /* expression tree for func call */
1321 /* number of columns it contributes to RTE */
1322 int funccolcount pg_node_attr(query_jumble_ignore);
1323 /* These fields record the contents of a column definition list, if any: */
1324 /* column names (list of String) */
1325 List *funccolnames pg_node_attr(query_jumble_ignore);
1326 /* OID list of column type OIDs */
1327 List *funccoltypes pg_node_attr(query_jumble_ignore);
1328 /* integer list of column typmods */
1329 List *funccoltypmods pg_node_attr(query_jumble_ignore);
1330 /* OID list of column collation OIDs */
1331 List *funccolcollations pg_node_attr(query_jumble_ignore);
1332
1333 /* This is set during planning for use by the executor: */
1334 /* PARAM_EXEC Param IDs affecting this func */
1335 Bitmapset *funcparams pg_node_attr(query_jumble_ignore);
1337
1338/*
1339 * TableSampleClause - TABLESAMPLE appearing in a transformed FROM clause
1340 *
1341 * Unlike RangeTableSample, this is a subnode of the relevant RangeTblEntry.
1342 */
1343typedef struct TableSampleClause
1344{
1346 Oid tsmhandler; /* OID of the tablesample handler function */
1347 List *args; /* tablesample argument expression(s) */
1348 Expr *repeatable; /* REPEATABLE expression, or NULL if none */
1350
1351/*
1352 * WithCheckOption -
1353 * representation of WITH CHECK OPTION checks to be applied to new tuples
1354 * when inserting/updating an auto-updatable view, or RLS WITH CHECK
1355 * policies to be applied when inserting/updating a relation with RLS.
1356 */
1357typedef enum WCOKind
1358{
1359 WCO_VIEW_CHECK, /* WCO on an auto-updatable view */
1360 WCO_RLS_INSERT_CHECK, /* RLS INSERT WITH CHECK policy */
1361 WCO_RLS_UPDATE_CHECK, /* RLS UPDATE WITH CHECK policy */
1362 WCO_RLS_CONFLICT_CHECK, /* RLS ON CONFLICT DO UPDATE USING policy */
1363 WCO_RLS_MERGE_UPDATE_CHECK, /* RLS MERGE UPDATE USING policy */
1364 WCO_RLS_MERGE_DELETE_CHECK, /* RLS MERGE DELETE USING policy */
1366
1367typedef struct WithCheckOption
1368{
1370 WCOKind kind; /* kind of WCO */
1371 char *relname; /* name of relation that specified the WCO */
1372 char *polname; /* name of RLS policy being checked */
1373 Node *qual; /* constraint qual to check */
1374 bool cascaded; /* true for a cascaded WCO on a view */
1376
1377/*
1378 * SortGroupClause -
1379 * representation of ORDER BY, GROUP BY, PARTITION BY,
1380 * DISTINCT, DISTINCT ON items
1381 *
1382 * You might think that ORDER BY is only interested in defining ordering,
1383 * and GROUP/DISTINCT are only interested in defining equality. However,
1384 * one way to implement grouping is to sort and then apply a "uniq"-like
1385 * filter. So it's also interesting to keep track of possible sort operators
1386 * for GROUP/DISTINCT, and in particular to try to sort for the grouping
1387 * in a way that will also yield a requested ORDER BY ordering. So we need
1388 * to be able to compare ORDER BY and GROUP/DISTINCT lists, which motivates
1389 * the decision to give them the same representation.
1390 *
1391 * tleSortGroupRef must match ressortgroupref of exactly one entry of the
1392 * query's targetlist; that is the expression to be sorted or grouped by.
1393 * eqop is the OID of the equality operator.
1394 * sortop is the OID of the ordering operator (a "<" or ">" operator),
1395 * or InvalidOid if not available.
1396 * nulls_first means about what you'd expect. If sortop is InvalidOid
1397 * then nulls_first is meaningless and should be set to false.
1398 * hashable is true if eqop is hashable (note this condition also depends
1399 * on the datatype of the input expression).
1400 *
1401 * In an ORDER BY item, all fields must be valid. (The eqop isn't essential
1402 * here, but it's cheap to get it along with the sortop, and requiring it
1403 * to be valid eases comparisons to grouping items.) Note that this isn't
1404 * actually enough information to determine an ordering: if the sortop is
1405 * collation-sensitive, a collation OID is needed too. We don't store the
1406 * collation in SortGroupClause because it's not available at the time the
1407 * parser builds the SortGroupClause; instead, consult the exposed collation
1408 * of the referenced targetlist expression to find out what it is.
1409 *
1410 * In a grouping item, eqop must be valid. If the eqop is a btree equality
1411 * operator, then sortop should be set to a compatible ordering operator.
1412 * We prefer to set eqop/sortop/nulls_first to match any ORDER BY item that
1413 * the query presents for the same tlist item. If there is none, we just
1414 * use the default ordering op for the datatype.
1415 *
1416 * If the tlist item's type has a hash opclass but no btree opclass, then
1417 * we will set eqop to the hash equality operator, sortop to InvalidOid,
1418 * and nulls_first to false. A grouping item of this kind can only be
1419 * implemented by hashing, and of course it'll never match an ORDER BY item.
1420 *
1421 * The hashable flag is provided since we generally have the requisite
1422 * information readily available when the SortGroupClause is constructed,
1423 * and it's relatively expensive to get it again later. Note there is no
1424 * need for a "sortable" flag since OidIsValid(sortop) serves the purpose.
1425 *
1426 * A query might have both ORDER BY and DISTINCT (or DISTINCT ON) clauses.
1427 * In SELECT DISTINCT, the distinctClause list is as long or longer than the
1428 * sortClause list, while in SELECT DISTINCT ON it's typically shorter.
1429 * The two lists must match up to the end of the shorter one --- the parser
1430 * rearranges the distinctClause if necessary to make this true. (This
1431 * restriction ensures that only one sort step is needed to both satisfy the
1432 * ORDER BY and set up for the Unique step. This is semantically necessary
1433 * for DISTINCT ON, and presents no real drawback for DISTINCT.)
1434 */
1435typedef struct SortGroupClause
1436{
1438 Index tleSortGroupRef; /* reference into targetlist */
1439 Oid eqop; /* the equality operator ('=' op) */
1440 Oid sortop; /* the ordering operator ('<' op), or 0 */
1441 bool reverse_sort; /* is sortop a "greater than" operator? */
1442 bool nulls_first; /* do NULLs come before normal values? */
1443 /* can eqop be implemented by hashing? */
1444 bool hashable pg_node_attr(query_jumble_ignore);
1446
1447/*
1448 * GroupingSet -
1449 * representation of CUBE, ROLLUP and GROUPING SETS clauses
1450 *
1451 * In a Query with grouping sets, the groupClause contains a flat list of
1452 * SortGroupClause nodes for each distinct expression used. The actual
1453 * structure of the GROUP BY clause is given by the groupingSets tree.
1454 *
1455 * In the raw parser output, GroupingSet nodes (of all types except SIMPLE
1456 * which is not used) are potentially mixed in with the expressions in the
1457 * groupClause of the SelectStmt. (An expression can't contain a GroupingSet,
1458 * but a list may mix GroupingSet and expression nodes.) At this stage, the
1459 * content of each node is a list of expressions, some of which may be RowExprs
1460 * which represent sublists rather than actual row constructors, and nested
1461 * GroupingSet nodes where legal in the grammar. The structure directly
1462 * reflects the query syntax.
1463 *
1464 * In parse analysis, the transformed expressions are used to build the tlist
1465 * and groupClause list (of SortGroupClause nodes), and the groupingSets tree
1466 * is eventually reduced to a fixed format:
1467 *
1468 * EMPTY nodes represent (), and obviously have no content
1469 *
1470 * SIMPLE nodes represent a list of one or more expressions to be treated as an
1471 * atom by the enclosing structure; the content is an integer list of
1472 * ressortgroupref values (see SortGroupClause)
1473 *
1474 * CUBE and ROLLUP nodes contain a list of one or more SIMPLE nodes.
1475 *
1476 * SETS nodes contain a list of EMPTY, SIMPLE, CUBE or ROLLUP nodes, but after
1477 * parse analysis they cannot contain more SETS nodes; enough of the syntactic
1478 * transforms of the spec have been applied that we no longer have arbitrarily
1479 * deep nesting (though we still preserve the use of cube/rollup).
1480 *
1481 * Note that if the groupingSets tree contains no SIMPLE nodes (only EMPTY
1482 * nodes at the leaves), then the groupClause will be empty, but this is still
1483 * an aggregation query (similar to using aggs or HAVING without GROUP BY).
1484 *
1485 * As an example, the following clause:
1486 *
1487 * GROUP BY GROUPING SETS ((a,b), CUBE(c,(d,e)))
1488 *
1489 * looks like this after raw parsing:
1490 *
1491 * SETS( RowExpr(a,b) , CUBE( c, RowExpr(d,e) ) )
1492 *
1493 * and parse analysis converts it to:
1494 *
1495 * SETS( SIMPLE(1,2), CUBE( SIMPLE(3), SIMPLE(4,5) ) )
1496 */
1498{
1505
1506typedef struct GroupingSet
1507{
1509 GroupingSetKind kind pg_node_attr(query_jumble_ignore);
1513
1514/*
1515 * WindowClause -
1516 * transformed representation of WINDOW and OVER clauses
1517 *
1518 * A parsed Query's windowClause list contains these structs. "name" is set
1519 * if the clause originally came from WINDOW, and is NULL if it originally
1520 * was an OVER clause (but note that we collapse out duplicate OVERs).
1521 * partitionClause and orderClause are lists of SortGroupClause structs.
1522 * partitionClause is sanitized by the query planner to remove any columns or
1523 * expressions belonging to redundant PathKeys.
1524 * If we have RANGE with offset PRECEDING/FOLLOWING, the semantics of that are
1525 * specified by startInRangeFunc/inRangeColl/inRangeAsc/inRangeNullsFirst
1526 * for the start offset, or endInRangeFunc/inRange* for the end offset.
1527 * winref is an ID number referenced by WindowFunc nodes; it must be unique
1528 * among the members of a Query's windowClause list.
1529 * When refname isn't null, the partitionClause is always copied from there;
1530 * the orderClause might or might not be copied (see copiedOrder); the framing
1531 * options are never copied, per spec.
1532 *
1533 * The information relevant for the query jumbling is the partition clause
1534 * type and its bounds.
1535 */
1536typedef struct WindowClause
1537{
1539 /* window name (NULL in an OVER clause) */
1540 char *name pg_node_attr(query_jumble_ignore);
1541 /* referenced window name, if any */
1542 char *refname pg_node_attr(query_jumble_ignore);
1543 List *partitionClause; /* PARTITION BY list */
1544 /* ORDER BY list */
1546 int frameOptions; /* frame_clause options, see WindowDef */
1547 Node *startOffset; /* expression for starting bound, if any */
1548 Node *endOffset; /* expression for ending bound, if any */
1549 /* in_range function for startOffset */
1550 Oid startInRangeFunc pg_node_attr(query_jumble_ignore);
1551 /* in_range function for endOffset */
1552 Oid endInRangeFunc pg_node_attr(query_jumble_ignore);
1553 /* collation for in_range tests */
1554 Oid inRangeColl pg_node_attr(query_jumble_ignore);
1555 /* use ASC sort order for in_range tests? */
1556 bool inRangeAsc pg_node_attr(query_jumble_ignore);
1557 /* nulls sort first for in_range tests? */
1558 bool inRangeNullsFirst pg_node_attr(query_jumble_ignore);
1559 Index winref; /* ID referenced by window functions */
1560 /* did we copy orderClause from refname? */
1561 bool copiedOrder pg_node_attr(query_jumble_ignore);
1563
1564/*
1565 * RowMarkClause -
1566 * parser output representation of FOR [KEY] UPDATE/SHARE clauses
1567 *
1568 * Query.rowMarks contains a separate RowMarkClause node for each relation
1569 * identified as a FOR [KEY] UPDATE/SHARE target. If one of these clauses
1570 * is applied to a subquery, we generate RowMarkClauses for all normal and
1571 * subquery rels in the subquery, but they are marked pushedDown = true to
1572 * distinguish them from clauses that were explicitly written at this query
1573 * level. Also, Query.hasForUpdate tells whether there were explicit FOR
1574 * UPDATE/SHARE/KEY SHARE clauses in the current query level.
1575 */
1576typedef struct RowMarkClause
1577{
1579 Index rti; /* range table index of target relation */
1581 LockWaitPolicy waitPolicy; /* NOWAIT and SKIP LOCKED */
1582 bool pushedDown; /* pushed down from higher query level? */
1584
1585/*
1586 * WithClause -
1587 * representation of WITH clause
1588 *
1589 * Note: WithClause does not propagate into the Query representation;
1590 * but CommonTableExpr does.
1591 */
1592typedef struct WithClause
1593{
1595 List *ctes; /* list of CommonTableExprs */
1596 bool recursive; /* true = WITH RECURSIVE */
1597 ParseLoc location; /* token location, or -1 if unknown */
1599
1600/*
1601 * InferClause -
1602 * ON CONFLICT unique index inference clause
1603 *
1604 * Note: InferClause does not propagate into the Query representation.
1605 */
1606typedef struct InferClause
1607{
1609 List *indexElems; /* IndexElems to infer unique index */
1610 Node *whereClause; /* qualification (partial-index predicate) */
1611 char *conname; /* Constraint name, or NULL if unnamed */
1612 ParseLoc location; /* token location, or -1 if unknown */
1614
1615/*
1616 * OnConflictClause -
1617 * representation of ON CONFLICT clause
1618 *
1619 * Note: OnConflictClause does not propagate into the Query representation.
1620 */
1621typedef struct OnConflictClause
1622{
1624 OnConflictAction action; /* DO NOTHING or UPDATE? */
1625 InferClause *infer; /* Optional index inference clause */
1626 List *targetList; /* the target list (of ResTarget) */
1627 Node *whereClause; /* qualifications */
1628 ParseLoc location; /* token location, or -1 if unknown */
1630
1631/*
1632 * CommonTableExpr -
1633 * representation of WITH list element
1634 */
1635
1636typedef enum CTEMaterialize
1637{
1638 CTEMaterializeDefault, /* no option specified */
1639 CTEMaterializeAlways, /* MATERIALIZED */
1640 CTEMaterializeNever, /* NOT MATERIALIZED */
1642
1643typedef struct CTESearchClause
1644{
1651
1652typedef struct CTECycleClause
1653{
1661 /* These fields are set during parse analysis: */
1662 Oid cycle_mark_type; /* common type of _value and _default */
1665 Oid cycle_mark_neop; /* <> operator for type */
1667
1668typedef struct CommonTableExpr
1669{
1671
1672 /*
1673 * Query name (never qualified). The string name is included in the query
1674 * jumbling because RTE_CTE RTEs need it.
1675 */
1676 char *ctename;
1677 /* optional list of column names */
1678 List *aliascolnames pg_node_attr(query_jumble_ignore);
1679 CTEMaterialize ctematerialized; /* is this an optimization fence? */
1680 /* SelectStmt/InsertStmt/etc before parse analysis, Query afterwards: */
1681 Node *ctequery; /* the CTE's subquery */
1682 CTESearchClause *search_clause pg_node_attr(query_jumble_ignore);
1683 CTECycleClause *cycle_clause pg_node_attr(query_jumble_ignore);
1684 ParseLoc location; /* token location, or -1 if unknown */
1685 /* These fields are set during parse analysis: */
1686 /* is this CTE actually recursive? */
1687 bool cterecursive pg_node_attr(query_jumble_ignore);
1688
1689 /*
1690 * Number of RTEs referencing this CTE (excluding internal
1691 * self-references), irrelevant for query jumbling.
1692 */
1693 int cterefcount pg_node_attr(query_jumble_ignore);
1694 /* list of output column names */
1695 List *ctecolnames pg_node_attr(query_jumble_ignore);
1696 /* OID list of output column type OIDs */
1697 List *ctecoltypes pg_node_attr(query_jumble_ignore);
1698 /* integer list of output column typmods */
1699 List *ctecoltypmods pg_node_attr(query_jumble_ignore);
1700 /* OID list of column collation OIDs */
1701 List *ctecolcollations pg_node_attr(query_jumble_ignore);
1703
1704/* Convenience macro to get the output tlist of a CTE's query */
1705#define GetCTETargetList(cte) \
1706 (AssertMacro(IsA((cte)->ctequery, Query)), \
1707 ((Query *) (cte)->ctequery)->commandType == CMD_SELECT ? \
1708 ((Query *) (cte)->ctequery)->targetList : \
1709 ((Query *) (cte)->ctequery)->returningList)
1710
1711/*
1712 * MergeWhenClause -
1713 * raw parser representation of a WHEN clause in a MERGE statement
1714 *
1715 * This is transformed into MergeAction by parse analysis
1716 */
1717typedef struct MergeWhenClause
1718{
1720 MergeMatchKind matchKind; /* MATCHED/NOT MATCHED BY SOURCE/TARGET */
1721 CmdType commandType; /* INSERT/UPDATE/DELETE/DO NOTHING */
1722 OverridingKind override; /* OVERRIDING clause */
1723 Node *condition; /* WHEN conditions (raw parser) */
1724 List *targetList; /* INSERT/UPDATE targetlist */
1725 /* the following members are only used in INSERT actions */
1726 List *values; /* VALUES to INSERT, or NULL */
1728
1729/*
1730 * TriggerTransition -
1731 * representation of transition row or table naming clause
1732 *
1733 * Only transition tables are initially supported in the syntax, and only for
1734 * AFTER triggers, but other permutations are accepted by the parser so we can
1735 * give a meaningful message from C code.
1736 */
1737typedef struct TriggerTransition
1738{
1740 char *name;
1741 bool isNew;
1744
1745/* Nodes for SQL/JSON support */
1746
1747/*
1748 * JsonOutput -
1749 * representation of JSON output clause (RETURNING type [FORMAT format])
1750 */
1751typedef struct JsonOutput
1752{
1754 TypeName *typeName; /* RETURNING type name, if specified */
1755 JsonReturning *returning; /* RETURNING FORMAT clause and type Oids */
1757
1758/*
1759 * JsonArgument -
1760 * representation of argument from JSON PASSING clause
1761 */
1762typedef struct JsonArgument
1763{
1765 JsonValueExpr *val; /* argument value expression */
1766 char *name; /* argument name */
1768
1769/*
1770 * JsonQuotes -
1771 * representation of [KEEP|OMIT] QUOTES clause for JSON_QUERY()
1772 */
1773typedef enum JsonQuotes
1774{
1775 JS_QUOTES_UNSPEC, /* unspecified */
1776 JS_QUOTES_KEEP, /* KEEP QUOTES */
1777 JS_QUOTES_OMIT, /* OMIT QUOTES */
1779
1780/*
1781 * JsonFuncExpr -
1782 * untransformed representation of function expressions for
1783 * SQL/JSON query functions
1784 */
1785typedef struct JsonFuncExpr
1786{
1788 JsonExprOp op; /* expression type */
1789 char *column_name; /* JSON_TABLE() column name or NULL if this is
1790 * not for a JSON_TABLE() */
1791 JsonValueExpr *context_item; /* context item expression */
1792 Node *pathspec; /* JSON path specification expression */
1793 List *passing; /* list of PASSING clause arguments, if any */
1794 JsonOutput *output; /* output clause, if specified */
1795 JsonBehavior *on_empty; /* ON EMPTY behavior */
1796 JsonBehavior *on_error; /* ON ERROR behavior */
1797 JsonWrapper wrapper; /* array wrapper behavior (JSON_QUERY only) */
1798 JsonQuotes quotes; /* omit or keep quotes? (JSON_QUERY only) */
1799 ParseLoc location; /* token location, or -1 if unknown */
1801
1802/*
1803 * JsonTablePathSpec
1804 * untransformed specification of JSON path expression with an optional
1805 * name
1806 */
1807typedef struct JsonTablePathSpec
1808{
1810
1812 char *name;
1814 ParseLoc location; /* location of 'string' */
1816
1817/*
1818 * JsonTable -
1819 * untransformed representation of JSON_TABLE
1820 */
1821typedef struct JsonTable
1822{
1824 JsonValueExpr *context_item; /* context item expression */
1825 JsonTablePathSpec *pathspec; /* JSON path specification */
1826 List *passing; /* list of PASSING clause arguments, if any */
1827 List *columns; /* list of JsonTableColumn */
1828 JsonBehavior *on_error; /* ON ERROR behavior */
1829 Alias *alias; /* table alias in FROM clause */
1830 bool lateral; /* does it have LATERAL prefix? */
1831 ParseLoc location; /* token location, or -1 if unknown */
1833
1834/*
1835 * JsonTableColumnType -
1836 * enumeration of JSON_TABLE column types
1837 */
1839{
1846
1847/*
1848 * JsonTableColumn -
1849 * untransformed representation of JSON_TABLE column
1850 */
1851typedef struct JsonTableColumn
1852{
1854 JsonTableColumnType coltype; /* column type */
1855 char *name; /* column name */
1856 TypeName *typeName; /* column type name */
1857 JsonTablePathSpec *pathspec; /* JSON path specification */
1858 JsonFormat *format; /* JSON format clause, if specified */
1859 JsonWrapper wrapper; /* WRAPPER behavior for formatted columns */
1860 JsonQuotes quotes; /* omit or keep quotes on scalar strings? */
1861 List *columns; /* nested columns */
1862 JsonBehavior *on_empty; /* ON EMPTY behavior */
1863 JsonBehavior *on_error; /* ON ERROR behavior */
1864 ParseLoc location; /* token location, or -1 if unknown */
1866
1867/*
1868 * JsonKeyValue -
1869 * untransformed representation of JSON object key-value pair for
1870 * JSON_OBJECT() and JSON_OBJECTAGG()
1871 */
1872typedef struct JsonKeyValue
1873{
1875 Expr *key; /* key expression */
1876 JsonValueExpr *value; /* JSON value expression */
1878
1879/*
1880 * JsonParseExpr -
1881 * untransformed representation of JSON()
1882 */
1883typedef struct JsonParseExpr
1884{
1886 JsonValueExpr *expr; /* string expression */
1887 JsonOutput *output; /* RETURNING clause, if specified */
1888 bool unique_keys; /* WITH UNIQUE KEYS? */
1889 ParseLoc location; /* token location, or -1 if unknown */
1891
1892/*
1893 * JsonScalarExpr -
1894 * untransformed representation of JSON_SCALAR()
1895 */
1896typedef struct JsonScalarExpr
1897{
1899 Expr *expr; /* scalar expression */
1900 JsonOutput *output; /* RETURNING clause, if specified */
1901 ParseLoc location; /* token location, or -1 if unknown */
1903
1904/*
1905 * JsonSerializeExpr -
1906 * untransformed representation of JSON_SERIALIZE() function
1907 */
1908typedef struct JsonSerializeExpr
1909{
1911 JsonValueExpr *expr; /* json value expression */
1912 JsonOutput *output; /* RETURNING clause, if specified */
1913 ParseLoc location; /* token location, or -1 if unknown */
1915
1916/*
1917 * JsonObjectConstructor -
1918 * untransformed representation of JSON_OBJECT() constructor
1919 */
1921{
1923 List *exprs; /* list of JsonKeyValue pairs */
1924 JsonOutput *output; /* RETURNING clause, if specified */
1925 bool absent_on_null; /* skip NULL values? */
1926 bool unique; /* check key uniqueness? */
1927 ParseLoc location; /* token location, or -1 if unknown */
1929
1930/*
1931 * JsonArrayConstructor -
1932 * untransformed representation of JSON_ARRAY(element,...) constructor
1933 */
1935{
1937 List *exprs; /* list of JsonValueExpr elements */
1938 JsonOutput *output; /* RETURNING clause, if specified */
1939 bool absent_on_null; /* skip NULL elements? */
1940 ParseLoc location; /* token location, or -1 if unknown */
1942
1943/*
1944 * JsonArrayQueryConstructor -
1945 * untransformed representation of JSON_ARRAY(subquery) constructor
1946 */
1948{
1950 Node *query; /* subquery */
1951 JsonOutput *output; /* RETURNING clause, if specified */
1952 JsonFormat *format; /* FORMAT clause for subquery, if specified */
1953 bool absent_on_null; /* skip NULL elements? */
1954 ParseLoc location; /* token location, or -1 if unknown */
1956
1957/*
1958 * JsonAggConstructor -
1959 * common fields of untransformed representation of
1960 * JSON_ARRAYAGG() and JSON_OBJECTAGG()
1961 */
1963{
1965 JsonOutput *output; /* RETURNING clause, if any */
1966 Node *agg_filter; /* FILTER clause, if any */
1967 List *agg_order; /* ORDER BY clause, if any */
1968 struct WindowDef *over; /* OVER clause, if any */
1969 ParseLoc location; /* token location, or -1 if unknown */
1971
1972/*
1973 * JsonObjectAgg -
1974 * untransformed representation of JSON_OBJECTAGG()
1975 */
1976typedef struct JsonObjectAgg
1977{
1979 JsonAggConstructor *constructor; /* common fields */
1980 JsonKeyValue *arg; /* object key-value pair */
1981 bool absent_on_null; /* skip NULL values? */
1982 bool unique; /* check key uniqueness? */
1984
1985/*
1986 * JsonArrayAgg -
1987 * untransformed representation of JSON_ARRAYAGG()
1988 */
1989typedef struct JsonArrayAgg
1990{
1992 JsonAggConstructor *constructor; /* common fields */
1993 JsonValueExpr *arg; /* array element expression */
1994 bool absent_on_null; /* skip NULL elements? */
1996
1997
1998/*****************************************************************************
1999 * Raw Grammar Output Statements
2000 *****************************************************************************/
2001
2002/*
2003 * RawStmt --- container for any one statement's raw parse tree
2004 *
2005 * Parse analysis converts a raw parse tree headed by a RawStmt node into
2006 * an analyzed statement headed by a Query node. For optimizable statements,
2007 * the conversion is complex. For utility statements, the parser usually just
2008 * transfers the raw parse tree (sans RawStmt) into the utilityStmt field of
2009 * the Query node, and all the useful work happens at execution time.
2010 *
2011 * stmt_location/stmt_len identify the portion of the source text string
2012 * containing this raw statement (useful for multi-statement strings).
2013 *
2014 * This is irrelevant for query jumbling, as this is not used in parsed
2015 * queries.
2016 */
2017typedef struct RawStmt
2018{
2019 pg_node_attr(no_query_jumble)
2020
2021 NodeTag type;
2022 Node *stmt; /* raw parse tree */
2023 ParseLoc stmt_location; /* start location, or -1 if unknown */
2024 ParseLoc stmt_len; /* length in bytes; 0 means "rest of string" */
2026
2027/*****************************************************************************
2028 * Optimizable Statements
2029 *****************************************************************************/
2030
2031/* ----------------------
2032 * Insert Statement
2033 *
2034 * The source expression is represented by SelectStmt for both the
2035 * SELECT and VALUES cases. If selectStmt is NULL, then the query
2036 * is INSERT ... DEFAULT VALUES.
2037 * ----------------------
2038 */
2039typedef struct InsertStmt
2040{
2042 RangeVar *relation; /* relation to insert into */
2043 List *cols; /* optional: names of the target columns */
2044 Node *selectStmt; /* the source SELECT/VALUES, or NULL */
2045 OnConflictClause *onConflictClause; /* ON CONFLICT clause */
2046 List *returningList; /* list of expressions to return */
2047 WithClause *withClause; /* WITH clause */
2048 OverridingKind override; /* OVERRIDING clause */
2049 ParseLoc stmt_location; /* start location, or -1 if unknown */
2050 ParseLoc stmt_len; /* length in bytes; 0 means "rest of string" */
2052
2053/* ----------------------
2054 * Delete Statement
2055 * ----------------------
2056 */
2057typedef struct DeleteStmt
2058{
2060 RangeVar *relation; /* relation to delete from */
2061 List *usingClause; /* optional using clause for more tables */
2062 Node *whereClause; /* qualifications */
2063 List *returningList; /* list of expressions to return */
2064 WithClause *withClause; /* WITH clause */
2065 ParseLoc stmt_location; /* start location, or -1 if unknown */
2066 ParseLoc stmt_len; /* length in bytes; 0 means "rest of string" */
2068
2069/* ----------------------
2070 * Update Statement
2071 * ----------------------
2072 */
2073typedef struct UpdateStmt
2074{
2076 RangeVar *relation; /* relation to update */
2077 List *targetList; /* the target list (of ResTarget) */
2078 Node *whereClause; /* qualifications */
2079 List *fromClause; /* optional from clause for more tables */
2080 List *returningList; /* list of expressions to return */
2081 WithClause *withClause; /* WITH clause */
2082 ParseLoc stmt_location; /* start location, or -1 if unknown */
2083 ParseLoc stmt_len; /* length in bytes; 0 means "rest of string" */
2085
2086/* ----------------------
2087 * Merge Statement
2088 * ----------------------
2089 */
2090typedef struct MergeStmt
2091{
2093 RangeVar *relation; /* target relation to merge into */
2094 Node *sourceRelation; /* source relation */
2095 Node *joinCondition; /* join condition between source and target */
2096 List *mergeWhenClauses; /* list of MergeWhenClause(es) */
2097 List *returningList; /* list of expressions to return */
2098 WithClause *withClause; /* WITH clause */
2099 ParseLoc stmt_location; /* start location, or -1 if unknown */
2100 ParseLoc stmt_len; /* length in bytes; 0 means "rest of string" */
2102
2103/* ----------------------
2104 * Select Statement
2105 *
2106 * A "simple" SELECT is represented in the output of gram.y by a single
2107 * SelectStmt node; so is a VALUES construct. A query containing set
2108 * operators (UNION, INTERSECT, EXCEPT) is represented by a tree of SelectStmt
2109 * nodes, in which the leaf nodes are component SELECTs and the internal nodes
2110 * represent UNION, INTERSECT, or EXCEPT operators. Using the same node
2111 * type for both leaf and internal nodes allows gram.y to stick ORDER BY,
2112 * LIMIT, etc, clause values into a SELECT statement without worrying
2113 * whether it is a simple or compound SELECT.
2114 * ----------------------
2115 */
2116typedef enum SetOperation
2117{
2123
2124typedef struct SelectStmt
2125{
2127
2128 /*
2129 * These fields are used only in "leaf" SelectStmts.
2130 */
2131 List *distinctClause; /* NULL, list of DISTINCT ON exprs, or
2132 * lcons(NIL,NIL) for all (SELECT DISTINCT) */
2133 IntoClause *intoClause; /* target for SELECT INTO */
2134 List *targetList; /* the target list (of ResTarget) */
2135 List *fromClause; /* the FROM clause */
2136 Node *whereClause; /* WHERE qualification */
2137 List *groupClause; /* GROUP BY clauses */
2138 bool groupDistinct; /* Is this GROUP BY DISTINCT? */
2139 Node *havingClause; /* HAVING conditional-expression */
2140 List *windowClause; /* WINDOW window_name AS (...), ... */
2141
2142 /*
2143 * In a "leaf" node representing a VALUES list, the above fields are all
2144 * null, and instead this field is set. Note that the elements of the
2145 * sublists are just expressions, without ResTarget decoration. Also note
2146 * that a list element can be DEFAULT (represented as a SetToDefault
2147 * node), regardless of the context of the VALUES list. It's up to parse
2148 * analysis to reject that where not valid.
2149 */
2150 List *valuesLists; /* untransformed list of expression lists */
2151
2152 /*
2153 * These fields are used in both "leaf" SelectStmts and upper-level
2154 * SelectStmts.
2155 */
2156 List *sortClause; /* sort clause (a list of SortBy's) */
2157 Node *limitOffset; /* # of result tuples to skip */
2158 Node *limitCount; /* # of result tuples to return */
2159 LimitOption limitOption; /* limit type */
2160 List *lockingClause; /* FOR UPDATE (list of LockingClause's) */
2161 WithClause *withClause; /* WITH clause */
2162
2163 /*
2164 * These fields are used only in upper-level SelectStmts.
2165 */
2166 SetOperation op; /* type of set op */
2167 bool all; /* ALL specified? */
2168 struct SelectStmt *larg; /* left child */
2169 struct SelectStmt *rarg; /* right child */
2170 ParseLoc stmt_location; /* start location, or -1 if unknown */
2171 ParseLoc stmt_len; /* length in bytes; 0 means "rest of string" */
2172 /* Eventually add fields for CORRESPONDING spec here */
2174
2175
2176/* ----------------------
2177 * Set Operation node for post-analysis query trees
2178 *
2179 * After parse analysis, a SELECT with set operations is represented by a
2180 * top-level Query node containing the leaf SELECTs as subqueries in its
2181 * range table. Its setOperations field shows the tree of set operations,
2182 * with leaf SelectStmt nodes replaced by RangeTblRef nodes, and internal
2183 * nodes replaced by SetOperationStmt nodes. Information about the output
2184 * column types is added, too. (Note that the child nodes do not necessarily
2185 * produce these types directly, but we've checked that their output types
2186 * can be coerced to the output column type.) Also, if it's not UNION ALL,
2187 * information about the types' sort/group semantics is provided in the form
2188 * of a SortGroupClause list (same representation as, eg, DISTINCT).
2189 * The resolved common column collations are provided too; but note that if
2190 * it's not UNION ALL, it's okay for a column to not have a common collation,
2191 * so a member of the colCollations list could be InvalidOid even though the
2192 * column has a collatable type.
2193 * ----------------------
2194 */
2195typedef struct SetOperationStmt
2196{
2198 SetOperation op; /* type of set op */
2199 bool all; /* ALL specified? */
2200 Node *larg; /* left child */
2201 Node *rarg; /* right child */
2202 /* Eventually add fields for CORRESPONDING spec here */
2203
2204 /* Fields derived during parse analysis (irrelevant for query jumbling): */
2205 /* OID list of output column type OIDs */
2206 List *colTypes pg_node_attr(query_jumble_ignore);
2207 /* integer list of output column typmods */
2208 List *colTypmods pg_node_attr(query_jumble_ignore);
2209 /* OID list of output column collation OIDs */
2210 List *colCollations pg_node_attr(query_jumble_ignore);
2211 /* a list of SortGroupClause's */
2212 List *groupClauses pg_node_attr(query_jumble_ignore);
2213 /* groupClauses is NIL if UNION ALL, but must be set otherwise */
2215
2216
2217/*
2218 * RETURN statement (inside SQL function body)
2219 */
2220typedef struct ReturnStmt
2221{
2225
2226
2227/* ----------------------
2228 * PL/pgSQL Assignment Statement
2229 *
2230 * Like SelectStmt, this is transformed into a SELECT Query.
2231 * However, the targetlist of the result looks more like an UPDATE.
2232 * ----------------------
2233 */
2234typedef struct PLAssignStmt
2235{
2237
2238 char *name; /* initial column name */
2239 List *indirection; /* subscripts and field names, if any */
2240 int nnames; /* number of names to use in ColumnRef */
2241 SelectStmt *val; /* the PL/pgSQL expression to assign */
2242 ParseLoc location; /* name's token location, or -1 if unknown */
2244
2245
2246/*****************************************************************************
2247 * Other Statements (no optimizations required)
2248 *
2249 * These are not touched by parser/analyze.c except to put them into
2250 * the utilityStmt field of a Query. This is eventually passed to
2251 * ProcessUtility (by-passing rewriting and planning). Some of the
2252 * statements do need attention from parse analysis, and this is
2253 * done by routines in parser/parse_utilcmd.c after ProcessUtility
2254 * receives the command for execution.
2255 * DECLARE CURSOR, EXPLAIN, and CREATE TABLE AS are special cases:
2256 * they contain optimizable statements, which get processed normally
2257 * by parser/analyze.c.
2258 *****************************************************************************/
2259
2260/*
2261 * When a command can act on several kinds of objects with only one
2262 * parse structure required, use these constants to designate the
2263 * object type. Note that commands typically don't support all the types.
2264 */
2265
2266typedef enum ObjectType
2267{
2272 OBJECT_ATTRIBUTE, /* type's attribute, when distinct from column */
2321
2322/* ----------------------
2323 * Create Schema Statement
2324 *
2325 * NOTE: the schemaElts list contains raw parsetrees for component statements
2326 * of the schema, such as CREATE TABLE, GRANT, etc. These are analyzed and
2327 * executed after the schema itself is created.
2328 * ----------------------
2329 */
2330typedef struct CreateSchemaStmt
2331{
2333 char *schemaname; /* the name of the schema to create */
2334 RoleSpec *authrole; /* the owner of the created schema */
2335 List *schemaElts; /* schema components (list of parsenodes) */
2336 bool if_not_exists; /* just do nothing if schema already exists? */
2338
2339typedef enum DropBehavior
2340{
2341 DROP_RESTRICT, /* drop fails if any dependent objects */
2342 DROP_CASCADE, /* remove dependent objects too */
2344
2345/* ----------------------
2346 * Alter Table
2347 * ----------------------
2348 */
2349typedef struct AlterTableStmt
2350{
2352 RangeVar *relation; /* table to work on */
2353 List *cmds; /* list of subcommands */
2354 ObjectType objtype; /* type of object */
2355 bool missing_ok; /* skip error if table missing */
2357
2358typedef enum AlterTableType
2359{
2360 AT_AddColumn, /* add column */
2361 AT_AddColumnToView, /* implicitly via CREATE OR REPLACE VIEW */
2362 AT_ColumnDefault, /* alter column default */
2363 AT_CookedColumnDefault, /* add a pre-cooked column default */
2364 AT_DropNotNull, /* alter column drop not null */
2365 AT_SetNotNull, /* alter column set not null */
2366 AT_SetExpression, /* alter column set expression */
2367 AT_DropExpression, /* alter column drop expression */
2368 AT_SetStatistics, /* alter column set statistics */
2369 AT_SetOptions, /* alter column set ( options ) */
2370 AT_ResetOptions, /* alter column reset ( options ) */
2371 AT_SetStorage, /* alter column set storage */
2372 AT_SetCompression, /* alter column set compression */
2373 AT_DropColumn, /* drop column */
2374 AT_AddIndex, /* add index */
2375 AT_ReAddIndex, /* internal to commands/tablecmds.c */
2376 AT_AddConstraint, /* add constraint */
2377 AT_ReAddConstraint, /* internal to commands/tablecmds.c */
2378 AT_ReAddDomainConstraint, /* internal to commands/tablecmds.c */
2379 AT_AlterConstraint, /* alter constraint */
2380 AT_ValidateConstraint, /* validate constraint */
2381 AT_AddIndexConstraint, /* add constraint using existing index */
2382 AT_DropConstraint, /* drop constraint */
2383 AT_ReAddComment, /* internal to commands/tablecmds.c */
2384 AT_AlterColumnType, /* alter column type */
2385 AT_AlterColumnGenericOptions, /* alter column OPTIONS (...) */
2386 AT_ChangeOwner, /* change owner */
2387 AT_ClusterOn, /* CLUSTER ON */
2388 AT_DropCluster, /* SET WITHOUT CLUSTER */
2389 AT_SetLogged, /* SET LOGGED */
2390 AT_SetUnLogged, /* SET UNLOGGED */
2391 AT_DropOids, /* SET WITHOUT OIDS */
2392 AT_SetAccessMethod, /* SET ACCESS METHOD */
2393 AT_SetTableSpace, /* SET TABLESPACE */
2394 AT_SetRelOptions, /* SET (...) -- AM specific parameters */
2395 AT_ResetRelOptions, /* RESET (...) -- AM specific parameters */
2396 AT_ReplaceRelOptions, /* replace reloption list in its entirety */
2397 AT_EnableTrig, /* ENABLE TRIGGER name */
2398 AT_EnableAlwaysTrig, /* ENABLE ALWAYS TRIGGER name */
2399 AT_EnableReplicaTrig, /* ENABLE REPLICA TRIGGER name */
2400 AT_DisableTrig, /* DISABLE TRIGGER name */
2401 AT_EnableTrigAll, /* ENABLE TRIGGER ALL */
2402 AT_DisableTrigAll, /* DISABLE TRIGGER ALL */
2403 AT_EnableTrigUser, /* ENABLE TRIGGER USER */
2404 AT_DisableTrigUser, /* DISABLE TRIGGER USER */
2405 AT_EnableRule, /* ENABLE RULE name */
2406 AT_EnableAlwaysRule, /* ENABLE ALWAYS RULE name */
2407 AT_EnableReplicaRule, /* ENABLE REPLICA RULE name */
2408 AT_DisableRule, /* DISABLE RULE name */
2409 AT_AddInherit, /* INHERIT parent */
2410 AT_DropInherit, /* NO INHERIT parent */
2411 AT_AddOf, /* OF <type_name> */
2412 AT_DropOf, /* NOT OF */
2413 AT_ReplicaIdentity, /* REPLICA IDENTITY */
2414 AT_EnableRowSecurity, /* ENABLE ROW SECURITY */
2415 AT_DisableRowSecurity, /* DISABLE ROW SECURITY */
2416 AT_ForceRowSecurity, /* FORCE ROW SECURITY */
2417 AT_NoForceRowSecurity, /* NO FORCE ROW SECURITY */
2418 AT_GenericOptions, /* OPTIONS (...) */
2419 AT_AttachPartition, /* ATTACH PARTITION */
2420 AT_DetachPartition, /* DETACH PARTITION */
2421 AT_DetachPartitionFinalize, /* DETACH PARTITION FINALIZE */
2422 AT_AddIdentity, /* ADD IDENTITY */
2423 AT_SetIdentity, /* SET identity column options */
2424 AT_DropIdentity, /* DROP IDENTITY */
2425 AT_ReAddStatistics, /* internal to commands/tablecmds.c */
2427
2429{
2432 char *name;
2434
2435typedef struct AlterTableCmd /* one subcommand of an ALTER TABLE */
2436{
2438 AlterTableType subtype; /* Type of table alteration to apply */
2439 char *name; /* column, constraint, or trigger to act on,
2440 * or tablespace, access method */
2441 int16 num; /* attribute number for columns referenced by
2442 * number */
2444 Node *def; /* definition of new column, index,
2445 * constraint, or parent table */
2446 DropBehavior behavior; /* RESTRICT or CASCADE for DROP cases */
2447 bool missing_ok; /* skip error if missing? */
2448 bool recurse; /* exec-time recursion */
2450
2451
2452/* ----------------------
2453 * Alter Collation
2454 * ----------------------
2455 */
2457{
2461
2462
2463/* ----------------------
2464 * Alter Domain
2465 *
2466 * The fields are used in different ways by the different variants of
2467 * this command.
2468 * ----------------------
2469 */
2470typedef struct AlterDomainStmt
2471{
2473 char subtype; /*------------
2474 * T = alter column default
2475 * N = alter column drop not null
2476 * O = alter column set not null
2477 * C = add constraint
2478 * X = drop constraint
2479 *------------
2480 */
2481 List *typeName; /* domain to work on */
2482 char *name; /* column or constraint name to act on */
2483 Node *def; /* definition of default or constraint */
2484 DropBehavior behavior; /* RESTRICT or CASCADE for DROP cases */
2485 bool missing_ok; /* skip error if missing? */
2487
2488
2489/* ----------------------
2490 * Grant|Revoke Statement
2491 * ----------------------
2492 */
2494{
2495 ACL_TARGET_OBJECT, /* grant on specific named object(s) */
2496 ACL_TARGET_ALL_IN_SCHEMA, /* grant on all objects in given schema(s) */
2497 ACL_TARGET_DEFAULTS, /* ALTER DEFAULT PRIVILEGES */
2499
2500typedef struct GrantStmt
2501{
2503 bool is_grant; /* true = GRANT, false = REVOKE */
2504 GrantTargetType targtype; /* type of the grant target */
2505 ObjectType objtype; /* kind of object being operated on */
2506 List *objects; /* list of RangeVar nodes, ObjectWithArgs
2507 * nodes, or plain names (as String values) */
2508 List *privileges; /* list of AccessPriv nodes */
2509 /* privileges == NIL denotes ALL PRIVILEGES */
2510 List *grantees; /* list of RoleSpec nodes */
2511 bool grant_option; /* grant or revoke grant option */
2513 DropBehavior behavior; /* drop behavior (for REVOKE) */
2515
2516/*
2517 * ObjectWithArgs represents a function/procedure/operator name plus parameter
2518 * identification.
2519 *
2520 * objargs includes only the types of the input parameters of the object.
2521 * In some contexts, that will be all we have, and it's enough to look up
2522 * objects according to the traditional Postgres rules (i.e., when only input
2523 * arguments matter).
2524 *
2525 * objfuncargs, if not NIL, carries the full specification of the parameter
2526 * list, including parameter mode annotations.
2527 *
2528 * Some grammar productions can set args_unspecified = true instead of
2529 * providing parameter info. In this case, lookup will succeed only if
2530 * the object name is unique. Note that otherwise, NIL parameter lists
2531 * mean zero arguments.
2532 */
2533typedef struct ObjectWithArgs
2534{
2536 List *objname; /* qualified name of function/operator */
2537 List *objargs; /* list of Typename nodes (input args only) */
2538 List *objfuncargs; /* list of FunctionParameter nodes */
2539 bool args_unspecified; /* argument list was omitted? */
2541
2542/*
2543 * An access privilege, with optional list of column names
2544 * priv_name == NULL denotes ALL PRIVILEGES (only used with a column list)
2545 * cols == NIL denotes "all columns"
2546 * Note that simple "ALL PRIVILEGES" is represented as a NIL list, not
2547 * an AccessPriv with both fields null.
2548 */
2549typedef struct AccessPriv
2550{
2552 char *priv_name; /* string name of privilege */
2553 List *cols; /* list of String */
2555
2556/* ----------------------
2557 * Grant/Revoke Role Statement
2558 *
2559 * Note: because of the parsing ambiguity with the GRANT <privileges>
2560 * statement, granted_roles is a list of AccessPriv; the execution code
2561 * should complain if any column lists appear. grantee_roles is a list
2562 * of role names, as String values.
2563 * ----------------------
2564 */
2565typedef struct GrantRoleStmt
2566{
2568 List *granted_roles; /* list of roles to be granted/revoked */
2569 List *grantee_roles; /* list of member roles to add/delete */
2570 bool is_grant; /* true = GRANT, false = REVOKE */
2571 List *opt; /* options e.g. WITH GRANT OPTION */
2572 RoleSpec *grantor; /* set grantor to other than current role */
2573 DropBehavior behavior; /* drop behavior (for REVOKE) */
2575
2576/* ----------------------
2577 * Alter Default Privileges Statement
2578 * ----------------------
2579 */
2581{
2583 List *options; /* list of DefElem */
2584 GrantStmt *action; /* GRANT/REVOKE action (with objects=NIL) */
2586
2587/* ----------------------
2588 * Copy Statement
2589 *
2590 * We support "COPY relation FROM file", "COPY relation TO file", and
2591 * "COPY (query) TO file". In any given CopyStmt, exactly one of "relation"
2592 * and "query" must be non-NULL.
2593 * ----------------------
2594 */
2595typedef struct CopyStmt
2596{
2598 RangeVar *relation; /* the relation to copy */
2599 Node *query; /* the query (SELECT or DML statement with
2600 * RETURNING) to copy, as a raw parse tree */
2601 List *attlist; /* List of column names (as Strings), or NIL
2602 * for all columns */
2603 bool is_from; /* TO or FROM */
2604 bool is_program; /* is 'filename' a program to popen? */
2605 char *filename; /* filename, or NULL for STDIN/STDOUT */
2606 List *options; /* List of DefElem nodes */
2607 Node *whereClause; /* WHERE condition (or NULL) */
2609
2610/* ----------------------
2611 * SET Statement (includes RESET)
2612 *
2613 * "SET var TO DEFAULT" and "RESET var" are semantically equivalent, but we
2614 * preserve the distinction in VariableSetKind for CreateCommandTag().
2615 * ----------------------
2616 */
2618{
2619 VAR_SET_VALUE, /* SET var = value */
2620 VAR_SET_DEFAULT, /* SET var TO DEFAULT */
2621 VAR_SET_CURRENT, /* SET var FROM CURRENT */
2622 VAR_SET_MULTI, /* special case for SET TRANSACTION ... */
2623 VAR_RESET, /* RESET var */
2624 VAR_RESET_ALL, /* RESET ALL */
2626
2627typedef struct VariableSetStmt
2628{
2629 pg_node_attr(custom_query_jumble)
2630
2631 NodeTag type;
2633 /* variable to be set */
2634 char *name;
2635 /* List of A_Const nodes */
2637
2638 /*
2639 * True if arguments should be accounted for in query jumbling. We use a
2640 * separate flag rather than query_jumble_ignore on "args" as several
2641 * grammar flavors of SET rely on a list of values that are parsed
2642 * directly from the grammar's keywords.
2643 */
2645 /* SET LOCAL? */
2647 /* token location, or -1 if unknown */
2648 ParseLoc location pg_node_attr(query_jumble_location);
2650
2651/* ----------------------
2652 * Show Statement
2653 * ----------------------
2654 */
2655typedef struct VariableShowStmt
2656{
2658 char *name;
2660
2661/* ----------------------
2662 * Create Table Statement
2663 *
2664 * NOTE: in the raw gram.y output, ColumnDef and Constraint nodes are
2665 * intermixed in tableElts, and constraints and nnconstraints are NIL. After
2666 * parse analysis, tableElts contains just ColumnDefs, nnconstraints contains
2667 * Constraint nodes of CONSTR_NOTNULL type from various sources, and
2668 * constraints contains just CONSTR_CHECK Constraint nodes.
2669 * ----------------------
2670 */
2671
2672typedef struct CreateStmt
2673{
2675 RangeVar *relation; /* relation to create */
2676 List *tableElts; /* column definitions (list of ColumnDef) */
2677 List *inhRelations; /* relations to inherit from (list of
2678 * RangeVar) */
2679 PartitionBoundSpec *partbound; /* FOR VALUES clause */
2680 PartitionSpec *partspec; /* PARTITION BY clause */
2681 TypeName *ofTypename; /* OF typename */
2682 List *constraints; /* constraints (list of Constraint nodes) */
2683 List *nnconstraints; /* NOT NULL constraints (ditto) */
2684 List *options; /* options from WITH clause */
2685 OnCommitAction oncommit; /* what do we do at COMMIT? */
2686 char *tablespacename; /* table space to use, or NULL */
2687 char *accessMethod; /* table access method */
2688 bool if_not_exists; /* just do nothing if it already exists? */
2690
2691/* ----------
2692 * Definitions for constraints in CreateStmt
2693 *
2694 * Note that column defaults are treated as a type of constraint,
2695 * even though that's a bit odd semantically.
2696 *
2697 * For constraints that use expressions (CONSTR_CHECK, CONSTR_DEFAULT)
2698 * we may have the expression in either "raw" form (an untransformed
2699 * parse tree) or "cooked" form (the nodeToString representation of
2700 * an executable expression tree), depending on how this Constraint
2701 * node was created (by parsing, or by inheritance from an existing
2702 * relation). We should never have both in the same node!
2703 *
2704 * FKCONSTR_ACTION_xxx values are stored into pg_constraint.confupdtype
2705 * and pg_constraint.confdeltype columns; FKCONSTR_MATCH_xxx values are
2706 * stored into pg_constraint.confmatchtype. Changing the code values may
2707 * require an initdb!
2708 *
2709 * If skip_validation is true then we skip checking that the existing rows
2710 * in the table satisfy the constraint, and just install the catalog entries
2711 * for the constraint. A new FK constraint is marked as valid iff
2712 * initially_valid is true. (Usually skip_validation and initially_valid
2713 * are inverses, but we can set both true if the table is known empty.)
2714 *
2715 * Constraint attributes (DEFERRABLE etc) are initially represented as
2716 * separate Constraint nodes for simplicity of parsing. parse_utilcmd.c makes
2717 * a pass through the constraints list to insert the info into the appropriate
2718 * Constraint node.
2719 * ----------
2720 */
2721
2722typedef enum ConstrType /* types of constraints */
2723{
2724 CONSTR_NULL, /* not standard SQL, but a lot of people
2725 * expect it */
2735 CONSTR_ATTR_DEFERRABLE, /* attributes for previous constraint node */
2740
2741/* Foreign key action codes */
2742#define FKCONSTR_ACTION_NOACTION 'a'
2743#define FKCONSTR_ACTION_RESTRICT 'r'
2744#define FKCONSTR_ACTION_CASCADE 'c'
2745#define FKCONSTR_ACTION_SETNULL 'n'
2746#define FKCONSTR_ACTION_SETDEFAULT 'd'
2747
2748/* Foreign key matchtype codes */
2749#define FKCONSTR_MATCH_FULL 'f'
2750#define FKCONSTR_MATCH_PARTIAL 'p'
2751#define FKCONSTR_MATCH_SIMPLE 's'
2752
2753typedef struct Constraint
2754{
2756 ConstrType contype; /* see above */
2757 char *conname; /* Constraint name, or NULL if unnamed */
2758 bool deferrable; /* DEFERRABLE? */
2759 bool initdeferred; /* INITIALLY DEFERRED? */
2760 bool skip_validation; /* skip validation of existing rows? */
2761 bool initially_valid; /* mark the new constraint as valid? */
2762 bool is_no_inherit; /* is constraint non-inheritable? */
2763 Node *raw_expr; /* CHECK or DEFAULT expression, as
2764 * untransformed parse tree */
2765 char *cooked_expr; /* CHECK or DEFAULT expression, as
2766 * nodeToString representation */
2767 char generated_when; /* ALWAYS or BY DEFAULT */
2768 bool nulls_not_distinct; /* null treatment for UNIQUE constraints */
2769 List *keys; /* String nodes naming referenced key
2770 * column(s); for UNIQUE/PK/NOT NULL */
2771 bool without_overlaps; /* WITHOUT OVERLAPS specified */
2772 List *including; /* String nodes naming referenced nonkey
2773 * column(s); for UNIQUE/PK */
2774 List *exclusions; /* list of (IndexElem, operator name) pairs;
2775 * for exclusion constraints */
2776 List *options; /* options from WITH clause */
2777 char *indexname; /* existing index to use; otherwise NULL */
2778 char *indexspace; /* index tablespace; NULL for default */
2779 bool reset_default_tblspc; /* reset default_tablespace prior to
2780 * creating the index */
2781 char *access_method; /* index access method; NULL for default */
2782 Node *where_clause; /* partial index predicate */
2783
2784 /* Fields used for FOREIGN KEY constraints: */
2785 RangeVar *pktable; /* Primary key table */
2786 List *fk_attrs; /* Attributes of foreign key */
2787 List *pk_attrs; /* Corresponding attrs in PK table */
2788 bool fk_with_period; /* Last attribute of FK uses PERIOD */
2789 bool pk_with_period; /* Last attribute of PK uses PERIOD */
2790 char fk_matchtype; /* FULL, PARTIAL, SIMPLE */
2791 char fk_upd_action; /* ON UPDATE action */
2792 char fk_del_action; /* ON DELETE action */
2793 List *fk_del_set_cols; /* ON DELETE SET NULL/DEFAULT (col1, col2) */
2794 List *old_conpfeqop; /* pg_constraint.conpfeqop of my former self */
2795 Oid old_pktable_oid; /* pg_constraint.confrelid of my former
2796 * self */
2797
2798 ParseLoc location; /* token location, or -1 if unknown */
2800
2801/* ----------------------
2802 * Create/Drop Table Space Statements
2803 * ----------------------
2804 */
2805
2807{
2814
2816{
2819 bool missing_ok; /* skip error if missing? */
2821
2823{
2829
2831{
2834 ObjectType objtype; /* Object type to move */
2835 List *roles; /* List of roles to move objects of */
2839
2840/* ----------------------
2841 * Create/Alter Extension Statements
2842 * ----------------------
2843 */
2844
2846{
2848 char *extname;
2849 bool if_not_exists; /* just do nothing if it already exists? */
2850 List *options; /* List of DefElem nodes */
2852
2853/* Only used for ALTER EXTENSION UPDATE; later might need an action field */
2855{
2857 char *extname;
2858 List *options; /* List of DefElem nodes */
2860
2862{
2864 char *extname; /* Extension's name */
2865 int action; /* +1 = add object, -1 = drop object */
2866 ObjectType objtype; /* Object's type */
2867 Node *object; /* Qualified name of the object */
2869
2870/* ----------------------
2871 * Create/Alter FOREIGN DATA WRAPPER Statements
2872 * ----------------------
2873 */
2874
2875typedef struct CreateFdwStmt
2876{
2878 char *fdwname; /* foreign-data wrapper name */
2879 List *func_options; /* HANDLER/VALIDATOR options */
2880 List *options; /* generic options to FDW */
2882
2883typedef struct AlterFdwStmt
2884{
2886 char *fdwname; /* foreign-data wrapper name */
2887 List *func_options; /* HANDLER/VALIDATOR options */
2888 List *options; /* generic options to FDW */
2890
2891/* ----------------------
2892 * Create/Alter FOREIGN SERVER Statements
2893 * ----------------------
2894 */
2895
2897{
2899 char *servername; /* server name */
2900 char *servertype; /* optional server type */
2901 char *version; /* optional server version */
2902 char *fdwname; /* FDW name */
2903 bool if_not_exists; /* just do nothing if it already exists? */
2904 List *options; /* generic options to server */
2906
2908{
2910 char *servername; /* server name */
2911 char *version; /* optional server version */
2912 List *options; /* generic options to server */
2913 bool has_version; /* version specified */
2915
2916/* ----------------------
2917 * Create FOREIGN TABLE Statement
2918 * ----------------------
2919 */
2920
2922{
2927
2928/* ----------------------
2929 * Create/Drop USER MAPPING Statements
2930 * ----------------------
2931 */
2932
2934{
2936 RoleSpec *user; /* user role */
2937 char *servername; /* server name */
2938 bool if_not_exists; /* just do nothing if it already exists? */
2939 List *options; /* generic options to server */
2941
2943{
2945 RoleSpec *user; /* user role */
2946 char *servername; /* server name */
2947 List *options; /* generic options to server */
2949
2951{
2953 RoleSpec *user; /* user role */
2954 char *servername; /* server name */
2955 bool missing_ok; /* ignore missing mappings */
2957
2958/* ----------------------
2959 * Import Foreign Schema Statement
2960 * ----------------------
2961 */
2962
2964{
2965 FDW_IMPORT_SCHEMA_ALL, /* all relations wanted */
2966 FDW_IMPORT_SCHEMA_LIMIT_TO, /* include only listed tables in import */
2967 FDW_IMPORT_SCHEMA_EXCEPT, /* exclude listed tables from import */
2969
2971{
2973 char *server_name; /* FDW server name */
2974 char *remote_schema; /* remote schema name to query */
2975 char *local_schema; /* local schema to create objects in */
2976 ImportForeignSchemaType list_type; /* type of table list */
2977 List *table_list; /* List of RangeVar */
2978 List *options; /* list of options to pass to FDW */
2980
2981/*----------------------
2982 * Create POLICY Statement
2983 *----------------------
2984 */
2985typedef struct CreatePolicyStmt
2986{
2988 char *policy_name; /* Policy's name */
2989 RangeVar *table; /* the table name the policy applies to */
2990 char *cmd_name; /* the command name the policy applies to */
2991 bool permissive; /* restrictive or permissive policy */
2992 List *roles; /* the roles associated with the policy */
2993 Node *qual; /* the policy's condition */
2994 Node *with_check; /* the policy's WITH CHECK condition. */
2996
2997/*----------------------
2998 * Alter POLICY Statement
2999 *----------------------
3000 */
3001typedef struct AlterPolicyStmt
3002{
3004 char *policy_name; /* Policy's name */
3005 RangeVar *table; /* the table name the policy applies to */
3006 List *roles; /* the roles associated with the policy */
3007 Node *qual; /* the policy's condition */
3008 Node *with_check; /* the policy's WITH CHECK condition. */
3010
3011/*----------------------
3012 * Create ACCESS METHOD Statement
3013 *----------------------
3014 */
3015typedef struct CreateAmStmt
3016{
3018 char *amname; /* access method name */
3019 List *handler_name; /* handler function name */
3020 char amtype; /* type of access method */
3022
3023/* ----------------------
3024 * Create TRIGGER Statement
3025 * ----------------------
3026 */
3027typedef struct CreateTrigStmt
3028{
3030 bool replace; /* replace trigger if already exists */
3031 bool isconstraint; /* This is a constraint trigger */
3032 char *trigname; /* TRIGGER's name */
3033 RangeVar *relation; /* relation trigger is on */
3034 List *funcname; /* qual. name of function to call */
3035 List *args; /* list of String or NIL */
3036 bool row; /* ROW/STATEMENT */
3037 /* timing uses the TRIGGER_TYPE bits defined in catalog/pg_trigger.h */
3038 int16 timing; /* BEFORE, AFTER, or INSTEAD */
3039 /* events uses the TRIGGER_TYPE bits defined in catalog/pg_trigger.h */
3040 int16 events; /* "OR" of INSERT/UPDATE/DELETE/TRUNCATE */
3041 List *columns; /* column names, or NIL for all columns */
3042 Node *whenClause; /* qual expression, or NULL if none */
3043 /* explicitly named transition data */
3044 List *transitionRels; /* TriggerTransition nodes, or NIL if none */
3045 /* The remaining fields are only used for constraint triggers */
3046 bool deferrable; /* [NOT] DEFERRABLE */
3047 bool initdeferred; /* INITIALLY {DEFERRED|IMMEDIATE} */
3048 RangeVar *constrrel; /* opposite relation, if RI trigger */
3050
3051/* ----------------------
3052 * Create EVENT TRIGGER Statement
3053 * ----------------------
3054 */
3056{
3058 char *trigname; /* TRIGGER's name */
3059 char *eventname; /* event's identifier */
3060 List *whenclause; /* list of DefElems indicating filtering */
3061 List *funcname; /* qual. name of function to call */
3063
3064/* ----------------------
3065 * Alter EVENT TRIGGER Statement
3066 * ----------------------
3067 */
3069{
3071 char *trigname; /* TRIGGER's name */
3072 char tgenabled; /* trigger's firing configuration WRT
3073 * session_replication_role */
3075
3076/* ----------------------
3077 * Create LANGUAGE Statements
3078 * ----------------------
3079 */
3080typedef struct CreatePLangStmt
3081{
3083 bool replace; /* T => replace if already exists */
3084 char *plname; /* PL name */
3085 List *plhandler; /* PL call handler function (qual. name) */
3086 List *plinline; /* optional inline function (qual. name) */
3087 List *plvalidator; /* optional validator function (qual. name) */
3088 bool pltrusted; /* PL is trusted */
3090
3091/* ----------------------
3092 * Create/Alter/Drop Role Statements
3093 *
3094 * Note: these node types are also used for the backwards-compatible
3095 * Create/Alter/Drop User/Group statements. In the ALTER and DROP cases
3096 * there's really no need to distinguish what the original spelling was,
3097 * but for CREATE we mark the type because the defaults vary.
3098 * ----------------------
3099 */
3100typedef enum RoleStmtType
3101{
3106
3107typedef struct CreateRoleStmt
3108{
3110 RoleStmtType stmt_type; /* ROLE/USER/GROUP */
3111 char *role; /* role name */
3112 List *options; /* List of DefElem nodes */
3114
3115typedef struct AlterRoleStmt
3116{
3118 RoleSpec *role; /* role */
3119 List *options; /* List of DefElem nodes */
3120 int action; /* +1 = add members, -1 = drop members */
3122
3123typedef struct AlterRoleSetStmt
3124{
3126 RoleSpec *role; /* role */
3127 char *database; /* database name, or NULL */
3128 VariableSetStmt *setstmt; /* SET or RESET subcommand */
3130
3131typedef struct DropRoleStmt
3132{
3134 List *roles; /* List of roles to remove */
3135 bool missing_ok; /* skip error if a role is missing? */
3137
3138/* ----------------------
3139 * {Create|Alter} SEQUENCE Statement
3140 * ----------------------
3141 */
3142
3143typedef struct CreateSeqStmt
3144{
3146 RangeVar *sequence; /* the sequence to create */
3148 Oid ownerId; /* ID of owner, or InvalidOid for default */
3150 bool if_not_exists; /* just do nothing if it already exists? */
3152
3153typedef struct AlterSeqStmt
3154{
3156 RangeVar *sequence; /* the sequence to alter */
3159 bool missing_ok; /* skip error if a role is missing? */
3161
3162/* ----------------------
3163 * Create {Aggregate|Operator|Type} Statement
3164 * ----------------------
3165 */
3166typedef struct DefineStmt
3167{
3169 ObjectType kind; /* aggregate, operator, type */
3170 bool oldstyle; /* hack to signal old CREATE AGG syntax */
3171 List *defnames; /* qualified name (list of String) */
3172 List *args; /* a list of TypeName (if needed) */
3173 List *definition; /* a list of DefElem */
3174 bool if_not_exists; /* just do nothing if it already exists? */
3175 bool replace; /* replace if already exists? */
3177
3178/* ----------------------
3179 * Create Domain Statement
3180 * ----------------------
3181 */
3182typedef struct CreateDomainStmt
3183{
3185 List *domainname; /* qualified name (list of String) */
3186 TypeName *typeName; /* the base type */
3187 CollateClause *collClause; /* untransformed COLLATE spec, if any */
3188 List *constraints; /* constraints (list of Constraint nodes) */
3190
3191/* ----------------------
3192 * Create Operator Class Statement
3193 * ----------------------
3194 */
3195typedef struct CreateOpClassStmt
3196{
3198 List *opclassname; /* qualified name (list of String) */
3199 List *opfamilyname; /* qualified name (ditto); NIL if omitted */
3200 char *amname; /* name of index AM opclass is for */
3201 TypeName *datatype; /* datatype of indexed column */
3202 List *items; /* List of CreateOpClassItem nodes */
3203 bool isDefault; /* Should be marked as default for type? */
3205
3206#define OPCLASS_ITEM_OPERATOR 1
3207#define OPCLASS_ITEM_FUNCTION 2
3208#define OPCLASS_ITEM_STORAGETYPE 3
3209
3210typedef struct CreateOpClassItem
3211{
3213 int itemtype; /* see codes above */
3214 ObjectWithArgs *name; /* operator or function name and args */
3215 int number; /* strategy num or support proc num */
3216 List *order_family; /* only used for ordering operators */
3217 List *class_args; /* amproclefttype/amprocrighttype or
3218 * amoplefttype/amoprighttype */
3219 /* fields used for a storagetype item: */
3220 TypeName *storedtype; /* datatype stored in index */
3222
3223/* ----------------------
3224 * Create Operator Family Statement
3225 * ----------------------
3226 */
3228{
3230 List *opfamilyname; /* qualified name (list of String) */
3231 char *amname; /* name of index AM opfamily is for */
3233
3234/* ----------------------
3235 * Alter Operator Family Statement
3236 * ----------------------
3237 */
3238typedef struct AlterOpFamilyStmt
3239{
3241 List *opfamilyname; /* qualified name (list of String) */
3242 char *amname; /* name of index AM opfamily is for */
3243 bool isDrop; /* ADD or DROP the items? */
3244 List *items; /* List of CreateOpClassItem nodes */
3246
3247/* ----------------------
3248 * Drop Table|Sequence|View|Index|Type|Domain|Conversion|Schema Statement
3249 * ----------------------
3250 */
3251
3252typedef struct DropStmt
3253{
3255 List *objects; /* list of names */
3256 ObjectType removeType; /* object type */
3257 DropBehavior behavior; /* RESTRICT or CASCADE behavior */
3258 bool missing_ok; /* skip error if object is missing? */
3259 bool concurrent; /* drop index concurrently? */
3261
3262/* ----------------------
3263 * Truncate Table Statement
3264 * ----------------------
3265 */
3266typedef struct TruncateStmt
3267{
3269 List *relations; /* relations (RangeVars) to be truncated */
3270 bool restart_seqs; /* restart owned sequences? */
3271 DropBehavior behavior; /* RESTRICT or CASCADE behavior */
3273
3274/* ----------------------
3275 * Comment On Statement
3276 * ----------------------
3277 */
3278typedef struct CommentStmt
3279{
3281 ObjectType objtype; /* Object's type */
3282 Node *object; /* Qualified name of the object */
3283 char *comment; /* Comment to insert, or NULL to remove */
3285
3286/* ----------------------
3287 * SECURITY LABEL Statement
3288 * ----------------------
3289 */
3290typedef struct SecLabelStmt
3291{
3293 ObjectType objtype; /* Object's type */
3294 Node *object; /* Qualified name of the object */
3295 char *provider; /* Label provider (or NULL) */
3296 char *label; /* New security label to be assigned */
3298
3299/* ----------------------
3300 * Declare Cursor Statement
3301 *
3302 * The "query" field is initially a raw parse tree, and is converted to a
3303 * Query node during parse analysis. Note that rewriting and planning
3304 * of the query are always postponed until execution.
3305 * ----------------------
3306 */
3307#define CURSOR_OPT_BINARY 0x0001 /* BINARY */
3308#define CURSOR_OPT_SCROLL 0x0002 /* SCROLL explicitly given */
3309#define CURSOR_OPT_NO_SCROLL 0x0004 /* NO SCROLL explicitly given */
3310#define CURSOR_OPT_INSENSITIVE 0x0008 /* INSENSITIVE */
3311#define CURSOR_OPT_ASENSITIVE 0x0010 /* ASENSITIVE */
3312#define CURSOR_OPT_HOLD 0x0020 /* WITH HOLD */
3313/* these planner-control flags do not correspond to any SQL grammar: */
3314#define CURSOR_OPT_FAST_PLAN 0x0100 /* prefer fast-start plan */
3315#define CURSOR_OPT_GENERIC_PLAN 0x0200 /* force use of generic plan */
3316#define CURSOR_OPT_CUSTOM_PLAN 0x0400 /* force use of custom plan */
3317#define CURSOR_OPT_PARALLEL_OK 0x0800 /* parallel mode OK */
3318
3319typedef struct DeclareCursorStmt
3320{
3322 char *portalname; /* name of the portal (cursor) */
3323 int options; /* bitmask of options (see above) */
3324 Node *query; /* the query (see comments above) */
3326
3327/* ----------------------
3328 * Close Portal Statement
3329 * ----------------------
3330 */
3331typedef struct ClosePortalStmt
3332{
3334 char *portalname; /* name of the portal (cursor) */
3335 /* NULL means CLOSE ALL */
3337
3338/* ----------------------
3339 * Fetch Statement (also Move)
3340 * ----------------------
3341 */
3342typedef enum FetchDirection
3343{
3344 /* for these, howMany is how many rows to fetch; FETCH_ALL means ALL */
3347 /* for these, howMany indicates a position; only one row is fetched */
3351
3352#define FETCH_ALL LONG_MAX
3353
3354typedef struct FetchStmt
3355{
3357 FetchDirection direction; /* see above */
3358 long howMany; /* number of rows, or position argument */
3359 char *portalname; /* name of portal (cursor) */
3360 bool ismove; /* true if MOVE */
3362
3363/* ----------------------
3364 * Create Index Statement
3365 *
3366 * This represents creation of an index and/or an associated constraint.
3367 * If isconstraint is true, we should create a pg_constraint entry along
3368 * with the index. But if indexOid isn't InvalidOid, we are not creating an
3369 * index, just a UNIQUE/PKEY constraint using an existing index. isconstraint
3370 * must always be true in this case, and the fields describing the index
3371 * properties are empty.
3372 * ----------------------
3373 */
3374typedef struct IndexStmt
3375{
3377 char *idxname; /* name of new index, or NULL for default */
3378 RangeVar *relation; /* relation to build index on */
3379 char *accessMethod; /* name of access method (eg. btree) */
3380 char *tableSpace; /* tablespace, or NULL for default */
3381 List *indexParams; /* columns to index: a list of IndexElem */
3382 List *indexIncludingParams; /* additional columns to index: a list
3383 * of IndexElem */
3384 List *options; /* WITH clause options: a list of DefElem */
3385 Node *whereClause; /* qualification (partial-index predicate) */
3386 List *excludeOpNames; /* exclusion operator names, or NIL if none */
3387 char *idxcomment; /* comment to apply to index, or NULL */
3388 Oid indexOid; /* OID of an existing index, if any */
3389 RelFileNumber oldNumber; /* relfilenumber of existing storage, if any */
3390 SubTransactionId oldCreateSubid; /* rd_createSubid of oldNumber */
3391 SubTransactionId oldFirstRelfilelocatorSubid; /* rd_firstRelfilelocatorSubid
3392 * of oldNumber */
3393 bool unique; /* is index unique? */
3394 bool nulls_not_distinct; /* null treatment for UNIQUE constraints */
3395 bool primary; /* is index a primary key? */
3396 bool isconstraint; /* is it for a pkey/unique constraint? */
3397 bool iswithoutoverlaps; /* is the constraint WITHOUT OVERLAPS? */
3398 bool deferrable; /* is the constraint DEFERRABLE? */
3399 bool initdeferred; /* is the constraint INITIALLY DEFERRED? */
3400 bool transformed; /* true when transformIndexStmt is finished */
3401 bool concurrent; /* should this be a concurrent index build? */
3402 bool if_not_exists; /* just do nothing if index already exists? */
3403 bool reset_default_tblspc; /* reset default_tablespace prior to
3404 * executing */
3406
3407/* ----------------------
3408 * Create Statistics Statement
3409 * ----------------------
3410 */
3411typedef struct CreateStatsStmt
3412{
3414 List *defnames; /* qualified name (list of String) */
3415 List *stat_types; /* stat types (list of String) */
3416 List *exprs; /* expressions to build statistics on */
3417 List *relations; /* rels to build stats on (list of RangeVar) */
3418 char *stxcomment; /* comment to apply to stats, or NULL */
3419 bool transformed; /* true when transformStatsStmt is finished */
3420 bool if_not_exists; /* do nothing if stats name already exists */
3422
3423/*
3424 * StatsElem - statistics parameters (used in CREATE STATISTICS)
3425 *
3426 * For a plain attribute, 'name' is the name of the referenced table column
3427 * and 'expr' is NULL. For an expression, 'name' is NULL and 'expr' is the
3428 * expression tree.
3429 */
3430typedef struct StatsElem
3431{
3433 char *name; /* name of attribute to index, or NULL */
3434 Node *expr; /* expression to index, or NULL */
3436
3437
3438/* ----------------------
3439 * Alter Statistics Statement
3440 * ----------------------
3441 */
3442typedef struct AlterStatsStmt
3443{
3445 List *defnames; /* qualified name (list of String) */
3446 Node *stxstattarget; /* statistics target */
3447 bool missing_ok; /* skip error if statistics object is missing */
3449
3450/* ----------------------
3451 * Create Function Statement
3452 * ----------------------
3453 */
3455{
3457 bool is_procedure; /* it's really CREATE PROCEDURE */
3458 bool replace; /* T => replace if already exists */
3459 List *funcname; /* qualified name of function to create */
3460 List *parameters; /* a list of FunctionParameter */
3461 TypeName *returnType; /* the return type */
3462 List *options; /* a list of DefElem */
3465
3467{
3468 /* the assigned enum values appear in pg_proc, don't change 'em! */
3469 FUNC_PARAM_IN = 'i', /* input only */
3470 FUNC_PARAM_OUT = 'o', /* output only */
3471 FUNC_PARAM_INOUT = 'b', /* both */
3472 FUNC_PARAM_VARIADIC = 'v', /* variadic (always input) */
3473 FUNC_PARAM_TABLE = 't', /* table function output column */
3474 /* this is not used in pg_proc: */
3475 FUNC_PARAM_DEFAULT = 'd', /* default; effectively same as IN */
3477
3478typedef struct FunctionParameter
3479{
3481 char *name; /* parameter name, or NULL if not given */
3482 TypeName *argType; /* TypeName for parameter type */
3483 FunctionParameterMode mode; /* IN/OUT/etc */
3484 Node *defexpr; /* raw default expr, or NULL if not given */
3485 ParseLoc location; /* token location, or -1 if unknown */
3487
3488typedef struct AlterFunctionStmt
3489{
3492 ObjectWithArgs *func; /* name and args of function */
3493 List *actions; /* list of DefElem */
3495
3496/* ----------------------
3497 * DO Statement
3498 *
3499 * DoStmt is the raw parser output, InlineCodeBlock is the execution-time API
3500 * ----------------------
3501 */
3502typedef struct DoStmt
3503{
3505 List *args; /* List of DefElem nodes */
3507
3508typedef struct InlineCodeBlock
3509{
3510 pg_node_attr(nodetag_only) /* this is not a member of parse trees */
3511
3512 NodeTag type;
3513 char *source_text; /* source text of anonymous code block */
3514 Oid langOid; /* OID of selected language */
3515 bool langIsTrusted; /* trusted property of the language */
3516 bool atomic; /* atomic execution context */
3518
3519/* ----------------------
3520 * CALL statement
3521 *
3522 * OUT-mode arguments are removed from the transformed funcexpr. The outargs
3523 * list contains copies of the expressions for all output arguments, in the
3524 * order of the procedure's declared arguments. (outargs is never evaluated,
3525 * but is useful to the caller as a reference for what to assign to.)
3526 * The transformed call state is not relevant in the query jumbling, only the
3527 * function call is.
3528 * ----------------------
3529 */
3530typedef struct CallStmt
3531{
3533 /* from the parser */
3534 FuncCall *funccall pg_node_attr(query_jumble_ignore);
3535 /* transformed call, with only input args */
3537 /* transformed output-argument expressions */
3540
3541typedef struct CallContext
3542{
3543 pg_node_attr(nodetag_only) /* this is not a member of parse trees */
3544
3545 NodeTag type;
3548
3549/* ----------------------
3550 * Alter Object Rename Statement
3551 * ----------------------
3552 */
3553typedef struct RenameStmt
3554{
3556 ObjectType renameType; /* OBJECT_TABLE, OBJECT_COLUMN, etc */
3557 ObjectType relationType; /* if column name, associated relation type */
3558 RangeVar *relation; /* in case it's a table */
3559 Node *object; /* in case it's some other object */
3560 char *subname; /* name of contained object (column, rule,
3561 * trigger, etc) */
3562 char *newname; /* the new name */
3563 DropBehavior behavior; /* RESTRICT or CASCADE behavior */
3564 bool missing_ok; /* skip error if missing? */
3566
3567/* ----------------------
3568 * ALTER object DEPENDS ON EXTENSION extname
3569 * ----------------------
3570 */
3572{
3574 ObjectType objectType; /* OBJECT_FUNCTION, OBJECT_TRIGGER, etc */
3575 RangeVar *relation; /* in case a table is involved */
3576 Node *object; /* name of the object */
3577 String *extname; /* extension name */
3578 bool remove; /* set true to remove dep rather than add */
3580
3581/* ----------------------
3582 * ALTER object SET SCHEMA Statement
3583 * ----------------------
3584 */
3586{
3588 ObjectType objectType; /* OBJECT_TABLE, OBJECT_TYPE, etc */
3589 RangeVar *relation; /* in case it's a table */
3590 Node *object; /* in case it's some other object */
3591 char *newschema; /* the new schema */
3592 bool missing_ok; /* skip error if missing? */
3594
3595/* ----------------------
3596 * Alter Object Owner Statement
3597 * ----------------------
3598 */
3599typedef struct AlterOwnerStmt
3600{
3602 ObjectType objectType; /* OBJECT_TABLE, OBJECT_TYPE, etc */
3603 RangeVar *relation; /* in case it's a table */
3604 Node *object; /* in case it's some other object */
3605 RoleSpec *newowner; /* the new owner */
3607
3608/* ----------------------
3609 * Alter Operator Set ( this-n-that )
3610 * ----------------------
3611 */
3612typedef struct AlterOperatorStmt
3613{
3615 ObjectWithArgs *opername; /* operator name and argument types */
3616 List *options; /* List of DefElem nodes */
3618
3619/* ------------------------
3620 * Alter Type Set ( this-n-that )
3621 * ------------------------
3622 */
3623typedef struct AlterTypeStmt
3624{
3626 List *typeName; /* type name (possibly qualified) */
3627 List *options; /* List of DefElem nodes */
3629
3630/* ----------------------
3631 * Create Rule Statement
3632 * ----------------------
3633 */
3634typedef struct RuleStmt
3635{
3637 RangeVar *relation; /* relation the rule is for */
3638 char *rulename; /* name of the rule */
3639 Node *whereClause; /* qualifications */
3640 CmdType event; /* SELECT, INSERT, etc */
3641 bool instead; /* is a 'do instead'? */
3642 List *actions; /* the action statements */
3643 bool replace; /* OR REPLACE */
3645
3646/* ----------------------
3647 * Notify Statement
3648 * ----------------------
3649 */
3650typedef struct NotifyStmt
3651{
3653 char *conditionname; /* condition name to notify */
3654 char *payload; /* the payload string, or NULL if none */
3656
3657/* ----------------------
3658 * Listen Statement
3659 * ----------------------
3660 */
3661typedef struct ListenStmt
3662{
3664 char *conditionname; /* condition name to listen on */
3666
3667/* ----------------------
3668 * Unlisten Statement
3669 * ----------------------
3670 */
3671typedef struct UnlistenStmt
3672{
3674 char *conditionname; /* name to unlisten on, or NULL for all */
3676
3677/* ----------------------
3678 * {Begin|Commit|Rollback} Transaction Statement
3679 * ----------------------
3680 */
3682{
3684 TRANS_STMT_START, /* semantically identical to BEGIN */
3694
3695typedef struct TransactionStmt
3696{
3698 TransactionStmtKind kind; /* see above */
3699 List *options; /* for BEGIN/START commands */
3700 /* for savepoint commands */
3701 char *savepoint_name pg_node_attr(query_jumble_ignore);
3702 /* for two-phase-commit related commands */
3703 char *gid pg_node_attr(query_jumble_ignore);
3704 bool chain; /* AND CHAIN option */
3705 /* token location, or -1 if unknown */
3706 ParseLoc location pg_node_attr(query_jumble_location);
3708
3709/* ----------------------
3710 * Create Type Statement, composite types
3711 * ----------------------
3712 */
3713typedef struct CompositeTypeStmt
3714{
3716 RangeVar *typevar; /* the composite type to be created */
3717 List *coldeflist; /* list of ColumnDef nodes */
3719
3720/* ----------------------
3721 * Create Type Statement, enum types
3722 * ----------------------
3723 */
3724typedef struct CreateEnumStmt
3725{
3727 List *typeName; /* qualified name (list of String) */
3728 List *vals; /* enum values (list of String) */
3730
3731/* ----------------------
3732 * Create Type Statement, range types
3733 * ----------------------
3734 */
3735typedef struct CreateRangeStmt
3736{
3738 List *typeName; /* qualified name (list of String) */
3739 List *params; /* range parameters (list of DefElem) */
3741
3742/* ----------------------
3743 * Alter Type Statement, enum types
3744 * ----------------------
3745 */
3746typedef struct AlterEnumStmt
3747{
3749 List *typeName; /* qualified name (list of String) */
3750 char *oldVal; /* old enum value's name, if renaming */
3751 char *newVal; /* new enum value's name */
3752 char *newValNeighbor; /* neighboring enum value, if specified */
3753 bool newValIsAfter; /* place new enum value after neighbor? */
3754 bool skipIfNewValExists; /* no error if new already exists? */
3756
3757/* ----------------------
3758 * Create View Statement
3759 * ----------------------
3760 */
3762{
3767
3768typedef struct ViewStmt
3769{
3771 RangeVar *view; /* the view to be created */
3772 List *aliases; /* target column names */
3773 Node *query; /* the SELECT query (as a raw parse tree) */
3774 bool replace; /* replace an existing view? */
3775 List *options; /* options from WITH clause */
3776 ViewCheckOption withCheckOption; /* WITH CHECK OPTION */
3778
3779/* ----------------------
3780 * Load Statement
3781 * ----------------------
3782 */
3783typedef struct LoadStmt
3784{
3786 char *filename; /* file to load */
3788
3789/* ----------------------
3790 * Createdb Statement
3791 * ----------------------
3792 */
3793typedef struct CreatedbStmt
3794{
3796 char *dbname; /* name of database to create */
3797 List *options; /* List of DefElem nodes */
3799
3800/* ----------------------
3801 * Alter Database
3802 * ----------------------
3803 */
3804typedef struct AlterDatabaseStmt
3805{
3807 char *dbname; /* name of database to alter */
3808 List *options; /* List of DefElem nodes */
3810
3812{
3814 char *dbname;
3816
3818{
3820 char *dbname; /* database name */
3821 VariableSetStmt *setstmt; /* SET or RESET subcommand */
3823
3824/* ----------------------
3825 * Dropdb Statement
3826 * ----------------------
3827 */
3828typedef struct DropdbStmt
3829{
3831 char *dbname; /* database to drop */
3832 bool missing_ok; /* skip error if db is missing? */
3833 List *options; /* currently only FORCE is supported */
3835
3836/* ----------------------
3837 * Alter System Statement
3838 * ----------------------
3839 */
3840typedef struct AlterSystemStmt
3841{
3843 VariableSetStmt *setstmt; /* SET subcommand */
3845
3846/* ----------------------
3847 * Cluster Statement (support pbrown's cluster index implementation)
3848 * ----------------------
3849 */
3850typedef struct ClusterStmt
3851{
3853 RangeVar *relation; /* relation being indexed, or NULL if all */
3854 char *indexname; /* original index defined */
3855 List *params; /* list of DefElem nodes */
3857
3858/* ----------------------
3859 * Vacuum and Analyze Statements
3860 *
3861 * Even though these are nominally two statements, it's convenient to use
3862 * just one node type for both.
3863 * ----------------------
3864 */
3865typedef struct VacuumStmt
3866{
3868 List *options; /* list of DefElem nodes */
3869 List *rels; /* list of VacuumRelation, or NIL for all */
3870 bool is_vacuumcmd; /* true for VACUUM, false for ANALYZE */
3872
3873/*
3874 * Info about a single target table of VACUUM/ANALYZE.
3875 *
3876 * If the OID field is set, it always identifies the table to process.
3877 * Then the relation field can be NULL; if it isn't, it's used only to report
3878 * failure to open/lock the relation.
3879 */
3880typedef struct VacuumRelation
3881{
3883 RangeVar *relation; /* table name to process, or NULL */
3884 Oid oid; /* table's OID; InvalidOid if not looked up */
3885 List *va_cols; /* list of column names, or NIL for all */
3887
3888/* ----------------------
3889 * Explain Statement
3890 *
3891 * The "query" field is initially a raw parse tree, and is converted to a
3892 * Query node during parse analysis. Note that rewriting and planning
3893 * of the query are always postponed until execution.
3894 * ----------------------
3895 */
3896typedef struct ExplainStmt
3897{
3899 Node *query; /* the query (see comments above) */
3900 List *options; /* list of DefElem nodes */
3902
3903/* ----------------------
3904 * CREATE TABLE AS Statement (a/k/a SELECT INTO)
3905 *
3906 * A query written as CREATE TABLE AS will produce this node type natively.
3907 * A query written as SELECT ... INTO will be transformed to this form during
3908 * parse analysis.
3909 * A query written as CREATE MATERIALIZED view will produce this node type,
3910 * during parse analysis, since it needs all the same data.
3911 *
3912 * The "query" field is handled similarly to EXPLAIN, though note that it
3913 * can be a SELECT or an EXECUTE, but not other DML statements.
3914 * ----------------------
3915 */
3916typedef struct CreateTableAsStmt
3917{
3919 Node *query; /* the query (see comments above) */
3920 IntoClause *into; /* destination table */
3921 ObjectType objtype; /* OBJECT_TABLE or OBJECT_MATVIEW */
3922 bool is_select_into; /* it was written as SELECT INTO */
3923 bool if_not_exists; /* just do nothing if it already exists? */
3925
3926/* ----------------------
3927 * REFRESH MATERIALIZED VIEW Statement
3928 * ----------------------
3929 */
3931{
3933 bool concurrent; /* allow concurrent access? */
3934 bool skipData; /* true for WITH NO DATA */
3935 RangeVar *relation; /* relation to insert into */
3937
3938/* ----------------------
3939 * Checkpoint Statement
3940 * ----------------------
3941 */
3942typedef struct CheckPointStmt
3943{
3946
3947/* ----------------------
3948 * Discard Statement
3949 * ----------------------
3950 */
3951
3952typedef enum DiscardMode
3953{
3959
3960typedef struct DiscardStmt
3961{
3965
3966/* ----------------------
3967 * LOCK Statement
3968 * ----------------------
3969 */
3970typedef struct LockStmt
3971{
3973 List *relations; /* relations to lock */
3974 int mode; /* lock mode */
3975 bool nowait; /* no wait mode */
3977
3978/* ----------------------
3979 * SET CONSTRAINTS Statement
3980 * ----------------------
3981 */
3983{
3985 List *constraints; /* List of names as RangeVars */
3988
3989/* ----------------------
3990 * REINDEX Statement
3991 * ----------------------
3992 */
3994{
3996 REINDEX_OBJECT_TABLE, /* table or materialized view */
3998 REINDEX_OBJECT_SYSTEM, /* system catalogs */
4001
4002typedef struct ReindexStmt
4003{
4005 ReindexObjectType kind; /* REINDEX_OBJECT_INDEX, REINDEX_OBJECT_TABLE,
4006 * etc. */
4007 RangeVar *relation; /* Table or index to reindex */
4008 const char *name; /* name of database to reindex */
4009 List *params; /* list of DefElem nodes */
4011
4012/* ----------------------
4013 * CREATE CONVERSION Statement
4014 * ----------------------
4015 */
4017{
4019 List *conversion_name; /* Name of the conversion */
4020 char *for_encoding_name; /* source encoding name */
4021 char *to_encoding_name; /* destination encoding name */
4022 List *func_name; /* qualified conversion function name */
4023 bool def; /* is this a default conversion? */
4025
4026/* ----------------------
4027 * CREATE CAST Statement
4028 * ----------------------
4029 */
4030typedef struct CreateCastStmt
4031{
4037 bool inout;
4039
4040/* ----------------------
4041 * CREATE TRANSFORM Statement
4042 * ----------------------
4043 */
4045{
4049 char *lang;
4053
4054/* ----------------------
4055 * PREPARE Statement
4056 * ----------------------
4057 */
4058typedef struct PrepareStmt
4059{
4061 char *name; /* Name of plan, arbitrary */
4062 List *argtypes; /* Types of parameters (List of TypeName) */
4063 Node *query; /* The query itself (as a raw parsetree) */
4065
4066
4067/* ----------------------
4068 * EXECUTE Statement
4069 * ----------------------
4070 */
4071
4072typedef struct ExecuteStmt
4073{
4075 char *name; /* The name of the plan to execute */
4076 List *params; /* Values to assign to parameters */
4078
4079
4080/* ----------------------
4081 * DEALLOCATE Statement
4082 * ----------------------
4083 */
4084typedef struct DeallocateStmt
4085{
4087 /* The name of the plan to remove, NULL if DEALLOCATE ALL */
4088 char *name pg_node_attr(query_jumble_ignore);
4089
4090 /*
4091 * True if DEALLOCATE ALL. This is redundant with "name == NULL", but we
4092 * make it a separate field so that exactly this condition (and not the
4093 * precise name) will be accounted for in query jumbling.
4094 */
4095 bool isall;
4096 /* token location, or -1 if unknown */
4097 ParseLoc location pg_node_attr(query_jumble_location);
4099
4100/*
4101 * DROP OWNED statement
4102 */
4103typedef struct DropOwnedStmt
4104{
4109
4110/*
4111 * REASSIGN OWNED statement
4112 */
4113typedef struct ReassignOwnedStmt
4114{
4119
4120/*
4121 * TS Dictionary stmts: DefineStmt, RenameStmt and DropStmt are default
4122 */
4124{
4126 List *dictname; /* qualified name (list of String) */
4127 List *options; /* List of DefElem nodes */
4129
4130/*
4131 * TS Configuration stmts: DefineStmt, RenameStmt and DropStmt are default
4132 */
4134{
4141
4143{
4145 AlterTSConfigType kind; /* ALTER_TSCONFIG_ADD_MAPPING, etc */
4146 List *cfgname; /* qualified name (list of String) */
4147
4148 /*
4149 * dicts will be non-NIL if ADD/ALTER MAPPING was specified. If dicts is
4150 * NIL, but tokentype isn't, DROP MAPPING was specified.
4151 */
4152 List *tokentype; /* list of String */
4153 List *dicts; /* list of list of String */
4154 bool override; /* if true - remove old variant */
4155 bool replace; /* if true - replace dictionary by another */
4156 bool missing_ok; /* for DROP - skip error if missing? */
4158
4159typedef struct PublicationTable
4160{
4162 RangeVar *relation; /* relation to be published */
4163 Node *whereClause; /* qualifications */
4164 List *columns; /* List of columns in a publication table */
4166
4167/*
4168 * Publication object type
4169 */
4171{
4173 PUBLICATIONOBJ_TABLES_IN_SCHEMA, /* All tables in schema */
4174 PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA, /* All tables in first element of
4175 * search_path */
4176 PUBLICATIONOBJ_CONTINUATION, /* Continuation of previous type */
4178
4180{
4182 PublicationObjSpecType pubobjtype; /* type of this publication object */
4183 char *name;
4185 ParseLoc location; /* token location, or -1 if unknown */
4187
4189{
4191 char *pubname; /* Name of the publication */
4192 List *options; /* List of DefElem nodes */
4193 List *pubobjects; /* Optional list of publication objects */
4194 bool for_all_tables; /* Special publication for all tables in db */
4196
4198{
4199 AP_AddObjects, /* add objects to publication */
4200 AP_DropObjects, /* remove objects from publication */
4201 AP_SetObjects, /* set list of objects */
4203
4205{
4207 char *pubname; /* Name of the publication */
4208
4209 /* parameters used for ALTER PUBLICATION ... WITH */
4210 List *options; /* List of DefElem nodes */
4211
4212 /*
4213 * Parameters used for ALTER PUBLICATION ... ADD/DROP/SET publication
4214 * objects.
4215 */
4216 List *pubobjects; /* Optional list of publication objects */
4217 bool for_all_tables; /* Special publication for all tables in db */
4218 AlterPublicationAction action; /* What action to perform with the given
4219 * objects */
4221
4223{
4225 char *subname; /* Name of the subscription */
4226 char *conninfo; /* Connection string to publisher */
4227 List *publication; /* One or more publication to subscribe to */
4228 List *options; /* List of DefElem nodes */
4230
4232{
4242
4244{
4246 AlterSubscriptionType kind; /* ALTER_SUBSCRIPTION_OPTIONS, etc */
4247 char *subname; /* Name of the subscription */
4248 char *conninfo; /* Connection string to publisher */
4249 List *publication; /* One or more publication to subscribe to */
4250 List *options; /* List of DefElem nodes */
4252
4254{
4256 char *subname; /* Name of the subscription */
4257 bool missing_ok; /* Skip error if missing? */
4258 DropBehavior behavior; /* RESTRICT or CASCADE behavior */
4260
4261#endif /* PARSENODES_H */
#define PG_INT32_MAX
Definition: c.h:543
uint32 SubTransactionId
Definition: c.h:610
int16_t int16
Definition: c.h:480
uint32 bits32
Definition: c.h:494
int32_t int32
Definition: c.h:481
uint64_t uint64
Definition: c.h:486
unsigned int Index
Definition: c.h:568
LockWaitPolicy
Definition: lockoptions.h:37
LockClauseStrength
Definition: lockoptions.h:22
OnConflictAction
Definition: nodes.h:417
double Cardinality
Definition: nodes.h:252
CmdType
Definition: nodes.h:263
NodeTag
Definition: nodes.h:27
LimitOption
Definition: nodes.h:430
int ParseLoc
Definition: nodes.h:240
JoinType
Definition: nodes.h:288
struct AlterDatabaseRefreshCollStmt AlterDatabaseRefreshCollStmt
struct LoadStmt LoadStmt
RoleSpecType
Definition: parsenodes.h:395
@ ROLESPEC_CURRENT_USER
Definition: parsenodes.h:398
@ ROLESPEC_CSTRING
Definition: parsenodes.h:396
@ ROLESPEC_SESSION_USER
Definition: parsenodes.h:399
@ ROLESPEC_CURRENT_ROLE
Definition: parsenodes.h:397
@ ROLESPEC_PUBLIC
Definition: parsenodes.h:400
struct DropSubscriptionStmt DropSubscriptionStmt
struct CreateEnumStmt CreateEnumStmt
struct RoleSpec RoleSpec
struct CreateFunctionStmt CreateFunctionStmt
struct AlterOwnerStmt AlterOwnerStmt
struct ReturnStmt ReturnStmt
struct CreateAmStmt CreateAmStmt
AlterSubscriptionType
Definition: parsenodes.h:4232
@ ALTER_SUBSCRIPTION_ENABLED
Definition: parsenodes.h:4239
@ ALTER_SUBSCRIPTION_DROP_PUBLICATION
Definition: parsenodes.h:4237
@ ALTER_SUBSCRIPTION_SET_PUBLICATION
Definition: parsenodes.h:4235
@ ALTER_SUBSCRIPTION_REFRESH
Definition: parsenodes.h:4238
@ ALTER_SUBSCRIPTION_SKIP
Definition: parsenodes.h:4240
@ ALTER_SUBSCRIPTION_OPTIONS
Definition: parsenodes.h:4233
@ ALTER_SUBSCRIPTION_CONNECTION
Definition: parsenodes.h:4234
@ ALTER_SUBSCRIPTION_ADD_PUBLICATION
Definition: parsenodes.h:4236
struct TableLikeClause TableLikeClause
struct AlterSystemStmt AlterSystemStmt
struct CopyStmt CopyStmt
TransactionStmtKind
Definition: parsenodes.h:3682
@ TRANS_STMT_ROLLBACK_TO
Definition: parsenodes.h:3689
@ TRANS_STMT_START
Definition: parsenodes.h:3684
@ TRANS_STMT_SAVEPOINT
Definition: parsenodes.h:3687
@ TRANS_STMT_BEGIN
Definition: parsenodes.h:3683
@ TRANS_STMT_ROLLBACK
Definition: parsenodes.h:3686
@ TRANS_STMT_COMMIT_PREPARED
Definition: parsenodes.h:3691
@ TRANS_STMT_COMMIT
Definition: parsenodes.h:3685
@ TRANS_STMT_ROLLBACK_PREPARED
Definition: parsenodes.h:3692
@ TRANS_STMT_PREPARE
Definition: parsenodes.h:3690
@ TRANS_STMT_RELEASE
Definition: parsenodes.h:3688
struct GrantRoleStmt GrantRoleStmt
struct AlterTSDictionaryStmt AlterTSDictionaryStmt
struct OnConflictClause OnConflictClause
struct JsonTablePathSpec JsonTablePathSpec
struct AlterOperatorStmt AlterOperatorStmt
WCOKind
Definition: parsenodes.h:1358
@ WCO_RLS_MERGE_UPDATE_CHECK
Definition: parsenodes.h:1363
@ WCO_RLS_CONFLICT_CHECK
Definition: parsenodes.h:1362
@ WCO_RLS_INSERT_CHECK
Definition: parsenodes.h:1360
@ WCO_VIEW_CHECK
Definition: parsenodes.h:1359
@ WCO_RLS_UPDATE_CHECK
Definition: parsenodes.h:1361
@ WCO_RLS_MERGE_DELETE_CHECK
Definition: parsenodes.h:1364
struct RangeTblFunction RangeTblFunction
struct JsonScalarExpr JsonScalarExpr
JsonTableColumnType
Definition: parsenodes.h:1839
@ JTC_FORMATTED
Definition: parsenodes.h:1843
@ JTC_FOR_ORDINALITY
Definition: parsenodes.h:1840
@ JTC_NESTED
Definition: parsenodes.h:1844
@ JTC_EXISTS
Definition: parsenodes.h:1842
@ JTC_REGULAR
Definition: parsenodes.h:1841
struct JsonArrayAgg JsonArrayAgg
struct A_Indirection A_Indirection
struct XmlSerialize XmlSerialize
SortByNulls
Definition: parsenodes.h:53
@ SORTBY_NULLS_DEFAULT
Definition: parsenodes.h:54
@ SORTBY_NULLS_LAST
Definition: parsenodes.h:56
@ SORTBY_NULLS_FIRST
Definition: parsenodes.h:55
struct DeallocateStmt DeallocateStmt
struct CreateSeqStmt CreateSeqStmt
struct DropTableSpaceStmt DropTableSpaceStmt
struct CreateExtensionStmt CreateExtensionStmt
struct A_Indices A_Indices
struct CreateTableSpaceStmt CreateTableSpaceStmt
GroupingSetKind
Definition: parsenodes.h:1498
@ GROUPING_SET_CUBE
Definition: parsenodes.h:1502
@ GROUPING_SET_SIMPLE
Definition: parsenodes.h:1500
@ GROUPING_SET_ROLLUP
Definition: parsenodes.h:1501
@ GROUPING_SET_SETS
Definition: parsenodes.h:1503
@ GROUPING_SET_EMPTY
Definition: parsenodes.h:1499
struct ReassignOwnedStmt ReassignOwnedStmt
struct ParamRef ParamRef
struct VacuumStmt VacuumStmt
struct NotifyStmt NotifyStmt
SetOperation
Definition: parsenodes.h:2117
@ SETOP_INTERSECT
Definition: parsenodes.h:2120
@ SETOP_UNION
Definition: parsenodes.h:2119
@ SETOP_EXCEPT
Definition: parsenodes.h:2121
@ SETOP_NONE
Definition: parsenodes.h:2118
struct TriggerTransition TriggerTransition
struct ClusterStmt ClusterStmt
struct MergeStmt MergeStmt
struct SelectStmt SelectStmt
struct DropdbStmt DropdbStmt
uint64 AclMode
Definition: parsenodes.h:74
struct FunctionParameter FunctionParameter
struct UnlistenStmt UnlistenStmt
struct InsertStmt InsertStmt
struct AlterFunctionStmt AlterFunctionStmt
struct StatsElem StatsElem
struct AlterRoleSetStmt AlterRoleSetStmt
struct CreateOpFamilyStmt CreateOpFamilyStmt
struct CreatePublicationStmt CreatePublicationStmt
struct InlineCodeBlock InlineCodeBlock
struct CreateDomainStmt CreateDomainStmt
struct AlterDomainStmt AlterDomainStmt
struct AlterDefaultPrivilegesStmt AlterDefaultPrivilegesStmt
struct CreateStatsStmt CreateStatsStmt
JsonQuotes
Definition: parsenodes.h:1774
@ JS_QUOTES_KEEP
Definition: parsenodes.h:1776
@ JS_QUOTES_UNSPEC
Definition: parsenodes.h:1775
@ JS_QUOTES_OMIT
Definition: parsenodes.h:1777
struct JsonOutput JsonOutput
struct UpdateStmt UpdateStmt
struct AlterObjectDependsStmt AlterObjectDependsStmt
struct IndexElem IndexElem
struct AlterCollationStmt AlterCollationStmt
A_Expr_Kind
Definition: parsenodes.h:314
@ AEXPR_BETWEEN
Definition: parsenodes.h:325
@ AEXPR_NULLIF
Definition: parsenodes.h:320
@ AEXPR_NOT_DISTINCT
Definition: parsenodes.h:319
@ AEXPR_BETWEEN_SYM
Definition: parsenodes.h:327
@ AEXPR_NOT_BETWEEN_SYM
Definition: parsenodes.h:328
@ AEXPR_ILIKE
Definition: parsenodes.h:323
@ AEXPR_IN
Definition: parsenodes.h:321
@ AEXPR_NOT_BETWEEN
Definition: parsenodes.h:326
@ AEXPR_DISTINCT
Definition: parsenodes.h:318
@ AEXPR_SIMILAR
Definition: parsenodes.h:324
@ AEXPR_LIKE
Definition: parsenodes.h:322
@ AEXPR_OP
Definition: parsenodes.h:315
@ AEXPR_OP_ANY
Definition: parsenodes.h:316
@ AEXPR_OP_ALL
Definition: parsenodes.h:317
FunctionParameterMode
Definition: parsenodes.h:3467
@ FUNC_PARAM_IN
Definition: parsenodes.h:3469
@ FUNC_PARAM_DEFAULT
Definition: parsenodes.h:3475
@ FUNC_PARAM_OUT
Definition: parsenodes.h:3470
@ FUNC_PARAM_INOUT
Definition: parsenodes.h:3471
@ FUNC_PARAM_TABLE
Definition: parsenodes.h:3473
@ FUNC_PARAM_VARIADIC
Definition: parsenodes.h:3472
struct CreateForeignTableStmt CreateForeignTableStmt
struct CreateOpClassStmt CreateOpClassStmt
struct JsonObjectConstructor JsonObjectConstructor
AlterTSConfigType
Definition: parsenodes.h:4134
@ ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN
Definition: parsenodes.h:4136
@ ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN
Definition: parsenodes.h:4138
@ ALTER_TSCONFIG_REPLACE_DICT
Definition: parsenodes.h:4137
@ ALTER_TSCONFIG_ADD_MAPPING
Definition: parsenodes.h:4135
@ ALTER_TSCONFIG_DROP_MAPPING
Definition: parsenodes.h:4139
struct AlterForeignServerStmt AlterForeignServerStmt
struct ColumnDef ColumnDef
struct CreatedbStmt CreatedbStmt
struct RTEPermissionInfo RTEPermissionInfo
struct AlterEventTrigStmt AlterEventTrigStmt
struct IndexStmt IndexStmt
struct PartitionCmd PartitionCmd
PublicationObjSpecType
Definition: parsenodes.h:4171
@ PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA
Definition: parsenodes.h:4174
@ PUBLICATIONOBJ_TABLES_IN_SCHEMA
Definition: parsenodes.h:4173
@ PUBLICATIONOBJ_TABLE
Definition: parsenodes.h:4172
@ PUBLICATIONOBJ_CONTINUATION
Definition: parsenodes.h:4176
struct JsonArrayConstructor JsonArrayConstructor
PartitionStrategy
Definition: parsenodes.h:873
@ PARTITION_STRATEGY_HASH
Definition: parsenodes.h:876
@ PARTITION_STRATEGY_LIST
Definition: parsenodes.h:874
@ PARTITION_STRATEGY_RANGE
Definition: parsenodes.h:875
ImportForeignSchemaType
Definition: parsenodes.h:2964
@ FDW_IMPORT_SCHEMA_LIMIT_TO
Definition: parsenodes.h:2966
@ FDW_IMPORT_SCHEMA_ALL
Definition: parsenodes.h:2965
@ FDW_IMPORT_SCHEMA_EXCEPT
Definition: parsenodes.h:2967
struct AlterRoleStmt AlterRoleStmt
struct MergeWhenClause MergeWhenClause
struct WindowDef WindowDef
struct CommentStmt CommentStmt
AlterPublicationAction
Definition: parsenodes.h:4198
@ AP_DropObjects
Definition: parsenodes.h:4200
@ AP_SetObjects
Definition: parsenodes.h:4201
@ AP_AddObjects
Definition: parsenodes.h:4199
struct JsonArgument JsonArgument
struct Query Query
struct JsonArrayQueryConstructor JsonArrayQueryConstructor
QuerySource
Definition: parsenodes.h:35
@ QSRC_NON_INSTEAD_RULE
Definition: parsenodes.h:40
@ QSRC_PARSER
Definition: parsenodes.h:37
@ QSRC_QUAL_INSTEAD_RULE
Definition: parsenodes.h:39
@ QSRC_ORIGINAL
Definition: parsenodes.h:36
@ QSRC_INSTEAD_RULE
Definition: parsenodes.h:38
struct WithClause WithClause
struct AlterObjectSchemaStmt AlterObjectSchemaStmt
struct MultiAssignRef MultiAssignRef
struct ImportForeignSchemaStmt ImportForeignSchemaStmt
struct ReindexStmt ReindexStmt
struct CreateSubscriptionStmt CreateSubscriptionStmt
struct JsonTableColumn JsonTableColumn
struct A_Const A_Const
struct DeleteStmt DeleteStmt
RTEKind
Definition: parsenodes.h:1016
@ RTE_JOIN
Definition: parsenodes.h:1019
@ RTE_CTE
Definition: parsenodes.h:1023
@ RTE_NAMEDTUPLESTORE
Definition: parsenodes.h:1024
@ RTE_VALUES
Definition: parsenodes.h:1022
@ RTE_SUBQUERY
Definition: parsenodes.h:1018
@ RTE_RESULT
Definition: parsenodes.h:1025
@ RTE_FUNCTION
Definition: parsenodes.h:1020
@ RTE_TABLEFUNC
Definition: parsenodes.h:1021
@ RTE_GROUP
Definition: parsenodes.h:1028
@ RTE_RELATION
Definition: parsenodes.h:1017
struct AlterSubscriptionStmt AlterSubscriptionStmt
struct AlterStatsStmt AlterStatsStmt
struct AlterPublicationStmt AlterPublicationStmt
struct RangeFunction RangeFunction
struct PLAssignStmt PLAssignStmt
DefElemAction
Definition: parsenodes.h:806
@ DEFELEM_UNSPEC
Definition: parsenodes.h:807
@ DEFELEM_DROP
Definition: parsenodes.h:810
@ DEFELEM_SET
Definition: parsenodes.h:808
@ DEFELEM_ADD
Definition: parsenodes.h:809
struct ColumnRef ColumnRef
ConstrType
Definition: parsenodes.h:2723
@ CONSTR_FOREIGN
Definition: parsenodes.h:2734
@ CONSTR_ATTR_DEFERRED
Definition: parsenodes.h:2737
@ CONSTR_IDENTITY
Definition: parsenodes.h:2728
@ CONSTR_UNIQUE
Definition: parsenodes.h:2732
@ CONSTR_ATTR_NOT_DEFERRABLE
Definition: parsenodes.h:2736
@ CONSTR_DEFAULT
Definition: parsenodes.h:2727
@ CONSTR_NOTNULL
Definition: parsenodes.h:2726
@ CONSTR_ATTR_IMMEDIATE
Definition: parsenodes.h:2738
@ CONSTR_CHECK
Definition: parsenodes.h:2730
@ CONSTR_NULL
Definition: parsenodes.h:2724
@ CONSTR_GENERATED
Definition: parsenodes.h:2729
@ CONSTR_EXCLUSION
Definition: parsenodes.h:2733
@ CONSTR_ATTR_DEFERRABLE
Definition: parsenodes.h:2735
@ CONSTR_PRIMARY
Definition: parsenodes.h:2731
PartitionRangeDatumKind
Definition: parsenodes.h:925
@ PARTITION_RANGE_DATUM_MAXVALUE
Definition: parsenodes.h:928
@ PARTITION_RANGE_DATUM_VALUE
Definition: parsenodes.h:927
@ PARTITION_RANGE_DATUM_MINVALUE
Definition: parsenodes.h:926
struct GroupingSet GroupingSet
struct CreatePolicyStmt CreatePolicyStmt
FetchDirection
Definition: parsenodes.h:3343
@ FETCH_RELATIVE
Definition: parsenodes.h:3349
@ FETCH_ABSOLUTE
Definition: parsenodes.h:3348
@ FETCH_FORWARD
Definition: parsenodes.h:3345
@ FETCH_BACKWARD
Definition: parsenodes.h:3346
VariableSetKind
Definition: parsenodes.h:2618
@ VAR_SET_DEFAULT
Definition: parsenodes.h:2620
@ VAR_RESET
Definition: parsenodes.h:2623
@ VAR_SET_MULTI
Definition: parsenodes.h:2622
@ VAR_SET_VALUE
Definition: parsenodes.h:2619
@ VAR_SET_CURRENT
Definition: parsenodes.h:2621
@ VAR_RESET_ALL
Definition: parsenodes.h:2624
DropBehavior
Definition: parsenodes.h:2340
@ DROP_CASCADE
Definition: parsenodes.h:2342
@ DROP_RESTRICT
Definition: parsenodes.h:2341
ObjectType
Definition: parsenodes.h:2267
@ OBJECT_EVENT_TRIGGER
Definition: parsenodes.h:2282
@ OBJECT_FDW
Definition: parsenodes.h:2284
@ OBJECT_TSPARSER
Definition: parsenodes.h:2315
@ OBJECT_COLLATION
Definition: parsenodes.h:2275
@ OBJECT_USER_MAPPING
Definition: parsenodes.h:2318
@ OBJECT_ACCESS_METHOD
Definition: parsenodes.h:2268
@ OBJECT_OPCLASS
Definition: parsenodes.h:2292
@ OBJECT_DEFACL
Definition: parsenodes.h:2279
@ OBJECT_AGGREGATE
Definition: parsenodes.h:2269
@ OBJECT_MATVIEW
Definition: parsenodes.h:2291
@ OBJECT_SCHEMA
Definition: parsenodes.h:2304
@ OBJECT_POLICY
Definition: parsenodes.h:2296
@ OBJECT_OPERATOR
Definition: parsenodes.h:2293
@ OBJECT_FOREIGN_TABLE
Definition: parsenodes.h:2286
@ OBJECT_TSCONFIGURATION
Definition: parsenodes.h:2313
@ OBJECT_OPFAMILY
Definition: parsenodes.h:2294
@ OBJECT_DOMAIN
Definition: parsenodes.h:2280
@ OBJECT_COLUMN
Definition: parsenodes.h:2274
@ OBJECT_TABLESPACE
Definition: parsenodes.h:2310
@ OBJECT_ROLE
Definition: parsenodes.h:2301
@ OBJECT_ROUTINE
Definition: parsenodes.h:2302
@ OBJECT_LARGEOBJECT
Definition: parsenodes.h:2290
@ OBJECT_PUBLICATION_NAMESPACE
Definition: parsenodes.h:2299
@ OBJECT_PROCEDURE
Definition: parsenodes.h:2297
@ OBJECT_EXTENSION
Definition: parsenodes.h:2283
@ OBJECT_INDEX
Definition: parsenodes.h:2288
@ OBJECT_DEFAULT
Definition: parsenodes.h:2278
@ OBJECT_DATABASE
Definition: parsenodes.h:2277
@ OBJECT_SEQUENCE
Definition: parsenodes.h:2305
@ OBJECT_TSTEMPLATE
Definition: parsenodes.h:2316
@ OBJECT_LANGUAGE
Definition: parsenodes.h:2289
@ OBJECT_AMOP
Definition: parsenodes.h:2270
@ OBJECT_PUBLICATION_REL
Definition: parsenodes.h:2300
@ OBJECT_FOREIGN_SERVER
Definition: parsenodes.h:2285
@ OBJECT_TSDICTIONARY
Definition: parsenodes.h:2314
@ OBJECT_ATTRIBUTE
Definition: parsenodes.h:2272
@ OBJECT_PUBLICATION
Definition: parsenodes.h:2298
@ OBJECT_RULE
Definition: parsenodes.h:2303
@ OBJECT_CONVERSION
Definition: parsenodes.h:2276
@ OBJECT_AMPROC
Definition: parsenodes.h:2271
@ OBJECT_TABLE
Definition: parsenodes.h:2309
@ OBJECT_VIEW
Definition: parsenodes.h:2319
@ OBJECT_PARAMETER_ACL
Definition: parsenodes.h:2295
@ OBJECT_TYPE
Definition: parsenodes.h:2317
@ OBJECT_FUNCTION
Definition: parsenodes.h:2287
@ OBJECT_TABCONSTRAINT
Definition: parsenodes.h:2308
@ OBJECT_DOMCONSTRAINT
Definition: parsenodes.h:2281
@ OBJECT_SUBSCRIPTION
Definition: parsenodes.h:2306
@ OBJECT_STATISTIC_EXT
Definition: parsenodes.h:2307
@ OBJECT_CAST
Definition: parsenodes.h:2273
@ OBJECT_TRIGGER
Definition: parsenodes.h:2312
@ OBJECT_TRANSFORM
Definition: parsenodes.h:2311
struct ListenStmt ListenStmt
struct A_Star A_Star
struct PublicationObjSpec PublicationObjSpec
struct AlterTableSpaceOptionsStmt AlterTableSpaceOptionsStmt
struct CreateRoleStmt CreateRoleStmt
struct AlterTableCmd AlterTableCmd
struct RangeTableSample RangeTableSample
struct DropUserMappingStmt DropUserMappingStmt
ReindexObjectType
Definition: parsenodes.h:3994
@ REINDEX_OBJECT_DATABASE
Definition: parsenodes.h:3999
@ REINDEX_OBJECT_INDEX
Definition: parsenodes.h:3995
@ REINDEX_OBJECT_SCHEMA
Definition: parsenodes.h:3997
@ REINDEX_OBJECT_SYSTEM
Definition: parsenodes.h:3998
@ REINDEX_OBJECT_TABLE
Definition: parsenodes.h:3996
struct CreateForeignServerStmt CreateForeignServerStmt
struct LockingClause LockingClause
AlterTableType
Definition: parsenodes.h:2359
@ AT_AddIndexConstraint
Definition: parsenodes.h:2381
@ AT_DropOf
Definition: parsenodes.h:2412
@ AT_SetOptions
Definition: parsenodes.h:2369
@ AT_DropIdentity
Definition: parsenodes.h:2424
@ AT_DisableTrigUser
Definition: parsenodes.h:2404
@ AT_DropNotNull
Definition: parsenodes.h:2364
@ AT_AddOf
Definition: parsenodes.h:2411
@ AT_ResetOptions
Definition: parsenodes.h:2370
@ AT_ReplicaIdentity
Definition: parsenodes.h:2413
@ AT_ReplaceRelOptions
Definition: parsenodes.h:2396
@ AT_EnableRowSecurity
Definition: parsenodes.h:2414
@ AT_AddColumnToView
Definition: parsenodes.h:2361
@ AT_ResetRelOptions
Definition: parsenodes.h:2395
@ AT_EnableReplicaTrig
Definition: parsenodes.h:2399
@ AT_DropOids
Definition: parsenodes.h:2391
@ AT_SetIdentity
Definition: parsenodes.h:2423
@ AT_ReAddStatistics
Definition: parsenodes.h:2425
@ AT_SetUnLogged
Definition: parsenodes.h:2390
@ AT_DisableTrig
Definition: parsenodes.h:2400
@ AT_SetCompression
Definition: parsenodes.h:2372
@ AT_DropExpression
Definition: parsenodes.h:2367
@ AT_AddIndex
Definition: parsenodes.h:2374
@ AT_EnableReplicaRule
Definition: parsenodes.h:2407
@ AT_ReAddIndex
Definition: parsenodes.h:2375
@ AT_DropConstraint
Definition: parsenodes.h:2382
@ AT_SetNotNull
Definition: parsenodes.h:2365
@ AT_ClusterOn
Definition: parsenodes.h:2387
@ AT_AddIdentity
Definition: parsenodes.h:2422
@ AT_ForceRowSecurity
Definition: parsenodes.h:2416
@ AT_EnableAlwaysRule
Definition: parsenodes.h:2406
@ AT_SetAccessMethod
Definition: parsenodes.h:2392
@ AT_AlterColumnType
Definition: parsenodes.h:2384
@ AT_DetachPartitionFinalize
Definition: parsenodes.h:2421
@ AT_AddInherit
Definition: parsenodes.h:2409
@ AT_ReAddDomainConstraint
Definition: parsenodes.h:2378
@ AT_EnableTrig
Definition: parsenodes.h:2397
@ AT_DropColumn
Definition: parsenodes.h:2373
@ AT_ReAddComment
Definition: parsenodes.h:2383
@ AT_AlterColumnGenericOptions
Definition: parsenodes.h:2385
@ AT_DisableTrigAll
Definition: parsenodes.h:2402
@ AT_EnableRule
Definition: parsenodes.h:2405
@ AT_NoForceRowSecurity
Definition: parsenodes.h:2417
@ AT_DetachPartition
Definition: parsenodes.h:2420
@ AT_SetStatistics
Definition: parsenodes.h:2368
@ AT_AttachPartition
Definition: parsenodes.h:2419
@ AT_AddConstraint
Definition: parsenodes.h:2376
@ AT_DropInherit
Definition: parsenodes.h:2410
@ AT_EnableAlwaysTrig
Definition: parsenodes.h:2398
@ AT_SetLogged
Definition: parsenodes.h:2389
@ AT_SetStorage
Definition: parsenodes.h:2371
@ AT_DisableRule
Definition: parsenodes.h:2408
@ AT_DisableRowSecurity
Definition: parsenodes.h:2415
@ AT_SetRelOptions
Definition: parsenodes.h:2394
@ AT_ChangeOwner
Definition: parsenodes.h:2386
@ AT_EnableTrigUser
Definition: parsenodes.h:2403
@ AT_SetExpression
Definition: parsenodes.h:2366
@ AT_ReAddConstraint
Definition: parsenodes.h:2377
@ AT_SetTableSpace
Definition: parsenodes.h:2393
@ AT_GenericOptions
Definition: parsenodes.h:2418
@ AT_ColumnDefault
Definition: parsenodes.h:2362
@ AT_CookedColumnDefault
Definition: parsenodes.h:2363
@ AT_AlterConstraint
Definition: parsenodes.h:2379
@ AT_EnableTrigAll
Definition: parsenodes.h:2401
@ AT_DropCluster
Definition: parsenodes.h:2388
@ AT_ValidateConstraint
Definition: parsenodes.h:2380
@ AT_AddColumn
Definition: parsenodes.h:2360
struct WithCheckOption WithCheckOption
struct LockStmt LockStmt
GrantTargetType
Definition: parsenodes.h:2494
@ ACL_TARGET_DEFAULTS
Definition: parsenodes.h:2497
@ ACL_TARGET_OBJECT
Definition: parsenodes.h:2495
@ ACL_TARGET_ALL_IN_SCHEMA
Definition: parsenodes.h:2496
struct CreateEventTrigStmt CreateEventTrigStmt
struct JsonObjectAgg JsonObjectAgg
struct DropOwnedStmt DropOwnedStmt
struct VariableShowStmt VariableShowStmt
struct CreateTransformStmt CreateTransformStmt
struct AlterUserMappingStmt AlterUserMappingStmt
struct PartitionRangeDatum PartitionRangeDatum
struct A_ArrayExpr A_ArrayExpr
struct JsonFuncExpr JsonFuncExpr
struct RangeTableFunc RangeTableFunc
struct InferClause InferClause
struct RangeSubselect RangeSubselect
struct DropStmt DropStmt
struct CreateOpClassItem CreateOpClassItem
struct PrepareStmt PrepareStmt
struct AlterOpFamilyStmt AlterOpFamilyStmt
struct ConstraintsSetStmt ConstraintsSetStmt
struct JsonParseExpr JsonParseExpr
struct GrantStmt GrantStmt
struct A_Expr A_Expr
struct SetOperationStmt SetOperationStmt
struct SortBy SortBy
struct ViewStmt ViewStmt
struct CreateTrigStmt CreateTrigStmt
struct CTECycleClause CTECycleClause
struct VacuumRelation VacuumRelation
struct RenameStmt RenameStmt
struct DefineStmt DefineStmt
struct CreateStmt CreateStmt
struct CreateSchemaStmt CreateSchemaStmt
DiscardMode
Definition: parsenodes.h:3953
@ DISCARD_ALL
Definition: parsenodes.h:3954
@ DISCARD_PLANS
Definition: parsenodes.h:3955
@ DISCARD_SEQUENCES
Definition: parsenodes.h:3956
@ DISCARD_TEMP
Definition: parsenodes.h:3957
struct VariableSetStmt VariableSetStmt
struct JsonAggConstructor JsonAggConstructor
struct RawStmt RawStmt
struct CommonTableExpr CommonTableExpr
struct TableSampleClause TableSampleClause
struct AlterPolicyStmt AlterPolicyStmt
struct CreateConversionStmt CreateConversionStmt
struct ResTarget ResTarget
struct DropRoleStmt DropRoleStmt
struct DiscardStmt DiscardStmt
struct JsonKeyValue JsonKeyValue
struct AlterExtensionStmt AlterExtensionStmt
struct AlterTableStmt AlterTableStmt
struct TypeCast TypeCast
struct PartitionElem PartitionElem
struct ClosePortalStmt ClosePortalStmt
struct AccessPriv AccessPriv
struct Constraint Constraint
struct CreatePLangStmt CreatePLangStmt
struct CreateRangeStmt CreateRangeStmt
struct CreateUserMappingStmt CreateUserMappingStmt
SortByDir
Definition: parsenodes.h:45
@ SORTBY_USING
Definition: parsenodes.h:49
@ SORTBY_DESC
Definition: parsenodes.h:48
@ SORTBY_ASC
Definition: parsenodes.h:47
@ SORTBY_DEFAULT
Definition: parsenodes.h:46
struct AlterDatabaseSetStmt AlterDatabaseSetStmt
struct AlterTableMoveAllStmt AlterTableMoveAllStmt
struct AlterSeqStmt AlterSeqStmt
struct PublicationTable PublicationTable
struct RowMarkClause RowMarkClause
struct CreateTableAsStmt CreateTableAsStmt
struct TransactionStmt TransactionStmt
struct CreateFdwStmt CreateFdwStmt
struct DeclareCursorStmt DeclareCursorStmt
struct ExecuteStmt ExecuteStmt
struct WindowClause WindowClause
RoleStmtType
Definition: parsenodes.h:3101
@ ROLESTMT_ROLE
Definition: parsenodes.h:3102
@ ROLESTMT_USER
Definition: parsenodes.h:3103
@ ROLESTMT_GROUP
Definition: parsenodes.h:3104
struct RuleStmt RuleStmt
struct SecLabelStmt SecLabelStmt
struct AlterTSConfigurationStmt AlterTSConfigurationStmt
struct AlterDatabaseStmt AlterDatabaseStmt
struct AlterExtensionContentsStmt AlterExtensionContentsStmt
TableLikeOption
Definition: parsenodes.h:762
@ CREATE_TABLE_LIKE_COMMENTS
Definition: parsenodes.h:763
@ CREATE_TABLE_LIKE_GENERATED
Definition: parsenodes.h:767
@ CREATE_TABLE_LIKE_IDENTITY
Definition: parsenodes.h:768
@ CREATE_TABLE_LIKE_COMPRESSION
Definition: parsenodes.h:764
@ CREATE_TABLE_LIKE_STORAGE
Definition: parsenodes.h:771
@ CREATE_TABLE_LIKE_ALL
Definition: parsenodes.h:772
@ CREATE_TABLE_LIKE_INDEXES
Definition: parsenodes.h:769
@ CREATE_TABLE_LIKE_DEFAULTS
Definition: parsenodes.h:766
@ CREATE_TABLE_LIKE_STATISTICS
Definition: parsenodes.h:770
@ CREATE_TABLE_LIKE_CONSTRAINTS
Definition: parsenodes.h:765
struct TypeName TypeName
struct AlterEnumStmt AlterEnumStmt
struct CreateCastStmt CreateCastStmt
struct CheckPointStmt CheckPointStmt
struct RefreshMatViewStmt RefreshMatViewStmt
struct CallStmt CallStmt
struct TruncateStmt TruncateStmt
struct DefElem DefElem
struct AlterFdwStmt AlterFdwStmt
struct RangeTblEntry RangeTblEntry
SetQuantifier
Definition: parsenodes.h:61
@ SET_QUANTIFIER_ALL
Definition: parsenodes.h:63
@ SET_QUANTIFIER_DISTINCT
Definition: parsenodes.h:64
@ SET_QUANTIFIER_DEFAULT
Definition: parsenodes.h:62
ViewCheckOption
Definition: parsenodes.h:3762
@ NO_CHECK_OPTION
Definition: parsenodes.h:3763
@ CASCADED_CHECK_OPTION
Definition: parsenodes.h:3765
@ LOCAL_CHECK_OPTION
Definition: parsenodes.h:3764
struct FuncCall FuncCall
struct RangeTableFuncCol RangeTableFuncCol
struct SortGroupClause SortGroupClause
struct CollateClause CollateClause
struct ExplainStmt ExplainStmt
struct AlterTypeStmt AlterTypeStmt
CTEMaterialize
Definition: parsenodes.h:1637
@ CTEMaterializeNever
Definition: parsenodes.h:1640
@ CTEMaterializeAlways
Definition: parsenodes.h:1639
@ CTEMaterializeDefault
Definition: parsenodes.h:1638
struct CallContext CallContext
struct ObjectWithArgs ObjectWithArgs
struct ReplicaIdentityStmt ReplicaIdentityStmt
struct DoStmt DoStmt
struct CompositeTypeStmt CompositeTypeStmt
struct JsonTable JsonTable
struct FetchStmt FetchStmt
struct JsonSerializeExpr JsonSerializeExpr
struct PartitionSpec PartitionSpec
struct CTESearchClause CTESearchClause
unsigned int Oid
Definition: postgres_ext.h:31
XmlOptionType
Definition: primnodes.h:1591
JsonWrapper
Definition: primnodes.h:1749
OnCommitAction
Definition: primnodes.h:56
JsonExprOp
Definition: primnodes.h:1801
CoercionForm
Definition: primnodes.h:733
OverridingKind
Definition: primnodes.h:26
MergeMatchKind
Definition: primnodes.h:1995
CoercionContext
Definition: primnodes.h:713
Oid RelFileNumber
Definition: relpath.h:25
NodeTag type
Definition: parsenodes.h:493
List * elements
Definition: parsenodes.h:494
ParseLoc location
Definition: parsenodes.h:495
bool isnull
Definition: parsenodes.h:365
union ValUnion val
Definition: parsenodes.h:364
ParseLoc location
Definition: parsenodes.h:366
pg_node_attr(custom_copy_equal, custom_read_write, custom_query_jumble) NodeTag type
ParseLoc location
Definition: parsenodes.h:340
Node * lexpr
Definition: parsenodes.h:338
pg_node_attr(custom_read_write) NodeTag type
List * name
Definition: parsenodes.h:337
A_Expr_Kind kind
Definition: parsenodes.h:336
Node * rexpr
Definition: parsenodes.h:339
bool is_slice
Definition: parsenodes.h:461
Node * uidx
Definition: parsenodes.h:463
NodeTag type
Definition: parsenodes.h:460
Node * lidx
Definition: parsenodes.h:462
NodeTag type
Definition: parsenodes.h:483
List * indirection
Definition: parsenodes.h:485
NodeTag type
Definition: parsenodes.h:449
char * priv_name
Definition: parsenodes.h:2552
NodeTag type
Definition: parsenodes.h:2551
List * cols
Definition: parsenodes.h:2553
VariableSetStmt * setstmt
Definition: parsenodes.h:3821
DropBehavior behavior
Definition: parsenodes.h:2484
char * newValNeighbor
Definition: parsenodes.h:3752
List * typeName
Definition: parsenodes.h:3749
bool skipIfNewValExists
Definition: parsenodes.h:3754
bool newValIsAfter
Definition: parsenodes.h:3753
NodeTag type
Definition: parsenodes.h:3748
List * func_options
Definition: parsenodes.h:2887
List * options
Definition: parsenodes.h:2888
char * fdwname
Definition: parsenodes.h:2886
NodeTag type
Definition: parsenodes.h:2885
ObjectWithArgs * func
Definition: parsenodes.h:3492
ObjectType objtype
Definition: parsenodes.h:3491
ObjectWithArgs * opername
Definition: parsenodes.h:3615
RangeVar * relation
Definition: parsenodes.h:3603
RoleSpec * newowner
Definition: parsenodes.h:3605
ObjectType objectType
Definition: parsenodes.h:3602
char * policy_name
Definition: parsenodes.h:3004
RangeVar * table
Definition: parsenodes.h:3005
AlterPublicationAction action
Definition: parsenodes.h:4218
RoleSpec * role
Definition: parsenodes.h:3126
VariableSetStmt * setstmt
Definition: parsenodes.h:3128
List * options
Definition: parsenodes.h:3119
NodeTag type
Definition: parsenodes.h:3117
RoleSpec * role
Definition: parsenodes.h:3118
List * options
Definition: parsenodes.h:3157
RangeVar * sequence
Definition: parsenodes.h:3156
bool for_identity
Definition: parsenodes.h:3158
NodeTag type
Definition: parsenodes.h:3155
Node * stxstattarget
Definition: parsenodes.h:3446
AlterSubscriptionType kind
Definition: parsenodes.h:4246
VariableSetStmt * setstmt
Definition: parsenodes.h:3843
AlterTSConfigType kind
Definition: parsenodes.h:4145
NodeTag type
Definition: parsenodes.h:2437
RoleSpec * newowner
Definition: parsenodes.h:2443
DropBehavior behavior
Definition: parsenodes.h:2446
AlterTableType subtype
Definition: parsenodes.h:2438
RangeVar * relation
Definition: parsenodes.h:2352
ObjectType objtype
Definition: parsenodes.h:2354
List * options
Definition: parsenodes.h:3627
List * typeName
Definition: parsenodes.h:3626
NodeTag type
Definition: parsenodes.h:3625
Definition: value.h:56
char * cycle_path_column
Definition: parsenodes.h:1659
ParseLoc location
Definition: parsenodes.h:1660
Node * cycle_mark_default
Definition: parsenodes.h:1658
Oid cycle_mark_collation
Definition: parsenodes.h:1664
List * cycle_col_list
Definition: parsenodes.h:1655
char * cycle_mark_column
Definition: parsenodes.h:1656
Node * cycle_mark_value
Definition: parsenodes.h:1657
ParseLoc location
Definition: parsenodes.h:1649
char * search_seq_column
Definition: parsenodes.h:1648
bool search_breadth_first
Definition: parsenodes.h:1647
List * search_col_list
Definition: parsenodes.h:1646
pg_node_attr(nodetag_only) NodeTag type
FuncExpr * funcexpr
Definition: parsenodes.h:3536
NodeTag type
Definition: parsenodes.h:3532
List * outargs
Definition: parsenodes.h:3538
FuncCall *funccall pg_node_attr(query_jumble_ignore)
char * indexname
Definition: parsenodes.h:3854
RangeVar * relation
Definition: parsenodes.h:3853
NodeTag type
Definition: parsenodes.h:3852
List * params
Definition: parsenodes.h:3855
List * collname
Definition: parsenodes.h:387
ParseLoc location
Definition: parsenodes.h:388
NodeTag type
Definition: parsenodes.h:385
bool is_not_null
Definition: parsenodes.h:733
CollateClause * collClause
Definition: parsenodes.h:743
char identity
Definition: parsenodes.h:739
RangeVar * identitySequence
Definition: parsenodes.h:740
List * constraints
Definition: parsenodes.h:745
Node * cooked_default
Definition: parsenodes.h:738
char * storage_name
Definition: parsenodes.h:736
char * colname
Definition: parsenodes.h:728
TypeName * typeName
Definition: parsenodes.h:729
char generated
Definition: parsenodes.h:742
NodeTag type
Definition: parsenodes.h:727
bool is_from_type
Definition: parsenodes.h:734
List * fdwoptions
Definition: parsenodes.h:746
Node * raw_default
Definition: parsenodes.h:737
char storage
Definition: parsenodes.h:735
Oid collOid
Definition: parsenodes.h:744
bool is_local
Definition: parsenodes.h:732
int16 inhcount
Definition: parsenodes.h:731
char * compression
Definition: parsenodes.h:730
ParseLoc location
Definition: parsenodes.h:747
ParseLoc location
Definition: parsenodes.h:297
List * fields
Definition: parsenodes.h:296
NodeTag type
Definition: parsenodes.h:295
char * comment
Definition: parsenodes.h:3283
ObjectType objtype
Definition: parsenodes.h:3281
NodeTag type
Definition: parsenodes.h:3280
Node * object
Definition: parsenodes.h:3282
int cterefcount pg_node_attr(query_jumble_ignore)
List *aliascolnames pg_node_attr(query_jumble_ignore)
List *ctecoltypes pg_node_attr(query_jumble_ignore)
CTECycleClause *cycle_clause pg_node_attr(query_jumble_ignore)
List *ctecoltypmods pg_node_attr(query_jumble_ignore)
CTESearchClause *search_clause pg_node_attr(query_jumble_ignore)
CTEMaterialize ctematerialized
Definition: parsenodes.h:1679
List *ctecolnames pg_node_attr(query_jumble_ignore)
List *ctecolcollations pg_node_attr(query_jumble_ignore)
ParseLoc location
Definition: parsenodes.h:1684
bool cterecursive pg_node_attr(query_jumble_ignore)
RangeVar * typevar
Definition: parsenodes.h:3716
bool initdeferred
Definition: parsenodes.h:2759
List * exclusions
Definition: parsenodes.h:2774
ParseLoc location
Definition: parsenodes.h:2798
bool reset_default_tblspc
Definition: parsenodes.h:2779
List * keys
Definition: parsenodes.h:2769
List * pk_attrs
Definition: parsenodes.h:2787
List * fk_del_set_cols
Definition: parsenodes.h:2793
bool fk_with_period
Definition: parsenodes.h:2788
Node * where_clause
Definition: parsenodes.h:2782
char * indexname
Definition: parsenodes.h:2777
char * indexspace
Definition: parsenodes.h:2778
ConstrType contype
Definition: parsenodes.h:2756
char * access_method
Definition: parsenodes.h:2781
Oid old_pktable_oid
Definition: parsenodes.h:2795
bool is_no_inherit
Definition: parsenodes.h:2762
List * options
Definition: parsenodes.h:2776
char fk_upd_action
Definition: parsenodes.h:2791
List * old_conpfeqop
Definition: parsenodes.h:2794
char fk_matchtype
Definition: parsenodes.h:2790
bool nulls_not_distinct
Definition: parsenodes.h:2768
bool pk_with_period
Definition: parsenodes.h:2789
char * cooked_expr
Definition: parsenodes.h:2765
bool initially_valid
Definition: parsenodes.h:2761
bool skip_validation
Definition: parsenodes.h:2760
bool without_overlaps
Definition: parsenodes.h:2771
bool deferrable
Definition: parsenodes.h:2758
NodeTag type
Definition: parsenodes.h:2755
Node * raw_expr
Definition: parsenodes.h:2763
char * conname
Definition: parsenodes.h:2757
char generated_when
Definition: parsenodes.h:2767
RangeVar * pktable
Definition: parsenodes.h:2785
List * including
Definition: parsenodes.h:2772
char fk_del_action
Definition: parsenodes.h:2792
List * fk_attrs
Definition: parsenodes.h:2786
bool is_program
Definition: parsenodes.h:2604
RangeVar * relation
Definition: parsenodes.h:2598
List * options
Definition: parsenodes.h:2606
bool is_from
Definition: parsenodes.h:2603
char * filename
Definition: parsenodes.h:2605
NodeTag type
Definition: parsenodes.h:2597
List * attlist
Definition: parsenodes.h:2601
Node * whereClause
Definition: parsenodes.h:2607
Node * query
Definition: parsenodes.h:2599
NodeTag type
Definition: parsenodes.h:3017
List * handler_name
Definition: parsenodes.h:3019
char * amname
Definition: parsenodes.h:3018
TypeName * sourcetype
Definition: parsenodes.h:4033
TypeName * targettype
Definition: parsenodes.h:4034
CoercionContext context
Definition: parsenodes.h:4036
ObjectWithArgs * func
Definition: parsenodes.h:4035
TypeName * typeName
Definition: parsenodes.h:3186
CollateClause * collClause
Definition: parsenodes.h:3187
NodeTag type
Definition: parsenodes.h:2877
List * func_options
Definition: parsenodes.h:2879
char * fdwname
Definition: parsenodes.h:2878
List * options
Definition: parsenodes.h:2880
TypeName * returnType
Definition: parsenodes.h:3461
ObjectWithArgs * name
Definition: parsenodes.h:3214
TypeName * storedtype
Definition: parsenodes.h:3220
TypeName * datatype
Definition: parsenodes.h:3201
List * plvalidator
Definition: parsenodes.h:3087
RangeVar * table
Definition: parsenodes.h:2989
RoleStmtType stmt_type
Definition: parsenodes.h:3110
RoleSpec * authrole
Definition: parsenodes.h:2334
bool if_not_exists
Definition: parsenodes.h:3150
List * options
Definition: parsenodes.h:3147
NodeTag type
Definition: parsenodes.h:3145
RangeVar * sequence
Definition: parsenodes.h:3146
List * tableElts
Definition: parsenodes.h:2676
List * nnconstraints
Definition: parsenodes.h:2683
TypeName * ofTypename
Definition: parsenodes.h:2681
OnCommitAction oncommit
Definition: parsenodes.h:2685
List * options
Definition: parsenodes.h:2684
bool if_not_exists
Definition: parsenodes.h:2688
List * inhRelations
Definition: parsenodes.h:2677
RangeVar * relation
Definition: parsenodes.h:2675
char * tablespacename
Definition: parsenodes.h:2686
PartitionSpec * partspec
Definition: parsenodes.h:2680
NodeTag type
Definition: parsenodes.h:2674
PartitionBoundSpec * partbound
Definition: parsenodes.h:2679
char * accessMethod
Definition: parsenodes.h:2687
List * constraints
Definition: parsenodes.h:2682
IntoClause * into
Definition: parsenodes.h:3920
ObjectType objtype
Definition: parsenodes.h:3921
ObjectWithArgs * tosql
Definition: parsenodes.h:4051
TypeName * type_name
Definition: parsenodes.h:4048
ObjectWithArgs * fromsql
Definition: parsenodes.h:4050
Node * whenClause
Definition: parsenodes.h:3042
List * transitionRels
Definition: parsenodes.h:3044
RangeVar * constrrel
Definition: parsenodes.h:3048
RangeVar * relation
Definition: parsenodes.h:3033
NodeTag type
Definition: parsenodes.h:3795
List * options
Definition: parsenodes.h:3797
char * dbname
Definition: parsenodes.h:3796
char *name pg_node_attr(query_jumble_ignore)
ParseLoc location pg_node_attr(query_jumble_location)
char * defnamespace
Definition: parsenodes.h:816
NodeTag type
Definition: parsenodes.h:815
DefElemAction defaction
Definition: parsenodes.h:820
char * defname
Definition: parsenodes.h:817
ParseLoc location
Definition: parsenodes.h:821
Node * arg
Definition: parsenodes.h:818
bool oldstyle
Definition: parsenodes.h:3170
List * definition
Definition: parsenodes.h:3173
List * defnames
Definition: parsenodes.h:3171
List * args
Definition: parsenodes.h:3172
NodeTag type
Definition: parsenodes.h:3168
ObjectType kind
Definition: parsenodes.h:3169
bool replace
Definition: parsenodes.h:3175
bool if_not_exists
Definition: parsenodes.h:3174
ParseLoc stmt_location
Definition: parsenodes.h:2065
WithClause * withClause
Definition: parsenodes.h:2064
ParseLoc stmt_len
Definition: parsenodes.h:2066
Node * whereClause
Definition: parsenodes.h:2062
RangeVar * relation
Definition: parsenodes.h:2060
List * usingClause
Definition: parsenodes.h:2061
List * returningList
Definition: parsenodes.h:2063
NodeTag type
Definition: parsenodes.h:2059
NodeTag type
Definition: parsenodes.h:3962
DiscardMode target
Definition: parsenodes.h:3963
NodeTag type
Definition: parsenodes.h:3504
List * args
Definition: parsenodes.h:3505
DropBehavior behavior
Definition: parsenodes.h:4107
NodeTag type
Definition: parsenodes.h:4105
NodeTag type
Definition: parsenodes.h:3133
List * roles
Definition: parsenodes.h:3134
bool missing_ok
Definition: parsenodes.h:3258
List * objects
Definition: parsenodes.h:3255
ObjectType removeType
Definition: parsenodes.h:3256
bool concurrent
Definition: parsenodes.h:3259
DropBehavior behavior
Definition: parsenodes.h:3257
NodeTag type
Definition: parsenodes.h:3254
DropBehavior behavior
Definition: parsenodes.h:4258
List * options
Definition: parsenodes.h:3833
char * dbname
Definition: parsenodes.h:3831
bool missing_ok
Definition: parsenodes.h:3832
NodeTag type
Definition: parsenodes.h:3830
List * params
Definition: parsenodes.h:4076
NodeTag type
Definition: parsenodes.h:4074
char * name
Definition: parsenodes.h:4075
NodeTag type
Definition: parsenodes.h:3898
Node * query
Definition: parsenodes.h:3899
List * options
Definition: parsenodes.h:3900
long howMany
Definition: parsenodes.h:3358
bool ismove
Definition: parsenodes.h:3360
FetchDirection direction
Definition: parsenodes.h:3357
char * portalname
Definition: parsenodes.h:3359
NodeTag type
Definition: parsenodes.h:3356
Definition: value.h:48
bool agg_within_group
Definition: parsenodes.h:433
CoercionForm funcformat
Definition: parsenodes.h:437
Node * agg_filter
Definition: parsenodes.h:431
List * agg_order
Definition: parsenodes.h:430
List * funcname
Definition: parsenodes.h:428
List * args
Definition: parsenodes.h:429
bool agg_star
Definition: parsenodes.h:434
bool agg_distinct
Definition: parsenodes.h:435
NodeTag type
Definition: parsenodes.h:427
ParseLoc location
Definition: parsenodes.h:438
bool func_variadic
Definition: parsenodes.h:436
struct WindowDef * over
Definition: parsenodes.h:432
TypeName * argType
Definition: parsenodes.h:3482
FunctionParameterMode mode
Definition: parsenodes.h:3483
DropBehavior behavior
Definition: parsenodes.h:2573
NodeTag type
Definition: parsenodes.h:2567
RoleSpec * grantor
Definition: parsenodes.h:2572
List * grantee_roles
Definition: parsenodes.h:2569
List * granted_roles
Definition: parsenodes.h:2568
ObjectType objtype
Definition: parsenodes.h:2505
bool is_grant
Definition: parsenodes.h:2503
List * objects
Definition: parsenodes.h:2506
bool grant_option
Definition: parsenodes.h:2511
List * grantees
Definition: parsenodes.h:2510
List * privileges
Definition: parsenodes.h:2508
GrantTargetType targtype
Definition: parsenodes.h:2504
NodeTag type
Definition: parsenodes.h:2502
DropBehavior behavior
Definition: parsenodes.h:2513
RoleSpec * grantor
Definition: parsenodes.h:2512
NodeTag type
Definition: parsenodes.h:1508
List * content
Definition: parsenodes.h:1510
GroupingSetKind kind pg_node_attr(query_jumble_ignore)
ParseLoc location
Definition: parsenodes.h:1511
ImportForeignSchemaType list_type
Definition: parsenodes.h:2976
Node * expr
Definition: parsenodes.h:786
SortByDir ordering
Definition: parsenodes.h:791
List * opclassopts
Definition: parsenodes.h:790
NodeTag type
Definition: parsenodes.h:784
char * indexcolname
Definition: parsenodes.h:787
SortByNulls nulls_ordering
Definition: parsenodes.h:792
List * opclass
Definition: parsenodes.h:789
char * name
Definition: parsenodes.h:785
List * collation
Definition: parsenodes.h:788
bool unique
Definition: parsenodes.h:3393
bool reset_default_tblspc
Definition: parsenodes.h:3403
NodeTag type
Definition: parsenodes.h:3376
bool deferrable
Definition: parsenodes.h:3398
List * indexParams
Definition: parsenodes.h:3381
Oid indexOid
Definition: parsenodes.h:3388
bool initdeferred
Definition: parsenodes.h:3399
RangeVar * relation
Definition: parsenodes.h:3378
SubTransactionId oldFirstRelfilelocatorSubid
Definition: parsenodes.h:3391
bool iswithoutoverlaps
Definition: parsenodes.h:3397
bool transformed
Definition: parsenodes.h:3400
List * options
Definition: parsenodes.h:3384
char * tableSpace
Definition: parsenodes.h:3380
SubTransactionId oldCreateSubid
Definition: parsenodes.h:3390
bool isconstraint
Definition: parsenodes.h:3396
List * excludeOpNames
Definition: parsenodes.h:3386
bool nulls_not_distinct
Definition: parsenodes.h:3394
bool concurrent
Definition: parsenodes.h:3401
char * idxname
Definition: parsenodes.h:3377
Node * whereClause
Definition: parsenodes.h:3385
bool if_not_exists
Definition: parsenodes.h:3402
char * accessMethod
Definition: parsenodes.h:3379
char * idxcomment
Definition: parsenodes.h:3387
RelFileNumber oldNumber
Definition: parsenodes.h:3389
bool primary
Definition: parsenodes.h:3395
List * indexIncludingParams
Definition: parsenodes.h:3382
NodeTag type
Definition: parsenodes.h:1608
ParseLoc location
Definition: parsenodes.h:1612
char * conname
Definition: parsenodes.h:1611
List * indexElems
Definition: parsenodes.h:1609
Node * whereClause
Definition: parsenodes.h:1610
pg_node_attr(nodetag_only) NodeTag type
char * source_text
Definition: parsenodes.h:3513
ParseLoc stmt_location
Definition: parsenodes.h:2049
OnConflictClause * onConflictClause
Definition: parsenodes.h:2045
Node * selectStmt
Definition: parsenodes.h:2044
ParseLoc stmt_len
Definition: parsenodes.h:2050
WithClause * withClause
Definition: parsenodes.h:2047
NodeTag type
Definition: parsenodes.h:2041
RangeVar * relation
Definition: parsenodes.h:2042
List * cols
Definition: parsenodes.h:2043
List * returningList
Definition: parsenodes.h:2046
Definition: value.h:29
struct WindowDef * over
Definition: parsenodes.h:1968
JsonOutput * output
Definition: parsenodes.h:1965
JsonValueExpr * val
Definition: parsenodes.h:1765
NodeTag type
Definition: parsenodes.h:1764
bool absent_on_null
Definition: parsenodes.h:1994
NodeTag type
Definition: parsenodes.h:1991
JsonValueExpr * arg
Definition: parsenodes.h:1993
JsonAggConstructor * constructor
Definition: parsenodes.h:1992
JsonOutput * output
Definition: parsenodes.h:1938
JsonOutput * output
Definition: parsenodes.h:1794
char * column_name
Definition: parsenodes.h:1789
JsonWrapper wrapper
Definition: parsenodes.h:1797
JsonQuotes quotes
Definition: parsenodes.h:1798
JsonExprOp op
Definition: parsenodes.h:1788
List * passing
Definition: parsenodes.h:1793
JsonBehavior * on_empty
Definition: parsenodes.h:1795
ParseLoc location
Definition: parsenodes.h:1799
NodeTag type
Definition: parsenodes.h:1787
Node * pathspec
Definition: parsenodes.h:1792
JsonBehavior * on_error
Definition: parsenodes.h:1796
JsonValueExpr * context_item
Definition: parsenodes.h:1791
JsonValueExpr * value
Definition: parsenodes.h:1876
NodeTag type
Definition: parsenodes.h:1874
NodeTag type
Definition: parsenodes.h:1978
JsonAggConstructor * constructor
Definition: parsenodes.h:1979
JsonKeyValue * arg
Definition: parsenodes.h:1980
bool absent_on_null
Definition: parsenodes.h:1981
JsonOutput * output
Definition: parsenodes.h:1924
JsonReturning * returning
Definition: parsenodes.h:1755
TypeName * typeName
Definition: parsenodes.h:1754
NodeTag type
Definition: parsenodes.h:1753
JsonValueExpr * expr
Definition: parsenodes.h:1886
ParseLoc location
Definition: parsenodes.h:1889
JsonOutput * output
Definition: parsenodes.h:1887
NodeTag type
Definition: parsenodes.h:1885
ParseLoc location
Definition: parsenodes.h:1901
JsonOutput * output
Definition: parsenodes.h:1900
JsonOutput * output
Definition: parsenodes.h:1912
JsonValueExpr * expr
Definition: parsenodes.h:1911
ParseLoc location
Definition: parsenodes.h:1864
JsonTableColumnType coltype
Definition: parsenodes.h:1854
JsonBehavior * on_empty
Definition: parsenodes.h:1862
JsonWrapper wrapper
Definition: parsenodes.h:1859
JsonBehavior * on_error
Definition: parsenodes.h:1863
JsonQuotes quotes
Definition: parsenodes.h:1860
JsonFormat * format
Definition: parsenodes.h:1858
TypeName * typeName
Definition: parsenodes.h:1856
JsonTablePathSpec * pathspec
Definition: parsenodes.h:1857
ParseLoc name_location
Definition: parsenodes.h:1813
JsonBehavior * on_error
Definition: parsenodes.h:1828
List * columns
Definition: parsenodes.h:1827
JsonTablePathSpec * pathspec
Definition: parsenodes.h:1825
Alias * alias
Definition: parsenodes.h:1829
NodeTag type
Definition: parsenodes.h:1823
bool lateral
Definition: parsenodes.h:1830
List * passing
Definition: parsenodes.h:1826
JsonValueExpr * context_item
Definition: parsenodes.h:1824
ParseLoc location
Definition: parsenodes.h:1831
Definition: pg_list.h:54
NodeTag type
Definition: parsenodes.h:3663
char * conditionname
Definition: parsenodes.h:3664
NodeTag type
Definition: parsenodes.h:3785
char * filename
Definition: parsenodes.h:3786
NodeTag type
Definition: parsenodes.h:3972
bool nowait
Definition: parsenodes.h:3975
List * relations
Definition: parsenodes.h:3973
List * lockedRels
Definition: parsenodes.h:836
LockClauseStrength strength
Definition: parsenodes.h:837
LockWaitPolicy waitPolicy
Definition: parsenodes.h:838
NodeTag type
Definition: parsenodes.h:835
Node * sourceRelation
Definition: parsenodes.h:2094
List * mergeWhenClauses
Definition: parsenodes.h:2096
ParseLoc stmt_location
Definition: parsenodes.h:2099
RangeVar * relation
Definition: parsenodes.h:2093
Node * joinCondition
Definition: parsenodes.h:2095
List * returningList
Definition: parsenodes.h:2097
WithClause * withClause
Definition: parsenodes.h:2098
NodeTag type
Definition: parsenodes.h:2092
ParseLoc stmt_len
Definition: parsenodes.h:2100
CmdType commandType
Definition: parsenodes.h:1721
MergeMatchKind matchKind
Definition: parsenodes.h:1720
NodeTag type
Definition: parsenodes.h:536
Definition: nodes.h:129
char * payload
Definition: parsenodes.h:3654
char * conditionname
Definition: parsenodes.h:3653
NodeTag type
Definition: parsenodes.h:3652
List * objfuncargs
Definition: parsenodes.h:2538
bool args_unspecified
Definition: parsenodes.h:2539
InferClause * infer
Definition: parsenodes.h:1625
OnConflictAction action
Definition: parsenodes.h:1624
ParseLoc location
Definition: parsenodes.h:1628
NodeTag type
Definition: parsenodes.h:2236
SelectStmt * val
Definition: parsenodes.h:2241
ParseLoc location
Definition: parsenodes.h:2242
List * indirection
Definition: parsenodes.h:2239
ParseLoc location
Definition: parsenodes.h:307
int number
Definition: parsenodes.h:306
NodeTag type
Definition: parsenodes.h:305
PartitionBoundSpec * bound
Definition: parsenodes.h:949
bool concurrent
Definition: parsenodes.h:950
RangeVar * name
Definition: parsenodes.h:948
NodeTag type
Definition: parsenodes.h:947
List * collation
Definition: parsenodes.h:867
ParseLoc location
Definition: parsenodes.h:869
NodeTag type
Definition: parsenodes.h:864
List * opclass
Definition: parsenodes.h:868
PartitionRangeDatumKind kind
Definition: parsenodes.h:935
List * partParams
Definition: parsenodes.h:888
NodeTag type
Definition: parsenodes.h:886
ParseLoc location
Definition: parsenodes.h:889
PartitionStrategy strategy
Definition: parsenodes.h:887
List * argtypes
Definition: parsenodes.h:4062
NodeTag type
Definition: parsenodes.h:4060
char * name
Definition: parsenodes.h:4061
Node * query
Definition: parsenodes.h:4063
PublicationObjSpecType pubobjtype
Definition: parsenodes.h:4182
PublicationTable * pubtable
Definition: parsenodes.h:4184
RangeVar * relation
Definition: parsenodes.h:4162
List * rowMarks
Definition: parsenodes.h:219
int mergeTargetRelation pg_node_attr(query_jumble_ignore)
bool hasAggs pg_node_attr(query_jumble_ignore)
bool groupDistinct
Definition: parsenodes.h:203
bool hasRecursive pg_node_attr(query_jumble_ignore)
Node * mergeJoinCondition
Definition: parsenodes.h:191
Node * limitCount
Definition: parsenodes.h:216
FromExpr * jointree
Definition: parsenodes.h:177
List * returningList
Definition: parsenodes.h:200
bool canSetTag pg_node_attr(query_jumble_ignore)
Node * setOperations
Definition: parsenodes.h:221
bool hasSubLinks pg_node_attr(query_jumble_ignore)
List * cteList
Definition: parsenodes.h:168
OnConflictExpr * onConflict
Definition: parsenodes.h:198
OverridingKind override pg_node_attr(query_jumble_ignore)
List * groupClause
Definition: parsenodes.h:202
List *rteperminfos pg_node_attr(query_jumble_ignore)
bool hasTargetSRFs pg_node_attr(query_jumble_ignore)
bool hasGroupRTE pg_node_attr(query_jumble_ignore)
int resultRelation pg_node_attr(query_jumble_ignore)
Node * havingQual
Definition: parsenodes.h:207
List * rtable
Definition: parsenodes.h:170
List *withCheckOptions pg_node_attr(query_jumble_ignore)
ParseLoc stmt_len pg_node_attr(query_jumble_ignore)
bool hasDistinctOn pg_node_attr(query_jumble_ignore)
Node * limitOffset
Definition: parsenodes.h:215
List *constraintDeps pg_node_attr(query_jumble_ignore)
bool isReturn pg_node_attr(query_jumble_ignore)
uint64 queryId pg_node_attr(equal_ignore, query_jumble_ignore, read_write_ignore, read_as(0))
bool hasWindowFuncs pg_node_attr(query_jumble_ignore)
CmdType commandType
Definition: parsenodes.h:121
LimitOption limitOption
Definition: parsenodes.h:217
Node * utilityStmt
Definition: parsenodes.h:136
List * mergeActionList
Definition: parsenodes.h:180
bool hasModifyingCTE pg_node_attr(query_jumble_ignore)
NodeTag type
Definition: parsenodes.h:119
List * windowClause
Definition: parsenodes.h:209
List * targetList
Definition: parsenodes.h:193
List * groupingSets
Definition: parsenodes.h:205
List * distinctClause
Definition: parsenodes.h:211
bool hasForUpdate pg_node_attr(query_jumble_ignore)
List * sortClause
Definition: parsenodes.h:213
ParseLoc stmt_location
Definition: parsenodes.h:240
bool hasRowSecurity pg_node_attr(query_jumble_ignore)
QuerySource querySource pg_node_attr(query_jumble_ignore)
Bitmapset * selectedCols
Definition: parsenodes.h:1293
AclMode requiredPerms
Definition: parsenodes.h:1291
Bitmapset * insertedCols
Definition: parsenodes.h:1294
Bitmapset * updatedCols
Definition: parsenodes.h:1295
Alias * alias
Definition: parsenodes.h:646
bool is_rowsfrom
Definition: parsenodes.h:644
List * coldeflist
Definition: parsenodes.h:647
List * functions
Definition: parsenodes.h:645
NodeTag type
Definition: parsenodes.h:641
Node * subquery
Definition: parsenodes.h:621
NodeTag type
Definition: parsenodes.h:619
Alias * alias
Definition: parsenodes.h:622
ParseLoc location
Definition: parsenodes.h:684
TypeName * typeName
Definition: parsenodes.h:679
List * namespaces
Definition: parsenodes.h:663
Node * docexpr
Definition: parsenodes.h:661
ParseLoc location
Definition: parsenodes.h:666
Node * rowexpr
Definition: parsenodes.h:662
List * columns
Definition: parsenodes.h:664
NodeTag type
Definition: parsenodes.h:659
Alias * alias
Definition: parsenodes.h:665
ParseLoc location
Definition: parsenodes.h:704
List *colcollations pg_node_attr(query_jumble_ignore)
List *joinrightcols pg_node_attr(query_jumble_ignore)
Cardinality enrtuples pg_node_attr(query_jumble_ignore)
char * ctename
Definition: parsenodes.h:1196
TableFunc * tablefunc
Definition: parsenodes.h:1184
Alias *alias pg_node_attr(query_jumble_ignore)
List *groupexprs pg_node_attr(query_jumble_ignore)
List *joinleftcols pg_node_attr(query_jumble_ignore)
Index ctelevelsup
Definition: parsenodes.h:1198
bool inFromCl pg_node_attr(query_jumble_ignore)
bool lateral pg_node_attr(query_jumble_ignore)
List *joinaliasvars pg_node_attr(query_jumble_ignore)
bool security_barrier pg_node_attr(query_jumble_ignore)
bool funcordinality
Definition: parsenodes.h:1179
Alias *eref pg_node_attr(query_jumble_ignore)
struct TableSampleClause * tablesample
Definition: parsenodes.h:1098
Query * subquery
Definition: parsenodes.h:1104
List *coltypmods pg_node_attr(query_jumble_ignore)
List * values_lists
Definition: parsenodes.h:1190
char * enrname
Definition: parsenodes.h:1231
List *securityQuals pg_node_attr(query_jumble_ignore)
JoinType jointype
Definition: parsenodes.h:1151
int rellockmode pg_node_attr(query_jumble_ignore)
pg_node_attr(custom_read_write) NodeTag type
char relkind pg_node_attr(query_jumble_ignore)
List * functions
Definition: parsenodes.h:1177
int joinmergedcols pg_node_attr(query_jumble_ignore)
Index perminfoindex pg_node_attr(query_jumble_ignore)
bool self_reference pg_node_attr(query_jumble_ignore)
List *coltypes pg_node_attr(query_jumble_ignore)
RTEKind rtekind
Definition: parsenodes.h:1047
Alias *join_using_alias pg_node_attr(query_jumble_ignore)
List *funccolcollations pg_node_attr(query_jumble_ignore)
Bitmapset *funcparams pg_node_attr(query_jumble_ignore)
List *funccolnames pg_node_attr(query_jumble_ignore)
int funccolcount pg_node_attr(query_jumble_ignore)
List *funccoltypes pg_node_attr(query_jumble_ignore)
List *funccoltypmods pg_node_attr(query_jumble_ignore)
ParseLoc stmt_location
Definition: parsenodes.h:2023
ParseLoc stmt_len
Definition: parsenodes.h:2024
pg_node_attr(no_query_jumble) NodeTag type
Node * stmt
Definition: parsenodes.h:2022
RoleSpec * newrole
Definition: parsenodes.h:4117
RangeVar * relation
Definition: parsenodes.h:3935
const char * name
Definition: parsenodes.h:4008
ReindexObjectType kind
Definition: parsenodes.h:4005
RangeVar * relation
Definition: parsenodes.h:4007
List * params
Definition: parsenodes.h:4009
NodeTag type
Definition: parsenodes.h:4004
RangeVar * relation
Definition: parsenodes.h:3558
bool missing_ok
Definition: parsenodes.h:3564
ObjectType relationType
Definition: parsenodes.h:3557
DropBehavior behavior
Definition: parsenodes.h:3563
ObjectType renameType
Definition: parsenodes.h:3556
NodeTag type
Definition: parsenodes.h:3555
char * newname
Definition: parsenodes.h:3562
char * subname
Definition: parsenodes.h:3560
Node * object
Definition: parsenodes.h:3559
Node * val
Definition: parsenodes.h:521
ParseLoc location
Definition: parsenodes.h:522
List * indirection
Definition: parsenodes.h:520
char * name
Definition: parsenodes.h:519
NodeTag type
Definition: parsenodes.h:518
NodeTag type
Definition: parsenodes.h:2222
Node * returnval
Definition: parsenodes.h:2223
ParseLoc location
Definition: parsenodes.h:408
RoleSpecType roletype
Definition: parsenodes.h:406
NodeTag type
Definition: parsenodes.h:405
char * rolename
Definition: parsenodes.h:407
NodeTag type
Definition: parsenodes.h:1578
LockClauseStrength strength
Definition: parsenodes.h:1580
LockWaitPolicy waitPolicy
Definition: parsenodes.h:1581
char * rulename
Definition: parsenodes.h:3638
Node * whereClause
Definition: parsenodes.h:3639
bool instead
Definition: parsenodes.h:3641
RangeVar * relation
Definition: parsenodes.h:3637
bool replace
Definition: parsenodes.h:3643
CmdType event
Definition: parsenodes.h:3640
List * actions
Definition: parsenodes.h:3642
NodeTag type
Definition: parsenodes.h:3636
ObjectType objtype
Definition: parsenodes.h:3293
NodeTag type
Definition: parsenodes.h:3292
Node * object
Definition: parsenodes.h:3294
char * provider
Definition: parsenodes.h:3295
char * label
Definition: parsenodes.h:3296
LimitOption limitOption
Definition: parsenodes.h:2159
ParseLoc stmt_location
Definition: parsenodes.h:2170
List * sortClause
Definition: parsenodes.h:2156
List * targetList
Definition: parsenodes.h:2134
IntoClause * intoClause
Definition: parsenodes.h:2133
Node * limitOffset
Definition: parsenodes.h:2157
bool groupDistinct
Definition: parsenodes.h:2138
List * fromClause
Definition: parsenodes.h:2135
NodeTag type
Definition: parsenodes.h:2126
List * groupClause
Definition: parsenodes.h:2137
Node * havingClause
Definition: parsenodes.h:2139
List * lockingClause
Definition: parsenodes.h:2160
Node * limitCount
Definition: parsenodes.h:2158
List * windowClause
Definition: parsenodes.h:2140
List * distinctClause
Definition: parsenodes.h:2131
List * valuesLists
Definition: parsenodes.h:2150
struct SelectStmt * larg
Definition: parsenodes.h:2168
struct SelectStmt * rarg
Definition: parsenodes.h:2169
ParseLoc stmt_len
Definition: parsenodes.h:2171
Node * whereClause
Definition: parsenodes.h:2136
SetOperation op
Definition: parsenodes.h:2166
WithClause * withClause
Definition: parsenodes.h:2161
List *colCollations pg_node_attr(query_jumble_ignore)
List *colTypes pg_node_attr(query_jumble_ignore)
List *groupClauses pg_node_attr(query_jumble_ignore)
List *colTypmods pg_node_attr(query_jumble_ignore)
SetOperation op
Definition: parsenodes.h:2198
SortByNulls sortby_nulls
Definition: parsenodes.h:550
Node * node
Definition: parsenodes.h:548
NodeTag type
Definition: parsenodes.h:547
List * useOp
Definition: parsenodes.h:551
SortByDir sortby_dir
Definition: parsenodes.h:549
ParseLoc location
Definition: parsenodes.h:552
bool hashable pg_node_attr(query_jumble_ignore)
Index tleSortGroupRef
Definition: parsenodes.h:1438
NodeTag type
Definition: parsenodes.h:3432
char * name
Definition: parsenodes.h:3433
Node * expr
Definition: parsenodes.h:3434
Definition: value.h:64
RangeVar * relation
Definition: parsenodes.h:756
TransactionStmtKind kind
Definition: parsenodes.h:3698
ParseLoc location pg_node_attr(query_jumble_location)
char *savepoint_name pg_node_attr(query_jumble_ignore)
char *gid pg_node_attr(query_jumble_ignore)
List * relations
Definition: parsenodes.h:3269
DropBehavior behavior
Definition: parsenodes.h:3271
bool restart_seqs
Definition: parsenodes.h:3270
NodeTag type
Definition: parsenodes.h:3268
TypeName * typeName
Definition: parsenodes.h:376
ParseLoc location
Definition: parsenodes.h:377
Node * arg
Definition: parsenodes.h:375
NodeTag type
Definition: parsenodes.h:374
bool setof
Definition: parsenodes.h:272
Oid typeOid
Definition: parsenodes.h:271
bool pct_type
Definition: parsenodes.h:273
List * names
Definition: parsenodes.h:270
NodeTag type
Definition: parsenodes.h:269
List * arrayBounds
Definition: parsenodes.h:276
int32 typemod
Definition: parsenodes.h:275
ParseLoc location
Definition: parsenodes.h:277
List * typmods
Definition: parsenodes.h:274
NodeTag type
Definition: parsenodes.h:3673
char * conditionname
Definition: parsenodes.h:3674
List * targetList
Definition: parsenodes.h:2077
List * returningList
Definition: parsenodes.h:2080
List * fromClause
Definition: parsenodes.h:2079
NodeTag type
Definition: parsenodes.h:2075
Node * whereClause
Definition: parsenodes.h:2078
ParseLoc stmt_len
Definition: parsenodes.h:2083
RangeVar * relation
Definition: parsenodes.h:2076
ParseLoc stmt_location
Definition: parsenodes.h:2082
WithClause * withClause
Definition: parsenodes.h:2081
RangeVar * relation
Definition: parsenodes.h:3883
NodeTag type
Definition: parsenodes.h:3867
List * options
Definition: parsenodes.h:3868
bool is_vacuumcmd
Definition: parsenodes.h:3870
List * rels
Definition: parsenodes.h:3869
ParseLoc location pg_node_attr(query_jumble_location)
VariableSetKind kind
Definition: parsenodes.h:2632
pg_node_attr(custom_query_jumble) NodeTag type
bool replace
Definition: parsenodes.h:3774
List * options
Definition: parsenodes.h:3775
Node * query
Definition: parsenodes.h:3773
List * aliases
Definition: parsenodes.h:3772
RangeVar * view
Definition: parsenodes.h:3771
NodeTag type
Definition: parsenodes.h:3770
ViewCheckOption withCheckOption
Definition: parsenodes.h:3776
bool inRangeNullsFirst pg_node_attr(query_jumble_ignore)
bool inRangeAsc pg_node_attr(query_jumble_ignore)
Node * startOffset
Definition: parsenodes.h:1547
Oid inRangeColl pg_node_attr(query_jumble_ignore)
List * partitionClause
Definition: parsenodes.h:1543
NodeTag type
Definition: parsenodes.h:1538
bool copiedOrder pg_node_attr(query_jumble_ignore)
char *refname pg_node_attr(query_jumble_ignore)
Oid startInRangeFunc pg_node_attr(query_jumble_ignore)
Oid endInRangeFunc pg_node_attr(query_jumble_ignore)
char *name pg_node_attr(query_jumble_ignore)
Node * endOffset
Definition: parsenodes.h:1548
List * orderClause
Definition: parsenodes.h:1545
List * orderClause
Definition: parsenodes.h:569
ParseLoc location
Definition: parsenodes.h:573
NodeTag type
Definition: parsenodes.h:565
List * partitionClause
Definition: parsenodes.h:568
Node * startOffset
Definition: parsenodes.h:571
char * refname
Definition: parsenodes.h:567
Node * endOffset
Definition: parsenodes.h:572
int frameOptions
Definition: parsenodes.h:570
char * name
Definition: parsenodes.h:566
List * ctes
Definition: parsenodes.h:1595
NodeTag type
Definition: parsenodes.h:1594
ParseLoc location
Definition: parsenodes.h:1597
bool recursive
Definition: parsenodes.h:1596
ParseLoc location
Definition: parsenodes.h:851
TypeName * typeName
Definition: parsenodes.h:849
Node * expr
Definition: parsenodes.h:848
NodeTag type
Definition: parsenodes.h:846
XmlOptionType xmloption
Definition: parsenodes.h:847
BitString bsval
Definition: parsenodes.h:356
Node node
Definition: parsenodes.h:351
Float fval
Definition: parsenodes.h:353
String sval
Definition: parsenodes.h:355
Boolean boolval
Definition: parsenodes.h:354
Integer ival
Definition: parsenodes.h:352
const char * type
const char * name