Skip to main content

rupg_sql/generated/
nodes.rs

1//! The node types of the raw parse tree, with the names and the fields of the PostgreSQL headers.
2//!
3//! @generated by `cargo xtask sql` from the vendored headers in `vendor/postgres-19/src/include`, `errcodes.txt`, `pg_type.dat` and `gram.y`. Do not edit. `cargo xtask sql --check` runs in CI and fails if this file and the vendored files disagree.
4//!
5//! A `Node *` field is an `Option<Node>`, a `List *` field is a [`List`], which is empty for `NIL`, a `char *` field is an `Option<Str>`, and a field that points to a node type is an `Option<Box<..>>` of that type. An enum is a number with a constant for each value, so that the zero of `makeNode` is a value of every enum. The writer of each type gives the text of `nodeToString` with the locations. The `#define` constants that `gram.y` names come first.
6
7#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals, missing_docs)]
8
9use rupg_common::SqlState;
10
11use crate::nodes::{Equal, List, NodeType, Out, Str, w};
12
13pub const PG_INT16_MAX: i32 = 32767;
14pub const NO_NULLTREATMENT: i32 = 0;
15pub const PARSER_IGNORE_NULLS: i32 = 1;
16pub const PARSER_RESPECT_NULLS: i32 = 2;
17pub const FRAMEOPTION_NONDEFAULT: i32 = 1;
18pub const FRAMEOPTION_RANGE: i32 = 2;
19pub const FRAMEOPTION_ROWS: i32 = 4;
20pub const FRAMEOPTION_GROUPS: i32 = 8;
21pub const FRAMEOPTION_BETWEEN: i32 = 16;
22pub const FRAMEOPTION_START_UNBOUNDED_PRECEDING: i32 = 32;
23pub const FRAMEOPTION_END_UNBOUNDED_PRECEDING: i32 = 64;
24pub const FRAMEOPTION_START_UNBOUNDED_FOLLOWING: i32 = 128;
25pub const FRAMEOPTION_START_CURRENT_ROW: i32 = 512;
26pub const FRAMEOPTION_END_CURRENT_ROW: i32 = 1024;
27pub const FRAMEOPTION_START_OFFSET_PRECEDING: i32 = 2048;
28pub const FRAMEOPTION_END_OFFSET_PRECEDING: i32 = 4096;
29pub const FRAMEOPTION_START_OFFSET_FOLLOWING: i32 = 8192;
30pub const FRAMEOPTION_EXCLUDE_CURRENT_ROW: i32 = 32768;
31pub const FRAMEOPTION_EXCLUDE_GROUP: i32 = 65536;
32pub const FRAMEOPTION_EXCLUDE_TIES: i32 = 131072;
33pub const FRAMEOPTION_DEFAULTS: i32 = 1058;
34pub const FKCONSTR_ACTION_NOACTION: u8 = b'a';
35pub const FKCONSTR_ACTION_RESTRICT: u8 = b'r';
36pub const FKCONSTR_ACTION_CASCADE: u8 = b'c';
37pub const FKCONSTR_ACTION_SETNULL: u8 = b'n';
38pub const FKCONSTR_ACTION_SETDEFAULT: u8 = b'd';
39pub const FKCONSTR_MATCH_FULL: u8 = b'f';
40pub const FKCONSTR_MATCH_PARTIAL: u8 = b'p';
41pub const FKCONSTR_MATCH_SIMPLE: u8 = b's';
42pub const OPCLASS_ITEM_OPERATOR: i32 = 1;
43pub const OPCLASS_ITEM_FUNCTION: i32 = 2;
44pub const OPCLASS_ITEM_STORAGETYPE: i32 = 3;
45pub const CURSOR_OPT_BINARY: i32 = 1;
46pub const CURSOR_OPT_SCROLL: i32 = 2;
47pub const CURSOR_OPT_NO_SCROLL: i32 = 4;
48pub const CURSOR_OPT_INSENSITIVE: i32 = 8;
49pub const CURSOR_OPT_ASENSITIVE: i32 = 16;
50pub const CURSOR_OPT_HOLD: i32 = 32;
51pub const CURSOR_OPT_FAST_PLAN: i32 = 256;
52pub const FETCH_ALL: i64 = 9223372036854775807;
53pub const RELPERSISTENCE_PERMANENT: u8 = b'p';
54pub const RELPERSISTENCE_UNLOGGED: u8 = b'u';
55pub const RELPERSISTENCE_TEMP: u8 = b't';
56pub const REPLICA_IDENTITY_DEFAULT: u8 = b'd';
57pub const REPLICA_IDENTITY_NOTHING: u8 = b'n';
58pub const REPLICA_IDENTITY_FULL: u8 = b'f';
59pub const REPLICA_IDENTITY_INDEX: u8 = b'i';
60pub const AMTYPE_INDEX: u8 = b'i';
61pub const AMTYPE_TABLE: u8 = b't';
62pub const ATTRIBUTE_IDENTITY_ALWAYS: u8 = b'a';
63pub const ATTRIBUTE_IDENTITY_BY_DEFAULT: u8 = b'd';
64pub const ATTRIBUTE_GENERATED_STORED: u8 = b's';
65pub const ATTRIBUTE_GENERATED_VIRTUAL: u8 = b'v';
66pub const TRIGGER_TYPE_BEFORE: i32 = 2;
67pub const TRIGGER_TYPE_INSERT: i32 = 4;
68pub const TRIGGER_TYPE_DELETE: i32 = 8;
69pub const TRIGGER_TYPE_UPDATE: i32 = 16;
70pub const TRIGGER_TYPE_TRUNCATE: i32 = 32;
71pub const TRIGGER_TYPE_INSTEAD: i32 = 64;
72pub const TRIGGER_TYPE_AFTER: i32 = 0;
73pub const DEFAULT_INDEX_TYPE: &str = "btree";
74pub const TRIGGER_FIRES_ON_ORIGIN: u8 = b'O';
75pub const TRIGGER_FIRES_ALWAYS: u8 = b'A';
76pub const TRIGGER_FIRES_ON_REPLICA: u8 = b'R';
77pub const TRIGGER_DISABLED: u8 = b'D';
78pub const MONTH: i32 = 1;
79pub const YEAR: i32 = 2;
80pub const DAY: i32 = 3;
81pub const HOUR: i32 = 10;
82pub const MINUTE: i32 = 11;
83pub const SECOND: i32 = 12;
84pub const INTERVAL_FULL_RANGE: i32 = 32767;
85pub const AccessShareLock: i32 = 1;
86pub const RowShareLock: i32 = 2;
87pub const RowExclusiveLock: i32 = 3;
88pub const ShareUpdateExclusiveLock: i32 = 4;
89pub const ShareLock: i32 = 5;
90pub const ShareRowExclusiveLock: i32 = 6;
91pub const ExclusiveLock: i32 = 7;
92pub const AccessExclusiveLock: i32 = 8;
93pub const InvalidRelFileNumber: u32 = 0;
94pub const ERRCODE_FEATURE_NOT_SUPPORTED: SqlState = SqlState::FEATURE_NOT_SUPPORTED;
95pub const ERRCODE_INVALID_PARAMETER_VALUE: SqlState = SqlState::INVALID_PARAMETER_VALUE;
96pub const ERRCODE_SYNTAX_ERROR: SqlState = SqlState::SYNTAX_ERROR;
97pub const ERRCODE_WINDOWING_ERROR: SqlState = SqlState::WINDOWING_ERROR;
98pub const ERRCODE_RESERVED_NAME: SqlState = SqlState::RESERVED_NAME;
99pub const ERRCODE_DUPLICATE_OBJECT: SqlState = SqlState::DUPLICATE_OBJECT;
100pub const InvalidOid: u32 = 0;
101pub const TEXTOID: u32 = 25;
102pub const InvalidSubTransactionId: u32 = 0;
103
104/// The C enum `CmdType`.
105#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
106pub struct CmdType(pub i32);
107
108impl CmdType {
109    pub const CMD_UNKNOWN: CmdType = CmdType(0);
110    pub const CMD_SELECT: CmdType = CmdType(1);
111    pub const CMD_UPDATE: CmdType = CmdType(2);
112    pub const CMD_INSERT: CmdType = CmdType(3);
113    pub const CMD_DELETE: CmdType = CmdType(4);
114    pub const CMD_MERGE: CmdType = CmdType(5);
115    pub const CMD_UTILITY: CmdType = CmdType(6);
116    pub const CMD_NOTHING: CmdType = CmdType(7);
117}
118
119/// The C enum `JoinType`.
120#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
121pub struct JoinType(pub i32);
122
123impl JoinType {
124    pub const JOIN_INNER: JoinType = JoinType(0);
125    pub const JOIN_LEFT: JoinType = JoinType(1);
126    pub const JOIN_FULL: JoinType = JoinType(2);
127    pub const JOIN_RIGHT: JoinType = JoinType(3);
128    pub const JOIN_SEMI: JoinType = JoinType(4);
129    pub const JOIN_ANTI: JoinType = JoinType(5);
130    pub const JOIN_RIGHT_SEMI: JoinType = JoinType(6);
131    pub const JOIN_RIGHT_ANTI: JoinType = JoinType(7);
132    pub const JOIN_UNIQUE_OUTER: JoinType = JoinType(8);
133    pub const JOIN_UNIQUE_INNER: JoinType = JoinType(9);
134}
135
136/// The C enum `OnConflictAction`.
137#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
138pub struct OnConflictAction(pub i32);
139
140impl OnConflictAction {
141    pub const ONCONFLICT_NONE: OnConflictAction = OnConflictAction(0);
142    pub const ONCONFLICT_NOTHING: OnConflictAction = OnConflictAction(1);
143    pub const ONCONFLICT_UPDATE: OnConflictAction = OnConflictAction(2);
144    pub const ONCONFLICT_SELECT: OnConflictAction = OnConflictAction(3);
145}
146
147/// The C enum `LimitOption`.
148#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
149pub struct LimitOption(pub i32);
150
151impl LimitOption {
152    pub const LIMIT_OPTION_COUNT: LimitOption = LimitOption(0);
153    pub const LIMIT_OPTION_WITH_TIES: LimitOption = LimitOption(1);
154}
155
156/// The C enum `LockClauseStrength`.
157#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
158pub struct LockClauseStrength(pub i32);
159
160impl LockClauseStrength {
161    pub const LCS_NONE: LockClauseStrength = LockClauseStrength(0);
162    pub const LCS_FORKEYSHARE: LockClauseStrength = LockClauseStrength(1);
163    pub const LCS_FORSHARE: LockClauseStrength = LockClauseStrength(2);
164    pub const LCS_FORNOKEYUPDATE: LockClauseStrength = LockClauseStrength(3);
165    pub const LCS_FORUPDATE: LockClauseStrength = LockClauseStrength(4);
166}
167
168/// The C enum `LockWaitPolicy`.
169#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
170pub struct LockWaitPolicy(pub i32);
171
172impl LockWaitPolicy {
173    pub const LockWaitBlock: LockWaitPolicy = LockWaitPolicy(0);
174    pub const LockWaitSkip: LockWaitPolicy = LockWaitPolicy(1);
175    pub const LockWaitError: LockWaitPolicy = LockWaitPolicy(2);
176}
177
178/// The C enum `OverridingKind`.
179#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
180pub struct OverridingKind(pub i32);
181
182impl OverridingKind {
183    pub const OVERRIDING_NOT_SET: OverridingKind = OverridingKind(0);
184    pub const OVERRIDING_USER_VALUE: OverridingKind = OverridingKind(1);
185    pub const OVERRIDING_SYSTEM_VALUE: OverridingKind = OverridingKind(2);
186}
187
188/// The C enum `OnCommitAction`.
189#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
190pub struct OnCommitAction(pub i32);
191
192impl OnCommitAction {
193    pub const ONCOMMIT_NOOP: OnCommitAction = OnCommitAction(0);
194    pub const ONCOMMIT_PRESERVE_ROWS: OnCommitAction = OnCommitAction(1);
195    pub const ONCOMMIT_DELETE_ROWS: OnCommitAction = OnCommitAction(2);
196    pub const ONCOMMIT_DROP: OnCommitAction = OnCommitAction(3);
197}
198
199/// The C enum `CoercionContext`.
200#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
201pub struct CoercionContext(pub i32);
202
203impl CoercionContext {
204    pub const COERCION_IMPLICIT: CoercionContext = CoercionContext(0);
205    pub const COERCION_ASSIGNMENT: CoercionContext = CoercionContext(1);
206    pub const COERCION_PLPGSQL: CoercionContext = CoercionContext(2);
207    pub const COERCION_EXPLICIT: CoercionContext = CoercionContext(3);
208}
209
210/// The C enum `CoercionForm`.
211#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
212pub struct CoercionForm(pub i32);
213
214impl CoercionForm {
215    pub const COERCE_EXPLICIT_CALL: CoercionForm = CoercionForm(0);
216    pub const COERCE_EXPLICIT_CAST: CoercionForm = CoercionForm(1);
217    pub const COERCE_IMPLICIT_CAST: CoercionForm = CoercionForm(2);
218    pub const COERCE_SQL_SYNTAX: CoercionForm = CoercionForm(3);
219}
220
221/// The C enum `BoolExprType`.
222#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
223pub struct BoolExprType(pub i32);
224
225impl BoolExprType {
226    pub const AND_EXPR: BoolExprType = BoolExprType(0);
227    pub const OR_EXPR: BoolExprType = BoolExprType(1);
228    pub const NOT_EXPR: BoolExprType = BoolExprType(2);
229}
230
231/// The C enum `SubLinkType`.
232#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
233pub struct SubLinkType(pub i32);
234
235impl SubLinkType {
236    pub const EXISTS_SUBLINK: SubLinkType = SubLinkType(0);
237    pub const ALL_SUBLINK: SubLinkType = SubLinkType(1);
238    pub const ANY_SUBLINK: SubLinkType = SubLinkType(2);
239    pub const ROWCOMPARE_SUBLINK: SubLinkType = SubLinkType(3);
240    pub const EXPR_SUBLINK: SubLinkType = SubLinkType(4);
241    pub const MULTIEXPR_SUBLINK: SubLinkType = SubLinkType(5);
242    pub const ARRAY_SUBLINK: SubLinkType = SubLinkType(6);
243    pub const CTE_SUBLINK: SubLinkType = SubLinkType(7);
244}
245
246/// The C enum `MinMaxOp`.
247#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
248pub struct MinMaxOp(pub i32);
249
250impl MinMaxOp {
251    pub const IS_GREATEST: MinMaxOp = MinMaxOp(0);
252    pub const IS_LEAST: MinMaxOp = MinMaxOp(1);
253}
254
255/// The C enum `SQLValueFunctionOp`.
256#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
257pub struct SQLValueFunctionOp(pub i32);
258
259impl SQLValueFunctionOp {
260    pub const SVFOP_CURRENT_DATE: SQLValueFunctionOp = SQLValueFunctionOp(0);
261    pub const SVFOP_CURRENT_TIME: SQLValueFunctionOp = SQLValueFunctionOp(1);
262    pub const SVFOP_CURRENT_TIME_N: SQLValueFunctionOp = SQLValueFunctionOp(2);
263    pub const SVFOP_CURRENT_TIMESTAMP: SQLValueFunctionOp = SQLValueFunctionOp(3);
264    pub const SVFOP_CURRENT_TIMESTAMP_N: SQLValueFunctionOp = SQLValueFunctionOp(4);
265    pub const SVFOP_LOCALTIME: SQLValueFunctionOp = SQLValueFunctionOp(5);
266    pub const SVFOP_LOCALTIME_N: SQLValueFunctionOp = SQLValueFunctionOp(6);
267    pub const SVFOP_LOCALTIMESTAMP: SQLValueFunctionOp = SQLValueFunctionOp(7);
268    pub const SVFOP_LOCALTIMESTAMP_N: SQLValueFunctionOp = SQLValueFunctionOp(8);
269    pub const SVFOP_CURRENT_ROLE: SQLValueFunctionOp = SQLValueFunctionOp(9);
270    pub const SVFOP_CURRENT_USER: SQLValueFunctionOp = SQLValueFunctionOp(10);
271    pub const SVFOP_USER: SQLValueFunctionOp = SQLValueFunctionOp(11);
272    pub const SVFOP_SESSION_USER: SQLValueFunctionOp = SQLValueFunctionOp(12);
273    pub const SVFOP_CURRENT_CATALOG: SQLValueFunctionOp = SQLValueFunctionOp(13);
274    pub const SVFOP_CURRENT_SCHEMA: SQLValueFunctionOp = SQLValueFunctionOp(14);
275}
276
277/// The C enum `XmlExprOp`.
278#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
279pub struct XmlExprOp(pub i32);
280
281impl XmlExprOp {
282    pub const IS_XMLCONCAT: XmlExprOp = XmlExprOp(0);
283    pub const IS_XMLELEMENT: XmlExprOp = XmlExprOp(1);
284    pub const IS_XMLFOREST: XmlExprOp = XmlExprOp(2);
285    pub const IS_XMLPARSE: XmlExprOp = XmlExprOp(3);
286    pub const IS_XMLPI: XmlExprOp = XmlExprOp(4);
287    pub const IS_XMLROOT: XmlExprOp = XmlExprOp(5);
288    pub const IS_XMLSERIALIZE: XmlExprOp = XmlExprOp(6);
289    pub const IS_DOCUMENT: XmlExprOp = XmlExprOp(7);
290}
291
292/// The C enum `XmlOptionType`.
293#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
294pub struct XmlOptionType(pub i32);
295
296impl XmlOptionType {
297    pub const XMLOPTION_DOCUMENT: XmlOptionType = XmlOptionType(0);
298    pub const XMLOPTION_CONTENT: XmlOptionType = XmlOptionType(1);
299}
300
301/// The C enum `JsonEncoding`.
302#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
303pub struct JsonEncoding(pub i32);
304
305impl JsonEncoding {
306    pub const JS_ENC_DEFAULT: JsonEncoding = JsonEncoding(0);
307    pub const JS_ENC_UTF8: JsonEncoding = JsonEncoding(1);
308    pub const JS_ENC_UTF16: JsonEncoding = JsonEncoding(2);
309    pub const JS_ENC_UTF32: JsonEncoding = JsonEncoding(3);
310}
311
312/// The C enum `JsonFormatType`.
313#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
314pub struct JsonFormatType(pub i32);
315
316impl JsonFormatType {
317    pub const JS_FORMAT_DEFAULT: JsonFormatType = JsonFormatType(0);
318    pub const JS_FORMAT_JSON: JsonFormatType = JsonFormatType(1);
319    pub const JS_FORMAT_JSONB: JsonFormatType = JsonFormatType(2);
320}
321
322/// The C enum `JsonValueType`.
323#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
324pub struct JsonValueType(pub i32);
325
326impl JsonValueType {
327    pub const JS_TYPE_ANY: JsonValueType = JsonValueType(0);
328    pub const JS_TYPE_OBJECT: JsonValueType = JsonValueType(1);
329    pub const JS_TYPE_ARRAY: JsonValueType = JsonValueType(2);
330    pub const JS_TYPE_SCALAR: JsonValueType = JsonValueType(3);
331}
332
333/// The C enum `JsonWrapper`.
334#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
335pub struct JsonWrapper(pub i32);
336
337impl JsonWrapper {
338    pub const JSW_UNSPEC: JsonWrapper = JsonWrapper(0);
339    pub const JSW_NONE: JsonWrapper = JsonWrapper(1);
340    pub const JSW_CONDITIONAL: JsonWrapper = JsonWrapper(2);
341    pub const JSW_UNCONDITIONAL: JsonWrapper = JsonWrapper(3);
342}
343
344/// The C enum `JsonBehaviorType`.
345#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
346pub struct JsonBehaviorType(pub i32);
347
348impl JsonBehaviorType {
349    pub const JSON_BEHAVIOR_NULL: JsonBehaviorType = JsonBehaviorType(0);
350    pub const JSON_BEHAVIOR_ERROR: JsonBehaviorType = JsonBehaviorType(1);
351    pub const JSON_BEHAVIOR_EMPTY: JsonBehaviorType = JsonBehaviorType(2);
352    pub const JSON_BEHAVIOR_TRUE: JsonBehaviorType = JsonBehaviorType(3);
353    pub const JSON_BEHAVIOR_FALSE: JsonBehaviorType = JsonBehaviorType(4);
354    pub const JSON_BEHAVIOR_UNKNOWN: JsonBehaviorType = JsonBehaviorType(5);
355    pub const JSON_BEHAVIOR_EMPTY_ARRAY: JsonBehaviorType = JsonBehaviorType(6);
356    pub const JSON_BEHAVIOR_EMPTY_OBJECT: JsonBehaviorType = JsonBehaviorType(7);
357    pub const JSON_BEHAVIOR_DEFAULT: JsonBehaviorType = JsonBehaviorType(8);
358}
359
360/// The C enum `JsonExprOp`.
361#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
362pub struct JsonExprOp(pub i32);
363
364impl JsonExprOp {
365    pub const JSON_EXISTS_OP: JsonExprOp = JsonExprOp(0);
366    pub const JSON_QUERY_OP: JsonExprOp = JsonExprOp(1);
367    pub const JSON_VALUE_OP: JsonExprOp = JsonExprOp(2);
368    pub const JSON_TABLE_OP: JsonExprOp = JsonExprOp(3);
369}
370
371/// The C enum `NullTestType`.
372#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
373pub struct NullTestType(pub i32);
374
375impl NullTestType {
376    pub const IS_NULL: NullTestType = NullTestType(0);
377    pub const IS_NOT_NULL: NullTestType = NullTestType(1);
378}
379
380/// The C enum `BoolTestType`.
381#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
382pub struct BoolTestType(pub i32);
383
384impl BoolTestType {
385    pub const IS_TRUE: BoolTestType = BoolTestType(0);
386    pub const IS_NOT_TRUE: BoolTestType = BoolTestType(1);
387    pub const IS_FALSE: BoolTestType = BoolTestType(2);
388    pub const IS_NOT_FALSE: BoolTestType = BoolTestType(3);
389    pub const IS_UNKNOWN: BoolTestType = BoolTestType(4);
390    pub const IS_NOT_UNKNOWN: BoolTestType = BoolTestType(5);
391}
392
393/// The C enum `MergeMatchKind`.
394#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
395pub struct MergeMatchKind(pub i32);
396
397impl MergeMatchKind {
398    pub const MERGE_WHEN_MATCHED: MergeMatchKind = MergeMatchKind(0);
399    pub const MERGE_WHEN_NOT_MATCHED_BY_SOURCE: MergeMatchKind = MergeMatchKind(1);
400    pub const MERGE_WHEN_NOT_MATCHED_BY_TARGET: MergeMatchKind = MergeMatchKind(2);
401}
402
403/// The C enum `SortByDir`.
404#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
405pub struct SortByDir(pub i32);
406
407impl SortByDir {
408    pub const SORTBY_DEFAULT: SortByDir = SortByDir(0);
409    pub const SORTBY_ASC: SortByDir = SortByDir(1);
410    pub const SORTBY_DESC: SortByDir = SortByDir(2);
411    pub const SORTBY_USING: SortByDir = SortByDir(3);
412}
413
414/// The C enum `SortByNulls`.
415#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
416pub struct SortByNulls(pub i32);
417
418impl SortByNulls {
419    pub const SORTBY_NULLS_DEFAULT: SortByNulls = SortByNulls(0);
420    pub const SORTBY_NULLS_FIRST: SortByNulls = SortByNulls(1);
421    pub const SORTBY_NULLS_LAST: SortByNulls = SortByNulls(2);
422}
423
424/// The C enum `SetQuantifier`.
425#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
426pub struct SetQuantifier(pub i32);
427
428impl SetQuantifier {
429    pub const SET_QUANTIFIER_DEFAULT: SetQuantifier = SetQuantifier(0);
430    pub const SET_QUANTIFIER_ALL: SetQuantifier = SetQuantifier(1);
431    pub const SET_QUANTIFIER_DISTINCT: SetQuantifier = SetQuantifier(2);
432}
433
434/// The C enum `A_Expr_Kind`.
435#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
436pub struct A_Expr_Kind(pub i32);
437
438impl A_Expr_Kind {
439    pub const AEXPR_OP: A_Expr_Kind = A_Expr_Kind(0);
440    pub const AEXPR_OP_ANY: A_Expr_Kind = A_Expr_Kind(1);
441    pub const AEXPR_OP_ALL: A_Expr_Kind = A_Expr_Kind(2);
442    pub const AEXPR_DISTINCT: A_Expr_Kind = A_Expr_Kind(3);
443    pub const AEXPR_NOT_DISTINCT: A_Expr_Kind = A_Expr_Kind(4);
444    pub const AEXPR_NULLIF: A_Expr_Kind = A_Expr_Kind(5);
445    pub const AEXPR_IN: A_Expr_Kind = A_Expr_Kind(6);
446    pub const AEXPR_LIKE: A_Expr_Kind = A_Expr_Kind(7);
447    pub const AEXPR_ILIKE: A_Expr_Kind = A_Expr_Kind(8);
448    pub const AEXPR_SIMILAR: A_Expr_Kind = A_Expr_Kind(9);
449    pub const AEXPR_BETWEEN: A_Expr_Kind = A_Expr_Kind(10);
450    pub const AEXPR_NOT_BETWEEN: A_Expr_Kind = A_Expr_Kind(11);
451    pub const AEXPR_BETWEEN_SYM: A_Expr_Kind = A_Expr_Kind(12);
452    pub const AEXPR_NOT_BETWEEN_SYM: A_Expr_Kind = A_Expr_Kind(13);
453}
454
455/// The C enum `RoleSpecType`.
456#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
457pub struct RoleSpecType(pub i32);
458
459impl RoleSpecType {
460    pub const ROLESPEC_CSTRING: RoleSpecType = RoleSpecType(0);
461    pub const ROLESPEC_CURRENT_ROLE: RoleSpecType = RoleSpecType(1);
462    pub const ROLESPEC_CURRENT_USER: RoleSpecType = RoleSpecType(2);
463    pub const ROLESPEC_SESSION_USER: RoleSpecType = RoleSpecType(3);
464    pub const ROLESPEC_PUBLIC: RoleSpecType = RoleSpecType(4);
465}
466
467/// The C enum `TableLikeOption`.
468#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
469pub struct TableLikeOption(pub i32);
470
471impl TableLikeOption {
472    pub const CREATE_TABLE_LIKE_COMMENTS: TableLikeOption = TableLikeOption(1);
473    pub const CREATE_TABLE_LIKE_COMPRESSION: TableLikeOption = TableLikeOption(2);
474    pub const CREATE_TABLE_LIKE_CONSTRAINTS: TableLikeOption = TableLikeOption(4);
475    pub const CREATE_TABLE_LIKE_DEFAULTS: TableLikeOption = TableLikeOption(8);
476    pub const CREATE_TABLE_LIKE_GENERATED: TableLikeOption = TableLikeOption(16);
477    pub const CREATE_TABLE_LIKE_IDENTITY: TableLikeOption = TableLikeOption(32);
478    pub const CREATE_TABLE_LIKE_INDEXES: TableLikeOption = TableLikeOption(64);
479    pub const CREATE_TABLE_LIKE_STATISTICS: TableLikeOption = TableLikeOption(128);
480    pub const CREATE_TABLE_LIKE_STORAGE: TableLikeOption = TableLikeOption(256);
481    pub const CREATE_TABLE_LIKE_ALL: TableLikeOption = TableLikeOption(2147483647);
482}
483
484/// The C enum `DefElemAction`.
485#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
486pub struct DefElemAction(pub i32);
487
488impl DefElemAction {
489    pub const DEFELEM_UNSPEC: DefElemAction = DefElemAction(0);
490    pub const DEFELEM_SET: DefElemAction = DefElemAction(1);
491    pub const DEFELEM_ADD: DefElemAction = DefElemAction(2);
492    pub const DEFELEM_DROP: DefElemAction = DefElemAction(3);
493}
494
495/// The C enum `PartitionStrategy`.
496#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
497pub struct PartitionStrategy(pub i32);
498
499impl PartitionStrategy {
500    pub const PARTITION_STRATEGY_LIST: PartitionStrategy = PartitionStrategy(108);
501    pub const PARTITION_STRATEGY_RANGE: PartitionStrategy = PartitionStrategy(114);
502    pub const PARTITION_STRATEGY_HASH: PartitionStrategy = PartitionStrategy(104);
503}
504
505/// The C enum `GroupingSetKind`.
506#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
507pub struct GroupingSetKind(pub i32);
508
509impl GroupingSetKind {
510    pub const GROUPING_SET_EMPTY: GroupingSetKind = GroupingSetKind(0);
511    pub const GROUPING_SET_SIMPLE: GroupingSetKind = GroupingSetKind(1);
512    pub const GROUPING_SET_ROLLUP: GroupingSetKind = GroupingSetKind(2);
513    pub const GROUPING_SET_CUBE: GroupingSetKind = GroupingSetKind(3);
514    pub const GROUPING_SET_SETS: GroupingSetKind = GroupingSetKind(4);
515}
516
517/// The C enum `CTEMaterialize`.
518#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
519pub struct CTEMaterialize(pub i32);
520
521impl CTEMaterialize {
522    pub const CTEMaterializeDefault: CTEMaterialize = CTEMaterialize(0);
523    pub const CTEMaterializeAlways: CTEMaterialize = CTEMaterialize(1);
524    pub const CTEMaterializeNever: CTEMaterialize = CTEMaterialize(2);
525}
526
527/// The C enum `ReturningOptionKind`.
528#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
529pub struct ReturningOptionKind(pub i32);
530
531impl ReturningOptionKind {
532    pub const RETURNING_OPTION_OLD: ReturningOptionKind = ReturningOptionKind(0);
533    pub const RETURNING_OPTION_NEW: ReturningOptionKind = ReturningOptionKind(1);
534}
535
536/// The C enum `JsonQuotes`.
537#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
538pub struct JsonQuotes(pub i32);
539
540impl JsonQuotes {
541    pub const JS_QUOTES_UNSPEC: JsonQuotes = JsonQuotes(0);
542    pub const JS_QUOTES_KEEP: JsonQuotes = JsonQuotes(1);
543    pub const JS_QUOTES_OMIT: JsonQuotes = JsonQuotes(2);
544}
545
546/// The C enum `JsonTableColumnType`.
547#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
548pub struct JsonTableColumnType(pub i32);
549
550impl JsonTableColumnType {
551    pub const JTC_FOR_ORDINALITY: JsonTableColumnType = JsonTableColumnType(0);
552    pub const JTC_REGULAR: JsonTableColumnType = JsonTableColumnType(1);
553    pub const JTC_EXISTS: JsonTableColumnType = JsonTableColumnType(2);
554    pub const JTC_FORMATTED: JsonTableColumnType = JsonTableColumnType(3);
555    pub const JTC_NESTED: JsonTableColumnType = JsonTableColumnType(4);
556}
557
558/// The C enum `SetOperation`.
559#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
560pub struct SetOperation(pub i32);
561
562impl SetOperation {
563    pub const SETOP_NONE: SetOperation = SetOperation(0);
564    pub const SETOP_UNION: SetOperation = SetOperation(1);
565    pub const SETOP_INTERSECT: SetOperation = SetOperation(2);
566    pub const SETOP_EXCEPT: SetOperation = SetOperation(3);
567}
568
569/// The C enum `ObjectType`.
570#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
571pub struct ObjectType(pub i32);
572
573impl ObjectType {
574    pub const OBJECT_ACCESS_METHOD: ObjectType = ObjectType(0);
575    pub const OBJECT_AGGREGATE: ObjectType = ObjectType(1);
576    pub const OBJECT_AMOP: ObjectType = ObjectType(2);
577    pub const OBJECT_AMPROC: ObjectType = ObjectType(3);
578    pub const OBJECT_ATTRIBUTE: ObjectType = ObjectType(4);
579    pub const OBJECT_CAST: ObjectType = ObjectType(5);
580    pub const OBJECT_COLUMN: ObjectType = ObjectType(6);
581    pub const OBJECT_COLLATION: ObjectType = ObjectType(7);
582    pub const OBJECT_CONVERSION: ObjectType = ObjectType(8);
583    pub const OBJECT_DATABASE: ObjectType = ObjectType(9);
584    pub const OBJECT_DEFAULT: ObjectType = ObjectType(10);
585    pub const OBJECT_DEFACL: ObjectType = ObjectType(11);
586    pub const OBJECT_DOMAIN: ObjectType = ObjectType(12);
587    pub const OBJECT_DOMCONSTRAINT: ObjectType = ObjectType(13);
588    pub const OBJECT_EVENT_TRIGGER: ObjectType = ObjectType(14);
589    pub const OBJECT_EXTENSION: ObjectType = ObjectType(15);
590    pub const OBJECT_FDW: ObjectType = ObjectType(16);
591    pub const OBJECT_FOREIGN_SERVER: ObjectType = ObjectType(17);
592    pub const OBJECT_FOREIGN_TABLE: ObjectType = ObjectType(18);
593    pub const OBJECT_FUNCTION: ObjectType = ObjectType(19);
594    pub const OBJECT_INDEX: ObjectType = ObjectType(20);
595    pub const OBJECT_LANGUAGE: ObjectType = ObjectType(21);
596    pub const OBJECT_LARGEOBJECT: ObjectType = ObjectType(22);
597    pub const OBJECT_MATVIEW: ObjectType = ObjectType(23);
598    pub const OBJECT_OPCLASS: ObjectType = ObjectType(24);
599    pub const OBJECT_OPERATOR: ObjectType = ObjectType(25);
600    pub const OBJECT_OPFAMILY: ObjectType = ObjectType(26);
601    pub const OBJECT_PARAMETER_ACL: ObjectType = ObjectType(27);
602    pub const OBJECT_POLICY: ObjectType = ObjectType(28);
603    pub const OBJECT_PROCEDURE: ObjectType = ObjectType(29);
604    pub const OBJECT_PUBLICATION: ObjectType = ObjectType(30);
605    pub const OBJECT_PUBLICATION_EXCLUDED_REL: ObjectType = ObjectType(31);
606    pub const OBJECT_PUBLICATION_NAMESPACE: ObjectType = ObjectType(32);
607    pub const OBJECT_PUBLICATION_REL: ObjectType = ObjectType(33);
608    pub const OBJECT_ROLE: ObjectType = ObjectType(34);
609    pub const OBJECT_ROUTINE: ObjectType = ObjectType(35);
610    pub const OBJECT_RULE: ObjectType = ObjectType(36);
611    pub const OBJECT_SCHEMA: ObjectType = ObjectType(37);
612    pub const OBJECT_SEQUENCE: ObjectType = ObjectType(38);
613    pub const OBJECT_SUBSCRIPTION: ObjectType = ObjectType(39);
614    pub const OBJECT_STATISTIC_EXT: ObjectType = ObjectType(40);
615    pub const OBJECT_TABCONSTRAINT: ObjectType = ObjectType(41);
616    pub const OBJECT_TABLE: ObjectType = ObjectType(42);
617    pub const OBJECT_TABLESPACE: ObjectType = ObjectType(43);
618    pub const OBJECT_TRANSFORM: ObjectType = ObjectType(44);
619    pub const OBJECT_TRIGGER: ObjectType = ObjectType(45);
620    pub const OBJECT_TSCONFIGURATION: ObjectType = ObjectType(46);
621    pub const OBJECT_TSDICTIONARY: ObjectType = ObjectType(47);
622    pub const OBJECT_TSPARSER: ObjectType = ObjectType(48);
623    pub const OBJECT_TSTEMPLATE: ObjectType = ObjectType(49);
624    pub const OBJECT_TYPE: ObjectType = ObjectType(50);
625    pub const OBJECT_USER_MAPPING: ObjectType = ObjectType(51);
626    pub const OBJECT_VIEW: ObjectType = ObjectType(52);
627}
628
629/// The C enum `DropBehavior`.
630#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
631pub struct DropBehavior(pub i32);
632
633impl DropBehavior {
634    pub const DROP_RESTRICT: DropBehavior = DropBehavior(0);
635    pub const DROP_CASCADE: DropBehavior = DropBehavior(1);
636}
637
638/// The C enum `AlterTableType`.
639#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
640pub struct AlterTableType(pub i32);
641
642impl AlterTableType {
643    pub const AT_AddColumn: AlterTableType = AlterTableType(0);
644    pub const AT_AddColumnToView: AlterTableType = AlterTableType(1);
645    pub const AT_ColumnDefault: AlterTableType = AlterTableType(2);
646    pub const AT_CookedColumnDefault: AlterTableType = AlterTableType(3);
647    pub const AT_DropNotNull: AlterTableType = AlterTableType(4);
648    pub const AT_SetNotNull: AlterTableType = AlterTableType(5);
649    pub const AT_SetExpression: AlterTableType = AlterTableType(6);
650    pub const AT_DropExpression: AlterTableType = AlterTableType(7);
651    pub const AT_SetStatistics: AlterTableType = AlterTableType(8);
652    pub const AT_SetOptions: AlterTableType = AlterTableType(9);
653    pub const AT_ResetOptions: AlterTableType = AlterTableType(10);
654    pub const AT_SetStorage: AlterTableType = AlterTableType(11);
655    pub const AT_SetCompression: AlterTableType = AlterTableType(12);
656    pub const AT_DropColumn: AlterTableType = AlterTableType(13);
657    pub const AT_AddIndex: AlterTableType = AlterTableType(14);
658    pub const AT_ReAddIndex: AlterTableType = AlterTableType(15);
659    pub const AT_AddConstraint: AlterTableType = AlterTableType(16);
660    pub const AT_ReAddConstraint: AlterTableType = AlterTableType(17);
661    pub const AT_ReAddDomainConstraint: AlterTableType = AlterTableType(18);
662    pub const AT_AlterConstraint: AlterTableType = AlterTableType(19);
663    pub const AT_ValidateConstraint: AlterTableType = AlterTableType(20);
664    pub const AT_AddIndexConstraint: AlterTableType = AlterTableType(21);
665    pub const AT_DropConstraint: AlterTableType = AlterTableType(22);
666    pub const AT_ReAddComment: AlterTableType = AlterTableType(23);
667    pub const AT_AlterColumnType: AlterTableType = AlterTableType(24);
668    pub const AT_AlterColumnGenericOptions: AlterTableType = AlterTableType(25);
669    pub const AT_ChangeOwner: AlterTableType = AlterTableType(26);
670    pub const AT_ClusterOn: AlterTableType = AlterTableType(27);
671    pub const AT_DropCluster: AlterTableType = AlterTableType(28);
672    pub const AT_SetLogged: AlterTableType = AlterTableType(29);
673    pub const AT_SetUnLogged: AlterTableType = AlterTableType(30);
674    pub const AT_DropOids: AlterTableType = AlterTableType(31);
675    pub const AT_SetAccessMethod: AlterTableType = AlterTableType(32);
676    pub const AT_SetTableSpace: AlterTableType = AlterTableType(33);
677    pub const AT_SetRelOptions: AlterTableType = AlterTableType(34);
678    pub const AT_ResetRelOptions: AlterTableType = AlterTableType(35);
679    pub const AT_ReplaceRelOptions: AlterTableType = AlterTableType(36);
680    pub const AT_EnableTrig: AlterTableType = AlterTableType(37);
681    pub const AT_EnableAlwaysTrig: AlterTableType = AlterTableType(38);
682    pub const AT_EnableReplicaTrig: AlterTableType = AlterTableType(39);
683    pub const AT_DisableTrig: AlterTableType = AlterTableType(40);
684    pub const AT_EnableTrigAll: AlterTableType = AlterTableType(41);
685    pub const AT_DisableTrigAll: AlterTableType = AlterTableType(42);
686    pub const AT_EnableTrigUser: AlterTableType = AlterTableType(43);
687    pub const AT_DisableTrigUser: AlterTableType = AlterTableType(44);
688    pub const AT_EnableRule: AlterTableType = AlterTableType(45);
689    pub const AT_EnableAlwaysRule: AlterTableType = AlterTableType(46);
690    pub const AT_EnableReplicaRule: AlterTableType = AlterTableType(47);
691    pub const AT_DisableRule: AlterTableType = AlterTableType(48);
692    pub const AT_AddInherit: AlterTableType = AlterTableType(49);
693    pub const AT_DropInherit: AlterTableType = AlterTableType(50);
694    pub const AT_AddOf: AlterTableType = AlterTableType(51);
695    pub const AT_DropOf: AlterTableType = AlterTableType(52);
696    pub const AT_ReplicaIdentity: AlterTableType = AlterTableType(53);
697    pub const AT_EnableRowSecurity: AlterTableType = AlterTableType(54);
698    pub const AT_DisableRowSecurity: AlterTableType = AlterTableType(55);
699    pub const AT_ForceRowSecurity: AlterTableType = AlterTableType(56);
700    pub const AT_NoForceRowSecurity: AlterTableType = AlterTableType(57);
701    pub const AT_GenericOptions: AlterTableType = AlterTableType(58);
702    pub const AT_AttachPartition: AlterTableType = AlterTableType(59);
703    pub const AT_DetachPartition: AlterTableType = AlterTableType(60);
704    pub const AT_DetachPartitionFinalize: AlterTableType = AlterTableType(61);
705    pub const AT_AddIdentity: AlterTableType = AlterTableType(62);
706    pub const AT_SetIdentity: AlterTableType = AlterTableType(63);
707    pub const AT_DropIdentity: AlterTableType = AlterTableType(64);
708    pub const AT_ReAddStatistics: AlterTableType = AlterTableType(65);
709}
710
711/// The C enum `AlterDomainType`.
712#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
713pub struct AlterDomainType(pub i32);
714
715impl AlterDomainType {
716    pub const AD_AlterDefault: AlterDomainType = AlterDomainType(84);
717    pub const AD_DropNotNull: AlterDomainType = AlterDomainType(78);
718    pub const AD_SetNotNull: AlterDomainType = AlterDomainType(79);
719    pub const AD_AddConstraint: AlterDomainType = AlterDomainType(67);
720    pub const AD_DropConstraint: AlterDomainType = AlterDomainType(88);
721    pub const AD_ValidateConstraint: AlterDomainType = AlterDomainType(86);
722}
723
724/// The C enum `GrantTargetType`.
725#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
726pub struct GrantTargetType(pub i32);
727
728impl GrantTargetType {
729    pub const ACL_TARGET_OBJECT: GrantTargetType = GrantTargetType(0);
730    pub const ACL_TARGET_ALL_IN_SCHEMA: GrantTargetType = GrantTargetType(1);
731    pub const ACL_TARGET_DEFAULTS: GrantTargetType = GrantTargetType(2);
732}
733
734/// The C enum `VariableSetKind`.
735#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
736pub struct VariableSetKind(pub i32);
737
738impl VariableSetKind {
739    pub const VAR_SET_VALUE: VariableSetKind = VariableSetKind(0);
740    pub const VAR_SET_DEFAULT: VariableSetKind = VariableSetKind(1);
741    pub const VAR_SET_CURRENT: VariableSetKind = VariableSetKind(2);
742    pub const VAR_SET_MULTI: VariableSetKind = VariableSetKind(3);
743    pub const VAR_RESET: VariableSetKind = VariableSetKind(4);
744    pub const VAR_RESET_ALL: VariableSetKind = VariableSetKind(5);
745}
746
747/// The C enum `ConstrType`.
748#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
749pub struct ConstrType(pub i32);
750
751impl ConstrType {
752    pub const CONSTR_NULL: ConstrType = ConstrType(0);
753    pub const CONSTR_NOTNULL: ConstrType = ConstrType(1);
754    pub const CONSTR_DEFAULT: ConstrType = ConstrType(2);
755    pub const CONSTR_IDENTITY: ConstrType = ConstrType(3);
756    pub const CONSTR_GENERATED: ConstrType = ConstrType(4);
757    pub const CONSTR_CHECK: ConstrType = ConstrType(5);
758    pub const CONSTR_PRIMARY: ConstrType = ConstrType(6);
759    pub const CONSTR_UNIQUE: ConstrType = ConstrType(7);
760    pub const CONSTR_EXCLUSION: ConstrType = ConstrType(8);
761    pub const CONSTR_FOREIGN: ConstrType = ConstrType(9);
762    pub const CONSTR_ATTR_DEFERRABLE: ConstrType = ConstrType(10);
763    pub const CONSTR_ATTR_NOT_DEFERRABLE: ConstrType = ConstrType(11);
764    pub const CONSTR_ATTR_DEFERRED: ConstrType = ConstrType(12);
765    pub const CONSTR_ATTR_IMMEDIATE: ConstrType = ConstrType(13);
766    pub const CONSTR_ATTR_ENFORCED: ConstrType = ConstrType(14);
767    pub const CONSTR_ATTR_NOT_ENFORCED: ConstrType = ConstrType(15);
768}
769
770/// The C enum `ImportForeignSchemaType`.
771#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
772pub struct ImportForeignSchemaType(pub i32);
773
774impl ImportForeignSchemaType {
775    pub const FDW_IMPORT_SCHEMA_ALL: ImportForeignSchemaType = ImportForeignSchemaType(0);
776    pub const FDW_IMPORT_SCHEMA_LIMIT_TO: ImportForeignSchemaType = ImportForeignSchemaType(1);
777    pub const FDW_IMPORT_SCHEMA_EXCEPT: ImportForeignSchemaType = ImportForeignSchemaType(2);
778}
779
780/// The C enum `RoleStmtType`.
781#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
782pub struct RoleStmtType(pub i32);
783
784impl RoleStmtType {
785    pub const ROLESTMT_ROLE: RoleStmtType = RoleStmtType(0);
786    pub const ROLESTMT_USER: RoleStmtType = RoleStmtType(1);
787    pub const ROLESTMT_GROUP: RoleStmtType = RoleStmtType(2);
788}
789
790/// The C enum `FetchDirection`.
791#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
792pub struct FetchDirection(pub i32);
793
794impl FetchDirection {
795    pub const FETCH_FORWARD: FetchDirection = FetchDirection(0);
796    pub const FETCH_BACKWARD: FetchDirection = FetchDirection(1);
797    pub const FETCH_ABSOLUTE: FetchDirection = FetchDirection(2);
798    pub const FETCH_RELATIVE: FetchDirection = FetchDirection(3);
799}
800
801/// The C enum `FetchDirectionKeywords`.
802#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
803pub struct FetchDirectionKeywords(pub i32);
804
805impl FetchDirectionKeywords {
806    pub const FETCH_KEYWORD_NONE: FetchDirectionKeywords = FetchDirectionKeywords(0);
807    pub const FETCH_KEYWORD_NEXT: FetchDirectionKeywords = FetchDirectionKeywords(1);
808    pub const FETCH_KEYWORD_PRIOR: FetchDirectionKeywords = FetchDirectionKeywords(2);
809    pub const FETCH_KEYWORD_FIRST: FetchDirectionKeywords = FetchDirectionKeywords(3);
810    pub const FETCH_KEYWORD_LAST: FetchDirectionKeywords = FetchDirectionKeywords(4);
811    pub const FETCH_KEYWORD_ABSOLUTE: FetchDirectionKeywords = FetchDirectionKeywords(5);
812    pub const FETCH_KEYWORD_RELATIVE: FetchDirectionKeywords = FetchDirectionKeywords(6);
813    pub const FETCH_KEYWORD_ALL: FetchDirectionKeywords = FetchDirectionKeywords(7);
814    pub const FETCH_KEYWORD_FORWARD: FetchDirectionKeywords = FetchDirectionKeywords(8);
815    pub const FETCH_KEYWORD_FORWARD_ALL: FetchDirectionKeywords = FetchDirectionKeywords(9);
816    pub const FETCH_KEYWORD_BACKWARD: FetchDirectionKeywords = FetchDirectionKeywords(10);
817    pub const FETCH_KEYWORD_BACKWARD_ALL: FetchDirectionKeywords = FetchDirectionKeywords(11);
818}
819
820/// The C enum `FunctionParameterMode`.
821#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
822pub struct FunctionParameterMode(pub i32);
823
824impl FunctionParameterMode {
825    pub const FUNC_PARAM_IN: FunctionParameterMode = FunctionParameterMode(105);
826    pub const FUNC_PARAM_OUT: FunctionParameterMode = FunctionParameterMode(111);
827    pub const FUNC_PARAM_INOUT: FunctionParameterMode = FunctionParameterMode(98);
828    pub const FUNC_PARAM_VARIADIC: FunctionParameterMode = FunctionParameterMode(118);
829    pub const FUNC_PARAM_TABLE: FunctionParameterMode = FunctionParameterMode(116);
830    pub const FUNC_PARAM_DEFAULT: FunctionParameterMode = FunctionParameterMode(100);
831}
832
833/// The C enum `TransactionStmtKind`.
834#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
835pub struct TransactionStmtKind(pub i32);
836
837impl TransactionStmtKind {
838    pub const TRANS_STMT_BEGIN: TransactionStmtKind = TransactionStmtKind(0);
839    pub const TRANS_STMT_START: TransactionStmtKind = TransactionStmtKind(1);
840    pub const TRANS_STMT_COMMIT: TransactionStmtKind = TransactionStmtKind(2);
841    pub const TRANS_STMT_ROLLBACK: TransactionStmtKind = TransactionStmtKind(3);
842    pub const TRANS_STMT_SAVEPOINT: TransactionStmtKind = TransactionStmtKind(4);
843    pub const TRANS_STMT_RELEASE: TransactionStmtKind = TransactionStmtKind(5);
844    pub const TRANS_STMT_ROLLBACK_TO: TransactionStmtKind = TransactionStmtKind(6);
845    pub const TRANS_STMT_PREPARE: TransactionStmtKind = TransactionStmtKind(7);
846    pub const TRANS_STMT_COMMIT_PREPARED: TransactionStmtKind = TransactionStmtKind(8);
847    pub const TRANS_STMT_ROLLBACK_PREPARED: TransactionStmtKind = TransactionStmtKind(9);
848}
849
850/// The C enum `ViewCheckOption`.
851#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
852pub struct ViewCheckOption(pub i32);
853
854impl ViewCheckOption {
855    pub const NO_CHECK_OPTION: ViewCheckOption = ViewCheckOption(0);
856    pub const LOCAL_CHECK_OPTION: ViewCheckOption = ViewCheckOption(1);
857    pub const CASCADED_CHECK_OPTION: ViewCheckOption = ViewCheckOption(2);
858}
859
860/// The C enum `RepackCommand`.
861#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
862pub struct RepackCommand(pub i32);
863
864impl RepackCommand {
865    pub const REPACK_COMMAND_CLUSTER: RepackCommand = RepackCommand(1);
866    pub const REPACK_COMMAND_REPACK: RepackCommand = RepackCommand(2);
867    pub const REPACK_COMMAND_VACUUMFULL: RepackCommand = RepackCommand(3);
868}
869
870/// The C enum `DiscardMode`.
871#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
872pub struct DiscardMode(pub i32);
873
874impl DiscardMode {
875    pub const DISCARD_ALL: DiscardMode = DiscardMode(0);
876    pub const DISCARD_PLANS: DiscardMode = DiscardMode(1);
877    pub const DISCARD_SEQUENCES: DiscardMode = DiscardMode(2);
878    pub const DISCARD_TEMP: DiscardMode = DiscardMode(3);
879}
880
881/// The C enum `ReindexObjectType`.
882#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
883pub struct ReindexObjectType(pub i32);
884
885impl ReindexObjectType {
886    pub const REINDEX_OBJECT_INDEX: ReindexObjectType = ReindexObjectType(0);
887    pub const REINDEX_OBJECT_TABLE: ReindexObjectType = ReindexObjectType(1);
888    pub const REINDEX_OBJECT_SCHEMA: ReindexObjectType = ReindexObjectType(2);
889    pub const REINDEX_OBJECT_SYSTEM: ReindexObjectType = ReindexObjectType(3);
890    pub const REINDEX_OBJECT_DATABASE: ReindexObjectType = ReindexObjectType(4);
891}
892
893/// The C enum `AlterTSConfigType`.
894#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
895pub struct AlterTSConfigType(pub i32);
896
897impl AlterTSConfigType {
898    pub const ALTER_TSCONFIG_ADD_MAPPING: AlterTSConfigType = AlterTSConfigType(0);
899    pub const ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN: AlterTSConfigType = AlterTSConfigType(1);
900    pub const ALTER_TSCONFIG_REPLACE_DICT: AlterTSConfigType = AlterTSConfigType(2);
901    pub const ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN: AlterTSConfigType = AlterTSConfigType(3);
902    pub const ALTER_TSCONFIG_DROP_MAPPING: AlterTSConfigType = AlterTSConfigType(4);
903}
904
905/// The C enum `PublicationObjSpecType`.
906#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
907pub struct PublicationObjSpecType(pub i32);
908
909impl PublicationObjSpecType {
910    pub const PUBLICATIONOBJ_TABLE: PublicationObjSpecType = PublicationObjSpecType(0);
911    pub const PUBLICATIONOBJ_EXCEPT_TABLE: PublicationObjSpecType = PublicationObjSpecType(1);
912    pub const PUBLICATIONOBJ_TABLES_IN_SCHEMA: PublicationObjSpecType = PublicationObjSpecType(2);
913    pub const PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA: PublicationObjSpecType =
914        PublicationObjSpecType(3);
915    pub const PUBLICATIONOBJ_CONTINUATION: PublicationObjSpecType = PublicationObjSpecType(4);
916}
917
918/// The C enum `PublicationAllObjType`.
919#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
920pub struct PublicationAllObjType(pub i32);
921
922impl PublicationAllObjType {
923    pub const PUBLICATION_ALL_TABLES: PublicationAllObjType = PublicationAllObjType(0);
924    pub const PUBLICATION_ALL_SEQUENCES: PublicationAllObjType = PublicationAllObjType(1);
925}
926
927/// The C enum `AlterPublicationAction`.
928#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
929pub struct AlterPublicationAction(pub i32);
930
931impl AlterPublicationAction {
932    pub const AP_AddObjects: AlterPublicationAction = AlterPublicationAction(0);
933    pub const AP_DropObjects: AlterPublicationAction = AlterPublicationAction(1);
934    pub const AP_SetObjects: AlterPublicationAction = AlterPublicationAction(2);
935}
936
937/// The C enum `AlterSubscriptionType`.
938#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
939pub struct AlterSubscriptionType(pub i32);
940
941impl AlterSubscriptionType {
942    pub const ALTER_SUBSCRIPTION_OPTIONS: AlterSubscriptionType = AlterSubscriptionType(0);
943    pub const ALTER_SUBSCRIPTION_SERVER: AlterSubscriptionType = AlterSubscriptionType(1);
944    pub const ALTER_SUBSCRIPTION_CONNECTION: AlterSubscriptionType = AlterSubscriptionType(2);
945    pub const ALTER_SUBSCRIPTION_SET_PUBLICATION: AlterSubscriptionType = AlterSubscriptionType(3);
946    pub const ALTER_SUBSCRIPTION_ADD_PUBLICATION: AlterSubscriptionType = AlterSubscriptionType(4);
947    pub const ALTER_SUBSCRIPTION_DROP_PUBLICATION: AlterSubscriptionType = AlterSubscriptionType(5);
948    pub const ALTER_SUBSCRIPTION_REFRESH_PUBLICATION: AlterSubscriptionType =
949        AlterSubscriptionType(6);
950    pub const ALTER_SUBSCRIPTION_REFRESH_SEQUENCES: AlterSubscriptionType =
951        AlterSubscriptionType(7);
952    pub const ALTER_SUBSCRIPTION_ENABLED: AlterSubscriptionType = AlterSubscriptionType(8);
953    pub const ALTER_SUBSCRIPTION_SKIP: AlterSubscriptionType = AlterSubscriptionType(9);
954}
955
956/// The C enum `XmlStandaloneType`.
957#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
958pub struct XmlStandaloneType(pub i32);
959
960impl XmlStandaloneType {
961    pub const XML_STANDALONE_YES: XmlStandaloneType = XmlStandaloneType(0);
962    pub const XML_STANDALONE_NO: XmlStandaloneType = XmlStandaloneType(1);
963    pub const XML_STANDALONE_NO_VALUE: XmlStandaloneType = XmlStandaloneType(2);
964    pub const XML_STANDALONE_OMITTED: XmlStandaloneType = XmlStandaloneType(3);
965}
966
967/// The node `ATAlterConstraint`.
968#[derive(Clone, Debug, Default, PartialEq)]
969pub struct ATAlterConstraint {
970    pub conname: Option<Str>,
971    pub alterEnforceability: bool,
972    pub is_enforced: bool,
973    pub alterDeferrability: bool,
974    pub deferrable: bool,
975    pub initdeferred: bool,
976    pub alterInheritability: bool,
977    pub noinherit: bool,
978}
979
980/// The node `A_ArrayExpr`.
981#[derive(Clone, Debug, Default, PartialEq)]
982pub struct A_ArrayExpr {
983    pub elements: List,
984    pub list_start: i32,
985    pub list_end: i32,
986    pub location: i32,
987}
988
989/// The node `A_Const`.
990#[derive(Clone, Debug, Default, PartialEq)]
991pub struct A_Const {
992    pub val: Option<Node>,
993    pub isnull: bool,
994    pub location: i32,
995}
996
997/// The node `A_Expr`.
998#[derive(Clone, Debug, Default, PartialEq)]
999pub struct A_Expr {
1000    pub kind: A_Expr_Kind,
1001    pub name: List,
1002    pub lexpr: Option<Node>,
1003    pub rexpr: Option<Node>,
1004    pub rexpr_list_start: i32,
1005    pub rexpr_list_end: i32,
1006    pub location: i32,
1007}
1008
1009/// The node `A_Indices`.
1010#[derive(Clone, Debug, Default, PartialEq)]
1011pub struct A_Indices {
1012    pub is_slice: bool,
1013    pub lidx: Option<Node>,
1014    pub uidx: Option<Node>,
1015}
1016
1017/// The node `A_Indirection`.
1018#[derive(Clone, Debug, Default, PartialEq)]
1019pub struct A_Indirection {
1020    pub arg: Option<Node>,
1021    pub indirection: List,
1022}
1023
1024/// The node `A_Star`.
1025#[derive(Clone, Debug, Default, PartialEq)]
1026pub struct A_Star {}
1027
1028/// The node `AccessPriv`.
1029#[derive(Clone, Debug, Default, PartialEq)]
1030pub struct AccessPriv {
1031    pub priv_name: Option<Str>,
1032    pub cols: List,
1033}
1034
1035/// The node `Alias`.
1036#[derive(Clone, Debug, Default, PartialEq)]
1037pub struct Alias {
1038    pub aliasname: Option<Str>,
1039    pub colnames: List,
1040}
1041
1042/// The node `AlterCollationStmt`.
1043#[derive(Clone, Debug, Default, PartialEq)]
1044pub struct AlterCollationStmt {
1045    pub collname: List,
1046}
1047
1048/// The node `AlterDatabaseRefreshCollStmt`.
1049#[derive(Clone, Debug, Default, PartialEq)]
1050pub struct AlterDatabaseRefreshCollStmt {
1051    pub dbname: Option<Str>,
1052}
1053
1054/// The node `AlterDatabaseSetStmt`.
1055#[derive(Clone, Debug, Default, PartialEq)]
1056pub struct AlterDatabaseSetStmt {
1057    pub dbname: Option<Str>,
1058    pub setstmt: Option<Box<VariableSetStmt>>,
1059}
1060
1061/// The node `AlterDatabaseStmt`.
1062#[derive(Clone, Debug, Default, PartialEq)]
1063pub struct AlterDatabaseStmt {
1064    pub dbname: Option<Str>,
1065    pub options: List,
1066}
1067
1068/// The node `AlterDefaultPrivilegesStmt`.
1069#[derive(Clone, Debug, Default, PartialEq)]
1070pub struct AlterDefaultPrivilegesStmt {
1071    pub options: List,
1072    pub action: Option<Box<GrantStmt>>,
1073}
1074
1075/// The node `AlterDomainStmt`.
1076#[derive(Clone, Debug, Default, PartialEq)]
1077pub struct AlterDomainStmt {
1078    pub subtype: AlterDomainType,
1079    pub typeName: List,
1080    pub name: Option<Str>,
1081    pub def: Option<Node>,
1082    pub behavior: DropBehavior,
1083    pub missing_ok: bool,
1084}
1085
1086/// The node `AlterEnumStmt`.
1087#[derive(Clone, Debug, Default, PartialEq)]
1088pub struct AlterEnumStmt {
1089    pub typeName: List,
1090    pub oldVal: Option<Str>,
1091    pub newVal: Option<Str>,
1092    pub newValNeighbor: Option<Str>,
1093    pub newValIsAfter: bool,
1094    pub skipIfNewValExists: bool,
1095}
1096
1097/// The node `AlterEventTrigStmt`.
1098#[derive(Clone, Debug, Default, PartialEq)]
1099pub struct AlterEventTrigStmt {
1100    pub trigname: Option<Str>,
1101    pub tgenabled: u8,
1102}
1103
1104/// The node `AlterExtensionContentsStmt`.
1105#[derive(Clone, Debug, Default, PartialEq)]
1106pub struct AlterExtensionContentsStmt {
1107    pub extname: Option<Str>,
1108    pub action: i32,
1109    pub objtype: ObjectType,
1110    pub object: Option<Node>,
1111}
1112
1113/// The node `AlterExtensionStmt`.
1114#[derive(Clone, Debug, Default, PartialEq)]
1115pub struct AlterExtensionStmt {
1116    pub extname: Option<Str>,
1117    pub options: List,
1118}
1119
1120/// The node `AlterFdwStmt`.
1121#[derive(Clone, Debug, Default, PartialEq)]
1122pub struct AlterFdwStmt {
1123    pub fdwname: Option<Str>,
1124    pub func_options: List,
1125    pub options: List,
1126}
1127
1128/// The node `AlterForeignServerStmt`.
1129#[derive(Clone, Debug, Default, PartialEq)]
1130pub struct AlterForeignServerStmt {
1131    pub servername: Option<Str>,
1132    pub version: Option<Str>,
1133    pub options: List,
1134    pub has_version: bool,
1135}
1136
1137/// The node `AlterFunctionStmt`.
1138#[derive(Clone, Debug, Default, PartialEq)]
1139pub struct AlterFunctionStmt {
1140    pub objtype: ObjectType,
1141    pub func: Option<Box<ObjectWithArgs>>,
1142    pub actions: List,
1143}
1144
1145/// The node `AlterObjectDependsStmt`.
1146#[derive(Clone, Debug, Default, PartialEq)]
1147pub struct AlterObjectDependsStmt {
1148    pub objectType: ObjectType,
1149    pub relation: Option<Box<RangeVar>>,
1150    pub object: Option<Node>,
1151    pub extname: Option<Node>,
1152    pub remove: bool,
1153}
1154
1155/// The node `AlterObjectSchemaStmt`.
1156#[derive(Clone, Debug, Default, PartialEq)]
1157pub struct AlterObjectSchemaStmt {
1158    pub objectType: ObjectType,
1159    pub relation: Option<Box<RangeVar>>,
1160    pub object: Option<Node>,
1161    pub newschema: Option<Str>,
1162    pub missing_ok: bool,
1163}
1164
1165/// The node `AlterOpFamilyStmt`.
1166#[derive(Clone, Debug, Default, PartialEq)]
1167pub struct AlterOpFamilyStmt {
1168    pub opfamilyname: List,
1169    pub amname: Option<Str>,
1170    pub isDrop: bool,
1171    pub items: List,
1172}
1173
1174/// The node `AlterOperatorStmt`.
1175#[derive(Clone, Debug, Default, PartialEq)]
1176pub struct AlterOperatorStmt {
1177    pub opername: Option<Box<ObjectWithArgs>>,
1178    pub options: List,
1179}
1180
1181/// The node `AlterOwnerStmt`.
1182#[derive(Clone, Debug, Default, PartialEq)]
1183pub struct AlterOwnerStmt {
1184    pub objectType: ObjectType,
1185    pub relation: Option<Box<RangeVar>>,
1186    pub object: Option<Node>,
1187    pub newowner: Option<Box<RoleSpec>>,
1188}
1189
1190/// The node `AlterPolicyStmt`.
1191#[derive(Clone, Debug, Default, PartialEq)]
1192pub struct AlterPolicyStmt {
1193    pub policy_name: Option<Str>,
1194    pub table: Option<Box<RangeVar>>,
1195    pub roles: List,
1196    pub qual: Option<Node>,
1197    pub with_check: Option<Node>,
1198}
1199
1200/// The node `AlterPublicationStmt`.
1201#[derive(Clone, Debug, Default, PartialEq)]
1202pub struct AlterPublicationStmt {
1203    pub pubname: Option<Str>,
1204    pub options: List,
1205    pub pubobjects: List,
1206    pub action: AlterPublicationAction,
1207    pub for_all_tables: bool,
1208    pub for_all_sequences: bool,
1209}
1210
1211/// The node `AlterRoleSetStmt`.
1212#[derive(Clone, Debug, Default, PartialEq)]
1213pub struct AlterRoleSetStmt {
1214    pub role: Option<Box<RoleSpec>>,
1215    pub database: Option<Str>,
1216    pub setstmt: Option<Box<VariableSetStmt>>,
1217}
1218
1219/// The node `AlterRoleStmt`.
1220#[derive(Clone, Debug, Default, PartialEq)]
1221pub struct AlterRoleStmt {
1222    pub role: Option<Box<RoleSpec>>,
1223    pub options: List,
1224    pub action: i32,
1225}
1226
1227/// The node `AlterSeqStmt`.
1228#[derive(Clone, Debug, Default, PartialEq)]
1229pub struct AlterSeqStmt {
1230    pub sequence: Option<Box<RangeVar>>,
1231    pub options: List,
1232    pub for_identity: bool,
1233    pub missing_ok: bool,
1234}
1235
1236/// The node `AlterStatsStmt`.
1237#[derive(Clone, Debug, Default, PartialEq)]
1238pub struct AlterStatsStmt {
1239    pub defnames: List,
1240    pub stxstattarget: Option<Node>,
1241    pub missing_ok: bool,
1242}
1243
1244/// The node `AlterSubscriptionStmt`.
1245#[derive(Clone, Debug, Default, PartialEq)]
1246pub struct AlterSubscriptionStmt {
1247    pub kind: AlterSubscriptionType,
1248    pub subname: Option<Str>,
1249    pub servername: Option<Str>,
1250    pub conninfo: Option<Str>,
1251    pub publication: List,
1252    pub options: List,
1253}
1254
1255/// The node `AlterSystemStmt`.
1256#[derive(Clone, Debug, Default, PartialEq)]
1257pub struct AlterSystemStmt {
1258    pub setstmt: Option<Box<VariableSetStmt>>,
1259}
1260
1261/// The node `AlterTSConfigurationStmt`.
1262#[derive(Clone, Debug, Default, PartialEq)]
1263pub struct AlterTSConfigurationStmt {
1264    pub kind: AlterTSConfigType,
1265    pub cfgname: List,
1266    pub tokentype: List,
1267    pub dicts: List,
1268    pub r#override: bool,
1269    pub replace: bool,
1270    pub missing_ok: bool,
1271}
1272
1273/// The node `AlterTSDictionaryStmt`.
1274#[derive(Clone, Debug, Default, PartialEq)]
1275pub struct AlterTSDictionaryStmt {
1276    pub dictname: List,
1277    pub options: List,
1278}
1279
1280/// The node `AlterTableCmd`.
1281#[derive(Clone, Debug, Default, PartialEq)]
1282pub struct AlterTableCmd {
1283    pub subtype: AlterTableType,
1284    pub name: Option<Str>,
1285    pub num: i16,
1286    pub newowner: Option<Box<RoleSpec>>,
1287    pub def: Option<Node>,
1288    pub behavior: DropBehavior,
1289    pub missing_ok: bool,
1290    pub recurse: bool,
1291}
1292
1293/// The node `AlterTableMoveAllStmt`.
1294#[derive(Clone, Debug, Default, PartialEq)]
1295pub struct AlterTableMoveAllStmt {
1296    pub orig_tablespacename: Option<Str>,
1297    pub objtype: ObjectType,
1298    pub roles: List,
1299    pub new_tablespacename: Option<Str>,
1300    pub nowait: bool,
1301}
1302
1303/// The node `AlterTableSpaceOptionsStmt`.
1304#[derive(Clone, Debug, Default, PartialEq)]
1305pub struct AlterTableSpaceOptionsStmt {
1306    pub tablespacename: Option<Str>,
1307    pub options: List,
1308    pub isReset: bool,
1309}
1310
1311/// The node `AlterTableStmt`.
1312#[derive(Clone, Debug, Default, PartialEq)]
1313pub struct AlterTableStmt {
1314    pub relation: Option<Box<RangeVar>>,
1315    pub cmds: List,
1316    pub objtype: ObjectType,
1317    pub missing_ok: bool,
1318}
1319
1320/// The node `AlterTypeStmt`.
1321#[derive(Clone, Debug, Default, PartialEq)]
1322pub struct AlterTypeStmt {
1323    pub typeName: List,
1324    pub options: List,
1325}
1326
1327/// The node `AlterUserMappingStmt`.
1328#[derive(Clone, Debug, Default, PartialEq)]
1329pub struct AlterUserMappingStmt {
1330    pub user: Option<Box<RoleSpec>>,
1331    pub servername: Option<Str>,
1332    pub options: List,
1333}
1334
1335/// The node `BoolExpr`.
1336#[derive(Clone, Debug, Default, PartialEq)]
1337pub struct BoolExpr {
1338    pub boolop: BoolExprType,
1339    pub args: List,
1340    pub location: i32,
1341}
1342
1343/// The node `BooleanTest`.
1344#[derive(Clone, Debug, Default, PartialEq)]
1345pub struct BooleanTest {
1346    pub arg: Option<Node>,
1347    pub booltesttype: BoolTestType,
1348    pub location: i32,
1349}
1350
1351/// The node `CTECycleClause`.
1352#[derive(Clone, Debug, Default, PartialEq)]
1353pub struct CTECycleClause {
1354    pub cycle_col_list: List,
1355    pub cycle_mark_column: Option<Str>,
1356    pub cycle_mark_value: Option<Node>,
1357    pub cycle_mark_default: Option<Node>,
1358    pub cycle_path_column: Option<Str>,
1359    pub location: i32,
1360    pub cycle_mark_type: u32,
1361    pub cycle_mark_typmod: i32,
1362    pub cycle_mark_collation: u32,
1363    pub cycle_mark_neop: u32,
1364}
1365
1366/// The node `CTESearchClause`.
1367#[derive(Clone, Debug, Default, PartialEq)]
1368pub struct CTESearchClause {
1369    pub search_col_list: List,
1370    pub search_breadth_first: bool,
1371    pub search_seq_column: Option<Str>,
1372    pub location: i32,
1373}
1374
1375/// The node `CallStmt`.
1376#[derive(Clone, Debug, Default, PartialEq)]
1377pub struct CallStmt {
1378    pub funccall: Option<Box<FuncCall>>,
1379    pub funcexpr: Option<Node>,
1380    pub outargs: List,
1381}
1382
1383/// The node `CaseExpr`.
1384#[derive(Clone, Debug, Default, PartialEq)]
1385pub struct CaseExpr {
1386    pub casetype: u32,
1387    pub casecollid: u32,
1388    pub arg: Option<Node>,
1389    pub args: List,
1390    pub defresult: Option<Node>,
1391    pub location: i32,
1392}
1393
1394/// The node `CaseWhen`.
1395#[derive(Clone, Debug, Default, PartialEq)]
1396pub struct CaseWhen {
1397    pub expr: Option<Node>,
1398    pub result: Option<Node>,
1399    pub location: i32,
1400}
1401
1402/// The node `CheckPointStmt`.
1403#[derive(Clone, Debug, Default, PartialEq)]
1404pub struct CheckPointStmt {
1405    pub options: List,
1406}
1407
1408/// The node `ClosePortalStmt`.
1409#[derive(Clone, Debug, Default, PartialEq)]
1410pub struct ClosePortalStmt {
1411    pub portalname: Option<Str>,
1412}
1413
1414/// The node `CoalesceExpr`.
1415#[derive(Clone, Debug, Default, PartialEq)]
1416pub struct CoalesceExpr {
1417    pub coalescetype: u32,
1418    pub coalescecollid: u32,
1419    pub args: List,
1420    pub location: i32,
1421}
1422
1423/// The node `CollateClause`.
1424#[derive(Clone, Debug, Default, PartialEq)]
1425pub struct CollateClause {
1426    pub arg: Option<Node>,
1427    pub collname: List,
1428    pub location: i32,
1429}
1430
1431/// The node `ColumnDef`.
1432#[derive(Clone, Debug, Default, PartialEq)]
1433pub struct ColumnDef {
1434    pub colname: Option<Str>,
1435    pub typeName: Option<Box<TypeName>>,
1436    pub compression: Option<Str>,
1437    pub inhcount: i16,
1438    pub is_local: bool,
1439    pub is_not_null: bool,
1440    pub is_from_type: bool,
1441    pub storage: u8,
1442    pub storage_name: Option<Str>,
1443    pub raw_default: Option<Node>,
1444    pub cooked_default: Option<Node>,
1445    pub identity: u8,
1446    pub identitySequence: Option<Box<RangeVar>>,
1447    pub generated: u8,
1448    pub collClause: Option<Box<CollateClause>>,
1449    pub collOid: u32,
1450    pub constraints: List,
1451    pub fdwoptions: List,
1452    pub location: i32,
1453}
1454
1455/// The node `ColumnRef`.
1456#[derive(Clone, Debug, Default, PartialEq)]
1457pub struct ColumnRef {
1458    pub fields: List,
1459    pub location: i32,
1460}
1461
1462/// The node `CommentStmt`.
1463#[derive(Clone, Debug, Default, PartialEq)]
1464pub struct CommentStmt {
1465    pub objtype: ObjectType,
1466    pub object: Option<Node>,
1467    pub comment: Option<Str>,
1468}
1469
1470/// The node `CommonTableExpr`.
1471#[derive(Clone, Debug, Default, PartialEq)]
1472pub struct CommonTableExpr {
1473    pub ctename: Option<Str>,
1474    pub aliascolnames: List,
1475    pub ctematerialized: CTEMaterialize,
1476    pub ctequery: Option<Node>,
1477    pub search_clause: Option<Box<CTESearchClause>>,
1478    pub cycle_clause: Option<Box<CTECycleClause>>,
1479    pub location: i32,
1480    pub cterecursive: bool,
1481    pub cterefcount: i32,
1482    pub ctecolnames: List,
1483    pub ctecoltypes: List,
1484    pub ctecoltypmods: List,
1485    pub ctecolcollations: List,
1486}
1487
1488/// The node `CompositeTypeStmt`.
1489#[derive(Clone, Debug, Default, PartialEq)]
1490pub struct CompositeTypeStmt {
1491    pub typevar: Option<Box<RangeVar>>,
1492    pub coldeflist: List,
1493}
1494
1495/// The node `Constraint`.
1496#[derive(Clone, Debug, Default, PartialEq)]
1497pub struct Constraint {
1498    pub contype: ConstrType,
1499    pub conname: Option<Str>,
1500    pub deferrable: bool,
1501    pub initdeferred: bool,
1502    pub is_enforced: bool,
1503    pub skip_validation: bool,
1504    pub initially_valid: bool,
1505    pub is_no_inherit: bool,
1506    pub raw_expr: Option<Node>,
1507    pub cooked_expr: Option<Str>,
1508    pub generated_when: u8,
1509    pub generated_kind: u8,
1510    pub nulls_not_distinct: bool,
1511    pub keys: List,
1512    pub without_overlaps: bool,
1513    pub including: List,
1514    pub exclusions: List,
1515    pub options: List,
1516    pub indexname: Option<Str>,
1517    pub indexspace: Option<Str>,
1518    pub reset_default_tblspc: bool,
1519    pub access_method: Option<Str>,
1520    pub where_clause: Option<Node>,
1521    pub pktable: Option<Box<RangeVar>>,
1522    pub fk_attrs: List,
1523    pub pk_attrs: List,
1524    pub fk_with_period: bool,
1525    pub pk_with_period: bool,
1526    pub fk_matchtype: u8,
1527    pub fk_upd_action: u8,
1528    pub fk_del_action: u8,
1529    pub fk_del_set_cols: List,
1530    pub old_conpfeqop: List,
1531    pub old_pktable_oid: u32,
1532    pub location: i32,
1533}
1534
1535/// The node `ConstraintsSetStmt`.
1536#[derive(Clone, Debug, Default, PartialEq)]
1537pub struct ConstraintsSetStmt {
1538    pub constraints: List,
1539    pub deferred: bool,
1540}
1541
1542/// The node `CopyStmt`.
1543#[derive(Clone, Debug, Default, PartialEq)]
1544pub struct CopyStmt {
1545    pub relation: Option<Box<RangeVar>>,
1546    pub query: Option<Node>,
1547    pub attlist: List,
1548    pub is_from: bool,
1549    pub is_program: bool,
1550    pub filename: Option<Str>,
1551    pub options: List,
1552    pub whereClause: Option<Node>,
1553}
1554
1555/// The node `CreateAmStmt`.
1556#[derive(Clone, Debug, Default, PartialEq)]
1557pub struct CreateAmStmt {
1558    pub amname: Option<Str>,
1559    pub handler_name: List,
1560    pub amtype: u8,
1561}
1562
1563/// The node `CreateCastStmt`.
1564#[derive(Clone, Debug, Default, PartialEq)]
1565pub struct CreateCastStmt {
1566    pub sourcetype: Option<Box<TypeName>>,
1567    pub targettype: Option<Box<TypeName>>,
1568    pub func: Option<Box<ObjectWithArgs>>,
1569    pub context: CoercionContext,
1570    pub inout: bool,
1571}
1572
1573/// The node `CreateConversionStmt`.
1574#[derive(Clone, Debug, Default, PartialEq)]
1575pub struct CreateConversionStmt {
1576    pub conversion_name: List,
1577    pub for_encoding_name: Option<Str>,
1578    pub to_encoding_name: Option<Str>,
1579    pub func_name: List,
1580    pub def: bool,
1581}
1582
1583/// The node `CreateDomainStmt`.
1584#[derive(Clone, Debug, Default, PartialEq)]
1585pub struct CreateDomainStmt {
1586    pub domainname: List,
1587    pub typeName: Option<Box<TypeName>>,
1588    pub collClause: Option<Box<CollateClause>>,
1589    pub constraints: List,
1590}
1591
1592/// The node `CreateEnumStmt`.
1593#[derive(Clone, Debug, Default, PartialEq)]
1594pub struct CreateEnumStmt {
1595    pub typeName: List,
1596    pub vals: List,
1597}
1598
1599/// The node `CreateEventTrigStmt`.
1600#[derive(Clone, Debug, Default, PartialEq)]
1601pub struct CreateEventTrigStmt {
1602    pub trigname: Option<Str>,
1603    pub eventname: Option<Str>,
1604    pub whenclause: List,
1605    pub funcname: List,
1606}
1607
1608/// The node `CreateExtensionStmt`.
1609#[derive(Clone, Debug, Default, PartialEq)]
1610pub struct CreateExtensionStmt {
1611    pub extname: Option<Str>,
1612    pub if_not_exists: bool,
1613    pub options: List,
1614}
1615
1616/// The node `CreateFdwStmt`.
1617#[derive(Clone, Debug, Default, PartialEq)]
1618pub struct CreateFdwStmt {
1619    pub fdwname: Option<Str>,
1620    pub func_options: List,
1621    pub options: List,
1622}
1623
1624/// The node `CreateForeignServerStmt`.
1625#[derive(Clone, Debug, Default, PartialEq)]
1626pub struct CreateForeignServerStmt {
1627    pub servername: Option<Str>,
1628    pub servertype: Option<Str>,
1629    pub version: Option<Str>,
1630    pub fdwname: Option<Str>,
1631    pub if_not_exists: bool,
1632    pub options: List,
1633}
1634
1635/// The node `CreateForeignTableStmt`.
1636#[derive(Clone, Debug, Default, PartialEq)]
1637pub struct CreateForeignTableStmt {
1638    pub base: CreateStmt,
1639    pub servername: Option<Str>,
1640    pub options: List,
1641}
1642
1643/// The node `CreateFunctionStmt`.
1644#[derive(Clone, Debug, Default, PartialEq)]
1645pub struct CreateFunctionStmt {
1646    pub is_procedure: bool,
1647    pub replace: bool,
1648    pub funcname: List,
1649    pub parameters: List,
1650    pub returnType: Option<Box<TypeName>>,
1651    pub options: List,
1652    pub sql_body: Option<Node>,
1653}
1654
1655/// The node `CreateOpClassItem`.
1656#[derive(Clone, Debug, Default, PartialEq)]
1657pub struct CreateOpClassItem {
1658    pub itemtype: i32,
1659    pub name: Option<Box<ObjectWithArgs>>,
1660    pub number: i32,
1661    pub order_family: List,
1662    pub class_args: List,
1663    pub storedtype: Option<Box<TypeName>>,
1664}
1665
1666/// The node `CreateOpClassStmt`.
1667#[derive(Clone, Debug, Default, PartialEq)]
1668pub struct CreateOpClassStmt {
1669    pub opclassname: List,
1670    pub opfamilyname: List,
1671    pub amname: Option<Str>,
1672    pub datatype: Option<Box<TypeName>>,
1673    pub items: List,
1674    pub isDefault: bool,
1675}
1676
1677/// The node `CreateOpFamilyStmt`.
1678#[derive(Clone, Debug, Default, PartialEq)]
1679pub struct CreateOpFamilyStmt {
1680    pub opfamilyname: List,
1681    pub amname: Option<Str>,
1682}
1683
1684/// The node `CreatePLangStmt`.
1685#[derive(Clone, Debug, Default, PartialEq)]
1686pub struct CreatePLangStmt {
1687    pub replace: bool,
1688    pub plname: Option<Str>,
1689    pub plhandler: List,
1690    pub plinline: List,
1691    pub plvalidator: List,
1692    pub pltrusted: bool,
1693}
1694
1695/// The node `CreatePolicyStmt`.
1696#[derive(Clone, Debug, Default, PartialEq)]
1697pub struct CreatePolicyStmt {
1698    pub policy_name: Option<Str>,
1699    pub table: Option<Box<RangeVar>>,
1700    pub cmd_name: Option<Str>,
1701    pub permissive: bool,
1702    pub roles: List,
1703    pub qual: Option<Node>,
1704    pub with_check: Option<Node>,
1705}
1706
1707/// The node `CreatePublicationStmt`.
1708#[derive(Clone, Debug, Default, PartialEq)]
1709pub struct CreatePublicationStmt {
1710    pub pubname: Option<Str>,
1711    pub options: List,
1712    pub pubobjects: List,
1713    pub for_all_tables: bool,
1714    pub for_all_sequences: bool,
1715}
1716
1717/// The node `CreateRangeStmt`.
1718#[derive(Clone, Debug, Default, PartialEq)]
1719pub struct CreateRangeStmt {
1720    pub typeName: List,
1721    pub params: List,
1722}
1723
1724/// The node `CreateRoleStmt`.
1725#[derive(Clone, Debug, Default, PartialEq)]
1726pub struct CreateRoleStmt {
1727    pub stmt_type: RoleStmtType,
1728    pub role: Option<Str>,
1729    pub options: List,
1730}
1731
1732/// The node `CreateSchemaStmt`.
1733#[derive(Clone, Debug, Default, PartialEq)]
1734pub struct CreateSchemaStmt {
1735    pub schemaname: Option<Str>,
1736    pub authrole: Option<Box<RoleSpec>>,
1737    pub schemaElts: List,
1738    pub if_not_exists: bool,
1739}
1740
1741/// The node `CreateSeqStmt`.
1742#[derive(Clone, Debug, Default, PartialEq)]
1743pub struct CreateSeqStmt {
1744    pub sequence: Option<Box<RangeVar>>,
1745    pub options: List,
1746    pub ownerId: u32,
1747    pub for_identity: bool,
1748    pub if_not_exists: bool,
1749}
1750
1751/// The node `CreateStatsStmt`.
1752#[derive(Clone, Debug, Default, PartialEq)]
1753pub struct CreateStatsStmt {
1754    pub defnames: List,
1755    pub stat_types: List,
1756    pub exprs: List,
1757    pub relations: List,
1758    pub stxcomment: Option<Str>,
1759    pub transformed: bool,
1760    pub if_not_exists: bool,
1761    pub owner: u32,
1762}
1763
1764/// The node `CreateStmt`.
1765#[derive(Clone, Debug, Default, PartialEq)]
1766pub struct CreateStmt {
1767    pub relation: Option<Box<RangeVar>>,
1768    pub tableElts: List,
1769    pub inhRelations: List,
1770    pub partbound: Option<Box<PartitionBoundSpec>>,
1771    pub partspec: Option<Box<PartitionSpec>>,
1772    pub ofTypename: Option<Box<TypeName>>,
1773    pub constraints: List,
1774    pub nnconstraints: List,
1775    pub options: List,
1776    pub oncommit: OnCommitAction,
1777    pub tablespacename: Option<Str>,
1778    pub accessMethod: Option<Str>,
1779    pub if_not_exists: bool,
1780}
1781
1782/// The node `CreateSubscriptionStmt`.
1783#[derive(Clone, Debug, Default, PartialEq)]
1784pub struct CreateSubscriptionStmt {
1785    pub subname: Option<Str>,
1786    pub servername: Option<Str>,
1787    pub conninfo: Option<Str>,
1788    pub publication: List,
1789    pub options: List,
1790}
1791
1792/// The node `CreateTableAsStmt`.
1793#[derive(Clone, Debug, Default, PartialEq)]
1794pub struct CreateTableAsStmt {
1795    pub query: Option<Node>,
1796    pub into: Option<Box<IntoClause>>,
1797    pub objtype: ObjectType,
1798    pub is_select_into: bool,
1799    pub if_not_exists: bool,
1800}
1801
1802/// The node `CreateTableSpaceStmt`.
1803#[derive(Clone, Debug, Default, PartialEq)]
1804pub struct CreateTableSpaceStmt {
1805    pub tablespacename: Option<Str>,
1806    pub owner: Option<Box<RoleSpec>>,
1807    pub location: Option<Str>,
1808    pub options: List,
1809}
1810
1811/// The node `CreateTransformStmt`.
1812#[derive(Clone, Debug, Default, PartialEq)]
1813pub struct CreateTransformStmt {
1814    pub replace: bool,
1815    pub type_name: Option<Box<TypeName>>,
1816    pub lang: Option<Str>,
1817    pub fromsql: Option<Box<ObjectWithArgs>>,
1818    pub tosql: Option<Box<ObjectWithArgs>>,
1819}
1820
1821/// The node `CreateTrigStmt`.
1822#[derive(Clone, Debug, Default, PartialEq)]
1823pub struct CreateTrigStmt {
1824    pub replace: bool,
1825    pub isconstraint: bool,
1826    pub trigname: Option<Str>,
1827    pub relation: Option<Box<RangeVar>>,
1828    pub funcname: List,
1829    pub args: List,
1830    pub row: bool,
1831    pub timing: i16,
1832    pub events: i16,
1833    pub columns: List,
1834    pub whenClause: Option<Node>,
1835    pub transitionRels: List,
1836    pub deferrable: bool,
1837    pub initdeferred: bool,
1838    pub constrrel: Option<Box<RangeVar>>,
1839}
1840
1841/// The node `CreateUserMappingStmt`.
1842#[derive(Clone, Debug, Default, PartialEq)]
1843pub struct CreateUserMappingStmt {
1844    pub user: Option<Box<RoleSpec>>,
1845    pub servername: Option<Str>,
1846    pub if_not_exists: bool,
1847    pub options: List,
1848}
1849
1850/// The node `CreatedbStmt`.
1851#[derive(Clone, Debug, Default, PartialEq)]
1852pub struct CreatedbStmt {
1853    pub dbname: Option<Str>,
1854    pub options: List,
1855}
1856
1857/// The node `CurrentOfExpr`.
1858#[derive(Clone, Debug, Default, PartialEq)]
1859pub struct CurrentOfExpr {
1860    pub cvarno: u32,
1861    pub cursor_name: Option<Str>,
1862    pub cursor_param: i32,
1863}
1864
1865/// The node `DeallocateStmt`.
1866#[derive(Clone, Debug, Default, PartialEq)]
1867pub struct DeallocateStmt {
1868    pub name: Option<Str>,
1869    pub isall: bool,
1870    pub location: i32,
1871}
1872
1873/// The node `DeclareCursorStmt`.
1874#[derive(Clone, Debug, Default, PartialEq)]
1875pub struct DeclareCursorStmt {
1876    pub portalname: Option<Str>,
1877    pub options: i32,
1878    pub query: Option<Node>,
1879}
1880
1881/// The node `DefElem`.
1882#[derive(Clone, Debug, Default, PartialEq)]
1883pub struct DefElem {
1884    pub defnamespace: Option<Str>,
1885    pub defname: Option<Str>,
1886    pub arg: Option<Node>,
1887    pub defaction: DefElemAction,
1888    pub location: i32,
1889}
1890
1891/// The node `DefineStmt`.
1892#[derive(Clone, Debug, Default, PartialEq)]
1893pub struct DefineStmt {
1894    pub kind: ObjectType,
1895    pub oldstyle: bool,
1896    pub defnames: List,
1897    pub args: List,
1898    pub definition: List,
1899    pub if_not_exists: bool,
1900    pub replace: bool,
1901}
1902
1903/// The node `DeleteStmt`.
1904#[derive(Clone, Debug, Default, PartialEq)]
1905pub struct DeleteStmt {
1906    pub relation: Option<Box<RangeVar>>,
1907    pub usingClause: List,
1908    pub whereClause: Option<Node>,
1909    pub returningClause: Option<Box<ReturningClause>>,
1910    pub withClause: Option<Box<WithClause>>,
1911}
1912
1913/// The node `DiscardStmt`.
1914#[derive(Clone, Debug, Default, PartialEq)]
1915pub struct DiscardStmt {
1916    pub target: DiscardMode,
1917}
1918
1919/// The node `DoStmt`.
1920#[derive(Clone, Debug, Default, PartialEq)]
1921pub struct DoStmt {
1922    pub args: List,
1923}
1924
1925/// The node `DropOwnedStmt`.
1926#[derive(Clone, Debug, Default, PartialEq)]
1927pub struct DropOwnedStmt {
1928    pub roles: List,
1929    pub behavior: DropBehavior,
1930}
1931
1932/// The node `DropRoleStmt`.
1933#[derive(Clone, Debug, Default, PartialEq)]
1934pub struct DropRoleStmt {
1935    pub roles: List,
1936    pub missing_ok: bool,
1937}
1938
1939/// The node `DropStmt`.
1940#[derive(Clone, Debug, Default, PartialEq)]
1941pub struct DropStmt {
1942    pub objects: List,
1943    pub removeType: ObjectType,
1944    pub behavior: DropBehavior,
1945    pub missing_ok: bool,
1946    pub concurrent: bool,
1947}
1948
1949/// The node `DropSubscriptionStmt`.
1950#[derive(Clone, Debug, Default, PartialEq)]
1951pub struct DropSubscriptionStmt {
1952    pub subname: Option<Str>,
1953    pub missing_ok: bool,
1954    pub behavior: DropBehavior,
1955}
1956
1957/// The node `DropTableSpaceStmt`.
1958#[derive(Clone, Debug, Default, PartialEq)]
1959pub struct DropTableSpaceStmt {
1960    pub tablespacename: Option<Str>,
1961    pub missing_ok: bool,
1962}
1963
1964/// The node `DropUserMappingStmt`.
1965#[derive(Clone, Debug, Default, PartialEq)]
1966pub struct DropUserMappingStmt {
1967    pub user: Option<Box<RoleSpec>>,
1968    pub servername: Option<Str>,
1969    pub missing_ok: bool,
1970}
1971
1972/// The node `DropdbStmt`.
1973#[derive(Clone, Debug, Default, PartialEq)]
1974pub struct DropdbStmt {
1975    pub dbname: Option<Str>,
1976    pub missing_ok: bool,
1977    pub options: List,
1978}
1979
1980/// The node `ExecuteStmt`.
1981#[derive(Clone, Debug, Default, PartialEq)]
1982pub struct ExecuteStmt {
1983    pub name: Option<Str>,
1984    pub params: List,
1985}
1986
1987/// The node `ExplainStmt`.
1988#[derive(Clone, Debug, Default, PartialEq)]
1989pub struct ExplainStmt {
1990    pub query: Option<Node>,
1991    pub options: List,
1992}
1993
1994/// The node `FetchStmt`.
1995#[derive(Clone, Debug, Default, PartialEq)]
1996pub struct FetchStmt {
1997    pub direction: FetchDirection,
1998    pub howMany: i64,
1999    pub portalname: Option<Str>,
2000    pub ismove: bool,
2001    pub direction_keyword: FetchDirectionKeywords,
2002    pub location: i32,
2003}
2004
2005/// The node `FuncCall`.
2006#[derive(Clone, Debug, Default, PartialEq)]
2007pub struct FuncCall {
2008    pub funcname: List,
2009    pub args: List,
2010    pub agg_order: List,
2011    pub agg_filter: Option<Node>,
2012    pub over: Option<Box<WindowDef>>,
2013    pub ignore_nulls: i32,
2014    pub agg_within_group: bool,
2015    pub agg_star: bool,
2016    pub agg_distinct: bool,
2017    pub func_variadic: bool,
2018    pub funcformat: CoercionForm,
2019    pub location: i32,
2020}
2021
2022/// The node `FunctionParameter`.
2023#[derive(Clone, Debug, Default, PartialEq)]
2024pub struct FunctionParameter {
2025    pub name: Option<Str>,
2026    pub argType: Option<Box<TypeName>>,
2027    pub mode: FunctionParameterMode,
2028    pub defexpr: Option<Node>,
2029    pub location: i32,
2030}
2031
2032/// The node `GrantRoleStmt`.
2033#[derive(Clone, Debug, Default, PartialEq)]
2034pub struct GrantRoleStmt {
2035    pub granted_roles: List,
2036    pub grantee_roles: List,
2037    pub is_grant: bool,
2038    pub opt: List,
2039    pub grantor: Option<Box<RoleSpec>>,
2040    pub behavior: DropBehavior,
2041}
2042
2043/// The node `GrantStmt`.
2044#[derive(Clone, Debug, Default, PartialEq)]
2045pub struct GrantStmt {
2046    pub is_grant: bool,
2047    pub targtype: GrantTargetType,
2048    pub objtype: ObjectType,
2049    pub objects: List,
2050    pub privileges: List,
2051    pub grantees: List,
2052    pub grant_option: bool,
2053    pub grantor: Option<Box<RoleSpec>>,
2054    pub behavior: DropBehavior,
2055}
2056
2057/// The node `GroupingFunc`.
2058#[derive(Clone, Debug, Default, PartialEq)]
2059pub struct GroupingFunc {
2060    pub args: List,
2061    pub refs: List,
2062    pub cols: List,
2063    pub agglevelsup: u32,
2064    pub location: i32,
2065}
2066
2067/// The node `GroupingSet`.
2068#[derive(Clone, Debug, Default, PartialEq)]
2069pub struct GroupingSet {
2070    pub kind: GroupingSetKind,
2071    pub content: List,
2072    pub location: i32,
2073}
2074
2075/// The node `ImportForeignSchemaStmt`.
2076#[derive(Clone, Debug, Default, PartialEq)]
2077pub struct ImportForeignSchemaStmt {
2078    pub server_name: Option<Str>,
2079    pub remote_schema: Option<Str>,
2080    pub local_schema: Option<Str>,
2081    pub list_type: ImportForeignSchemaType,
2082    pub table_list: List,
2083    pub options: List,
2084}
2085
2086/// The node `IndexElem`.
2087#[derive(Clone, Debug, Default, PartialEq)]
2088pub struct IndexElem {
2089    pub name: Option<Str>,
2090    pub expr: Option<Node>,
2091    pub indexcolname: Option<Str>,
2092    pub collation: List,
2093    pub opclass: List,
2094    pub opclassopts: List,
2095    pub ordering: SortByDir,
2096    pub nulls_ordering: SortByNulls,
2097    pub location: i32,
2098}
2099
2100/// The node `IndexStmt`.
2101#[derive(Clone, Debug, Default, PartialEq)]
2102pub struct IndexStmt {
2103    pub idxname: Option<Str>,
2104    pub relation: Option<Box<RangeVar>>,
2105    pub accessMethod: Option<Str>,
2106    pub tableSpace: Option<Str>,
2107    pub indexParams: List,
2108    pub indexIncludingParams: List,
2109    pub options: List,
2110    pub whereClause: Option<Node>,
2111    pub excludeOpNames: List,
2112    pub idxcomment: Option<Str>,
2113    pub indexOid: u32,
2114    pub oldNumber: u32,
2115    pub oldCreateSubid: u32,
2116    pub oldFirstRelfilelocatorSubid: u32,
2117    pub unique: bool,
2118    pub nulls_not_distinct: bool,
2119    pub primary: bool,
2120    pub isconstraint: bool,
2121    pub iswithoutoverlaps: bool,
2122    pub deferrable: bool,
2123    pub initdeferred: bool,
2124    pub transformed: bool,
2125    pub concurrent: bool,
2126    pub if_not_exists: bool,
2127    pub reset_default_tblspc: bool,
2128}
2129
2130/// The node `InferClause`.
2131#[derive(Clone, Debug, Default, PartialEq)]
2132pub struct InferClause {
2133    pub indexElems: List,
2134    pub whereClause: Option<Node>,
2135    pub conname: Option<Str>,
2136    pub location: i32,
2137}
2138
2139/// The node `InsertStmt`.
2140#[derive(Clone, Debug, Default, PartialEq)]
2141pub struct InsertStmt {
2142    pub relation: Option<Box<RangeVar>>,
2143    pub cols: List,
2144    pub selectStmt: Option<Node>,
2145    pub onConflictClause: Option<Box<OnConflictClause>>,
2146    pub returningClause: Option<Box<ReturningClause>>,
2147    pub withClause: Option<Box<WithClause>>,
2148    pub r#override: OverridingKind,
2149}
2150
2151/// The node `IntoClause`.
2152#[derive(Clone, Debug, Default, PartialEq)]
2153pub struct IntoClause {
2154    pub rel: Option<Box<RangeVar>>,
2155    pub colNames: List,
2156    pub accessMethod: Option<Str>,
2157    pub options: List,
2158    pub onCommit: OnCommitAction,
2159    pub tableSpaceName: Option<Str>,
2160    pub viewQuery: Option<Node>,
2161    pub skipData: bool,
2162}
2163
2164/// The node `JoinExpr`.
2165#[derive(Clone, Debug, Default, PartialEq)]
2166pub struct JoinExpr {
2167    pub jointype: JoinType,
2168    pub isNatural: bool,
2169    pub larg: Option<Node>,
2170    pub rarg: Option<Node>,
2171    pub usingClause: List,
2172    pub join_using_alias: Option<Box<Alias>>,
2173    pub quals: Option<Node>,
2174    pub alias: Option<Box<Alias>>,
2175    pub rtindex: i32,
2176}
2177
2178/// The node `JsonAggConstructor`.
2179#[derive(Clone, Debug, Default, PartialEq)]
2180pub struct JsonAggConstructor {
2181    pub output: Option<Box<JsonOutput>>,
2182    pub agg_filter: Option<Node>,
2183    pub agg_order: List,
2184    pub over: Option<Box<WindowDef>>,
2185    pub location: i32,
2186}
2187
2188/// The node `JsonArgument`.
2189#[derive(Clone, Debug, Default, PartialEq)]
2190pub struct JsonArgument {
2191    pub val: Option<Box<JsonValueExpr>>,
2192    pub name: Option<Str>,
2193}
2194
2195/// The node `JsonArrayAgg`.
2196#[derive(Clone, Debug, Default, PartialEq)]
2197pub struct JsonArrayAgg {
2198    pub constructor: Option<Box<JsonAggConstructor>>,
2199    pub arg: Option<Box<JsonValueExpr>>,
2200    pub absent_on_null: bool,
2201}
2202
2203/// The node `JsonArrayConstructor`.
2204#[derive(Clone, Debug, Default, PartialEq)]
2205pub struct JsonArrayConstructor {
2206    pub exprs: List,
2207    pub output: Option<Box<JsonOutput>>,
2208    pub absent_on_null: bool,
2209    pub location: i32,
2210}
2211
2212/// The node `JsonArrayQueryConstructor`.
2213#[derive(Clone, Debug, Default, PartialEq)]
2214pub struct JsonArrayQueryConstructor {
2215    pub query: Option<Node>,
2216    pub output: Option<Box<JsonOutput>>,
2217    pub format: Option<Box<JsonFormat>>,
2218    pub absent_on_null: bool,
2219    pub location: i32,
2220}
2221
2222/// The node `JsonBehavior`.
2223#[derive(Clone, Debug, Default, PartialEq)]
2224pub struct JsonBehavior {
2225    pub btype: JsonBehaviorType,
2226    pub expr: Option<Node>,
2227    pub coerce: bool,
2228    pub location: i32,
2229}
2230
2231/// The node `JsonFormat`.
2232#[derive(Clone, Debug, Default, PartialEq)]
2233pub struct JsonFormat {
2234    pub format_type: JsonFormatType,
2235    pub encoding: JsonEncoding,
2236    pub location: i32,
2237}
2238
2239/// The node `JsonFuncExpr`.
2240#[derive(Clone, Debug, Default, PartialEq)]
2241pub struct JsonFuncExpr {
2242    pub op: JsonExprOp,
2243    pub column_name: Option<Str>,
2244    pub context_item: Option<Box<JsonValueExpr>>,
2245    pub pathspec: Option<Node>,
2246    pub passing: List,
2247    pub output: Option<Box<JsonOutput>>,
2248    pub on_empty: Option<Box<JsonBehavior>>,
2249    pub on_error: Option<Box<JsonBehavior>>,
2250    pub wrapper: JsonWrapper,
2251    pub quotes: JsonQuotes,
2252    pub location: i32,
2253}
2254
2255/// The node `JsonIsPredicate`.
2256#[derive(Clone, Debug, Default, PartialEq)]
2257pub struct JsonIsPredicate {
2258    pub expr: Option<Node>,
2259    pub format: Option<Box<JsonFormat>>,
2260    pub item_type: JsonValueType,
2261    pub unique_keys: bool,
2262    pub exprBaseType: u32,
2263    pub location: i32,
2264}
2265
2266/// The node `JsonKeyValue`.
2267#[derive(Clone, Debug, Default, PartialEq)]
2268pub struct JsonKeyValue {
2269    pub key: Option<Node>,
2270    pub value: Option<Box<JsonValueExpr>>,
2271}
2272
2273/// The node `JsonObjectAgg`.
2274#[derive(Clone, Debug, Default, PartialEq)]
2275pub struct JsonObjectAgg {
2276    pub constructor: Option<Box<JsonAggConstructor>>,
2277    pub arg: Option<Box<JsonKeyValue>>,
2278    pub absent_on_null: bool,
2279    pub unique: bool,
2280}
2281
2282/// The node `JsonObjectConstructor`.
2283#[derive(Clone, Debug, Default, PartialEq)]
2284pub struct JsonObjectConstructor {
2285    pub exprs: List,
2286    pub output: Option<Box<JsonOutput>>,
2287    pub absent_on_null: bool,
2288    pub unique: bool,
2289    pub location: i32,
2290}
2291
2292/// The node `JsonOutput`.
2293#[derive(Clone, Debug, Default, PartialEq)]
2294pub struct JsonOutput {
2295    pub typeName: Option<Box<TypeName>>,
2296    pub returning: Option<Box<JsonReturning>>,
2297}
2298
2299/// The node `JsonParseExpr`.
2300#[derive(Clone, Debug, Default, PartialEq)]
2301pub struct JsonParseExpr {
2302    pub expr: Option<Box<JsonValueExpr>>,
2303    pub output: Option<Box<JsonOutput>>,
2304    pub unique_keys: bool,
2305    pub location: i32,
2306}
2307
2308/// The node `JsonReturning`.
2309#[derive(Clone, Debug, Default, PartialEq)]
2310pub struct JsonReturning {
2311    pub format: Option<Box<JsonFormat>>,
2312    pub typid: u32,
2313    pub typmod: i32,
2314}
2315
2316/// The node `JsonScalarExpr`.
2317#[derive(Clone, Debug, Default, PartialEq)]
2318pub struct JsonScalarExpr {
2319    pub expr: Option<Node>,
2320    pub output: Option<Box<JsonOutput>>,
2321    pub location: i32,
2322}
2323
2324/// The node `JsonSerializeExpr`.
2325#[derive(Clone, Debug, Default, PartialEq)]
2326pub struct JsonSerializeExpr {
2327    pub expr: Option<Box<JsonValueExpr>>,
2328    pub output: Option<Box<JsonOutput>>,
2329    pub location: i32,
2330}
2331
2332/// The node `JsonTable`.
2333#[derive(Clone, Debug, Default, PartialEq)]
2334pub struct JsonTable {
2335    pub context_item: Option<Box<JsonValueExpr>>,
2336    pub pathspec: Option<Box<JsonTablePathSpec>>,
2337    pub passing: List,
2338    pub columns: List,
2339    pub on_error: Option<Box<JsonBehavior>>,
2340    pub alias: Option<Box<Alias>>,
2341    pub lateral: bool,
2342    pub location: i32,
2343}
2344
2345/// The node `JsonTableColumn`.
2346#[derive(Clone, Debug, Default, PartialEq)]
2347pub struct JsonTableColumn {
2348    pub coltype: JsonTableColumnType,
2349    pub name: Option<Str>,
2350    pub typeName: Option<Box<TypeName>>,
2351    pub pathspec: Option<Box<JsonTablePathSpec>>,
2352    pub format: Option<Box<JsonFormat>>,
2353    pub wrapper: JsonWrapper,
2354    pub quotes: JsonQuotes,
2355    pub columns: List,
2356    pub on_empty: Option<Box<JsonBehavior>>,
2357    pub on_error: Option<Box<JsonBehavior>>,
2358    pub location: i32,
2359}
2360
2361/// The node `JsonTablePathSpec`.
2362#[derive(Clone, Debug, Default, PartialEq)]
2363pub struct JsonTablePathSpec {
2364    pub string: Option<Node>,
2365    pub name: Option<Str>,
2366    pub name_location: i32,
2367    pub location: i32,
2368}
2369
2370/// The node `JsonValueExpr`.
2371#[derive(Clone, Debug, Default, PartialEq)]
2372pub struct JsonValueExpr {
2373    pub raw_expr: Option<Node>,
2374    pub formatted_expr: Option<Node>,
2375    pub format: Option<Box<JsonFormat>>,
2376}
2377
2378/// The node `ListenStmt`.
2379#[derive(Clone, Debug, Default, PartialEq)]
2380pub struct ListenStmt {
2381    pub conditionname: Option<Str>,
2382}
2383
2384/// The node `LoadStmt`.
2385#[derive(Clone, Debug, Default, PartialEq)]
2386pub struct LoadStmt {
2387    pub filename: Option<Str>,
2388}
2389
2390/// The node `LockStmt`.
2391#[derive(Clone, Debug, Default, PartialEq)]
2392pub struct LockStmt {
2393    pub relations: List,
2394    pub mode: i32,
2395    pub nowait: bool,
2396}
2397
2398/// The node `LockingClause`.
2399#[derive(Clone, Debug, Default, PartialEq)]
2400pub struct LockingClause {
2401    pub lockedRels: List,
2402    pub strength: LockClauseStrength,
2403    pub waitPolicy: LockWaitPolicy,
2404}
2405
2406/// The node `MergeStmt`.
2407#[derive(Clone, Debug, Default, PartialEq)]
2408pub struct MergeStmt {
2409    pub relation: Option<Box<RangeVar>>,
2410    pub sourceRelation: Option<Node>,
2411    pub joinCondition: Option<Node>,
2412    pub mergeWhenClauses: List,
2413    pub returningClause: Option<Box<ReturningClause>>,
2414    pub withClause: Option<Box<WithClause>>,
2415}
2416
2417/// The node `MergeSupportFunc`.
2418#[derive(Clone, Debug, Default, PartialEq)]
2419pub struct MergeSupportFunc {
2420    pub msftype: u32,
2421    pub msfcollid: u32,
2422    pub location: i32,
2423}
2424
2425/// The node `MergeWhenClause`.
2426#[derive(Clone, Debug, Default, PartialEq)]
2427pub struct MergeWhenClause {
2428    pub matchKind: MergeMatchKind,
2429    pub commandType: CmdType,
2430    pub r#override: OverridingKind,
2431    pub condition: Option<Node>,
2432    pub targetList: List,
2433    pub values: List,
2434}
2435
2436/// The node `MinMaxExpr`.
2437#[derive(Clone, Debug, Default, PartialEq)]
2438pub struct MinMaxExpr {
2439    pub minmaxtype: u32,
2440    pub minmaxcollid: u32,
2441    pub inputcollid: u32,
2442    pub op: MinMaxOp,
2443    pub args: List,
2444    pub location: i32,
2445}
2446
2447/// The node `MultiAssignRef`.
2448#[derive(Clone, Debug, Default, PartialEq)]
2449pub struct MultiAssignRef {
2450    pub source: Option<Node>,
2451    pub colno: i32,
2452    pub ncolumns: i32,
2453}
2454
2455/// The node `NamedArgExpr`.
2456#[derive(Clone, Debug, Default, PartialEq)]
2457pub struct NamedArgExpr {
2458    pub arg: Option<Node>,
2459    pub name: Option<Str>,
2460    pub argnumber: i32,
2461    pub location: i32,
2462}
2463
2464/// The node `NotifyStmt`.
2465#[derive(Clone, Debug, Default, PartialEq)]
2466pub struct NotifyStmt {
2467    pub conditionname: Option<Str>,
2468    pub payload: Option<Str>,
2469}
2470
2471/// The node `NullTest`.
2472#[derive(Clone, Debug, Default, PartialEq)]
2473pub struct NullTest {
2474    pub arg: Option<Node>,
2475    pub nulltesttype: NullTestType,
2476    pub argisrow: bool,
2477    pub location: i32,
2478}
2479
2480/// The node `ObjectWithArgs`.
2481#[derive(Clone, Debug, Default, PartialEq)]
2482pub struct ObjectWithArgs {
2483    pub objname: List,
2484    pub objargs: List,
2485    pub objfuncargs: List,
2486    pub args_unspecified: bool,
2487}
2488
2489/// The node `OnConflictClause`.
2490#[derive(Clone, Debug, Default, PartialEq)]
2491pub struct OnConflictClause {
2492    pub action: OnConflictAction,
2493    pub infer: Option<Box<InferClause>>,
2494    pub lockStrength: LockClauseStrength,
2495    pub targetList: List,
2496    pub whereClause: Option<Node>,
2497    pub location: i32,
2498}
2499
2500/// The node `PLAssignStmt`.
2501#[derive(Clone, Debug, Default, PartialEq)]
2502pub struct PLAssignStmt {
2503    pub name: Option<Str>,
2504    pub indirection: List,
2505    pub nnames: i32,
2506    pub val: Option<Box<SelectStmt>>,
2507    pub location: i32,
2508}
2509
2510/// The node `ParamRef`.
2511#[derive(Clone, Debug, Default, PartialEq)]
2512pub struct ParamRef {
2513    pub number: i32,
2514    pub location: i32,
2515}
2516
2517/// The node `PartitionBoundSpec`.
2518#[derive(Clone, Debug, Default, PartialEq)]
2519pub struct PartitionBoundSpec {
2520    pub strategy: u8,
2521    pub is_default: bool,
2522    pub modulus: i32,
2523    pub remainder: i32,
2524    pub listdatums: List,
2525    pub lowerdatums: List,
2526    pub upperdatums: List,
2527    pub location: i32,
2528}
2529
2530/// The node `PartitionCmd`.
2531#[derive(Clone, Debug, Default, PartialEq)]
2532pub struct PartitionCmd {
2533    pub name: Option<Box<RangeVar>>,
2534    pub bound: Option<Box<PartitionBoundSpec>>,
2535    pub concurrent: bool,
2536}
2537
2538/// The node `PartitionElem`.
2539#[derive(Clone, Debug, Default, PartialEq)]
2540pub struct PartitionElem {
2541    pub name: Option<Str>,
2542    pub expr: Option<Node>,
2543    pub collation: List,
2544    pub opclass: List,
2545    pub location: i32,
2546}
2547
2548/// The node `PartitionSpec`.
2549#[derive(Clone, Debug, Default, PartialEq)]
2550pub struct PartitionSpec {
2551    pub strategy: PartitionStrategy,
2552    pub partParams: List,
2553    pub location: i32,
2554}
2555
2556/// The node `PrepareStmt`.
2557#[derive(Clone, Debug, Default, PartialEq)]
2558pub struct PrepareStmt {
2559    pub name: Option<Str>,
2560    pub argtypes: List,
2561    pub query: Option<Node>,
2562}
2563
2564/// The node `PublicationAllObjSpec`.
2565#[derive(Clone, Debug, Default, PartialEq)]
2566pub struct PublicationAllObjSpec {
2567    pub pubobjtype: PublicationAllObjType,
2568    pub except_tables: List,
2569    pub location: i32,
2570}
2571
2572/// The node `PublicationObjSpec`.
2573#[derive(Clone, Debug, Default, PartialEq)]
2574pub struct PublicationObjSpec {
2575    pub pubobjtype: PublicationObjSpecType,
2576    pub name: Option<Str>,
2577    pub pubtable: Option<Box<PublicationTable>>,
2578    pub location: i32,
2579}
2580
2581/// The node `PublicationTable`.
2582#[derive(Clone, Debug, Default, PartialEq)]
2583pub struct PublicationTable {
2584    pub relation: Option<Box<RangeVar>>,
2585    pub whereClause: Option<Node>,
2586    pub columns: List,
2587    pub except: bool,
2588}
2589
2590/// The node `RangeFunction`.
2591#[derive(Clone, Debug, Default, PartialEq)]
2592pub struct RangeFunction {
2593    pub lateral: bool,
2594    pub ordinality: bool,
2595    pub is_rowsfrom: bool,
2596    pub functions: List,
2597    pub alias: Option<Box<Alias>>,
2598    pub coldeflist: List,
2599}
2600
2601/// The node `RangeSubselect`.
2602#[derive(Clone, Debug, Default, PartialEq)]
2603pub struct RangeSubselect {
2604    pub lateral: bool,
2605    pub subquery: Option<Node>,
2606    pub alias: Option<Box<Alias>>,
2607}
2608
2609/// The node `RangeTableFunc`.
2610#[derive(Clone, Debug, Default, PartialEq)]
2611pub struct RangeTableFunc {
2612    pub lateral: bool,
2613    pub docexpr: Option<Node>,
2614    pub rowexpr: Option<Node>,
2615    pub namespaces: List,
2616    pub columns: List,
2617    pub alias: Option<Box<Alias>>,
2618    pub location: i32,
2619}
2620
2621/// The node `RangeTableFuncCol`.
2622#[derive(Clone, Debug, Default, PartialEq)]
2623pub struct RangeTableFuncCol {
2624    pub colname: Option<Str>,
2625    pub typeName: Option<Box<TypeName>>,
2626    pub for_ordinality: bool,
2627    pub is_not_null: bool,
2628    pub colexpr: Option<Node>,
2629    pub coldefexpr: Option<Node>,
2630    pub location: i32,
2631}
2632
2633/// The node `RangeTableSample`.
2634#[derive(Clone, Debug, Default, PartialEq)]
2635pub struct RangeTableSample {
2636    pub relation: Option<Node>,
2637    pub method: List,
2638    pub args: List,
2639    pub repeatable: Option<Node>,
2640    pub location: i32,
2641}
2642
2643/// The node `RangeVar`.
2644#[derive(Clone, Debug, Default, PartialEq)]
2645pub struct RangeVar {
2646    pub catalogname: Option<Str>,
2647    pub schemaname: Option<Str>,
2648    pub relname: Option<Str>,
2649    pub inh: bool,
2650    pub relpersistence: u8,
2651    pub alias: Option<Box<Alias>>,
2652    pub location: i32,
2653}
2654
2655/// The node `RawStmt`.
2656#[derive(Clone, Debug, Default, PartialEq)]
2657pub struct RawStmt {
2658    pub stmt: Option<Node>,
2659    pub stmt_location: i32,
2660    pub stmt_len: i32,
2661}
2662
2663/// The node `ReassignOwnedStmt`.
2664#[derive(Clone, Debug, Default, PartialEq)]
2665pub struct ReassignOwnedStmt {
2666    pub roles: List,
2667    pub newrole: Option<Box<RoleSpec>>,
2668}
2669
2670/// The node `RefreshMatViewStmt`.
2671#[derive(Clone, Debug, Default, PartialEq)]
2672pub struct RefreshMatViewStmt {
2673    pub concurrent: bool,
2674    pub skipData: bool,
2675    pub relation: Option<Box<RangeVar>>,
2676}
2677
2678/// The node `ReindexStmt`.
2679#[derive(Clone, Debug, Default, PartialEq)]
2680pub struct ReindexStmt {
2681    pub kind: ReindexObjectType,
2682    pub relation: Option<Box<RangeVar>>,
2683    pub name: Option<Str>,
2684    pub params: List,
2685}
2686
2687/// The node `RenameStmt`.
2688#[derive(Clone, Debug, Default, PartialEq)]
2689pub struct RenameStmt {
2690    pub renameType: ObjectType,
2691    pub relationType: ObjectType,
2692    pub relation: Option<Box<RangeVar>>,
2693    pub object: Option<Node>,
2694    pub subname: Option<Str>,
2695    pub newname: Option<Str>,
2696    pub behavior: DropBehavior,
2697    pub missing_ok: bool,
2698}
2699
2700/// The node `RepackStmt`.
2701#[derive(Clone, Debug, Default, PartialEq)]
2702pub struct RepackStmt {
2703    pub command: RepackCommand,
2704    pub relation: Option<Box<VacuumRelation>>,
2705    pub indexname: Option<Str>,
2706    pub usingindex: bool,
2707    pub params: List,
2708}
2709
2710/// The node `ReplicaIdentityStmt`.
2711#[derive(Clone, Debug, Default, PartialEq)]
2712pub struct ReplicaIdentityStmt {
2713    pub identity_type: u8,
2714    pub name: Option<Str>,
2715}
2716
2717/// The node `ResTarget`.
2718#[derive(Clone, Debug, Default, PartialEq)]
2719pub struct ResTarget {
2720    pub name: Option<Str>,
2721    pub indirection: List,
2722    pub val: Option<Node>,
2723    pub location: i32,
2724}
2725
2726/// The node `ReturnStmt`.
2727#[derive(Clone, Debug, Default, PartialEq)]
2728pub struct ReturnStmt {
2729    pub returnval: Option<Node>,
2730}
2731
2732/// The node `ReturningClause`.
2733#[derive(Clone, Debug, Default, PartialEq)]
2734pub struct ReturningClause {
2735    pub options: List,
2736    pub exprs: List,
2737}
2738
2739/// The node `ReturningOption`.
2740#[derive(Clone, Debug, Default, PartialEq)]
2741pub struct ReturningOption {
2742    pub option: ReturningOptionKind,
2743    pub value: Option<Str>,
2744    pub location: i32,
2745}
2746
2747/// The node `RoleSpec`.
2748#[derive(Clone, Debug, Default, PartialEq)]
2749pub struct RoleSpec {
2750    pub roletype: RoleSpecType,
2751    pub rolename: Option<Str>,
2752    pub location: i32,
2753}
2754
2755/// The node `RowExpr`.
2756#[derive(Clone, Debug, Default, PartialEq)]
2757pub struct RowExpr {
2758    pub args: List,
2759    pub row_typeid: u32,
2760    pub row_format: CoercionForm,
2761    pub colnames: List,
2762    pub location: i32,
2763}
2764
2765/// The node `RuleStmt`.
2766#[derive(Clone, Debug, Default, PartialEq)]
2767pub struct RuleStmt {
2768    pub relation: Option<Box<RangeVar>>,
2769    pub rulename: Option<Str>,
2770    pub whereClause: Option<Node>,
2771    pub event: CmdType,
2772    pub instead: bool,
2773    pub actions: List,
2774    pub replace: bool,
2775}
2776
2777/// The node `SQLValueFunction`.
2778#[derive(Clone, Debug, Default, PartialEq)]
2779pub struct SQLValueFunction {
2780    pub op: SQLValueFunctionOp,
2781    pub r#type: u32,
2782    pub typmod: i32,
2783    pub location: i32,
2784}
2785
2786/// The node `SecLabelStmt`.
2787#[derive(Clone, Debug, Default, PartialEq)]
2788pub struct SecLabelStmt {
2789    pub objtype: ObjectType,
2790    pub object: Option<Node>,
2791    pub provider: Option<Str>,
2792    pub label: Option<Str>,
2793}
2794
2795/// The node `SelectStmt`.
2796#[derive(Clone, Debug, Default, PartialEq)]
2797pub struct SelectStmt {
2798    pub distinctClause: List,
2799    pub intoClause: Option<Box<IntoClause>>,
2800    pub targetList: List,
2801    pub fromClause: List,
2802    pub whereClause: Option<Node>,
2803    pub groupClause: List,
2804    pub groupDistinct: bool,
2805    pub havingClause: Option<Node>,
2806    pub windowClause: List,
2807    pub valuesLists: List,
2808    pub sortClause: List,
2809    pub limitOffset: Option<Node>,
2810    pub limitCount: Option<Node>,
2811    pub limitOption: LimitOption,
2812    pub lockingClause: List,
2813    pub withClause: Option<Box<WithClause>>,
2814    pub op: SetOperation,
2815    pub all: bool,
2816    pub larg: Option<Box<SelectStmt>>,
2817    pub rarg: Option<Box<SelectStmt>>,
2818}
2819
2820/// The node `SetToDefault`.
2821#[derive(Clone, Debug, Default, PartialEq)]
2822pub struct SetToDefault {
2823    pub typeId: u32,
2824    pub typeMod: i32,
2825    pub collation: u32,
2826    pub location: i32,
2827}
2828
2829/// The node `SortBy`.
2830#[derive(Clone, Debug, Default, PartialEq)]
2831pub struct SortBy {
2832    pub node: Option<Node>,
2833    pub sortby_dir: SortByDir,
2834    pub sortby_nulls: SortByNulls,
2835    pub useOp: List,
2836    pub location: i32,
2837}
2838
2839/// The node `StatsElem`.
2840#[derive(Clone, Debug, Default, PartialEq)]
2841pub struct StatsElem {
2842    pub name: Option<Str>,
2843    pub expr: Option<Node>,
2844}
2845
2846/// The node `SubLink`.
2847#[derive(Clone, Debug, Default, PartialEq)]
2848pub struct SubLink {
2849    pub subLinkType: SubLinkType,
2850    pub subLinkId: i32,
2851    pub testexpr: Option<Node>,
2852    pub operName: List,
2853    pub subselect: Option<Node>,
2854    pub location: i32,
2855}
2856
2857/// The node `TableLikeClause`.
2858#[derive(Clone, Debug, Default, PartialEq)]
2859pub struct TableLikeClause {
2860    pub relation: Option<Box<RangeVar>>,
2861    pub options: u32,
2862    pub relationOid: u32,
2863}
2864
2865/// The node `TransactionStmt`.
2866#[derive(Clone, Debug, Default, PartialEq)]
2867pub struct TransactionStmt {
2868    pub kind: TransactionStmtKind,
2869    pub options: List,
2870    pub savepoint_name: Option<Str>,
2871    pub gid: Option<Str>,
2872    pub chain: bool,
2873    pub location: i32,
2874}
2875
2876/// The node `TriggerTransition`.
2877#[derive(Clone, Debug, Default, PartialEq)]
2878pub struct TriggerTransition {
2879    pub name: Option<Str>,
2880    pub isNew: bool,
2881    pub isTable: bool,
2882}
2883
2884/// The node `TruncateStmt`.
2885#[derive(Clone, Debug, Default, PartialEq)]
2886pub struct TruncateStmt {
2887    pub relations: List,
2888    pub restart_seqs: bool,
2889    pub behavior: DropBehavior,
2890}
2891
2892/// The node `TypeCast`.
2893#[derive(Clone, Debug, Default, PartialEq)]
2894pub struct TypeCast {
2895    pub arg: Option<Node>,
2896    pub typeName: Option<Box<TypeName>>,
2897    pub location: i32,
2898}
2899
2900/// The node `TypeName`.
2901#[derive(Clone, Debug, Default, PartialEq)]
2902pub struct TypeName {
2903    pub names: List,
2904    pub typeOid: u32,
2905    pub setof: bool,
2906    pub pct_type: bool,
2907    pub typmods: List,
2908    pub typemod: i32,
2909    pub arrayBounds: List,
2910    pub location: i32,
2911}
2912
2913/// The node `UnlistenStmt`.
2914#[derive(Clone, Debug, Default, PartialEq)]
2915pub struct UnlistenStmt {
2916    pub conditionname: Option<Str>,
2917}
2918
2919/// The node `UpdateStmt`.
2920#[derive(Clone, Debug, Default, PartialEq)]
2921pub struct UpdateStmt {
2922    pub relation: Option<Box<RangeVar>>,
2923    pub targetList: List,
2924    pub whereClause: Option<Node>,
2925    pub fromClause: List,
2926    pub returningClause: Option<Box<ReturningClause>>,
2927    pub withClause: Option<Box<WithClause>>,
2928}
2929
2930/// The node `VacuumRelation`.
2931#[derive(Clone, Debug, Default, PartialEq)]
2932pub struct VacuumRelation {
2933    pub relation: Option<Box<RangeVar>>,
2934    pub oid: u32,
2935    pub va_cols: List,
2936}
2937
2938/// The node `VacuumStmt`.
2939#[derive(Clone, Debug, Default, PartialEq)]
2940pub struct VacuumStmt {
2941    pub options: List,
2942    pub rels: List,
2943    pub is_vacuumcmd: bool,
2944}
2945
2946/// The node `VariableSetStmt`.
2947#[derive(Clone, Debug, Default, PartialEq)]
2948pub struct VariableSetStmt {
2949    pub kind: VariableSetKind,
2950    pub name: Option<Str>,
2951    pub args: List,
2952    pub jumble_args: bool,
2953    pub is_local: bool,
2954    pub location: i32,
2955}
2956
2957/// The node `VariableShowStmt`.
2958#[derive(Clone, Debug, Default, PartialEq)]
2959pub struct VariableShowStmt {
2960    pub name: Option<Str>,
2961}
2962
2963/// The node `ViewStmt`.
2964#[derive(Clone, Debug, Default, PartialEq)]
2965pub struct ViewStmt {
2966    pub view: Option<Box<RangeVar>>,
2967    pub aliases: List,
2968    pub query: Option<Node>,
2969    pub replace: bool,
2970    pub options: List,
2971    pub withCheckOption: ViewCheckOption,
2972}
2973
2974/// The node `WaitStmt`.
2975#[derive(Clone, Debug, Default, PartialEq)]
2976pub struct WaitStmt {
2977    pub lsn_literal: Option<Str>,
2978    pub options: List,
2979    pub lsn_location: i32,
2980}
2981
2982/// The node `WindowDef`.
2983#[derive(Clone, Debug, Default, PartialEq)]
2984pub struct WindowDef {
2985    pub name: Option<Str>,
2986    pub refname: Option<Str>,
2987    pub partitionClause: List,
2988    pub orderClause: List,
2989    pub frameOptions: i32,
2990    pub startOffset: Option<Node>,
2991    pub endOffset: Option<Node>,
2992    pub location: i32,
2993}
2994
2995/// The node `WithClause`.
2996#[derive(Clone, Debug, Default, PartialEq)]
2997pub struct WithClause {
2998    pub ctes: List,
2999    pub recursive: bool,
3000    pub location: i32,
3001}
3002
3003/// The node `XmlExpr`.
3004#[derive(Clone, Debug, Default, PartialEq)]
3005pub struct XmlExpr {
3006    pub op: XmlExprOp,
3007    pub name: Option<Str>,
3008    pub named_args: List,
3009    pub arg_names: List,
3010    pub args: List,
3011    pub xmloption: XmlOptionType,
3012    pub indent: bool,
3013    pub r#type: u32,
3014    pub typmod: i32,
3015    pub location: i32,
3016}
3017
3018/// The node `XmlSerialize`.
3019#[derive(Clone, Debug, Default, PartialEq)]
3020pub struct XmlSerialize {
3021    pub xmloption: XmlOptionType,
3022    pub expr: Option<Node>,
3023    pub typeName: Option<Box<TypeName>>,
3024    pub indent: bool,
3025    pub location: i32,
3026}
3027
3028impl Out for ATAlterConstraint {
3029    fn out(&self, s: &mut String) {
3030        s.push_str("ATALTERCONSTRAINT");
3031        self.fields(s, "");
3032    }
3033
3034    fn fields(&self, s: &mut String, prefix: &str) {
3035        w::text(s, prefix, "conname", self.conname.as_deref());
3036        w::bool(s, prefix, "alterEnforceability", self.alterEnforceability);
3037        w::bool(s, prefix, "is_enforced", self.is_enforced);
3038        w::bool(s, prefix, "alterDeferrability", self.alterDeferrability);
3039        w::bool(s, prefix, "deferrable", self.deferrable);
3040        w::bool(s, prefix, "initdeferred", self.initdeferred);
3041        w::bool(s, prefix, "alterInheritability", self.alterInheritability);
3042        w::bool(s, prefix, "noinherit", self.noinherit);
3043    }
3044}
3045
3046impl Out for A_ArrayExpr {
3047    fn out(&self, s: &mut String) {
3048        s.push_str("A_ARRAYEXPR");
3049        self.fields(s, "");
3050    }
3051
3052    fn fields(&self, s: &mut String, prefix: &str) {
3053        w::list(s, prefix, "elements", &self.elements);
3054        w::int(s, prefix, "list_start", self.list_start);
3055        w::int(s, prefix, "list_end", self.list_end);
3056        w::int(s, prefix, "location", self.location);
3057    }
3058}
3059
3060impl Out for A_Indices {
3061    fn out(&self, s: &mut String) {
3062        s.push_str("A_INDICES");
3063        self.fields(s, "");
3064    }
3065
3066    fn fields(&self, s: &mut String, prefix: &str) {
3067        w::bool(s, prefix, "is_slice", self.is_slice);
3068        w::node(s, prefix, "lidx", self.lidx.as_ref());
3069        w::node(s, prefix, "uidx", self.uidx.as_ref());
3070    }
3071}
3072
3073impl Out for A_Indirection {
3074    fn out(&self, s: &mut String) {
3075        s.push_str("A_INDIRECTION");
3076        self.fields(s, "");
3077    }
3078
3079    fn fields(&self, s: &mut String, prefix: &str) {
3080        w::node(s, prefix, "arg", self.arg.as_ref());
3081        w::list(s, prefix, "indirection", &self.indirection);
3082    }
3083}
3084
3085impl Out for A_Star {
3086    fn out(&self, s: &mut String) {
3087        s.push_str("A_STAR");
3088        self.fields(s, "");
3089    }
3090
3091    fn fields(&self, s: &mut String, prefix: &str) {
3092        let _ = (s, prefix);
3093    }
3094}
3095
3096impl Out for AccessPriv {
3097    fn out(&self, s: &mut String) {
3098        s.push_str("ACCESSPRIV");
3099        self.fields(s, "");
3100    }
3101
3102    fn fields(&self, s: &mut String, prefix: &str) {
3103        w::text(s, prefix, "priv_name", self.priv_name.as_deref());
3104        w::list(s, prefix, "cols", &self.cols);
3105    }
3106}
3107
3108impl Out for Alias {
3109    fn out(&self, s: &mut String) {
3110        s.push_str("ALIAS");
3111        self.fields(s, "");
3112    }
3113
3114    fn fields(&self, s: &mut String, prefix: &str) {
3115        w::text(s, prefix, "aliasname", self.aliasname.as_deref());
3116        w::list(s, prefix, "colnames", &self.colnames);
3117    }
3118}
3119
3120impl Out for AlterCollationStmt {
3121    fn out(&self, s: &mut String) {
3122        s.push_str("ALTERCOLLATIONSTMT");
3123        self.fields(s, "");
3124    }
3125
3126    fn fields(&self, s: &mut String, prefix: &str) {
3127        w::list(s, prefix, "collname", &self.collname);
3128    }
3129}
3130
3131impl Out for AlterDatabaseRefreshCollStmt {
3132    fn out(&self, s: &mut String) {
3133        s.push_str("ALTERDATABASEREFRESHCOLLSTMT");
3134        self.fields(s, "");
3135    }
3136
3137    fn fields(&self, s: &mut String, prefix: &str) {
3138        w::text(s, prefix, "dbname", self.dbname.as_deref());
3139    }
3140}
3141
3142impl Out for AlterDatabaseSetStmt {
3143    fn out(&self, s: &mut String) {
3144        s.push_str("ALTERDATABASESETSTMT");
3145        self.fields(s, "");
3146    }
3147
3148    fn fields(&self, s: &mut String, prefix: &str) {
3149        w::text(s, prefix, "dbname", self.dbname.as_deref());
3150        w::boxed(s, prefix, "setstmt", self.setstmt.as_deref());
3151    }
3152}
3153
3154impl Out for AlterDatabaseStmt {
3155    fn out(&self, s: &mut String) {
3156        s.push_str("ALTERDATABASESTMT");
3157        self.fields(s, "");
3158    }
3159
3160    fn fields(&self, s: &mut String, prefix: &str) {
3161        w::text(s, prefix, "dbname", self.dbname.as_deref());
3162        w::list(s, prefix, "options", &self.options);
3163    }
3164}
3165
3166impl Out for AlterDefaultPrivilegesStmt {
3167    fn out(&self, s: &mut String) {
3168        s.push_str("ALTERDEFAULTPRIVILEGESSTMT");
3169        self.fields(s, "");
3170    }
3171
3172    fn fields(&self, s: &mut String, prefix: &str) {
3173        w::list(s, prefix, "options", &self.options);
3174        w::boxed(s, prefix, "action", self.action.as_deref());
3175    }
3176}
3177
3178impl Out for AlterDomainStmt {
3179    fn out(&self, s: &mut String) {
3180        s.push_str("ALTERDOMAINSTMT");
3181        self.fields(s, "");
3182    }
3183
3184    fn fields(&self, s: &mut String, prefix: &str) {
3185        w::int(s, prefix, "subtype", self.subtype.0);
3186        w::list(s, prefix, "typeName", &self.typeName);
3187        w::text(s, prefix, "name", self.name.as_deref());
3188        w::node(s, prefix, "def", self.def.as_ref());
3189        w::int(s, prefix, "behavior", self.behavior.0);
3190        w::bool(s, prefix, "missing_ok", self.missing_ok);
3191    }
3192}
3193
3194impl Out for AlterEnumStmt {
3195    fn out(&self, s: &mut String) {
3196        s.push_str("ALTERENUMSTMT");
3197        self.fields(s, "");
3198    }
3199
3200    fn fields(&self, s: &mut String, prefix: &str) {
3201        w::list(s, prefix, "typeName", &self.typeName);
3202        w::text(s, prefix, "oldVal", self.oldVal.as_deref());
3203        w::text(s, prefix, "newVal", self.newVal.as_deref());
3204        w::text(s, prefix, "newValNeighbor", self.newValNeighbor.as_deref());
3205        w::bool(s, prefix, "newValIsAfter", self.newValIsAfter);
3206        w::bool(s, prefix, "skipIfNewValExists", self.skipIfNewValExists);
3207    }
3208}
3209
3210impl Out for AlterEventTrigStmt {
3211    fn out(&self, s: &mut String) {
3212        s.push_str("ALTEREVENTTRIGSTMT");
3213        self.fields(s, "");
3214    }
3215
3216    fn fields(&self, s: &mut String, prefix: &str) {
3217        w::text(s, prefix, "trigname", self.trigname.as_deref());
3218        w::char(s, prefix, "tgenabled", self.tgenabled);
3219    }
3220}
3221
3222impl Out for AlterExtensionContentsStmt {
3223    fn out(&self, s: &mut String) {
3224        s.push_str("ALTEREXTENSIONCONTENTSSTMT");
3225        self.fields(s, "");
3226    }
3227
3228    fn fields(&self, s: &mut String, prefix: &str) {
3229        w::text(s, prefix, "extname", self.extname.as_deref());
3230        w::int(s, prefix, "action", self.action);
3231        w::int(s, prefix, "objtype", self.objtype.0);
3232        w::node(s, prefix, "object", self.object.as_ref());
3233    }
3234}
3235
3236impl Out for AlterExtensionStmt {
3237    fn out(&self, s: &mut String) {
3238        s.push_str("ALTEREXTENSIONSTMT");
3239        self.fields(s, "");
3240    }
3241
3242    fn fields(&self, s: &mut String, prefix: &str) {
3243        w::text(s, prefix, "extname", self.extname.as_deref());
3244        w::list(s, prefix, "options", &self.options);
3245    }
3246}
3247
3248impl Out for AlterFdwStmt {
3249    fn out(&self, s: &mut String) {
3250        s.push_str("ALTERFDWSTMT");
3251        self.fields(s, "");
3252    }
3253
3254    fn fields(&self, s: &mut String, prefix: &str) {
3255        w::text(s, prefix, "fdwname", self.fdwname.as_deref());
3256        w::list(s, prefix, "func_options", &self.func_options);
3257        w::list(s, prefix, "options", &self.options);
3258    }
3259}
3260
3261impl Out for AlterForeignServerStmt {
3262    fn out(&self, s: &mut String) {
3263        s.push_str("ALTERFOREIGNSERVERSTMT");
3264        self.fields(s, "");
3265    }
3266
3267    fn fields(&self, s: &mut String, prefix: &str) {
3268        w::text(s, prefix, "servername", self.servername.as_deref());
3269        w::text(s, prefix, "version", self.version.as_deref());
3270        w::list(s, prefix, "options", &self.options);
3271        w::bool(s, prefix, "has_version", self.has_version);
3272    }
3273}
3274
3275impl Out for AlterFunctionStmt {
3276    fn out(&self, s: &mut String) {
3277        s.push_str("ALTERFUNCTIONSTMT");
3278        self.fields(s, "");
3279    }
3280
3281    fn fields(&self, s: &mut String, prefix: &str) {
3282        w::int(s, prefix, "objtype", self.objtype.0);
3283        w::boxed(s, prefix, "func", self.func.as_deref());
3284        w::list(s, prefix, "actions", &self.actions);
3285    }
3286}
3287
3288impl Out for AlterObjectDependsStmt {
3289    fn out(&self, s: &mut String) {
3290        s.push_str("ALTEROBJECTDEPENDSSTMT");
3291        self.fields(s, "");
3292    }
3293
3294    fn fields(&self, s: &mut String, prefix: &str) {
3295        w::int(s, prefix, "objectType", self.objectType.0);
3296        w::boxed(s, prefix, "relation", self.relation.as_deref());
3297        w::node(s, prefix, "object", self.object.as_ref());
3298        w::node(s, prefix, "extname", self.extname.as_ref());
3299        w::bool(s, prefix, "remove", self.remove);
3300    }
3301}
3302
3303impl Out for AlterObjectSchemaStmt {
3304    fn out(&self, s: &mut String) {
3305        s.push_str("ALTEROBJECTSCHEMASTMT");
3306        self.fields(s, "");
3307    }
3308
3309    fn fields(&self, s: &mut String, prefix: &str) {
3310        w::int(s, prefix, "objectType", self.objectType.0);
3311        w::boxed(s, prefix, "relation", self.relation.as_deref());
3312        w::node(s, prefix, "object", self.object.as_ref());
3313        w::text(s, prefix, "newschema", self.newschema.as_deref());
3314        w::bool(s, prefix, "missing_ok", self.missing_ok);
3315    }
3316}
3317
3318impl Out for AlterOpFamilyStmt {
3319    fn out(&self, s: &mut String) {
3320        s.push_str("ALTEROPFAMILYSTMT");
3321        self.fields(s, "");
3322    }
3323
3324    fn fields(&self, s: &mut String, prefix: &str) {
3325        w::list(s, prefix, "opfamilyname", &self.opfamilyname);
3326        w::text(s, prefix, "amname", self.amname.as_deref());
3327        w::bool(s, prefix, "isDrop", self.isDrop);
3328        w::list(s, prefix, "items", &self.items);
3329    }
3330}
3331
3332impl Out for AlterOperatorStmt {
3333    fn out(&self, s: &mut String) {
3334        s.push_str("ALTEROPERATORSTMT");
3335        self.fields(s, "");
3336    }
3337
3338    fn fields(&self, s: &mut String, prefix: &str) {
3339        w::boxed(s, prefix, "opername", self.opername.as_deref());
3340        w::list(s, prefix, "options", &self.options);
3341    }
3342}
3343
3344impl Out for AlterOwnerStmt {
3345    fn out(&self, s: &mut String) {
3346        s.push_str("ALTEROWNERSTMT");
3347        self.fields(s, "");
3348    }
3349
3350    fn fields(&self, s: &mut String, prefix: &str) {
3351        w::int(s, prefix, "objectType", self.objectType.0);
3352        w::boxed(s, prefix, "relation", self.relation.as_deref());
3353        w::node(s, prefix, "object", self.object.as_ref());
3354        w::boxed(s, prefix, "newowner", self.newowner.as_deref());
3355    }
3356}
3357
3358impl Out for AlterPolicyStmt {
3359    fn out(&self, s: &mut String) {
3360        s.push_str("ALTERPOLICYSTMT");
3361        self.fields(s, "");
3362    }
3363
3364    fn fields(&self, s: &mut String, prefix: &str) {
3365        w::text(s, prefix, "policy_name", self.policy_name.as_deref());
3366        w::boxed(s, prefix, "table", self.table.as_deref());
3367        w::list(s, prefix, "roles", &self.roles);
3368        w::node(s, prefix, "qual", self.qual.as_ref());
3369        w::node(s, prefix, "with_check", self.with_check.as_ref());
3370    }
3371}
3372
3373impl Out for AlterPublicationStmt {
3374    fn out(&self, s: &mut String) {
3375        s.push_str("ALTERPUBLICATIONSTMT");
3376        self.fields(s, "");
3377    }
3378
3379    fn fields(&self, s: &mut String, prefix: &str) {
3380        w::text(s, prefix, "pubname", self.pubname.as_deref());
3381        w::list(s, prefix, "options", &self.options);
3382        w::list(s, prefix, "pubobjects", &self.pubobjects);
3383        w::int(s, prefix, "action", self.action.0);
3384        w::bool(s, prefix, "for_all_tables", self.for_all_tables);
3385        w::bool(s, prefix, "for_all_sequences", self.for_all_sequences);
3386    }
3387}
3388
3389impl Out for AlterRoleSetStmt {
3390    fn out(&self, s: &mut String) {
3391        s.push_str("ALTERROLESETSTMT");
3392        self.fields(s, "");
3393    }
3394
3395    fn fields(&self, s: &mut String, prefix: &str) {
3396        w::boxed(s, prefix, "role", self.role.as_deref());
3397        w::text(s, prefix, "database", self.database.as_deref());
3398        w::boxed(s, prefix, "setstmt", self.setstmt.as_deref());
3399    }
3400}
3401
3402impl Out for AlterRoleStmt {
3403    fn out(&self, s: &mut String) {
3404        s.push_str("ALTERROLESTMT");
3405        self.fields(s, "");
3406    }
3407
3408    fn fields(&self, s: &mut String, prefix: &str) {
3409        w::boxed(s, prefix, "role", self.role.as_deref());
3410        w::list(s, prefix, "options", &self.options);
3411        w::int(s, prefix, "action", self.action);
3412    }
3413}
3414
3415impl Out for AlterSeqStmt {
3416    fn out(&self, s: &mut String) {
3417        s.push_str("ALTERSEQSTMT");
3418        self.fields(s, "");
3419    }
3420
3421    fn fields(&self, s: &mut String, prefix: &str) {
3422        w::boxed(s, prefix, "sequence", self.sequence.as_deref());
3423        w::list(s, prefix, "options", &self.options);
3424        w::bool(s, prefix, "for_identity", self.for_identity);
3425        w::bool(s, prefix, "missing_ok", self.missing_ok);
3426    }
3427}
3428
3429impl Out for AlterStatsStmt {
3430    fn out(&self, s: &mut String) {
3431        s.push_str("ALTERSTATSSTMT");
3432        self.fields(s, "");
3433    }
3434
3435    fn fields(&self, s: &mut String, prefix: &str) {
3436        w::list(s, prefix, "defnames", &self.defnames);
3437        w::node(s, prefix, "stxstattarget", self.stxstattarget.as_ref());
3438        w::bool(s, prefix, "missing_ok", self.missing_ok);
3439    }
3440}
3441
3442impl Out for AlterSubscriptionStmt {
3443    fn out(&self, s: &mut String) {
3444        s.push_str("ALTERSUBSCRIPTIONSTMT");
3445        self.fields(s, "");
3446    }
3447
3448    fn fields(&self, s: &mut String, prefix: &str) {
3449        w::int(s, prefix, "kind", self.kind.0);
3450        w::text(s, prefix, "subname", self.subname.as_deref());
3451        w::text(s, prefix, "servername", self.servername.as_deref());
3452        w::text(s, prefix, "conninfo", self.conninfo.as_deref());
3453        w::list(s, prefix, "publication", &self.publication);
3454        w::list(s, prefix, "options", &self.options);
3455    }
3456}
3457
3458impl Out for AlterSystemStmt {
3459    fn out(&self, s: &mut String) {
3460        s.push_str("ALTERSYSTEMSTMT");
3461        self.fields(s, "");
3462    }
3463
3464    fn fields(&self, s: &mut String, prefix: &str) {
3465        w::boxed(s, prefix, "setstmt", self.setstmt.as_deref());
3466    }
3467}
3468
3469impl Out for AlterTSConfigurationStmt {
3470    fn out(&self, s: &mut String) {
3471        s.push_str("ALTERTSCONFIGURATIONSTMT");
3472        self.fields(s, "");
3473    }
3474
3475    fn fields(&self, s: &mut String, prefix: &str) {
3476        w::int(s, prefix, "kind", self.kind.0);
3477        w::list(s, prefix, "cfgname", &self.cfgname);
3478        w::list(s, prefix, "tokentype", &self.tokentype);
3479        w::list(s, prefix, "dicts", &self.dicts);
3480        w::bool(s, prefix, "override", self.r#override);
3481        w::bool(s, prefix, "replace", self.replace);
3482        w::bool(s, prefix, "missing_ok", self.missing_ok);
3483    }
3484}
3485
3486impl Out for AlterTSDictionaryStmt {
3487    fn out(&self, s: &mut String) {
3488        s.push_str("ALTERTSDICTIONARYSTMT");
3489        self.fields(s, "");
3490    }
3491
3492    fn fields(&self, s: &mut String, prefix: &str) {
3493        w::list(s, prefix, "dictname", &self.dictname);
3494        w::list(s, prefix, "options", &self.options);
3495    }
3496}
3497
3498impl Out for AlterTableCmd {
3499    fn out(&self, s: &mut String) {
3500        s.push_str("ALTERTABLECMD");
3501        self.fields(s, "");
3502    }
3503
3504    fn fields(&self, s: &mut String, prefix: &str) {
3505        w::int(s, prefix, "subtype", self.subtype.0);
3506        w::text(s, prefix, "name", self.name.as_deref());
3507        w::int(s, prefix, "num", self.num);
3508        w::boxed(s, prefix, "newowner", self.newowner.as_deref());
3509        w::node(s, prefix, "def", self.def.as_ref());
3510        w::int(s, prefix, "behavior", self.behavior.0);
3511        w::bool(s, prefix, "missing_ok", self.missing_ok);
3512        w::bool(s, prefix, "recurse", self.recurse);
3513    }
3514}
3515
3516impl Out for AlterTableMoveAllStmt {
3517    fn out(&self, s: &mut String) {
3518        s.push_str("ALTERTABLEMOVEALLSTMT");
3519        self.fields(s, "");
3520    }
3521
3522    fn fields(&self, s: &mut String, prefix: &str) {
3523        w::text(s, prefix, "orig_tablespacename", self.orig_tablespacename.as_deref());
3524        w::int(s, prefix, "objtype", self.objtype.0);
3525        w::list(s, prefix, "roles", &self.roles);
3526        w::text(s, prefix, "new_tablespacename", self.new_tablespacename.as_deref());
3527        w::bool(s, prefix, "nowait", self.nowait);
3528    }
3529}
3530
3531impl Out for AlterTableSpaceOptionsStmt {
3532    fn out(&self, s: &mut String) {
3533        s.push_str("ALTERTABLESPACEOPTIONSSTMT");
3534        self.fields(s, "");
3535    }
3536
3537    fn fields(&self, s: &mut String, prefix: &str) {
3538        w::text(s, prefix, "tablespacename", self.tablespacename.as_deref());
3539        w::list(s, prefix, "options", &self.options);
3540        w::bool(s, prefix, "isReset", self.isReset);
3541    }
3542}
3543
3544impl Out for AlterTableStmt {
3545    fn out(&self, s: &mut String) {
3546        s.push_str("ALTERTABLESTMT");
3547        self.fields(s, "");
3548    }
3549
3550    fn fields(&self, s: &mut String, prefix: &str) {
3551        w::boxed(s, prefix, "relation", self.relation.as_deref());
3552        w::list(s, prefix, "cmds", &self.cmds);
3553        w::int(s, prefix, "objtype", self.objtype.0);
3554        w::bool(s, prefix, "missing_ok", self.missing_ok);
3555    }
3556}
3557
3558impl Out for AlterTypeStmt {
3559    fn out(&self, s: &mut String) {
3560        s.push_str("ALTERTYPESTMT");
3561        self.fields(s, "");
3562    }
3563
3564    fn fields(&self, s: &mut String, prefix: &str) {
3565        w::list(s, prefix, "typeName", &self.typeName);
3566        w::list(s, prefix, "options", &self.options);
3567    }
3568}
3569
3570impl Out for AlterUserMappingStmt {
3571    fn out(&self, s: &mut String) {
3572        s.push_str("ALTERUSERMAPPINGSTMT");
3573        self.fields(s, "");
3574    }
3575
3576    fn fields(&self, s: &mut String, prefix: &str) {
3577        w::boxed(s, prefix, "user", self.user.as_deref());
3578        w::text(s, prefix, "servername", self.servername.as_deref());
3579        w::list(s, prefix, "options", &self.options);
3580    }
3581}
3582
3583impl Out for BooleanTest {
3584    fn out(&self, s: &mut String) {
3585        s.push_str("BOOLEANTEST");
3586        self.fields(s, "");
3587    }
3588
3589    fn fields(&self, s: &mut String, prefix: &str) {
3590        w::node(s, prefix, "arg", self.arg.as_ref());
3591        w::int(s, prefix, "booltesttype", self.booltesttype.0);
3592        w::int(s, prefix, "location", self.location);
3593    }
3594}
3595
3596impl Out for CTECycleClause {
3597    fn out(&self, s: &mut String) {
3598        s.push_str("CTECYCLECLAUSE");
3599        self.fields(s, "");
3600    }
3601
3602    fn fields(&self, s: &mut String, prefix: &str) {
3603        w::list(s, prefix, "cycle_col_list", &self.cycle_col_list);
3604        w::text(s, prefix, "cycle_mark_column", self.cycle_mark_column.as_deref());
3605        w::node(s, prefix, "cycle_mark_value", self.cycle_mark_value.as_ref());
3606        w::node(s, prefix, "cycle_mark_default", self.cycle_mark_default.as_ref());
3607        w::text(s, prefix, "cycle_path_column", self.cycle_path_column.as_deref());
3608        w::int(s, prefix, "location", self.location);
3609        w::int(s, prefix, "cycle_mark_type", self.cycle_mark_type);
3610        w::int(s, prefix, "cycle_mark_typmod", self.cycle_mark_typmod);
3611        w::int(s, prefix, "cycle_mark_collation", self.cycle_mark_collation);
3612        w::int(s, prefix, "cycle_mark_neop", self.cycle_mark_neop);
3613    }
3614}
3615
3616impl Out for CTESearchClause {
3617    fn out(&self, s: &mut String) {
3618        s.push_str("CTESEARCHCLAUSE");
3619        self.fields(s, "");
3620    }
3621
3622    fn fields(&self, s: &mut String, prefix: &str) {
3623        w::list(s, prefix, "search_col_list", &self.search_col_list);
3624        w::bool(s, prefix, "search_breadth_first", self.search_breadth_first);
3625        w::text(s, prefix, "search_seq_column", self.search_seq_column.as_deref());
3626        w::int(s, prefix, "location", self.location);
3627    }
3628}
3629
3630impl Out for CallStmt {
3631    fn out(&self, s: &mut String) {
3632        s.push_str("CALLSTMT");
3633        self.fields(s, "");
3634    }
3635
3636    fn fields(&self, s: &mut String, prefix: &str) {
3637        w::boxed(s, prefix, "funccall", self.funccall.as_deref());
3638        w::node(s, prefix, "funcexpr", self.funcexpr.as_ref());
3639        w::list(s, prefix, "outargs", &self.outargs);
3640    }
3641}
3642
3643impl Out for CaseExpr {
3644    fn out(&self, s: &mut String) {
3645        s.push_str("CASEEXPR");
3646        self.fields(s, "");
3647    }
3648
3649    fn fields(&self, s: &mut String, prefix: &str) {
3650        w::int(s, prefix, "casetype", self.casetype);
3651        w::int(s, prefix, "casecollid", self.casecollid);
3652        w::node(s, prefix, "arg", self.arg.as_ref());
3653        w::list(s, prefix, "args", &self.args);
3654        w::node(s, prefix, "defresult", self.defresult.as_ref());
3655        w::int(s, prefix, "location", self.location);
3656    }
3657}
3658
3659impl Out for CaseWhen {
3660    fn out(&self, s: &mut String) {
3661        s.push_str("CASEWHEN");
3662        self.fields(s, "");
3663    }
3664
3665    fn fields(&self, s: &mut String, prefix: &str) {
3666        w::node(s, prefix, "expr", self.expr.as_ref());
3667        w::node(s, prefix, "result", self.result.as_ref());
3668        w::int(s, prefix, "location", self.location);
3669    }
3670}
3671
3672impl Out for CheckPointStmt {
3673    fn out(&self, s: &mut String) {
3674        s.push_str("CHECKPOINTSTMT");
3675        self.fields(s, "");
3676    }
3677
3678    fn fields(&self, s: &mut String, prefix: &str) {
3679        w::list(s, prefix, "options", &self.options);
3680    }
3681}
3682
3683impl Out for ClosePortalStmt {
3684    fn out(&self, s: &mut String) {
3685        s.push_str("CLOSEPORTALSTMT");
3686        self.fields(s, "");
3687    }
3688
3689    fn fields(&self, s: &mut String, prefix: &str) {
3690        w::text(s, prefix, "portalname", self.portalname.as_deref());
3691    }
3692}
3693
3694impl Out for CoalesceExpr {
3695    fn out(&self, s: &mut String) {
3696        s.push_str("COALESCEEXPR");
3697        self.fields(s, "");
3698    }
3699
3700    fn fields(&self, s: &mut String, prefix: &str) {
3701        w::int(s, prefix, "coalescetype", self.coalescetype);
3702        w::int(s, prefix, "coalescecollid", self.coalescecollid);
3703        w::list(s, prefix, "args", &self.args);
3704        w::int(s, prefix, "location", self.location);
3705    }
3706}
3707
3708impl Out for CollateClause {
3709    fn out(&self, s: &mut String) {
3710        s.push_str("COLLATECLAUSE");
3711        self.fields(s, "");
3712    }
3713
3714    fn fields(&self, s: &mut String, prefix: &str) {
3715        w::node(s, prefix, "arg", self.arg.as_ref());
3716        w::list(s, prefix, "collname", &self.collname);
3717        w::int(s, prefix, "location", self.location);
3718    }
3719}
3720
3721impl Out for ColumnDef {
3722    fn out(&self, s: &mut String) {
3723        s.push_str("COLUMNDEF");
3724        self.fields(s, "");
3725    }
3726
3727    fn fields(&self, s: &mut String, prefix: &str) {
3728        w::text(s, prefix, "colname", self.colname.as_deref());
3729        w::boxed(s, prefix, "typeName", self.typeName.as_deref());
3730        w::text(s, prefix, "compression", self.compression.as_deref());
3731        w::int(s, prefix, "inhcount", self.inhcount);
3732        w::bool(s, prefix, "is_local", self.is_local);
3733        w::bool(s, prefix, "is_not_null", self.is_not_null);
3734        w::bool(s, prefix, "is_from_type", self.is_from_type);
3735        w::char(s, prefix, "storage", self.storage);
3736        w::text(s, prefix, "storage_name", self.storage_name.as_deref());
3737        w::node(s, prefix, "raw_default", self.raw_default.as_ref());
3738        w::node(s, prefix, "cooked_default", self.cooked_default.as_ref());
3739        w::char(s, prefix, "identity", self.identity);
3740        w::boxed(s, prefix, "identitySequence", self.identitySequence.as_deref());
3741        w::char(s, prefix, "generated", self.generated);
3742        w::boxed(s, prefix, "collClause", self.collClause.as_deref());
3743        w::int(s, prefix, "collOid", self.collOid);
3744        w::list(s, prefix, "constraints", &self.constraints);
3745        w::list(s, prefix, "fdwoptions", &self.fdwoptions);
3746        w::int(s, prefix, "location", self.location);
3747    }
3748}
3749
3750impl Out for ColumnRef {
3751    fn out(&self, s: &mut String) {
3752        s.push_str("COLUMNREF");
3753        self.fields(s, "");
3754    }
3755
3756    fn fields(&self, s: &mut String, prefix: &str) {
3757        w::list(s, prefix, "fields", &self.fields);
3758        w::int(s, prefix, "location", self.location);
3759    }
3760}
3761
3762impl Out for CommentStmt {
3763    fn out(&self, s: &mut String) {
3764        s.push_str("COMMENTSTMT");
3765        self.fields(s, "");
3766    }
3767
3768    fn fields(&self, s: &mut String, prefix: &str) {
3769        w::int(s, prefix, "objtype", self.objtype.0);
3770        w::node(s, prefix, "object", self.object.as_ref());
3771        w::text(s, prefix, "comment", self.comment.as_deref());
3772    }
3773}
3774
3775impl Out for CommonTableExpr {
3776    fn out(&self, s: &mut String) {
3777        s.push_str("COMMONTABLEEXPR");
3778        self.fields(s, "");
3779    }
3780
3781    fn fields(&self, s: &mut String, prefix: &str) {
3782        w::text(s, prefix, "ctename", self.ctename.as_deref());
3783        w::list(s, prefix, "aliascolnames", &self.aliascolnames);
3784        w::int(s, prefix, "ctematerialized", self.ctematerialized.0);
3785        w::node(s, prefix, "ctequery", self.ctequery.as_ref());
3786        w::boxed(s, prefix, "search_clause", self.search_clause.as_deref());
3787        w::boxed(s, prefix, "cycle_clause", self.cycle_clause.as_deref());
3788        w::int(s, prefix, "location", self.location);
3789        w::bool(s, prefix, "cterecursive", self.cterecursive);
3790        w::int(s, prefix, "cterefcount", self.cterefcount);
3791        w::list(s, prefix, "ctecolnames", &self.ctecolnames);
3792        w::list(s, prefix, "ctecoltypes", &self.ctecoltypes);
3793        w::list(s, prefix, "ctecoltypmods", &self.ctecoltypmods);
3794        w::list(s, prefix, "ctecolcollations", &self.ctecolcollations);
3795    }
3796}
3797
3798impl Out for CompositeTypeStmt {
3799    fn out(&self, s: &mut String) {
3800        s.push_str("COMPOSITETYPESTMT");
3801        self.fields(s, "");
3802    }
3803
3804    fn fields(&self, s: &mut String, prefix: &str) {
3805        w::boxed(s, prefix, "typevar", self.typevar.as_deref());
3806        w::list(s, prefix, "coldeflist", &self.coldeflist);
3807    }
3808}
3809
3810impl Out for Constraint {
3811    fn out(&self, s: &mut String) {
3812        s.push_str("CONSTRAINT");
3813        self.fields(s, "");
3814    }
3815
3816    fn fields(&self, s: &mut String, prefix: &str) {
3817        w::int(s, prefix, "contype", self.contype.0);
3818        w::text(s, prefix, "conname", self.conname.as_deref());
3819        w::bool(s, prefix, "deferrable", self.deferrable);
3820        w::bool(s, prefix, "initdeferred", self.initdeferred);
3821        w::bool(s, prefix, "is_enforced", self.is_enforced);
3822        w::bool(s, prefix, "skip_validation", self.skip_validation);
3823        w::bool(s, prefix, "initially_valid", self.initially_valid);
3824        w::bool(s, prefix, "is_no_inherit", self.is_no_inherit);
3825        w::node(s, prefix, "raw_expr", self.raw_expr.as_ref());
3826        w::text(s, prefix, "cooked_expr", self.cooked_expr.as_deref());
3827        w::char(s, prefix, "generated_when", self.generated_when);
3828        w::char(s, prefix, "generated_kind", self.generated_kind);
3829        w::bool(s, prefix, "nulls_not_distinct", self.nulls_not_distinct);
3830        w::list(s, prefix, "keys", &self.keys);
3831        w::bool(s, prefix, "without_overlaps", self.without_overlaps);
3832        w::list(s, prefix, "including", &self.including);
3833        w::list(s, prefix, "exclusions", &self.exclusions);
3834        w::list(s, prefix, "options", &self.options);
3835        w::text(s, prefix, "indexname", self.indexname.as_deref());
3836        w::text(s, prefix, "indexspace", self.indexspace.as_deref());
3837        w::bool(s, prefix, "reset_default_tblspc", self.reset_default_tblspc);
3838        w::text(s, prefix, "access_method", self.access_method.as_deref());
3839        w::node(s, prefix, "where_clause", self.where_clause.as_ref());
3840        w::boxed(s, prefix, "pktable", self.pktable.as_deref());
3841        w::list(s, prefix, "fk_attrs", &self.fk_attrs);
3842        w::list(s, prefix, "pk_attrs", &self.pk_attrs);
3843        w::bool(s, prefix, "fk_with_period", self.fk_with_period);
3844        w::bool(s, prefix, "pk_with_period", self.pk_with_period);
3845        w::char(s, prefix, "fk_matchtype", self.fk_matchtype);
3846        w::char(s, prefix, "fk_upd_action", self.fk_upd_action);
3847        w::char(s, prefix, "fk_del_action", self.fk_del_action);
3848        w::list(s, prefix, "fk_del_set_cols", &self.fk_del_set_cols);
3849        w::list(s, prefix, "old_conpfeqop", &self.old_conpfeqop);
3850        w::int(s, prefix, "old_pktable_oid", self.old_pktable_oid);
3851        w::int(s, prefix, "location", self.location);
3852    }
3853}
3854
3855impl Out for ConstraintsSetStmt {
3856    fn out(&self, s: &mut String) {
3857        s.push_str("CONSTRAINTSSETSTMT");
3858        self.fields(s, "");
3859    }
3860
3861    fn fields(&self, s: &mut String, prefix: &str) {
3862        w::list(s, prefix, "constraints", &self.constraints);
3863        w::bool(s, prefix, "deferred", self.deferred);
3864    }
3865}
3866
3867impl Out for CopyStmt {
3868    fn out(&self, s: &mut String) {
3869        s.push_str("COPYSTMT");
3870        self.fields(s, "");
3871    }
3872
3873    fn fields(&self, s: &mut String, prefix: &str) {
3874        w::boxed(s, prefix, "relation", self.relation.as_deref());
3875        w::node(s, prefix, "query", self.query.as_ref());
3876        w::list(s, prefix, "attlist", &self.attlist);
3877        w::bool(s, prefix, "is_from", self.is_from);
3878        w::bool(s, prefix, "is_program", self.is_program);
3879        w::text(s, prefix, "filename", self.filename.as_deref());
3880        w::list(s, prefix, "options", &self.options);
3881        w::node(s, prefix, "whereClause", self.whereClause.as_ref());
3882    }
3883}
3884
3885impl Out for CreateAmStmt {
3886    fn out(&self, s: &mut String) {
3887        s.push_str("CREATEAMSTMT");
3888        self.fields(s, "");
3889    }
3890
3891    fn fields(&self, s: &mut String, prefix: &str) {
3892        w::text(s, prefix, "amname", self.amname.as_deref());
3893        w::list(s, prefix, "handler_name", &self.handler_name);
3894        w::char(s, prefix, "amtype", self.amtype);
3895    }
3896}
3897
3898impl Out for CreateCastStmt {
3899    fn out(&self, s: &mut String) {
3900        s.push_str("CREATECASTSTMT");
3901        self.fields(s, "");
3902    }
3903
3904    fn fields(&self, s: &mut String, prefix: &str) {
3905        w::boxed(s, prefix, "sourcetype", self.sourcetype.as_deref());
3906        w::boxed(s, prefix, "targettype", self.targettype.as_deref());
3907        w::boxed(s, prefix, "func", self.func.as_deref());
3908        w::int(s, prefix, "context", self.context.0);
3909        w::bool(s, prefix, "inout", self.inout);
3910    }
3911}
3912
3913impl Out for CreateConversionStmt {
3914    fn out(&self, s: &mut String) {
3915        s.push_str("CREATECONVERSIONSTMT");
3916        self.fields(s, "");
3917    }
3918
3919    fn fields(&self, s: &mut String, prefix: &str) {
3920        w::list(s, prefix, "conversion_name", &self.conversion_name);
3921        w::text(s, prefix, "for_encoding_name", self.for_encoding_name.as_deref());
3922        w::text(s, prefix, "to_encoding_name", self.to_encoding_name.as_deref());
3923        w::list(s, prefix, "func_name", &self.func_name);
3924        w::bool(s, prefix, "def", self.def);
3925    }
3926}
3927
3928impl Out for CreateDomainStmt {
3929    fn out(&self, s: &mut String) {
3930        s.push_str("CREATEDOMAINSTMT");
3931        self.fields(s, "");
3932    }
3933
3934    fn fields(&self, s: &mut String, prefix: &str) {
3935        w::list(s, prefix, "domainname", &self.domainname);
3936        w::boxed(s, prefix, "typeName", self.typeName.as_deref());
3937        w::boxed(s, prefix, "collClause", self.collClause.as_deref());
3938        w::list(s, prefix, "constraints", &self.constraints);
3939    }
3940}
3941
3942impl Out for CreateEnumStmt {
3943    fn out(&self, s: &mut String) {
3944        s.push_str("CREATEENUMSTMT");
3945        self.fields(s, "");
3946    }
3947
3948    fn fields(&self, s: &mut String, prefix: &str) {
3949        w::list(s, prefix, "typeName", &self.typeName);
3950        w::list(s, prefix, "vals", &self.vals);
3951    }
3952}
3953
3954impl Out for CreateEventTrigStmt {
3955    fn out(&self, s: &mut String) {
3956        s.push_str("CREATEEVENTTRIGSTMT");
3957        self.fields(s, "");
3958    }
3959
3960    fn fields(&self, s: &mut String, prefix: &str) {
3961        w::text(s, prefix, "trigname", self.trigname.as_deref());
3962        w::text(s, prefix, "eventname", self.eventname.as_deref());
3963        w::list(s, prefix, "whenclause", &self.whenclause);
3964        w::list(s, prefix, "funcname", &self.funcname);
3965    }
3966}
3967
3968impl Out for CreateExtensionStmt {
3969    fn out(&self, s: &mut String) {
3970        s.push_str("CREATEEXTENSIONSTMT");
3971        self.fields(s, "");
3972    }
3973
3974    fn fields(&self, s: &mut String, prefix: &str) {
3975        w::text(s, prefix, "extname", self.extname.as_deref());
3976        w::bool(s, prefix, "if_not_exists", self.if_not_exists);
3977        w::list(s, prefix, "options", &self.options);
3978    }
3979}
3980
3981impl Out for CreateFdwStmt {
3982    fn out(&self, s: &mut String) {
3983        s.push_str("CREATEFDWSTMT");
3984        self.fields(s, "");
3985    }
3986
3987    fn fields(&self, s: &mut String, prefix: &str) {
3988        w::text(s, prefix, "fdwname", self.fdwname.as_deref());
3989        w::list(s, prefix, "func_options", &self.func_options);
3990        w::list(s, prefix, "options", &self.options);
3991    }
3992}
3993
3994impl Out for CreateForeignServerStmt {
3995    fn out(&self, s: &mut String) {
3996        s.push_str("CREATEFOREIGNSERVERSTMT");
3997        self.fields(s, "");
3998    }
3999
4000    fn fields(&self, s: &mut String, prefix: &str) {
4001        w::text(s, prefix, "servername", self.servername.as_deref());
4002        w::text(s, prefix, "servertype", self.servertype.as_deref());
4003        w::text(s, prefix, "version", self.version.as_deref());
4004        w::text(s, prefix, "fdwname", self.fdwname.as_deref());
4005        w::bool(s, prefix, "if_not_exists", self.if_not_exists);
4006        w::list(s, prefix, "options", &self.options);
4007    }
4008}
4009
4010impl Out for CreateForeignTableStmt {
4011    fn out(&self, s: &mut String) {
4012        s.push_str("CREATEFOREIGNTABLESTMT");
4013        self.fields(s, "");
4014    }
4015
4016    fn fields(&self, s: &mut String, prefix: &str) {
4017        self.base.fields(s, &format!("{prefix}base."));
4018        w::text(s, prefix, "servername", self.servername.as_deref());
4019        w::list(s, prefix, "options", &self.options);
4020    }
4021}
4022
4023impl Out for CreateFunctionStmt {
4024    fn out(&self, s: &mut String) {
4025        s.push_str("CREATEFUNCTIONSTMT");
4026        self.fields(s, "");
4027    }
4028
4029    fn fields(&self, s: &mut String, prefix: &str) {
4030        w::bool(s, prefix, "is_procedure", self.is_procedure);
4031        w::bool(s, prefix, "replace", self.replace);
4032        w::list(s, prefix, "funcname", &self.funcname);
4033        w::list(s, prefix, "parameters", &self.parameters);
4034        w::boxed(s, prefix, "returnType", self.returnType.as_deref());
4035        w::list(s, prefix, "options", &self.options);
4036        w::node(s, prefix, "sql_body", self.sql_body.as_ref());
4037    }
4038}
4039
4040impl Out for CreateOpClassItem {
4041    fn out(&self, s: &mut String) {
4042        s.push_str("CREATEOPCLASSITEM");
4043        self.fields(s, "");
4044    }
4045
4046    fn fields(&self, s: &mut String, prefix: &str) {
4047        w::int(s, prefix, "itemtype", self.itemtype);
4048        w::boxed(s, prefix, "name", self.name.as_deref());
4049        w::int(s, prefix, "number", self.number);
4050        w::list(s, prefix, "order_family", &self.order_family);
4051        w::list(s, prefix, "class_args", &self.class_args);
4052        w::boxed(s, prefix, "storedtype", self.storedtype.as_deref());
4053    }
4054}
4055
4056impl Out for CreateOpClassStmt {
4057    fn out(&self, s: &mut String) {
4058        s.push_str("CREATEOPCLASSSTMT");
4059        self.fields(s, "");
4060    }
4061
4062    fn fields(&self, s: &mut String, prefix: &str) {
4063        w::list(s, prefix, "opclassname", &self.opclassname);
4064        w::list(s, prefix, "opfamilyname", &self.opfamilyname);
4065        w::text(s, prefix, "amname", self.amname.as_deref());
4066        w::boxed(s, prefix, "datatype", self.datatype.as_deref());
4067        w::list(s, prefix, "items", &self.items);
4068        w::bool(s, prefix, "isDefault", self.isDefault);
4069    }
4070}
4071
4072impl Out for CreateOpFamilyStmt {
4073    fn out(&self, s: &mut String) {
4074        s.push_str("CREATEOPFAMILYSTMT");
4075        self.fields(s, "");
4076    }
4077
4078    fn fields(&self, s: &mut String, prefix: &str) {
4079        w::list(s, prefix, "opfamilyname", &self.opfamilyname);
4080        w::text(s, prefix, "amname", self.amname.as_deref());
4081    }
4082}
4083
4084impl Out for CreatePLangStmt {
4085    fn out(&self, s: &mut String) {
4086        s.push_str("CREATEPLANGSTMT");
4087        self.fields(s, "");
4088    }
4089
4090    fn fields(&self, s: &mut String, prefix: &str) {
4091        w::bool(s, prefix, "replace", self.replace);
4092        w::text(s, prefix, "plname", self.plname.as_deref());
4093        w::list(s, prefix, "plhandler", &self.plhandler);
4094        w::list(s, prefix, "plinline", &self.plinline);
4095        w::list(s, prefix, "plvalidator", &self.plvalidator);
4096        w::bool(s, prefix, "pltrusted", self.pltrusted);
4097    }
4098}
4099
4100impl Out for CreatePolicyStmt {
4101    fn out(&self, s: &mut String) {
4102        s.push_str("CREATEPOLICYSTMT");
4103        self.fields(s, "");
4104    }
4105
4106    fn fields(&self, s: &mut String, prefix: &str) {
4107        w::text(s, prefix, "policy_name", self.policy_name.as_deref());
4108        w::boxed(s, prefix, "table", self.table.as_deref());
4109        w::text(s, prefix, "cmd_name", self.cmd_name.as_deref());
4110        w::bool(s, prefix, "permissive", self.permissive);
4111        w::list(s, prefix, "roles", &self.roles);
4112        w::node(s, prefix, "qual", self.qual.as_ref());
4113        w::node(s, prefix, "with_check", self.with_check.as_ref());
4114    }
4115}
4116
4117impl Out for CreatePublicationStmt {
4118    fn out(&self, s: &mut String) {
4119        s.push_str("CREATEPUBLICATIONSTMT");
4120        self.fields(s, "");
4121    }
4122
4123    fn fields(&self, s: &mut String, prefix: &str) {
4124        w::text(s, prefix, "pubname", self.pubname.as_deref());
4125        w::list(s, prefix, "options", &self.options);
4126        w::list(s, prefix, "pubobjects", &self.pubobjects);
4127        w::bool(s, prefix, "for_all_tables", self.for_all_tables);
4128        w::bool(s, prefix, "for_all_sequences", self.for_all_sequences);
4129    }
4130}
4131
4132impl Out for CreateRangeStmt {
4133    fn out(&self, s: &mut String) {
4134        s.push_str("CREATERANGESTMT");
4135        self.fields(s, "");
4136    }
4137
4138    fn fields(&self, s: &mut String, prefix: &str) {
4139        w::list(s, prefix, "typeName", &self.typeName);
4140        w::list(s, prefix, "params", &self.params);
4141    }
4142}
4143
4144impl Out for CreateRoleStmt {
4145    fn out(&self, s: &mut String) {
4146        s.push_str("CREATEROLESTMT");
4147        self.fields(s, "");
4148    }
4149
4150    fn fields(&self, s: &mut String, prefix: &str) {
4151        w::int(s, prefix, "stmt_type", self.stmt_type.0);
4152        w::text(s, prefix, "role", self.role.as_deref());
4153        w::list(s, prefix, "options", &self.options);
4154    }
4155}
4156
4157impl Out for CreateSchemaStmt {
4158    fn out(&self, s: &mut String) {
4159        s.push_str("CREATESCHEMASTMT");
4160        self.fields(s, "");
4161    }
4162
4163    fn fields(&self, s: &mut String, prefix: &str) {
4164        w::text(s, prefix, "schemaname", self.schemaname.as_deref());
4165        w::boxed(s, prefix, "authrole", self.authrole.as_deref());
4166        w::list(s, prefix, "schemaElts", &self.schemaElts);
4167        w::bool(s, prefix, "if_not_exists", self.if_not_exists);
4168    }
4169}
4170
4171impl Out for CreateSeqStmt {
4172    fn out(&self, s: &mut String) {
4173        s.push_str("CREATESEQSTMT");
4174        self.fields(s, "");
4175    }
4176
4177    fn fields(&self, s: &mut String, prefix: &str) {
4178        w::boxed(s, prefix, "sequence", self.sequence.as_deref());
4179        w::list(s, prefix, "options", &self.options);
4180        w::int(s, prefix, "ownerId", self.ownerId);
4181        w::bool(s, prefix, "for_identity", self.for_identity);
4182        w::bool(s, prefix, "if_not_exists", self.if_not_exists);
4183    }
4184}
4185
4186impl Out for CreateStatsStmt {
4187    fn out(&self, s: &mut String) {
4188        s.push_str("CREATESTATSSTMT");
4189        self.fields(s, "");
4190    }
4191
4192    fn fields(&self, s: &mut String, prefix: &str) {
4193        w::list(s, prefix, "defnames", &self.defnames);
4194        w::list(s, prefix, "stat_types", &self.stat_types);
4195        w::list(s, prefix, "exprs", &self.exprs);
4196        w::list(s, prefix, "relations", &self.relations);
4197        w::text(s, prefix, "stxcomment", self.stxcomment.as_deref());
4198        w::bool(s, prefix, "transformed", self.transformed);
4199        w::bool(s, prefix, "if_not_exists", self.if_not_exists);
4200        w::int(s, prefix, "owner", self.owner);
4201    }
4202}
4203
4204impl Out for CreateStmt {
4205    fn out(&self, s: &mut String) {
4206        s.push_str("CREATESTMT");
4207        self.fields(s, "");
4208    }
4209
4210    fn fields(&self, s: &mut String, prefix: &str) {
4211        w::boxed(s, prefix, "relation", self.relation.as_deref());
4212        w::list(s, prefix, "tableElts", &self.tableElts);
4213        w::list(s, prefix, "inhRelations", &self.inhRelations);
4214        w::boxed(s, prefix, "partbound", self.partbound.as_deref());
4215        w::boxed(s, prefix, "partspec", self.partspec.as_deref());
4216        w::boxed(s, prefix, "ofTypename", self.ofTypename.as_deref());
4217        w::list(s, prefix, "constraints", &self.constraints);
4218        w::list(s, prefix, "nnconstraints", &self.nnconstraints);
4219        w::list(s, prefix, "options", &self.options);
4220        w::int(s, prefix, "oncommit", self.oncommit.0);
4221        w::text(s, prefix, "tablespacename", self.tablespacename.as_deref());
4222        w::text(s, prefix, "accessMethod", self.accessMethod.as_deref());
4223        w::bool(s, prefix, "if_not_exists", self.if_not_exists);
4224    }
4225}
4226
4227impl Out for CreateSubscriptionStmt {
4228    fn out(&self, s: &mut String) {
4229        s.push_str("CREATESUBSCRIPTIONSTMT");
4230        self.fields(s, "");
4231    }
4232
4233    fn fields(&self, s: &mut String, prefix: &str) {
4234        w::text(s, prefix, "subname", self.subname.as_deref());
4235        w::text(s, prefix, "servername", self.servername.as_deref());
4236        w::text(s, prefix, "conninfo", self.conninfo.as_deref());
4237        w::list(s, prefix, "publication", &self.publication);
4238        w::list(s, prefix, "options", &self.options);
4239    }
4240}
4241
4242impl Out for CreateTableAsStmt {
4243    fn out(&self, s: &mut String) {
4244        s.push_str("CREATETABLEASSTMT");
4245        self.fields(s, "");
4246    }
4247
4248    fn fields(&self, s: &mut String, prefix: &str) {
4249        w::node(s, prefix, "query", self.query.as_ref());
4250        w::boxed(s, prefix, "into", self.into.as_deref());
4251        w::int(s, prefix, "objtype", self.objtype.0);
4252        w::bool(s, prefix, "is_select_into", self.is_select_into);
4253        w::bool(s, prefix, "if_not_exists", self.if_not_exists);
4254    }
4255}
4256
4257impl Out for CreateTableSpaceStmt {
4258    fn out(&self, s: &mut String) {
4259        s.push_str("CREATETABLESPACESTMT");
4260        self.fields(s, "");
4261    }
4262
4263    fn fields(&self, s: &mut String, prefix: &str) {
4264        w::text(s, prefix, "tablespacename", self.tablespacename.as_deref());
4265        w::boxed(s, prefix, "owner", self.owner.as_deref());
4266        w::text(s, prefix, "location", self.location.as_deref());
4267        w::list(s, prefix, "options", &self.options);
4268    }
4269}
4270
4271impl Out for CreateTransformStmt {
4272    fn out(&self, s: &mut String) {
4273        s.push_str("CREATETRANSFORMSTMT");
4274        self.fields(s, "");
4275    }
4276
4277    fn fields(&self, s: &mut String, prefix: &str) {
4278        w::bool(s, prefix, "replace", self.replace);
4279        w::boxed(s, prefix, "type_name", self.type_name.as_deref());
4280        w::text(s, prefix, "lang", self.lang.as_deref());
4281        w::boxed(s, prefix, "fromsql", self.fromsql.as_deref());
4282        w::boxed(s, prefix, "tosql", self.tosql.as_deref());
4283    }
4284}
4285
4286impl Out for CreateTrigStmt {
4287    fn out(&self, s: &mut String) {
4288        s.push_str("CREATETRIGSTMT");
4289        self.fields(s, "");
4290    }
4291
4292    fn fields(&self, s: &mut String, prefix: &str) {
4293        w::bool(s, prefix, "replace", self.replace);
4294        w::bool(s, prefix, "isconstraint", self.isconstraint);
4295        w::text(s, prefix, "trigname", self.trigname.as_deref());
4296        w::boxed(s, prefix, "relation", self.relation.as_deref());
4297        w::list(s, prefix, "funcname", &self.funcname);
4298        w::list(s, prefix, "args", &self.args);
4299        w::bool(s, prefix, "row", self.row);
4300        w::int(s, prefix, "timing", self.timing);
4301        w::int(s, prefix, "events", self.events);
4302        w::list(s, prefix, "columns", &self.columns);
4303        w::node(s, prefix, "whenClause", self.whenClause.as_ref());
4304        w::list(s, prefix, "transitionRels", &self.transitionRels);
4305        w::bool(s, prefix, "deferrable", self.deferrable);
4306        w::bool(s, prefix, "initdeferred", self.initdeferred);
4307        w::boxed(s, prefix, "constrrel", self.constrrel.as_deref());
4308    }
4309}
4310
4311impl Out for CreateUserMappingStmt {
4312    fn out(&self, s: &mut String) {
4313        s.push_str("CREATEUSERMAPPINGSTMT");
4314        self.fields(s, "");
4315    }
4316
4317    fn fields(&self, s: &mut String, prefix: &str) {
4318        w::boxed(s, prefix, "user", self.user.as_deref());
4319        w::text(s, prefix, "servername", self.servername.as_deref());
4320        w::bool(s, prefix, "if_not_exists", self.if_not_exists);
4321        w::list(s, prefix, "options", &self.options);
4322    }
4323}
4324
4325impl Out for CreatedbStmt {
4326    fn out(&self, s: &mut String) {
4327        s.push_str("CREATEDBSTMT");
4328        self.fields(s, "");
4329    }
4330
4331    fn fields(&self, s: &mut String, prefix: &str) {
4332        w::text(s, prefix, "dbname", self.dbname.as_deref());
4333        w::list(s, prefix, "options", &self.options);
4334    }
4335}
4336
4337impl Out for CurrentOfExpr {
4338    fn out(&self, s: &mut String) {
4339        s.push_str("CURRENTOFEXPR");
4340        self.fields(s, "");
4341    }
4342
4343    fn fields(&self, s: &mut String, prefix: &str) {
4344        w::int(s, prefix, "cvarno", self.cvarno);
4345        w::text(s, prefix, "cursor_name", self.cursor_name.as_deref());
4346        w::int(s, prefix, "cursor_param", self.cursor_param);
4347    }
4348}
4349
4350impl Out for DeallocateStmt {
4351    fn out(&self, s: &mut String) {
4352        s.push_str("DEALLOCATESTMT");
4353        self.fields(s, "");
4354    }
4355
4356    fn fields(&self, s: &mut String, prefix: &str) {
4357        w::text(s, prefix, "name", self.name.as_deref());
4358        w::bool(s, prefix, "isall", self.isall);
4359        w::int(s, prefix, "location", self.location);
4360    }
4361}
4362
4363impl Out for DeclareCursorStmt {
4364    fn out(&self, s: &mut String) {
4365        s.push_str("DECLARECURSORSTMT");
4366        self.fields(s, "");
4367    }
4368
4369    fn fields(&self, s: &mut String, prefix: &str) {
4370        w::text(s, prefix, "portalname", self.portalname.as_deref());
4371        w::int(s, prefix, "options", self.options);
4372        w::node(s, prefix, "query", self.query.as_ref());
4373    }
4374}
4375
4376impl Out for DefElem {
4377    fn out(&self, s: &mut String) {
4378        s.push_str("DEFELEM");
4379        self.fields(s, "");
4380    }
4381
4382    fn fields(&self, s: &mut String, prefix: &str) {
4383        w::text(s, prefix, "defnamespace", self.defnamespace.as_deref());
4384        w::text(s, prefix, "defname", self.defname.as_deref());
4385        w::node(s, prefix, "arg", self.arg.as_ref());
4386        w::int(s, prefix, "defaction", self.defaction.0);
4387        w::int(s, prefix, "location", self.location);
4388    }
4389}
4390
4391impl Out for DefineStmt {
4392    fn out(&self, s: &mut String) {
4393        s.push_str("DEFINESTMT");
4394        self.fields(s, "");
4395    }
4396
4397    fn fields(&self, s: &mut String, prefix: &str) {
4398        w::int(s, prefix, "kind", self.kind.0);
4399        w::bool(s, prefix, "oldstyle", self.oldstyle);
4400        w::list(s, prefix, "defnames", &self.defnames);
4401        w::list(s, prefix, "args", &self.args);
4402        w::list(s, prefix, "definition", &self.definition);
4403        w::bool(s, prefix, "if_not_exists", self.if_not_exists);
4404        w::bool(s, prefix, "replace", self.replace);
4405    }
4406}
4407
4408impl Out for DeleteStmt {
4409    fn out(&self, s: &mut String) {
4410        s.push_str("DELETESTMT");
4411        self.fields(s, "");
4412    }
4413
4414    fn fields(&self, s: &mut String, prefix: &str) {
4415        w::boxed(s, prefix, "relation", self.relation.as_deref());
4416        w::list(s, prefix, "usingClause", &self.usingClause);
4417        w::node(s, prefix, "whereClause", self.whereClause.as_ref());
4418        w::boxed(s, prefix, "returningClause", self.returningClause.as_deref());
4419        w::boxed(s, prefix, "withClause", self.withClause.as_deref());
4420    }
4421}
4422
4423impl Out for DiscardStmt {
4424    fn out(&self, s: &mut String) {
4425        s.push_str("DISCARDSTMT");
4426        self.fields(s, "");
4427    }
4428
4429    fn fields(&self, s: &mut String, prefix: &str) {
4430        w::int(s, prefix, "target", self.target.0);
4431    }
4432}
4433
4434impl Out for DoStmt {
4435    fn out(&self, s: &mut String) {
4436        s.push_str("DOSTMT");
4437        self.fields(s, "");
4438    }
4439
4440    fn fields(&self, s: &mut String, prefix: &str) {
4441        w::list(s, prefix, "args", &self.args);
4442    }
4443}
4444
4445impl Out for DropOwnedStmt {
4446    fn out(&self, s: &mut String) {
4447        s.push_str("DROPOWNEDSTMT");
4448        self.fields(s, "");
4449    }
4450
4451    fn fields(&self, s: &mut String, prefix: &str) {
4452        w::list(s, prefix, "roles", &self.roles);
4453        w::int(s, prefix, "behavior", self.behavior.0);
4454    }
4455}
4456
4457impl Out for DropRoleStmt {
4458    fn out(&self, s: &mut String) {
4459        s.push_str("DROPROLESTMT");
4460        self.fields(s, "");
4461    }
4462
4463    fn fields(&self, s: &mut String, prefix: &str) {
4464        w::list(s, prefix, "roles", &self.roles);
4465        w::bool(s, prefix, "missing_ok", self.missing_ok);
4466    }
4467}
4468
4469impl Out for DropStmt {
4470    fn out(&self, s: &mut String) {
4471        s.push_str("DROPSTMT");
4472        self.fields(s, "");
4473    }
4474
4475    fn fields(&self, s: &mut String, prefix: &str) {
4476        w::list(s, prefix, "objects", &self.objects);
4477        w::int(s, prefix, "removeType", self.removeType.0);
4478        w::int(s, prefix, "behavior", self.behavior.0);
4479        w::bool(s, prefix, "missing_ok", self.missing_ok);
4480        w::bool(s, prefix, "concurrent", self.concurrent);
4481    }
4482}
4483
4484impl Out for DropSubscriptionStmt {
4485    fn out(&self, s: &mut String) {
4486        s.push_str("DROPSUBSCRIPTIONSTMT");
4487        self.fields(s, "");
4488    }
4489
4490    fn fields(&self, s: &mut String, prefix: &str) {
4491        w::text(s, prefix, "subname", self.subname.as_deref());
4492        w::bool(s, prefix, "missing_ok", self.missing_ok);
4493        w::int(s, prefix, "behavior", self.behavior.0);
4494    }
4495}
4496
4497impl Out for DropTableSpaceStmt {
4498    fn out(&self, s: &mut String) {
4499        s.push_str("DROPTABLESPACESTMT");
4500        self.fields(s, "");
4501    }
4502
4503    fn fields(&self, s: &mut String, prefix: &str) {
4504        w::text(s, prefix, "tablespacename", self.tablespacename.as_deref());
4505        w::bool(s, prefix, "missing_ok", self.missing_ok);
4506    }
4507}
4508
4509impl Out for DropUserMappingStmt {
4510    fn out(&self, s: &mut String) {
4511        s.push_str("DROPUSERMAPPINGSTMT");
4512        self.fields(s, "");
4513    }
4514
4515    fn fields(&self, s: &mut String, prefix: &str) {
4516        w::boxed(s, prefix, "user", self.user.as_deref());
4517        w::text(s, prefix, "servername", self.servername.as_deref());
4518        w::bool(s, prefix, "missing_ok", self.missing_ok);
4519    }
4520}
4521
4522impl Out for DropdbStmt {
4523    fn out(&self, s: &mut String) {
4524        s.push_str("DROPDBSTMT");
4525        self.fields(s, "");
4526    }
4527
4528    fn fields(&self, s: &mut String, prefix: &str) {
4529        w::text(s, prefix, "dbname", self.dbname.as_deref());
4530        w::bool(s, prefix, "missing_ok", self.missing_ok);
4531        w::list(s, prefix, "options", &self.options);
4532    }
4533}
4534
4535impl Out for ExecuteStmt {
4536    fn out(&self, s: &mut String) {
4537        s.push_str("EXECUTESTMT");
4538        self.fields(s, "");
4539    }
4540
4541    fn fields(&self, s: &mut String, prefix: &str) {
4542        w::text(s, prefix, "name", self.name.as_deref());
4543        w::list(s, prefix, "params", &self.params);
4544    }
4545}
4546
4547impl Out for ExplainStmt {
4548    fn out(&self, s: &mut String) {
4549        s.push_str("EXPLAINSTMT");
4550        self.fields(s, "");
4551    }
4552
4553    fn fields(&self, s: &mut String, prefix: &str) {
4554        w::node(s, prefix, "query", self.query.as_ref());
4555        w::list(s, prefix, "options", &self.options);
4556    }
4557}
4558
4559impl Out for FetchStmt {
4560    fn out(&self, s: &mut String) {
4561        s.push_str("FETCHSTMT");
4562        self.fields(s, "");
4563    }
4564
4565    fn fields(&self, s: &mut String, prefix: &str) {
4566        w::int(s, prefix, "direction", self.direction.0);
4567        w::int(s, prefix, "howMany", self.howMany);
4568        w::text(s, prefix, "portalname", self.portalname.as_deref());
4569        w::bool(s, prefix, "ismove", self.ismove);
4570        w::int(s, prefix, "direction_keyword", self.direction_keyword.0);
4571        w::int(s, prefix, "location", self.location);
4572    }
4573}
4574
4575impl Out for FuncCall {
4576    fn out(&self, s: &mut String) {
4577        s.push_str("FUNCCALL");
4578        self.fields(s, "");
4579    }
4580
4581    fn fields(&self, s: &mut String, prefix: &str) {
4582        w::list(s, prefix, "funcname", &self.funcname);
4583        w::list(s, prefix, "args", &self.args);
4584        w::list(s, prefix, "agg_order", &self.agg_order);
4585        w::node(s, prefix, "agg_filter", self.agg_filter.as_ref());
4586        w::boxed(s, prefix, "over", self.over.as_deref());
4587        w::int(s, prefix, "ignore_nulls", self.ignore_nulls);
4588        w::bool(s, prefix, "agg_within_group", self.agg_within_group);
4589        w::bool(s, prefix, "agg_star", self.agg_star);
4590        w::bool(s, prefix, "agg_distinct", self.agg_distinct);
4591        w::bool(s, prefix, "func_variadic", self.func_variadic);
4592        w::int(s, prefix, "funcformat", self.funcformat.0);
4593        w::int(s, prefix, "location", self.location);
4594    }
4595}
4596
4597impl Out for FunctionParameter {
4598    fn out(&self, s: &mut String) {
4599        s.push_str("FUNCTIONPARAMETER");
4600        self.fields(s, "");
4601    }
4602
4603    fn fields(&self, s: &mut String, prefix: &str) {
4604        w::text(s, prefix, "name", self.name.as_deref());
4605        w::boxed(s, prefix, "argType", self.argType.as_deref());
4606        w::int(s, prefix, "mode", self.mode.0);
4607        w::node(s, prefix, "defexpr", self.defexpr.as_ref());
4608        w::int(s, prefix, "location", self.location);
4609    }
4610}
4611
4612impl Out for GrantRoleStmt {
4613    fn out(&self, s: &mut String) {
4614        s.push_str("GRANTROLESTMT");
4615        self.fields(s, "");
4616    }
4617
4618    fn fields(&self, s: &mut String, prefix: &str) {
4619        w::list(s, prefix, "granted_roles", &self.granted_roles);
4620        w::list(s, prefix, "grantee_roles", &self.grantee_roles);
4621        w::bool(s, prefix, "is_grant", self.is_grant);
4622        w::list(s, prefix, "opt", &self.opt);
4623        w::boxed(s, prefix, "grantor", self.grantor.as_deref());
4624        w::int(s, prefix, "behavior", self.behavior.0);
4625    }
4626}
4627
4628impl Out for GrantStmt {
4629    fn out(&self, s: &mut String) {
4630        s.push_str("GRANTSTMT");
4631        self.fields(s, "");
4632    }
4633
4634    fn fields(&self, s: &mut String, prefix: &str) {
4635        w::bool(s, prefix, "is_grant", self.is_grant);
4636        w::int(s, prefix, "targtype", self.targtype.0);
4637        w::int(s, prefix, "objtype", self.objtype.0);
4638        w::list(s, prefix, "objects", &self.objects);
4639        w::list(s, prefix, "privileges", &self.privileges);
4640        w::list(s, prefix, "grantees", &self.grantees);
4641        w::bool(s, prefix, "grant_option", self.grant_option);
4642        w::boxed(s, prefix, "grantor", self.grantor.as_deref());
4643        w::int(s, prefix, "behavior", self.behavior.0);
4644    }
4645}
4646
4647impl Out for GroupingFunc {
4648    fn out(&self, s: &mut String) {
4649        s.push_str("GROUPINGFUNC");
4650        self.fields(s, "");
4651    }
4652
4653    fn fields(&self, s: &mut String, prefix: &str) {
4654        w::list(s, prefix, "args", &self.args);
4655        w::list(s, prefix, "refs", &self.refs);
4656        w::list(s, prefix, "cols", &self.cols);
4657        w::int(s, prefix, "agglevelsup", self.agglevelsup);
4658        w::int(s, prefix, "location", self.location);
4659    }
4660}
4661
4662impl Out for GroupingSet {
4663    fn out(&self, s: &mut String) {
4664        s.push_str("GROUPINGSET");
4665        self.fields(s, "");
4666    }
4667
4668    fn fields(&self, s: &mut String, prefix: &str) {
4669        w::int(s, prefix, "kind", self.kind.0);
4670        w::list(s, prefix, "content", &self.content);
4671        w::int(s, prefix, "location", self.location);
4672    }
4673}
4674
4675impl Out for ImportForeignSchemaStmt {
4676    fn out(&self, s: &mut String) {
4677        s.push_str("IMPORTFOREIGNSCHEMASTMT");
4678        self.fields(s, "");
4679    }
4680
4681    fn fields(&self, s: &mut String, prefix: &str) {
4682        w::text(s, prefix, "server_name", self.server_name.as_deref());
4683        w::text(s, prefix, "remote_schema", self.remote_schema.as_deref());
4684        w::text(s, prefix, "local_schema", self.local_schema.as_deref());
4685        w::int(s, prefix, "list_type", self.list_type.0);
4686        w::list(s, prefix, "table_list", &self.table_list);
4687        w::list(s, prefix, "options", &self.options);
4688    }
4689}
4690
4691impl Out for IndexElem {
4692    fn out(&self, s: &mut String) {
4693        s.push_str("INDEXELEM");
4694        self.fields(s, "");
4695    }
4696
4697    fn fields(&self, s: &mut String, prefix: &str) {
4698        w::text(s, prefix, "name", self.name.as_deref());
4699        w::node(s, prefix, "expr", self.expr.as_ref());
4700        w::text(s, prefix, "indexcolname", self.indexcolname.as_deref());
4701        w::list(s, prefix, "collation", &self.collation);
4702        w::list(s, prefix, "opclass", &self.opclass);
4703        w::list(s, prefix, "opclassopts", &self.opclassopts);
4704        w::int(s, prefix, "ordering", self.ordering.0);
4705        w::int(s, prefix, "nulls_ordering", self.nulls_ordering.0);
4706        w::int(s, prefix, "location", self.location);
4707    }
4708}
4709
4710impl Out for IndexStmt {
4711    fn out(&self, s: &mut String) {
4712        s.push_str("INDEXSTMT");
4713        self.fields(s, "");
4714    }
4715
4716    fn fields(&self, s: &mut String, prefix: &str) {
4717        w::text(s, prefix, "idxname", self.idxname.as_deref());
4718        w::boxed(s, prefix, "relation", self.relation.as_deref());
4719        w::text(s, prefix, "accessMethod", self.accessMethod.as_deref());
4720        w::text(s, prefix, "tableSpace", self.tableSpace.as_deref());
4721        w::list(s, prefix, "indexParams", &self.indexParams);
4722        w::list(s, prefix, "indexIncludingParams", &self.indexIncludingParams);
4723        w::list(s, prefix, "options", &self.options);
4724        w::node(s, prefix, "whereClause", self.whereClause.as_ref());
4725        w::list(s, prefix, "excludeOpNames", &self.excludeOpNames);
4726        w::text(s, prefix, "idxcomment", self.idxcomment.as_deref());
4727        w::int(s, prefix, "indexOid", self.indexOid);
4728        w::int(s, prefix, "oldNumber", self.oldNumber);
4729        w::int(s, prefix, "oldCreateSubid", self.oldCreateSubid);
4730        w::int(s, prefix, "oldFirstRelfilelocatorSubid", self.oldFirstRelfilelocatorSubid);
4731        w::bool(s, prefix, "unique", self.unique);
4732        w::bool(s, prefix, "nulls_not_distinct", self.nulls_not_distinct);
4733        w::bool(s, prefix, "primary", self.primary);
4734        w::bool(s, prefix, "isconstraint", self.isconstraint);
4735        w::bool(s, prefix, "iswithoutoverlaps", self.iswithoutoverlaps);
4736        w::bool(s, prefix, "deferrable", self.deferrable);
4737        w::bool(s, prefix, "initdeferred", self.initdeferred);
4738        w::bool(s, prefix, "transformed", self.transformed);
4739        w::bool(s, prefix, "concurrent", self.concurrent);
4740        w::bool(s, prefix, "if_not_exists", self.if_not_exists);
4741        w::bool(s, prefix, "reset_default_tblspc", self.reset_default_tblspc);
4742    }
4743}
4744
4745impl Out for InferClause {
4746    fn out(&self, s: &mut String) {
4747        s.push_str("INFERCLAUSE");
4748        self.fields(s, "");
4749    }
4750
4751    fn fields(&self, s: &mut String, prefix: &str) {
4752        w::list(s, prefix, "indexElems", &self.indexElems);
4753        w::node(s, prefix, "whereClause", self.whereClause.as_ref());
4754        w::text(s, prefix, "conname", self.conname.as_deref());
4755        w::int(s, prefix, "location", self.location);
4756    }
4757}
4758
4759impl Out for InsertStmt {
4760    fn out(&self, s: &mut String) {
4761        s.push_str("INSERTSTMT");
4762        self.fields(s, "");
4763    }
4764
4765    fn fields(&self, s: &mut String, prefix: &str) {
4766        w::boxed(s, prefix, "relation", self.relation.as_deref());
4767        w::list(s, prefix, "cols", &self.cols);
4768        w::node(s, prefix, "selectStmt", self.selectStmt.as_ref());
4769        w::boxed(s, prefix, "onConflictClause", self.onConflictClause.as_deref());
4770        w::boxed(s, prefix, "returningClause", self.returningClause.as_deref());
4771        w::boxed(s, prefix, "withClause", self.withClause.as_deref());
4772        w::int(s, prefix, "override", self.r#override.0);
4773    }
4774}
4775
4776impl Out for IntoClause {
4777    fn out(&self, s: &mut String) {
4778        s.push_str("INTOCLAUSE");
4779        self.fields(s, "");
4780    }
4781
4782    fn fields(&self, s: &mut String, prefix: &str) {
4783        w::boxed(s, prefix, "rel", self.rel.as_deref());
4784        w::list(s, prefix, "colNames", &self.colNames);
4785        w::text(s, prefix, "accessMethod", self.accessMethod.as_deref());
4786        w::list(s, prefix, "options", &self.options);
4787        w::int(s, prefix, "onCommit", self.onCommit.0);
4788        w::text(s, prefix, "tableSpaceName", self.tableSpaceName.as_deref());
4789        w::node(s, prefix, "viewQuery", self.viewQuery.as_ref());
4790        w::bool(s, prefix, "skipData", self.skipData);
4791    }
4792}
4793
4794impl Out for JoinExpr {
4795    fn out(&self, s: &mut String) {
4796        s.push_str("JOINEXPR");
4797        self.fields(s, "");
4798    }
4799
4800    fn fields(&self, s: &mut String, prefix: &str) {
4801        w::int(s, prefix, "jointype", self.jointype.0);
4802        w::bool(s, prefix, "isNatural", self.isNatural);
4803        w::node(s, prefix, "larg", self.larg.as_ref());
4804        w::node(s, prefix, "rarg", self.rarg.as_ref());
4805        w::list(s, prefix, "usingClause", &self.usingClause);
4806        w::boxed(s, prefix, "join_using_alias", self.join_using_alias.as_deref());
4807        w::node(s, prefix, "quals", self.quals.as_ref());
4808        w::boxed(s, prefix, "alias", self.alias.as_deref());
4809        w::int(s, prefix, "rtindex", self.rtindex);
4810    }
4811}
4812
4813impl Out for JsonAggConstructor {
4814    fn out(&self, s: &mut String) {
4815        s.push_str("JSONAGGCONSTRUCTOR");
4816        self.fields(s, "");
4817    }
4818
4819    fn fields(&self, s: &mut String, prefix: &str) {
4820        w::boxed(s, prefix, "output", self.output.as_deref());
4821        w::node(s, prefix, "agg_filter", self.agg_filter.as_ref());
4822        w::list(s, prefix, "agg_order", &self.agg_order);
4823        w::boxed(s, prefix, "over", self.over.as_deref());
4824        w::int(s, prefix, "location", self.location);
4825    }
4826}
4827
4828impl Out for JsonArgument {
4829    fn out(&self, s: &mut String) {
4830        s.push_str("JSONARGUMENT");
4831        self.fields(s, "");
4832    }
4833
4834    fn fields(&self, s: &mut String, prefix: &str) {
4835        w::boxed(s, prefix, "val", self.val.as_deref());
4836        w::text(s, prefix, "name", self.name.as_deref());
4837    }
4838}
4839
4840impl Out for JsonArrayAgg {
4841    fn out(&self, s: &mut String) {
4842        s.push_str("JSONARRAYAGG");
4843        self.fields(s, "");
4844    }
4845
4846    fn fields(&self, s: &mut String, prefix: &str) {
4847        w::boxed(s, prefix, "constructor", self.constructor.as_deref());
4848        w::boxed(s, prefix, "arg", self.arg.as_deref());
4849        w::bool(s, prefix, "absent_on_null", self.absent_on_null);
4850    }
4851}
4852
4853impl Out for JsonArrayConstructor {
4854    fn out(&self, s: &mut String) {
4855        s.push_str("JSONARRAYCONSTRUCTOR");
4856        self.fields(s, "");
4857    }
4858
4859    fn fields(&self, s: &mut String, prefix: &str) {
4860        w::list(s, prefix, "exprs", &self.exprs);
4861        w::boxed(s, prefix, "output", self.output.as_deref());
4862        w::bool(s, prefix, "absent_on_null", self.absent_on_null);
4863        w::int(s, prefix, "location", self.location);
4864    }
4865}
4866
4867impl Out for JsonArrayQueryConstructor {
4868    fn out(&self, s: &mut String) {
4869        s.push_str("JSONARRAYQUERYCONSTRUCTOR");
4870        self.fields(s, "");
4871    }
4872
4873    fn fields(&self, s: &mut String, prefix: &str) {
4874        w::node(s, prefix, "query", self.query.as_ref());
4875        w::boxed(s, prefix, "output", self.output.as_deref());
4876        w::boxed(s, prefix, "format", self.format.as_deref());
4877        w::bool(s, prefix, "absent_on_null", self.absent_on_null);
4878        w::int(s, prefix, "location", self.location);
4879    }
4880}
4881
4882impl Out for JsonBehavior {
4883    fn out(&self, s: &mut String) {
4884        s.push_str("JSONBEHAVIOR");
4885        self.fields(s, "");
4886    }
4887
4888    fn fields(&self, s: &mut String, prefix: &str) {
4889        w::int(s, prefix, "btype", self.btype.0);
4890        w::node(s, prefix, "expr", self.expr.as_ref());
4891        w::bool(s, prefix, "coerce", self.coerce);
4892        w::int(s, prefix, "location", self.location);
4893    }
4894}
4895
4896impl Out for JsonFormat {
4897    fn out(&self, s: &mut String) {
4898        s.push_str("JSONFORMAT");
4899        self.fields(s, "");
4900    }
4901
4902    fn fields(&self, s: &mut String, prefix: &str) {
4903        w::int(s, prefix, "format_type", self.format_type.0);
4904        w::int(s, prefix, "encoding", self.encoding.0);
4905        w::int(s, prefix, "location", self.location);
4906    }
4907}
4908
4909impl Out for JsonFuncExpr {
4910    fn out(&self, s: &mut String) {
4911        s.push_str("JSONFUNCEXPR");
4912        self.fields(s, "");
4913    }
4914
4915    fn fields(&self, s: &mut String, prefix: &str) {
4916        w::int(s, prefix, "op", self.op.0);
4917        w::text(s, prefix, "column_name", self.column_name.as_deref());
4918        w::boxed(s, prefix, "context_item", self.context_item.as_deref());
4919        w::node(s, prefix, "pathspec", self.pathspec.as_ref());
4920        w::list(s, prefix, "passing", &self.passing);
4921        w::boxed(s, prefix, "output", self.output.as_deref());
4922        w::boxed(s, prefix, "on_empty", self.on_empty.as_deref());
4923        w::boxed(s, prefix, "on_error", self.on_error.as_deref());
4924        w::int(s, prefix, "wrapper", self.wrapper.0);
4925        w::int(s, prefix, "quotes", self.quotes.0);
4926        w::int(s, prefix, "location", self.location);
4927    }
4928}
4929
4930impl Out for JsonIsPredicate {
4931    fn out(&self, s: &mut String) {
4932        s.push_str("JSONISPREDICATE");
4933        self.fields(s, "");
4934    }
4935
4936    fn fields(&self, s: &mut String, prefix: &str) {
4937        w::node(s, prefix, "expr", self.expr.as_ref());
4938        w::boxed(s, prefix, "format", self.format.as_deref());
4939        w::int(s, prefix, "item_type", self.item_type.0);
4940        w::bool(s, prefix, "unique_keys", self.unique_keys);
4941        w::int(s, prefix, "exprBaseType", self.exprBaseType);
4942        w::int(s, prefix, "location", self.location);
4943    }
4944}
4945
4946impl Out for JsonKeyValue {
4947    fn out(&self, s: &mut String) {
4948        s.push_str("JSONKEYVALUE");
4949        self.fields(s, "");
4950    }
4951
4952    fn fields(&self, s: &mut String, prefix: &str) {
4953        w::node(s, prefix, "key", self.key.as_ref());
4954        w::boxed(s, prefix, "value", self.value.as_deref());
4955    }
4956}
4957
4958impl Out for JsonObjectAgg {
4959    fn out(&self, s: &mut String) {
4960        s.push_str("JSONOBJECTAGG");
4961        self.fields(s, "");
4962    }
4963
4964    fn fields(&self, s: &mut String, prefix: &str) {
4965        w::boxed(s, prefix, "constructor", self.constructor.as_deref());
4966        w::boxed(s, prefix, "arg", self.arg.as_deref());
4967        w::bool(s, prefix, "absent_on_null", self.absent_on_null);
4968        w::bool(s, prefix, "unique", self.unique);
4969    }
4970}
4971
4972impl Out for JsonObjectConstructor {
4973    fn out(&self, s: &mut String) {
4974        s.push_str("JSONOBJECTCONSTRUCTOR");
4975        self.fields(s, "");
4976    }
4977
4978    fn fields(&self, s: &mut String, prefix: &str) {
4979        w::list(s, prefix, "exprs", &self.exprs);
4980        w::boxed(s, prefix, "output", self.output.as_deref());
4981        w::bool(s, prefix, "absent_on_null", self.absent_on_null);
4982        w::bool(s, prefix, "unique", self.unique);
4983        w::int(s, prefix, "location", self.location);
4984    }
4985}
4986
4987impl Out for JsonOutput {
4988    fn out(&self, s: &mut String) {
4989        s.push_str("JSONOUTPUT");
4990        self.fields(s, "");
4991    }
4992
4993    fn fields(&self, s: &mut String, prefix: &str) {
4994        w::boxed(s, prefix, "typeName", self.typeName.as_deref());
4995        w::boxed(s, prefix, "returning", self.returning.as_deref());
4996    }
4997}
4998
4999impl Out for JsonParseExpr {
5000    fn out(&self, s: &mut String) {
5001        s.push_str("JSONPARSEEXPR");
5002        self.fields(s, "");
5003    }
5004
5005    fn fields(&self, s: &mut String, prefix: &str) {
5006        w::boxed(s, prefix, "expr", self.expr.as_deref());
5007        w::boxed(s, prefix, "output", self.output.as_deref());
5008        w::bool(s, prefix, "unique_keys", self.unique_keys);
5009        w::int(s, prefix, "location", self.location);
5010    }
5011}
5012
5013impl Out for JsonReturning {
5014    fn out(&self, s: &mut String) {
5015        s.push_str("JSONRETURNING");
5016        self.fields(s, "");
5017    }
5018
5019    fn fields(&self, s: &mut String, prefix: &str) {
5020        w::boxed(s, prefix, "format", self.format.as_deref());
5021        w::int(s, prefix, "typid", self.typid);
5022        w::int(s, prefix, "typmod", self.typmod);
5023    }
5024}
5025
5026impl Out for JsonScalarExpr {
5027    fn out(&self, s: &mut String) {
5028        s.push_str("JSONSCALAREXPR");
5029        self.fields(s, "");
5030    }
5031
5032    fn fields(&self, s: &mut String, prefix: &str) {
5033        w::node(s, prefix, "expr", self.expr.as_ref());
5034        w::boxed(s, prefix, "output", self.output.as_deref());
5035        w::int(s, prefix, "location", self.location);
5036    }
5037}
5038
5039impl Out for JsonSerializeExpr {
5040    fn out(&self, s: &mut String) {
5041        s.push_str("JSONSERIALIZEEXPR");
5042        self.fields(s, "");
5043    }
5044
5045    fn fields(&self, s: &mut String, prefix: &str) {
5046        w::boxed(s, prefix, "expr", self.expr.as_deref());
5047        w::boxed(s, prefix, "output", self.output.as_deref());
5048        w::int(s, prefix, "location", self.location);
5049    }
5050}
5051
5052impl Out for JsonTable {
5053    fn out(&self, s: &mut String) {
5054        s.push_str("JSONTABLE");
5055        self.fields(s, "");
5056    }
5057
5058    fn fields(&self, s: &mut String, prefix: &str) {
5059        w::boxed(s, prefix, "context_item", self.context_item.as_deref());
5060        w::boxed(s, prefix, "pathspec", self.pathspec.as_deref());
5061        w::list(s, prefix, "passing", &self.passing);
5062        w::list(s, prefix, "columns", &self.columns);
5063        w::boxed(s, prefix, "on_error", self.on_error.as_deref());
5064        w::boxed(s, prefix, "alias", self.alias.as_deref());
5065        w::bool(s, prefix, "lateral", self.lateral);
5066        w::int(s, prefix, "location", self.location);
5067    }
5068}
5069
5070impl Out for JsonTableColumn {
5071    fn out(&self, s: &mut String) {
5072        s.push_str("JSONTABLECOLUMN");
5073        self.fields(s, "");
5074    }
5075
5076    fn fields(&self, s: &mut String, prefix: &str) {
5077        w::int(s, prefix, "coltype", self.coltype.0);
5078        w::text(s, prefix, "name", self.name.as_deref());
5079        w::boxed(s, prefix, "typeName", self.typeName.as_deref());
5080        w::boxed(s, prefix, "pathspec", self.pathspec.as_deref());
5081        w::boxed(s, prefix, "format", self.format.as_deref());
5082        w::int(s, prefix, "wrapper", self.wrapper.0);
5083        w::int(s, prefix, "quotes", self.quotes.0);
5084        w::list(s, prefix, "columns", &self.columns);
5085        w::boxed(s, prefix, "on_empty", self.on_empty.as_deref());
5086        w::boxed(s, prefix, "on_error", self.on_error.as_deref());
5087        w::int(s, prefix, "location", self.location);
5088    }
5089}
5090
5091impl Out for JsonTablePathSpec {
5092    fn out(&self, s: &mut String) {
5093        s.push_str("JSONTABLEPATHSPEC");
5094        self.fields(s, "");
5095    }
5096
5097    fn fields(&self, s: &mut String, prefix: &str) {
5098        w::node(s, prefix, "string", self.string.as_ref());
5099        w::text(s, prefix, "name", self.name.as_deref());
5100        w::int(s, prefix, "name_location", self.name_location);
5101        w::int(s, prefix, "location", self.location);
5102    }
5103}
5104
5105impl Out for JsonValueExpr {
5106    fn out(&self, s: &mut String) {
5107        s.push_str("JSONVALUEEXPR");
5108        self.fields(s, "");
5109    }
5110
5111    fn fields(&self, s: &mut String, prefix: &str) {
5112        w::node(s, prefix, "raw_expr", self.raw_expr.as_ref());
5113        w::node(s, prefix, "formatted_expr", self.formatted_expr.as_ref());
5114        w::boxed(s, prefix, "format", self.format.as_deref());
5115    }
5116}
5117
5118impl Out for ListenStmt {
5119    fn out(&self, s: &mut String) {
5120        s.push_str("LISTENSTMT");
5121        self.fields(s, "");
5122    }
5123
5124    fn fields(&self, s: &mut String, prefix: &str) {
5125        w::text(s, prefix, "conditionname", self.conditionname.as_deref());
5126    }
5127}
5128
5129impl Out for LoadStmt {
5130    fn out(&self, s: &mut String) {
5131        s.push_str("LOADSTMT");
5132        self.fields(s, "");
5133    }
5134
5135    fn fields(&self, s: &mut String, prefix: &str) {
5136        w::text(s, prefix, "filename", self.filename.as_deref());
5137    }
5138}
5139
5140impl Out for LockStmt {
5141    fn out(&self, s: &mut String) {
5142        s.push_str("LOCKSTMT");
5143        self.fields(s, "");
5144    }
5145
5146    fn fields(&self, s: &mut String, prefix: &str) {
5147        w::list(s, prefix, "relations", &self.relations);
5148        w::int(s, prefix, "mode", self.mode);
5149        w::bool(s, prefix, "nowait", self.nowait);
5150    }
5151}
5152
5153impl Out for LockingClause {
5154    fn out(&self, s: &mut String) {
5155        s.push_str("LOCKINGCLAUSE");
5156        self.fields(s, "");
5157    }
5158
5159    fn fields(&self, s: &mut String, prefix: &str) {
5160        w::list(s, prefix, "lockedRels", &self.lockedRels);
5161        w::int(s, prefix, "strength", self.strength.0);
5162        w::int(s, prefix, "waitPolicy", self.waitPolicy.0);
5163    }
5164}
5165
5166impl Out for MergeStmt {
5167    fn out(&self, s: &mut String) {
5168        s.push_str("MERGESTMT");
5169        self.fields(s, "");
5170    }
5171
5172    fn fields(&self, s: &mut String, prefix: &str) {
5173        w::boxed(s, prefix, "relation", self.relation.as_deref());
5174        w::node(s, prefix, "sourceRelation", self.sourceRelation.as_ref());
5175        w::node(s, prefix, "joinCondition", self.joinCondition.as_ref());
5176        w::list(s, prefix, "mergeWhenClauses", &self.mergeWhenClauses);
5177        w::boxed(s, prefix, "returningClause", self.returningClause.as_deref());
5178        w::boxed(s, prefix, "withClause", self.withClause.as_deref());
5179    }
5180}
5181
5182impl Out for MergeSupportFunc {
5183    fn out(&self, s: &mut String) {
5184        s.push_str("MERGESUPPORTFUNC");
5185        self.fields(s, "");
5186    }
5187
5188    fn fields(&self, s: &mut String, prefix: &str) {
5189        w::int(s, prefix, "msftype", self.msftype);
5190        w::int(s, prefix, "msfcollid", self.msfcollid);
5191        w::int(s, prefix, "location", self.location);
5192    }
5193}
5194
5195impl Out for MergeWhenClause {
5196    fn out(&self, s: &mut String) {
5197        s.push_str("MERGEWHENCLAUSE");
5198        self.fields(s, "");
5199    }
5200
5201    fn fields(&self, s: &mut String, prefix: &str) {
5202        w::int(s, prefix, "matchKind", self.matchKind.0);
5203        w::int(s, prefix, "commandType", self.commandType.0);
5204        w::int(s, prefix, "override", self.r#override.0);
5205        w::node(s, prefix, "condition", self.condition.as_ref());
5206        w::list(s, prefix, "targetList", &self.targetList);
5207        w::list(s, prefix, "values", &self.values);
5208    }
5209}
5210
5211impl Out for MinMaxExpr {
5212    fn out(&self, s: &mut String) {
5213        s.push_str("MINMAXEXPR");
5214        self.fields(s, "");
5215    }
5216
5217    fn fields(&self, s: &mut String, prefix: &str) {
5218        w::int(s, prefix, "minmaxtype", self.minmaxtype);
5219        w::int(s, prefix, "minmaxcollid", self.minmaxcollid);
5220        w::int(s, prefix, "inputcollid", self.inputcollid);
5221        w::int(s, prefix, "op", self.op.0);
5222        w::list(s, prefix, "args", &self.args);
5223        w::int(s, prefix, "location", self.location);
5224    }
5225}
5226
5227impl Out for MultiAssignRef {
5228    fn out(&self, s: &mut String) {
5229        s.push_str("MULTIASSIGNREF");
5230        self.fields(s, "");
5231    }
5232
5233    fn fields(&self, s: &mut String, prefix: &str) {
5234        w::node(s, prefix, "source", self.source.as_ref());
5235        w::int(s, prefix, "colno", self.colno);
5236        w::int(s, prefix, "ncolumns", self.ncolumns);
5237    }
5238}
5239
5240impl Out for NamedArgExpr {
5241    fn out(&self, s: &mut String) {
5242        s.push_str("NAMEDARGEXPR");
5243        self.fields(s, "");
5244    }
5245
5246    fn fields(&self, s: &mut String, prefix: &str) {
5247        w::node(s, prefix, "arg", self.arg.as_ref());
5248        w::text(s, prefix, "name", self.name.as_deref());
5249        w::int(s, prefix, "argnumber", self.argnumber);
5250        w::int(s, prefix, "location", self.location);
5251    }
5252}
5253
5254impl Out for NotifyStmt {
5255    fn out(&self, s: &mut String) {
5256        s.push_str("NOTIFYSTMT");
5257        self.fields(s, "");
5258    }
5259
5260    fn fields(&self, s: &mut String, prefix: &str) {
5261        w::text(s, prefix, "conditionname", self.conditionname.as_deref());
5262        w::text(s, prefix, "payload", self.payload.as_deref());
5263    }
5264}
5265
5266impl Out for NullTest {
5267    fn out(&self, s: &mut String) {
5268        s.push_str("NULLTEST");
5269        self.fields(s, "");
5270    }
5271
5272    fn fields(&self, s: &mut String, prefix: &str) {
5273        w::node(s, prefix, "arg", self.arg.as_ref());
5274        w::int(s, prefix, "nulltesttype", self.nulltesttype.0);
5275        w::bool(s, prefix, "argisrow", self.argisrow);
5276        w::int(s, prefix, "location", self.location);
5277    }
5278}
5279
5280impl Out for ObjectWithArgs {
5281    fn out(&self, s: &mut String) {
5282        s.push_str("OBJECTWITHARGS");
5283        self.fields(s, "");
5284    }
5285
5286    fn fields(&self, s: &mut String, prefix: &str) {
5287        w::list(s, prefix, "objname", &self.objname);
5288        w::list(s, prefix, "objargs", &self.objargs);
5289        w::list(s, prefix, "objfuncargs", &self.objfuncargs);
5290        w::bool(s, prefix, "args_unspecified", self.args_unspecified);
5291    }
5292}
5293
5294impl Out for OnConflictClause {
5295    fn out(&self, s: &mut String) {
5296        s.push_str("ONCONFLICTCLAUSE");
5297        self.fields(s, "");
5298    }
5299
5300    fn fields(&self, s: &mut String, prefix: &str) {
5301        w::int(s, prefix, "action", self.action.0);
5302        w::boxed(s, prefix, "infer", self.infer.as_deref());
5303        w::int(s, prefix, "lockStrength", self.lockStrength.0);
5304        w::list(s, prefix, "targetList", &self.targetList);
5305        w::node(s, prefix, "whereClause", self.whereClause.as_ref());
5306        w::int(s, prefix, "location", self.location);
5307    }
5308}
5309
5310impl Out for PLAssignStmt {
5311    fn out(&self, s: &mut String) {
5312        s.push_str("PLASSIGNSTMT");
5313        self.fields(s, "");
5314    }
5315
5316    fn fields(&self, s: &mut String, prefix: &str) {
5317        w::text(s, prefix, "name", self.name.as_deref());
5318        w::list(s, prefix, "indirection", &self.indirection);
5319        w::int(s, prefix, "nnames", self.nnames);
5320        w::boxed(s, prefix, "val", self.val.as_deref());
5321        w::int(s, prefix, "location", self.location);
5322    }
5323}
5324
5325impl Out for ParamRef {
5326    fn out(&self, s: &mut String) {
5327        s.push_str("PARAMREF");
5328        self.fields(s, "");
5329    }
5330
5331    fn fields(&self, s: &mut String, prefix: &str) {
5332        w::int(s, prefix, "number", self.number);
5333        w::int(s, prefix, "location", self.location);
5334    }
5335}
5336
5337impl Out for PartitionBoundSpec {
5338    fn out(&self, s: &mut String) {
5339        s.push_str("PARTITIONBOUNDSPEC");
5340        self.fields(s, "");
5341    }
5342
5343    fn fields(&self, s: &mut String, prefix: &str) {
5344        w::char(s, prefix, "strategy", self.strategy);
5345        w::bool(s, prefix, "is_default", self.is_default);
5346        w::int(s, prefix, "modulus", self.modulus);
5347        w::int(s, prefix, "remainder", self.remainder);
5348        w::list(s, prefix, "listdatums", &self.listdatums);
5349        w::list(s, prefix, "lowerdatums", &self.lowerdatums);
5350        w::list(s, prefix, "upperdatums", &self.upperdatums);
5351        w::int(s, prefix, "location", self.location);
5352    }
5353}
5354
5355impl Out for PartitionCmd {
5356    fn out(&self, s: &mut String) {
5357        s.push_str("PARTITIONCMD");
5358        self.fields(s, "");
5359    }
5360
5361    fn fields(&self, s: &mut String, prefix: &str) {
5362        w::boxed(s, prefix, "name", self.name.as_deref());
5363        w::boxed(s, prefix, "bound", self.bound.as_deref());
5364        w::bool(s, prefix, "concurrent", self.concurrent);
5365    }
5366}
5367
5368impl Out for PartitionElem {
5369    fn out(&self, s: &mut String) {
5370        s.push_str("PARTITIONELEM");
5371        self.fields(s, "");
5372    }
5373
5374    fn fields(&self, s: &mut String, prefix: &str) {
5375        w::text(s, prefix, "name", self.name.as_deref());
5376        w::node(s, prefix, "expr", self.expr.as_ref());
5377        w::list(s, prefix, "collation", &self.collation);
5378        w::list(s, prefix, "opclass", &self.opclass);
5379        w::int(s, prefix, "location", self.location);
5380    }
5381}
5382
5383impl Out for PartitionSpec {
5384    fn out(&self, s: &mut String) {
5385        s.push_str("PARTITIONSPEC");
5386        self.fields(s, "");
5387    }
5388
5389    fn fields(&self, s: &mut String, prefix: &str) {
5390        w::int(s, prefix, "strategy", self.strategy.0);
5391        w::list(s, prefix, "partParams", &self.partParams);
5392        w::int(s, prefix, "location", self.location);
5393    }
5394}
5395
5396impl Out for PrepareStmt {
5397    fn out(&self, s: &mut String) {
5398        s.push_str("PREPARESTMT");
5399        self.fields(s, "");
5400    }
5401
5402    fn fields(&self, s: &mut String, prefix: &str) {
5403        w::text(s, prefix, "name", self.name.as_deref());
5404        w::list(s, prefix, "argtypes", &self.argtypes);
5405        w::node(s, prefix, "query", self.query.as_ref());
5406    }
5407}
5408
5409impl Out for PublicationAllObjSpec {
5410    fn out(&self, s: &mut String) {
5411        s.push_str("PUBLICATIONALLOBJSPEC");
5412        self.fields(s, "");
5413    }
5414
5415    fn fields(&self, s: &mut String, prefix: &str) {
5416        w::int(s, prefix, "pubobjtype", self.pubobjtype.0);
5417        w::list(s, prefix, "except_tables", &self.except_tables);
5418        w::int(s, prefix, "location", self.location);
5419    }
5420}
5421
5422impl Out for PublicationObjSpec {
5423    fn out(&self, s: &mut String) {
5424        s.push_str("PUBLICATIONOBJSPEC");
5425        self.fields(s, "");
5426    }
5427
5428    fn fields(&self, s: &mut String, prefix: &str) {
5429        w::int(s, prefix, "pubobjtype", self.pubobjtype.0);
5430        w::text(s, prefix, "name", self.name.as_deref());
5431        w::boxed(s, prefix, "pubtable", self.pubtable.as_deref());
5432        w::int(s, prefix, "location", self.location);
5433    }
5434}
5435
5436impl Out for PublicationTable {
5437    fn out(&self, s: &mut String) {
5438        s.push_str("PUBLICATIONTABLE");
5439        self.fields(s, "");
5440    }
5441
5442    fn fields(&self, s: &mut String, prefix: &str) {
5443        w::boxed(s, prefix, "relation", self.relation.as_deref());
5444        w::node(s, prefix, "whereClause", self.whereClause.as_ref());
5445        w::list(s, prefix, "columns", &self.columns);
5446        w::bool(s, prefix, "except", self.except);
5447    }
5448}
5449
5450impl Out for RangeFunction {
5451    fn out(&self, s: &mut String) {
5452        s.push_str("RANGEFUNCTION");
5453        self.fields(s, "");
5454    }
5455
5456    fn fields(&self, s: &mut String, prefix: &str) {
5457        w::bool(s, prefix, "lateral", self.lateral);
5458        w::bool(s, prefix, "ordinality", self.ordinality);
5459        w::bool(s, prefix, "is_rowsfrom", self.is_rowsfrom);
5460        w::list(s, prefix, "functions", &self.functions);
5461        w::boxed(s, prefix, "alias", self.alias.as_deref());
5462        w::list(s, prefix, "coldeflist", &self.coldeflist);
5463    }
5464}
5465
5466impl Out for RangeSubselect {
5467    fn out(&self, s: &mut String) {
5468        s.push_str("RANGESUBSELECT");
5469        self.fields(s, "");
5470    }
5471
5472    fn fields(&self, s: &mut String, prefix: &str) {
5473        w::bool(s, prefix, "lateral", self.lateral);
5474        w::node(s, prefix, "subquery", self.subquery.as_ref());
5475        w::boxed(s, prefix, "alias", self.alias.as_deref());
5476    }
5477}
5478
5479impl Out for RangeTableFunc {
5480    fn out(&self, s: &mut String) {
5481        s.push_str("RANGETABLEFUNC");
5482        self.fields(s, "");
5483    }
5484
5485    fn fields(&self, s: &mut String, prefix: &str) {
5486        w::bool(s, prefix, "lateral", self.lateral);
5487        w::node(s, prefix, "docexpr", self.docexpr.as_ref());
5488        w::node(s, prefix, "rowexpr", self.rowexpr.as_ref());
5489        w::list(s, prefix, "namespaces", &self.namespaces);
5490        w::list(s, prefix, "columns", &self.columns);
5491        w::boxed(s, prefix, "alias", self.alias.as_deref());
5492        w::int(s, prefix, "location", self.location);
5493    }
5494}
5495
5496impl Out for RangeTableFuncCol {
5497    fn out(&self, s: &mut String) {
5498        s.push_str("RANGETABLEFUNCCOL");
5499        self.fields(s, "");
5500    }
5501
5502    fn fields(&self, s: &mut String, prefix: &str) {
5503        w::text(s, prefix, "colname", self.colname.as_deref());
5504        w::boxed(s, prefix, "typeName", self.typeName.as_deref());
5505        w::bool(s, prefix, "for_ordinality", self.for_ordinality);
5506        w::bool(s, prefix, "is_not_null", self.is_not_null);
5507        w::node(s, prefix, "colexpr", self.colexpr.as_ref());
5508        w::node(s, prefix, "coldefexpr", self.coldefexpr.as_ref());
5509        w::int(s, prefix, "location", self.location);
5510    }
5511}
5512
5513impl Out for RangeTableSample {
5514    fn out(&self, s: &mut String) {
5515        s.push_str("RANGETABLESAMPLE");
5516        self.fields(s, "");
5517    }
5518
5519    fn fields(&self, s: &mut String, prefix: &str) {
5520        w::node(s, prefix, "relation", self.relation.as_ref());
5521        w::list(s, prefix, "method", &self.method);
5522        w::list(s, prefix, "args", &self.args);
5523        w::node(s, prefix, "repeatable", self.repeatable.as_ref());
5524        w::int(s, prefix, "location", self.location);
5525    }
5526}
5527
5528impl Out for RangeVar {
5529    fn out(&self, s: &mut String) {
5530        s.push_str("RANGEVAR");
5531        self.fields(s, "");
5532    }
5533
5534    fn fields(&self, s: &mut String, prefix: &str) {
5535        w::text(s, prefix, "catalogname", self.catalogname.as_deref());
5536        w::text(s, prefix, "schemaname", self.schemaname.as_deref());
5537        w::text(s, prefix, "relname", self.relname.as_deref());
5538        w::bool(s, prefix, "inh", self.inh);
5539        w::char(s, prefix, "relpersistence", self.relpersistence);
5540        w::boxed(s, prefix, "alias", self.alias.as_deref());
5541        w::int(s, prefix, "location", self.location);
5542    }
5543}
5544
5545impl Out for RawStmt {
5546    fn out(&self, s: &mut String) {
5547        s.push_str("RAWSTMT");
5548        self.fields(s, "");
5549    }
5550
5551    fn fields(&self, s: &mut String, prefix: &str) {
5552        w::node(s, prefix, "stmt", self.stmt.as_ref());
5553        w::int(s, prefix, "stmt_location", self.stmt_location);
5554        w::int(s, prefix, "stmt_len", self.stmt_len);
5555    }
5556}
5557
5558impl Out for ReassignOwnedStmt {
5559    fn out(&self, s: &mut String) {
5560        s.push_str("REASSIGNOWNEDSTMT");
5561        self.fields(s, "");
5562    }
5563
5564    fn fields(&self, s: &mut String, prefix: &str) {
5565        w::list(s, prefix, "roles", &self.roles);
5566        w::boxed(s, prefix, "newrole", self.newrole.as_deref());
5567    }
5568}
5569
5570impl Out for RefreshMatViewStmt {
5571    fn out(&self, s: &mut String) {
5572        s.push_str("REFRESHMATVIEWSTMT");
5573        self.fields(s, "");
5574    }
5575
5576    fn fields(&self, s: &mut String, prefix: &str) {
5577        w::bool(s, prefix, "concurrent", self.concurrent);
5578        w::bool(s, prefix, "skipData", self.skipData);
5579        w::boxed(s, prefix, "relation", self.relation.as_deref());
5580    }
5581}
5582
5583impl Out for ReindexStmt {
5584    fn out(&self, s: &mut String) {
5585        s.push_str("REINDEXSTMT");
5586        self.fields(s, "");
5587    }
5588
5589    fn fields(&self, s: &mut String, prefix: &str) {
5590        w::int(s, prefix, "kind", self.kind.0);
5591        w::boxed(s, prefix, "relation", self.relation.as_deref());
5592        w::text(s, prefix, "name", self.name.as_deref());
5593        w::list(s, prefix, "params", &self.params);
5594    }
5595}
5596
5597impl Out for RenameStmt {
5598    fn out(&self, s: &mut String) {
5599        s.push_str("RENAMESTMT");
5600        self.fields(s, "");
5601    }
5602
5603    fn fields(&self, s: &mut String, prefix: &str) {
5604        w::int(s, prefix, "renameType", self.renameType.0);
5605        w::int(s, prefix, "relationType", self.relationType.0);
5606        w::boxed(s, prefix, "relation", self.relation.as_deref());
5607        w::node(s, prefix, "object", self.object.as_ref());
5608        w::text(s, prefix, "subname", self.subname.as_deref());
5609        w::text(s, prefix, "newname", self.newname.as_deref());
5610        w::int(s, prefix, "behavior", self.behavior.0);
5611        w::bool(s, prefix, "missing_ok", self.missing_ok);
5612    }
5613}
5614
5615impl Out for RepackStmt {
5616    fn out(&self, s: &mut String) {
5617        s.push_str("REPACKSTMT");
5618        self.fields(s, "");
5619    }
5620
5621    fn fields(&self, s: &mut String, prefix: &str) {
5622        w::int(s, prefix, "command", self.command.0);
5623        w::boxed(s, prefix, "relation", self.relation.as_deref());
5624        w::text(s, prefix, "indexname", self.indexname.as_deref());
5625        w::bool(s, prefix, "usingindex", self.usingindex);
5626        w::list(s, prefix, "params", &self.params);
5627    }
5628}
5629
5630impl Out for ReplicaIdentityStmt {
5631    fn out(&self, s: &mut String) {
5632        s.push_str("REPLICAIDENTITYSTMT");
5633        self.fields(s, "");
5634    }
5635
5636    fn fields(&self, s: &mut String, prefix: &str) {
5637        w::char(s, prefix, "identity_type", self.identity_type);
5638        w::text(s, prefix, "name", self.name.as_deref());
5639    }
5640}
5641
5642impl Out for ResTarget {
5643    fn out(&self, s: &mut String) {
5644        s.push_str("RESTARGET");
5645        self.fields(s, "");
5646    }
5647
5648    fn fields(&self, s: &mut String, prefix: &str) {
5649        w::text(s, prefix, "name", self.name.as_deref());
5650        w::list(s, prefix, "indirection", &self.indirection);
5651        w::node(s, prefix, "val", self.val.as_ref());
5652        w::int(s, prefix, "location", self.location);
5653    }
5654}
5655
5656impl Out for ReturnStmt {
5657    fn out(&self, s: &mut String) {
5658        s.push_str("RETURNSTMT");
5659        self.fields(s, "");
5660    }
5661
5662    fn fields(&self, s: &mut String, prefix: &str) {
5663        w::node(s, prefix, "returnval", self.returnval.as_ref());
5664    }
5665}
5666
5667impl Out for ReturningClause {
5668    fn out(&self, s: &mut String) {
5669        s.push_str("RETURNINGCLAUSE");
5670        self.fields(s, "");
5671    }
5672
5673    fn fields(&self, s: &mut String, prefix: &str) {
5674        w::list(s, prefix, "options", &self.options);
5675        w::list(s, prefix, "exprs", &self.exprs);
5676    }
5677}
5678
5679impl Out for ReturningOption {
5680    fn out(&self, s: &mut String) {
5681        s.push_str("RETURNINGOPTION");
5682        self.fields(s, "");
5683    }
5684
5685    fn fields(&self, s: &mut String, prefix: &str) {
5686        w::int(s, prefix, "option", self.option.0);
5687        w::text(s, prefix, "value", self.value.as_deref());
5688        w::int(s, prefix, "location", self.location);
5689    }
5690}
5691
5692impl Out for RoleSpec {
5693    fn out(&self, s: &mut String) {
5694        s.push_str("ROLESPEC");
5695        self.fields(s, "");
5696    }
5697
5698    fn fields(&self, s: &mut String, prefix: &str) {
5699        w::int(s, prefix, "roletype", self.roletype.0);
5700        w::text(s, prefix, "rolename", self.rolename.as_deref());
5701        w::int(s, prefix, "location", self.location);
5702    }
5703}
5704
5705impl Out for RowExpr {
5706    fn out(&self, s: &mut String) {
5707        s.push_str("ROWEXPR");
5708        self.fields(s, "");
5709    }
5710
5711    fn fields(&self, s: &mut String, prefix: &str) {
5712        w::list(s, prefix, "args", &self.args);
5713        w::int(s, prefix, "row_typeid", self.row_typeid);
5714        w::int(s, prefix, "row_format", self.row_format.0);
5715        w::list(s, prefix, "colnames", &self.colnames);
5716        w::int(s, prefix, "location", self.location);
5717    }
5718}
5719
5720impl Out for RuleStmt {
5721    fn out(&self, s: &mut String) {
5722        s.push_str("RULESTMT");
5723        self.fields(s, "");
5724    }
5725
5726    fn fields(&self, s: &mut String, prefix: &str) {
5727        w::boxed(s, prefix, "relation", self.relation.as_deref());
5728        w::text(s, prefix, "rulename", self.rulename.as_deref());
5729        w::node(s, prefix, "whereClause", self.whereClause.as_ref());
5730        w::int(s, prefix, "event", self.event.0);
5731        w::bool(s, prefix, "instead", self.instead);
5732        w::list(s, prefix, "actions", &self.actions);
5733        w::bool(s, prefix, "replace", self.replace);
5734    }
5735}
5736
5737impl Out for SQLValueFunction {
5738    fn out(&self, s: &mut String) {
5739        s.push_str("SQLVALUEFUNCTION");
5740        self.fields(s, "");
5741    }
5742
5743    fn fields(&self, s: &mut String, prefix: &str) {
5744        w::int(s, prefix, "op", self.op.0);
5745        w::int(s, prefix, "type", self.r#type);
5746        w::int(s, prefix, "typmod", self.typmod);
5747        w::int(s, prefix, "location", self.location);
5748    }
5749}
5750
5751impl Out for SecLabelStmt {
5752    fn out(&self, s: &mut String) {
5753        s.push_str("SECLABELSTMT");
5754        self.fields(s, "");
5755    }
5756
5757    fn fields(&self, s: &mut String, prefix: &str) {
5758        w::int(s, prefix, "objtype", self.objtype.0);
5759        w::node(s, prefix, "object", self.object.as_ref());
5760        w::text(s, prefix, "provider", self.provider.as_deref());
5761        w::text(s, prefix, "label", self.label.as_deref());
5762    }
5763}
5764
5765impl Out for SelectStmt {
5766    fn out(&self, s: &mut String) {
5767        s.push_str("SELECTSTMT");
5768        self.fields(s, "");
5769    }
5770
5771    fn fields(&self, s: &mut String, prefix: &str) {
5772        w::list(s, prefix, "distinctClause", &self.distinctClause);
5773        w::boxed(s, prefix, "intoClause", self.intoClause.as_deref());
5774        w::list(s, prefix, "targetList", &self.targetList);
5775        w::list(s, prefix, "fromClause", &self.fromClause);
5776        w::node(s, prefix, "whereClause", self.whereClause.as_ref());
5777        w::list(s, prefix, "groupClause", &self.groupClause);
5778        w::bool(s, prefix, "groupDistinct", self.groupDistinct);
5779        w::node(s, prefix, "havingClause", self.havingClause.as_ref());
5780        w::list(s, prefix, "windowClause", &self.windowClause);
5781        w::list(s, prefix, "valuesLists", &self.valuesLists);
5782        w::list(s, prefix, "sortClause", &self.sortClause);
5783        w::node(s, prefix, "limitOffset", self.limitOffset.as_ref());
5784        w::node(s, prefix, "limitCount", self.limitCount.as_ref());
5785        w::int(s, prefix, "limitOption", self.limitOption.0);
5786        w::list(s, prefix, "lockingClause", &self.lockingClause);
5787        w::boxed(s, prefix, "withClause", self.withClause.as_deref());
5788        w::int(s, prefix, "op", self.op.0);
5789        w::bool(s, prefix, "all", self.all);
5790        w::boxed(s, prefix, "larg", self.larg.as_deref());
5791        w::boxed(s, prefix, "rarg", self.rarg.as_deref());
5792    }
5793}
5794
5795impl Out for SetToDefault {
5796    fn out(&self, s: &mut String) {
5797        s.push_str("SETTODEFAULT");
5798        self.fields(s, "");
5799    }
5800
5801    fn fields(&self, s: &mut String, prefix: &str) {
5802        w::int(s, prefix, "typeId", self.typeId);
5803        w::int(s, prefix, "typeMod", self.typeMod);
5804        w::int(s, prefix, "collation", self.collation);
5805        w::int(s, prefix, "location", self.location);
5806    }
5807}
5808
5809impl Out for SortBy {
5810    fn out(&self, s: &mut String) {
5811        s.push_str("SORTBY");
5812        self.fields(s, "");
5813    }
5814
5815    fn fields(&self, s: &mut String, prefix: &str) {
5816        w::node(s, prefix, "node", self.node.as_ref());
5817        w::int(s, prefix, "sortby_dir", self.sortby_dir.0);
5818        w::int(s, prefix, "sortby_nulls", self.sortby_nulls.0);
5819        w::list(s, prefix, "useOp", &self.useOp);
5820        w::int(s, prefix, "location", self.location);
5821    }
5822}
5823
5824impl Out for StatsElem {
5825    fn out(&self, s: &mut String) {
5826        s.push_str("STATSELEM");
5827        self.fields(s, "");
5828    }
5829
5830    fn fields(&self, s: &mut String, prefix: &str) {
5831        w::text(s, prefix, "name", self.name.as_deref());
5832        w::node(s, prefix, "expr", self.expr.as_ref());
5833    }
5834}
5835
5836impl Out for SubLink {
5837    fn out(&self, s: &mut String) {
5838        s.push_str("SUBLINK");
5839        self.fields(s, "");
5840    }
5841
5842    fn fields(&self, s: &mut String, prefix: &str) {
5843        w::int(s, prefix, "subLinkType", self.subLinkType.0);
5844        w::int(s, prefix, "subLinkId", self.subLinkId);
5845        w::node(s, prefix, "testexpr", self.testexpr.as_ref());
5846        w::list(s, prefix, "operName", &self.operName);
5847        w::node(s, prefix, "subselect", self.subselect.as_ref());
5848        w::int(s, prefix, "location", self.location);
5849    }
5850}
5851
5852impl Out for TableLikeClause {
5853    fn out(&self, s: &mut String) {
5854        s.push_str("TABLELIKECLAUSE");
5855        self.fields(s, "");
5856    }
5857
5858    fn fields(&self, s: &mut String, prefix: &str) {
5859        w::boxed(s, prefix, "relation", self.relation.as_deref());
5860        w::int(s, prefix, "options", self.options);
5861        w::int(s, prefix, "relationOid", self.relationOid);
5862    }
5863}
5864
5865impl Out for TransactionStmt {
5866    fn out(&self, s: &mut String) {
5867        s.push_str("TRANSACTIONSTMT");
5868        self.fields(s, "");
5869    }
5870
5871    fn fields(&self, s: &mut String, prefix: &str) {
5872        w::int(s, prefix, "kind", self.kind.0);
5873        w::list(s, prefix, "options", &self.options);
5874        w::text(s, prefix, "savepoint_name", self.savepoint_name.as_deref());
5875        w::text(s, prefix, "gid", self.gid.as_deref());
5876        w::bool(s, prefix, "chain", self.chain);
5877        w::int(s, prefix, "location", self.location);
5878    }
5879}
5880
5881impl Out for TriggerTransition {
5882    fn out(&self, s: &mut String) {
5883        s.push_str("TRIGGERTRANSITION");
5884        self.fields(s, "");
5885    }
5886
5887    fn fields(&self, s: &mut String, prefix: &str) {
5888        w::text(s, prefix, "name", self.name.as_deref());
5889        w::bool(s, prefix, "isNew", self.isNew);
5890        w::bool(s, prefix, "isTable", self.isTable);
5891    }
5892}
5893
5894impl Out for TruncateStmt {
5895    fn out(&self, s: &mut String) {
5896        s.push_str("TRUNCATESTMT");
5897        self.fields(s, "");
5898    }
5899
5900    fn fields(&self, s: &mut String, prefix: &str) {
5901        w::list(s, prefix, "relations", &self.relations);
5902        w::bool(s, prefix, "restart_seqs", self.restart_seqs);
5903        w::int(s, prefix, "behavior", self.behavior.0);
5904    }
5905}
5906
5907impl Out for TypeCast {
5908    fn out(&self, s: &mut String) {
5909        s.push_str("TYPECAST");
5910        self.fields(s, "");
5911    }
5912
5913    fn fields(&self, s: &mut String, prefix: &str) {
5914        w::node(s, prefix, "arg", self.arg.as_ref());
5915        w::boxed(s, prefix, "typeName", self.typeName.as_deref());
5916        w::int(s, prefix, "location", self.location);
5917    }
5918}
5919
5920impl Out for TypeName {
5921    fn out(&self, s: &mut String) {
5922        s.push_str("TYPENAME");
5923        self.fields(s, "");
5924    }
5925
5926    fn fields(&self, s: &mut String, prefix: &str) {
5927        w::list(s, prefix, "names", &self.names);
5928        w::int(s, prefix, "typeOid", self.typeOid);
5929        w::bool(s, prefix, "setof", self.setof);
5930        w::bool(s, prefix, "pct_type", self.pct_type);
5931        w::list(s, prefix, "typmods", &self.typmods);
5932        w::int(s, prefix, "typemod", self.typemod);
5933        w::list(s, prefix, "arrayBounds", &self.arrayBounds);
5934        w::int(s, prefix, "location", self.location);
5935    }
5936}
5937
5938impl Out for UnlistenStmt {
5939    fn out(&self, s: &mut String) {
5940        s.push_str("UNLISTENSTMT");
5941        self.fields(s, "");
5942    }
5943
5944    fn fields(&self, s: &mut String, prefix: &str) {
5945        w::text(s, prefix, "conditionname", self.conditionname.as_deref());
5946    }
5947}
5948
5949impl Out for UpdateStmt {
5950    fn out(&self, s: &mut String) {
5951        s.push_str("UPDATESTMT");
5952        self.fields(s, "");
5953    }
5954
5955    fn fields(&self, s: &mut String, prefix: &str) {
5956        w::boxed(s, prefix, "relation", self.relation.as_deref());
5957        w::list(s, prefix, "targetList", &self.targetList);
5958        w::node(s, prefix, "whereClause", self.whereClause.as_ref());
5959        w::list(s, prefix, "fromClause", &self.fromClause);
5960        w::boxed(s, prefix, "returningClause", self.returningClause.as_deref());
5961        w::boxed(s, prefix, "withClause", self.withClause.as_deref());
5962    }
5963}
5964
5965impl Out for VacuumRelation {
5966    fn out(&self, s: &mut String) {
5967        s.push_str("VACUUMRELATION");
5968        self.fields(s, "");
5969    }
5970
5971    fn fields(&self, s: &mut String, prefix: &str) {
5972        w::boxed(s, prefix, "relation", self.relation.as_deref());
5973        w::int(s, prefix, "oid", self.oid);
5974        w::list(s, prefix, "va_cols", &self.va_cols);
5975    }
5976}
5977
5978impl Out for VacuumStmt {
5979    fn out(&self, s: &mut String) {
5980        s.push_str("VACUUMSTMT");
5981        self.fields(s, "");
5982    }
5983
5984    fn fields(&self, s: &mut String, prefix: &str) {
5985        w::list(s, prefix, "options", &self.options);
5986        w::list(s, prefix, "rels", &self.rels);
5987        w::bool(s, prefix, "is_vacuumcmd", self.is_vacuumcmd);
5988    }
5989}
5990
5991impl Out for VariableSetStmt {
5992    fn out(&self, s: &mut String) {
5993        s.push_str("VARIABLESETSTMT");
5994        self.fields(s, "");
5995    }
5996
5997    fn fields(&self, s: &mut String, prefix: &str) {
5998        w::int(s, prefix, "kind", self.kind.0);
5999        w::text(s, prefix, "name", self.name.as_deref());
6000        w::list(s, prefix, "args", &self.args);
6001        w::bool(s, prefix, "jumble_args", self.jumble_args);
6002        w::bool(s, prefix, "is_local", self.is_local);
6003        w::int(s, prefix, "location", self.location);
6004    }
6005}
6006
6007impl Out for VariableShowStmt {
6008    fn out(&self, s: &mut String) {
6009        s.push_str("VARIABLESHOWSTMT");
6010        self.fields(s, "");
6011    }
6012
6013    fn fields(&self, s: &mut String, prefix: &str) {
6014        w::text(s, prefix, "name", self.name.as_deref());
6015    }
6016}
6017
6018impl Out for ViewStmt {
6019    fn out(&self, s: &mut String) {
6020        s.push_str("VIEWSTMT");
6021        self.fields(s, "");
6022    }
6023
6024    fn fields(&self, s: &mut String, prefix: &str) {
6025        w::boxed(s, prefix, "view", self.view.as_deref());
6026        w::list(s, prefix, "aliases", &self.aliases);
6027        w::node(s, prefix, "query", self.query.as_ref());
6028        w::bool(s, prefix, "replace", self.replace);
6029        w::list(s, prefix, "options", &self.options);
6030        w::int(s, prefix, "withCheckOption", self.withCheckOption.0);
6031    }
6032}
6033
6034impl Out for WaitStmt {
6035    fn out(&self, s: &mut String) {
6036        s.push_str("WAITSTMT");
6037        self.fields(s, "");
6038    }
6039
6040    fn fields(&self, s: &mut String, prefix: &str) {
6041        w::text(s, prefix, "lsn_literal", self.lsn_literal.as_deref());
6042        w::list(s, prefix, "options", &self.options);
6043        w::int(s, prefix, "lsn_location", self.lsn_location);
6044    }
6045}
6046
6047impl Out for WindowDef {
6048    fn out(&self, s: &mut String) {
6049        s.push_str("WINDOWDEF");
6050        self.fields(s, "");
6051    }
6052
6053    fn fields(&self, s: &mut String, prefix: &str) {
6054        w::text(s, prefix, "name", self.name.as_deref());
6055        w::text(s, prefix, "refname", self.refname.as_deref());
6056        w::list(s, prefix, "partitionClause", &self.partitionClause);
6057        w::list(s, prefix, "orderClause", &self.orderClause);
6058        w::int(s, prefix, "frameOptions", self.frameOptions);
6059        w::node(s, prefix, "startOffset", self.startOffset.as_ref());
6060        w::node(s, prefix, "endOffset", self.endOffset.as_ref());
6061        w::int(s, prefix, "location", self.location);
6062    }
6063}
6064
6065impl Out for WithClause {
6066    fn out(&self, s: &mut String) {
6067        s.push_str("WITHCLAUSE");
6068        self.fields(s, "");
6069    }
6070
6071    fn fields(&self, s: &mut String, prefix: &str) {
6072        w::list(s, prefix, "ctes", &self.ctes);
6073        w::bool(s, prefix, "recursive", self.recursive);
6074        w::int(s, prefix, "location", self.location);
6075    }
6076}
6077
6078impl Out for XmlExpr {
6079    fn out(&self, s: &mut String) {
6080        s.push_str("XMLEXPR");
6081        self.fields(s, "");
6082    }
6083
6084    fn fields(&self, s: &mut String, prefix: &str) {
6085        w::int(s, prefix, "op", self.op.0);
6086        w::text(s, prefix, "name", self.name.as_deref());
6087        w::list(s, prefix, "named_args", &self.named_args);
6088        w::list(s, prefix, "arg_names", &self.arg_names);
6089        w::list(s, prefix, "args", &self.args);
6090        w::int(s, prefix, "xmloption", self.xmloption.0);
6091        w::bool(s, prefix, "indent", self.indent);
6092        w::int(s, prefix, "type", self.r#type);
6093        w::int(s, prefix, "typmod", self.typmod);
6094        w::int(s, prefix, "location", self.location);
6095    }
6096}
6097
6098impl Out for XmlSerialize {
6099    fn out(&self, s: &mut String) {
6100        s.push_str("XMLSERIALIZE");
6101        self.fields(s, "");
6102    }
6103
6104    fn fields(&self, s: &mut String, prefix: &str) {
6105        w::int(s, prefix, "xmloption", self.xmloption.0);
6106        w::node(s, prefix, "expr", self.expr.as_ref());
6107        w::boxed(s, prefix, "typeName", self.typeName.as_deref());
6108        w::bool(s, prefix, "indent", self.indent);
6109        w::int(s, prefix, "location", self.location);
6110    }
6111}
6112
6113impl Equal for ATAlterConstraint {
6114    fn equal(&self, other: &Self) -> bool {
6115        self.conname == other.conname
6116            && self.alterEnforceability == other.alterEnforceability
6117            && self.is_enforced == other.is_enforced
6118            && self.alterDeferrability == other.alterDeferrability
6119            && self.deferrable == other.deferrable
6120            && self.initdeferred == other.initdeferred
6121            && self.alterInheritability == other.alterInheritability
6122            && self.noinherit == other.noinherit
6123    }
6124}
6125
6126impl Equal for A_ArrayExpr {
6127    fn equal(&self, other: &Self) -> bool {
6128        self.elements.equal(&other.elements)
6129    }
6130}
6131
6132impl Equal for A_Const {
6133    fn equal(&self, other: &Self) -> bool {
6134        self.val.equal(&other.val) && self.isnull == other.isnull
6135    }
6136}
6137
6138impl Equal for A_Expr {
6139    fn equal(&self, other: &Self) -> bool {
6140        self.kind == other.kind
6141            && self.name.equal(&other.name)
6142            && self.lexpr.equal(&other.lexpr)
6143            && self.rexpr.equal(&other.rexpr)
6144    }
6145}
6146
6147impl Equal for A_Indices {
6148    fn equal(&self, other: &Self) -> bool {
6149        self.is_slice == other.is_slice
6150            && self.lidx.equal(&other.lidx)
6151            && self.uidx.equal(&other.uidx)
6152    }
6153}
6154
6155impl Equal for A_Indirection {
6156    fn equal(&self, other: &Self) -> bool {
6157        self.arg.equal(&other.arg) && self.indirection.equal(&other.indirection)
6158    }
6159}
6160
6161impl Equal for A_Star {
6162    fn equal(&self, _: &Self) -> bool {
6163        true
6164    }
6165}
6166
6167impl Equal for AccessPriv {
6168    fn equal(&self, other: &Self) -> bool {
6169        self.priv_name == other.priv_name && self.cols.equal(&other.cols)
6170    }
6171}
6172
6173impl Equal for Alias {
6174    fn equal(&self, other: &Self) -> bool {
6175        self.aliasname == other.aliasname && self.colnames.equal(&other.colnames)
6176    }
6177}
6178
6179impl Equal for AlterCollationStmt {
6180    fn equal(&self, other: &Self) -> bool {
6181        self.collname.equal(&other.collname)
6182    }
6183}
6184
6185impl Equal for AlterDatabaseRefreshCollStmt {
6186    fn equal(&self, other: &Self) -> bool {
6187        self.dbname == other.dbname
6188    }
6189}
6190
6191impl Equal for AlterDatabaseSetStmt {
6192    fn equal(&self, other: &Self) -> bool {
6193        self.dbname == other.dbname && self.setstmt.equal(&other.setstmt)
6194    }
6195}
6196
6197impl Equal for AlterDatabaseStmt {
6198    fn equal(&self, other: &Self) -> bool {
6199        self.dbname == other.dbname && self.options.equal(&other.options)
6200    }
6201}
6202
6203impl Equal for AlterDefaultPrivilegesStmt {
6204    fn equal(&self, other: &Self) -> bool {
6205        self.options.equal(&other.options) && self.action.equal(&other.action)
6206    }
6207}
6208
6209impl Equal for AlterDomainStmt {
6210    fn equal(&self, other: &Self) -> bool {
6211        self.subtype == other.subtype
6212            && self.typeName.equal(&other.typeName)
6213            && self.name == other.name
6214            && self.def.equal(&other.def)
6215            && self.behavior == other.behavior
6216            && self.missing_ok == other.missing_ok
6217    }
6218}
6219
6220impl Equal for AlterEnumStmt {
6221    fn equal(&self, other: &Self) -> bool {
6222        self.typeName.equal(&other.typeName)
6223            && self.oldVal == other.oldVal
6224            && self.newVal == other.newVal
6225            && self.newValNeighbor == other.newValNeighbor
6226            && self.newValIsAfter == other.newValIsAfter
6227            && self.skipIfNewValExists == other.skipIfNewValExists
6228    }
6229}
6230
6231impl Equal for AlterEventTrigStmt {
6232    fn equal(&self, other: &Self) -> bool {
6233        self.trigname == other.trigname && self.tgenabled == other.tgenabled
6234    }
6235}
6236
6237impl Equal for AlterExtensionContentsStmt {
6238    fn equal(&self, other: &Self) -> bool {
6239        self.extname == other.extname
6240            && self.action == other.action
6241            && self.objtype == other.objtype
6242            && self.object.equal(&other.object)
6243    }
6244}
6245
6246impl Equal for AlterExtensionStmt {
6247    fn equal(&self, other: &Self) -> bool {
6248        self.extname == other.extname && self.options.equal(&other.options)
6249    }
6250}
6251
6252impl Equal for AlterFdwStmt {
6253    fn equal(&self, other: &Self) -> bool {
6254        self.fdwname == other.fdwname
6255            && self.func_options.equal(&other.func_options)
6256            && self.options.equal(&other.options)
6257    }
6258}
6259
6260impl Equal for AlterForeignServerStmt {
6261    fn equal(&self, other: &Self) -> bool {
6262        self.servername == other.servername
6263            && self.version == other.version
6264            && self.options.equal(&other.options)
6265            && self.has_version == other.has_version
6266    }
6267}
6268
6269impl Equal for AlterFunctionStmt {
6270    fn equal(&self, other: &Self) -> bool {
6271        self.objtype == other.objtype
6272            && self.func.equal(&other.func)
6273            && self.actions.equal(&other.actions)
6274    }
6275}
6276
6277impl Equal for AlterObjectDependsStmt {
6278    fn equal(&self, other: &Self) -> bool {
6279        self.objectType == other.objectType
6280            && self.relation.equal(&other.relation)
6281            && self.object.equal(&other.object)
6282            && self.extname.equal(&other.extname)
6283            && self.remove == other.remove
6284    }
6285}
6286
6287impl Equal for AlterObjectSchemaStmt {
6288    fn equal(&self, other: &Self) -> bool {
6289        self.objectType == other.objectType
6290            && self.relation.equal(&other.relation)
6291            && self.object.equal(&other.object)
6292            && self.newschema == other.newschema
6293            && self.missing_ok == other.missing_ok
6294    }
6295}
6296
6297impl Equal for AlterOpFamilyStmt {
6298    fn equal(&self, other: &Self) -> bool {
6299        self.opfamilyname.equal(&other.opfamilyname)
6300            && self.amname == other.amname
6301            && self.isDrop == other.isDrop
6302            && self.items.equal(&other.items)
6303    }
6304}
6305
6306impl Equal for AlterOperatorStmt {
6307    fn equal(&self, other: &Self) -> bool {
6308        self.opername.equal(&other.opername) && self.options.equal(&other.options)
6309    }
6310}
6311
6312impl Equal for AlterOwnerStmt {
6313    fn equal(&self, other: &Self) -> bool {
6314        self.objectType == other.objectType
6315            && self.relation.equal(&other.relation)
6316            && self.object.equal(&other.object)
6317            && self.newowner.equal(&other.newowner)
6318    }
6319}
6320
6321impl Equal for AlterPolicyStmt {
6322    fn equal(&self, other: &Self) -> bool {
6323        self.policy_name == other.policy_name
6324            && self.table.equal(&other.table)
6325            && self.roles.equal(&other.roles)
6326            && self.qual.equal(&other.qual)
6327            && self.with_check.equal(&other.with_check)
6328    }
6329}
6330
6331impl Equal for AlterPublicationStmt {
6332    fn equal(&self, other: &Self) -> bool {
6333        self.pubname == other.pubname
6334            && self.options.equal(&other.options)
6335            && self.pubobjects.equal(&other.pubobjects)
6336            && self.action == other.action
6337            && self.for_all_tables == other.for_all_tables
6338            && self.for_all_sequences == other.for_all_sequences
6339    }
6340}
6341
6342impl Equal for AlterRoleSetStmt {
6343    fn equal(&self, other: &Self) -> bool {
6344        self.role.equal(&other.role)
6345            && self.database == other.database
6346            && self.setstmt.equal(&other.setstmt)
6347    }
6348}
6349
6350impl Equal for AlterRoleStmt {
6351    fn equal(&self, other: &Self) -> bool {
6352        self.role.equal(&other.role)
6353            && self.options.equal(&other.options)
6354            && self.action == other.action
6355    }
6356}
6357
6358impl Equal for AlterSeqStmt {
6359    fn equal(&self, other: &Self) -> bool {
6360        self.sequence.equal(&other.sequence)
6361            && self.options.equal(&other.options)
6362            && self.for_identity == other.for_identity
6363            && self.missing_ok == other.missing_ok
6364    }
6365}
6366
6367impl Equal for AlterStatsStmt {
6368    fn equal(&self, other: &Self) -> bool {
6369        self.defnames.equal(&other.defnames)
6370            && self.stxstattarget.equal(&other.stxstattarget)
6371            && self.missing_ok == other.missing_ok
6372    }
6373}
6374
6375impl Equal for AlterSubscriptionStmt {
6376    fn equal(&self, other: &Self) -> bool {
6377        self.kind == other.kind
6378            && self.subname == other.subname
6379            && self.servername == other.servername
6380            && self.conninfo == other.conninfo
6381            && self.publication.equal(&other.publication)
6382            && self.options.equal(&other.options)
6383    }
6384}
6385
6386impl Equal for AlterSystemStmt {
6387    fn equal(&self, other: &Self) -> bool {
6388        self.setstmt.equal(&other.setstmt)
6389    }
6390}
6391
6392impl Equal for AlterTSConfigurationStmt {
6393    fn equal(&self, other: &Self) -> bool {
6394        self.kind == other.kind
6395            && self.cfgname.equal(&other.cfgname)
6396            && self.tokentype.equal(&other.tokentype)
6397            && self.dicts.equal(&other.dicts)
6398            && self.r#override == other.r#override
6399            && self.replace == other.replace
6400            && self.missing_ok == other.missing_ok
6401    }
6402}
6403
6404impl Equal for AlterTSDictionaryStmt {
6405    fn equal(&self, other: &Self) -> bool {
6406        self.dictname.equal(&other.dictname) && self.options.equal(&other.options)
6407    }
6408}
6409
6410impl Equal for AlterTableCmd {
6411    fn equal(&self, other: &Self) -> bool {
6412        self.subtype == other.subtype
6413            && self.name == other.name
6414            && self.num == other.num
6415            && self.newowner.equal(&other.newowner)
6416            && self.def.equal(&other.def)
6417            && self.behavior == other.behavior
6418            && self.missing_ok == other.missing_ok
6419            && self.recurse == other.recurse
6420    }
6421}
6422
6423impl Equal for AlterTableMoveAllStmt {
6424    fn equal(&self, other: &Self) -> bool {
6425        self.orig_tablespacename == other.orig_tablespacename
6426            && self.objtype == other.objtype
6427            && self.roles.equal(&other.roles)
6428            && self.new_tablespacename == other.new_tablespacename
6429            && self.nowait == other.nowait
6430    }
6431}
6432
6433impl Equal for AlterTableSpaceOptionsStmt {
6434    fn equal(&self, other: &Self) -> bool {
6435        self.tablespacename == other.tablespacename
6436            && self.options.equal(&other.options)
6437            && self.isReset == other.isReset
6438    }
6439}
6440
6441impl Equal for AlterTableStmt {
6442    fn equal(&self, other: &Self) -> bool {
6443        self.relation.equal(&other.relation)
6444            && self.cmds.equal(&other.cmds)
6445            && self.objtype == other.objtype
6446            && self.missing_ok == other.missing_ok
6447    }
6448}
6449
6450impl Equal for AlterTypeStmt {
6451    fn equal(&self, other: &Self) -> bool {
6452        self.typeName.equal(&other.typeName) && self.options.equal(&other.options)
6453    }
6454}
6455
6456impl Equal for AlterUserMappingStmt {
6457    fn equal(&self, other: &Self) -> bool {
6458        self.user.equal(&other.user)
6459            && self.servername == other.servername
6460            && self.options.equal(&other.options)
6461    }
6462}
6463
6464impl Equal for BoolExpr {
6465    fn equal(&self, other: &Self) -> bool {
6466        self.boolop == other.boolop && self.args.equal(&other.args)
6467    }
6468}
6469
6470impl Equal for BooleanTest {
6471    fn equal(&self, other: &Self) -> bool {
6472        self.arg.equal(&other.arg) && self.booltesttype == other.booltesttype
6473    }
6474}
6475
6476impl Equal for CTECycleClause {
6477    fn equal(&self, other: &Self) -> bool {
6478        self.cycle_col_list.equal(&other.cycle_col_list)
6479            && self.cycle_mark_column == other.cycle_mark_column
6480            && self.cycle_mark_value.equal(&other.cycle_mark_value)
6481            && self.cycle_mark_default.equal(&other.cycle_mark_default)
6482            && self.cycle_path_column == other.cycle_path_column
6483            && self.cycle_mark_type == other.cycle_mark_type
6484            && self.cycle_mark_typmod == other.cycle_mark_typmod
6485            && self.cycle_mark_collation == other.cycle_mark_collation
6486            && self.cycle_mark_neop == other.cycle_mark_neop
6487    }
6488}
6489
6490impl Equal for CTESearchClause {
6491    fn equal(&self, other: &Self) -> bool {
6492        self.search_col_list.equal(&other.search_col_list)
6493            && self.search_breadth_first == other.search_breadth_first
6494            && self.search_seq_column == other.search_seq_column
6495    }
6496}
6497
6498impl Equal for CallStmt {
6499    fn equal(&self, other: &Self) -> bool {
6500        self.funccall.equal(&other.funccall)
6501            && self.funcexpr.equal(&other.funcexpr)
6502            && self.outargs.equal(&other.outargs)
6503    }
6504}
6505
6506impl Equal for CaseExpr {
6507    fn equal(&self, other: &Self) -> bool {
6508        self.casetype == other.casetype
6509            && self.casecollid == other.casecollid
6510            && self.arg.equal(&other.arg)
6511            && self.args.equal(&other.args)
6512            && self.defresult.equal(&other.defresult)
6513    }
6514}
6515
6516impl Equal for CaseWhen {
6517    fn equal(&self, other: &Self) -> bool {
6518        self.expr.equal(&other.expr) && self.result.equal(&other.result)
6519    }
6520}
6521
6522impl Equal for CheckPointStmt {
6523    fn equal(&self, other: &Self) -> bool {
6524        self.options.equal(&other.options)
6525    }
6526}
6527
6528impl Equal for ClosePortalStmt {
6529    fn equal(&self, other: &Self) -> bool {
6530        self.portalname == other.portalname
6531    }
6532}
6533
6534impl Equal for CoalesceExpr {
6535    fn equal(&self, other: &Self) -> bool {
6536        self.coalescetype == other.coalescetype
6537            && self.coalescecollid == other.coalescecollid
6538            && self.args.equal(&other.args)
6539    }
6540}
6541
6542impl Equal for CollateClause {
6543    fn equal(&self, other: &Self) -> bool {
6544        self.arg.equal(&other.arg) && self.collname.equal(&other.collname)
6545    }
6546}
6547
6548impl Equal for ColumnDef {
6549    fn equal(&self, other: &Self) -> bool {
6550        self.colname == other.colname
6551            && self.typeName.equal(&other.typeName)
6552            && self.compression == other.compression
6553            && self.inhcount == other.inhcount
6554            && self.is_local == other.is_local
6555            && self.is_not_null == other.is_not_null
6556            && self.is_from_type == other.is_from_type
6557            && self.storage == other.storage
6558            && self.storage_name == other.storage_name
6559            && self.raw_default.equal(&other.raw_default)
6560            && self.cooked_default.equal(&other.cooked_default)
6561            && self.identity == other.identity
6562            && self.identitySequence.equal(&other.identitySequence)
6563            && self.generated == other.generated
6564            && self.collClause.equal(&other.collClause)
6565            && self.collOid == other.collOid
6566            && self.constraints.equal(&other.constraints)
6567            && self.fdwoptions.equal(&other.fdwoptions)
6568    }
6569}
6570
6571impl Equal for ColumnRef {
6572    fn equal(&self, other: &Self) -> bool {
6573        self.fields.equal(&other.fields)
6574    }
6575}
6576
6577impl Equal for CommentStmt {
6578    fn equal(&self, other: &Self) -> bool {
6579        self.objtype == other.objtype
6580            && self.object.equal(&other.object)
6581            && self.comment == other.comment
6582    }
6583}
6584
6585impl Equal for CommonTableExpr {
6586    fn equal(&self, other: &Self) -> bool {
6587        self.ctename == other.ctename
6588            && self.aliascolnames.equal(&other.aliascolnames)
6589            && self.ctematerialized == other.ctematerialized
6590            && self.ctequery.equal(&other.ctequery)
6591            && self.search_clause.equal(&other.search_clause)
6592            && self.cycle_clause.equal(&other.cycle_clause)
6593            && self.cterecursive == other.cterecursive
6594            && self.cterefcount == other.cterefcount
6595            && self.ctecolnames.equal(&other.ctecolnames)
6596            && self.ctecoltypes.equal(&other.ctecoltypes)
6597            && self.ctecoltypmods.equal(&other.ctecoltypmods)
6598            && self.ctecolcollations.equal(&other.ctecolcollations)
6599    }
6600}
6601
6602impl Equal for CompositeTypeStmt {
6603    fn equal(&self, other: &Self) -> bool {
6604        self.typevar.equal(&other.typevar) && self.coldeflist.equal(&other.coldeflist)
6605    }
6606}
6607
6608impl Equal for Constraint {
6609    fn equal(&self, other: &Self) -> bool {
6610        self.contype == other.contype
6611            && self.conname == other.conname
6612            && self.deferrable == other.deferrable
6613            && self.initdeferred == other.initdeferred
6614            && self.is_enforced == other.is_enforced
6615            && self.skip_validation == other.skip_validation
6616            && self.initially_valid == other.initially_valid
6617            && self.is_no_inherit == other.is_no_inherit
6618            && self.raw_expr.equal(&other.raw_expr)
6619            && self.cooked_expr == other.cooked_expr
6620            && self.generated_when == other.generated_when
6621            && self.generated_kind == other.generated_kind
6622            && self.nulls_not_distinct == other.nulls_not_distinct
6623            && self.keys.equal(&other.keys)
6624            && self.without_overlaps == other.without_overlaps
6625            && self.including.equal(&other.including)
6626            && self.exclusions.equal(&other.exclusions)
6627            && self.options.equal(&other.options)
6628            && self.indexname == other.indexname
6629            && self.indexspace == other.indexspace
6630            && self.reset_default_tblspc == other.reset_default_tblspc
6631            && self.access_method == other.access_method
6632            && self.where_clause.equal(&other.where_clause)
6633            && self.pktable.equal(&other.pktable)
6634            && self.fk_attrs.equal(&other.fk_attrs)
6635            && self.pk_attrs.equal(&other.pk_attrs)
6636            && self.fk_with_period == other.fk_with_period
6637            && self.pk_with_period == other.pk_with_period
6638            && self.fk_matchtype == other.fk_matchtype
6639            && self.fk_upd_action == other.fk_upd_action
6640            && self.fk_del_action == other.fk_del_action
6641            && self.fk_del_set_cols.equal(&other.fk_del_set_cols)
6642            && self.old_conpfeqop.equal(&other.old_conpfeqop)
6643            && self.old_pktable_oid == other.old_pktable_oid
6644    }
6645}
6646
6647impl Equal for ConstraintsSetStmt {
6648    fn equal(&self, other: &Self) -> bool {
6649        self.constraints.equal(&other.constraints) && self.deferred == other.deferred
6650    }
6651}
6652
6653impl Equal for CopyStmt {
6654    fn equal(&self, other: &Self) -> bool {
6655        self.relation.equal(&other.relation)
6656            && self.query.equal(&other.query)
6657            && self.attlist.equal(&other.attlist)
6658            && self.is_from == other.is_from
6659            && self.is_program == other.is_program
6660            && self.filename == other.filename
6661            && self.options.equal(&other.options)
6662            && self.whereClause.equal(&other.whereClause)
6663    }
6664}
6665
6666impl Equal for CreateAmStmt {
6667    fn equal(&self, other: &Self) -> bool {
6668        self.amname == other.amname
6669            && self.handler_name.equal(&other.handler_name)
6670            && self.amtype == other.amtype
6671    }
6672}
6673
6674impl Equal for CreateCastStmt {
6675    fn equal(&self, other: &Self) -> bool {
6676        self.sourcetype.equal(&other.sourcetype)
6677            && self.targettype.equal(&other.targettype)
6678            && self.func.equal(&other.func)
6679            && self.context == other.context
6680            && self.inout == other.inout
6681    }
6682}
6683
6684impl Equal for CreateConversionStmt {
6685    fn equal(&self, other: &Self) -> bool {
6686        self.conversion_name.equal(&other.conversion_name)
6687            && self.for_encoding_name == other.for_encoding_name
6688            && self.to_encoding_name == other.to_encoding_name
6689            && self.func_name.equal(&other.func_name)
6690            && self.def == other.def
6691    }
6692}
6693
6694impl Equal for CreateDomainStmt {
6695    fn equal(&self, other: &Self) -> bool {
6696        self.domainname.equal(&other.domainname)
6697            && self.typeName.equal(&other.typeName)
6698            && self.collClause.equal(&other.collClause)
6699            && self.constraints.equal(&other.constraints)
6700    }
6701}
6702
6703impl Equal for CreateEnumStmt {
6704    fn equal(&self, other: &Self) -> bool {
6705        self.typeName.equal(&other.typeName) && self.vals.equal(&other.vals)
6706    }
6707}
6708
6709impl Equal for CreateEventTrigStmt {
6710    fn equal(&self, other: &Self) -> bool {
6711        self.trigname == other.trigname
6712            && self.eventname == other.eventname
6713            && self.whenclause.equal(&other.whenclause)
6714            && self.funcname.equal(&other.funcname)
6715    }
6716}
6717
6718impl Equal for CreateExtensionStmt {
6719    fn equal(&self, other: &Self) -> bool {
6720        self.extname == other.extname
6721            && self.if_not_exists == other.if_not_exists
6722            && self.options.equal(&other.options)
6723    }
6724}
6725
6726impl Equal for CreateFdwStmt {
6727    fn equal(&self, other: &Self) -> bool {
6728        self.fdwname == other.fdwname
6729            && self.func_options.equal(&other.func_options)
6730            && self.options.equal(&other.options)
6731    }
6732}
6733
6734impl Equal for CreateForeignServerStmt {
6735    fn equal(&self, other: &Self) -> bool {
6736        self.servername == other.servername
6737            && self.servertype == other.servertype
6738            && self.version == other.version
6739            && self.fdwname == other.fdwname
6740            && self.if_not_exists == other.if_not_exists
6741            && self.options.equal(&other.options)
6742    }
6743}
6744
6745impl Equal for CreateForeignTableStmt {
6746    fn equal(&self, other: &Self) -> bool {
6747        self.base.equal(&other.base)
6748            && self.servername == other.servername
6749            && self.options.equal(&other.options)
6750    }
6751}
6752
6753impl Equal for CreateFunctionStmt {
6754    fn equal(&self, other: &Self) -> bool {
6755        self.is_procedure == other.is_procedure
6756            && self.replace == other.replace
6757            && self.funcname.equal(&other.funcname)
6758            && self.parameters.equal(&other.parameters)
6759            && self.returnType.equal(&other.returnType)
6760            && self.options.equal(&other.options)
6761            && self.sql_body.equal(&other.sql_body)
6762    }
6763}
6764
6765impl Equal for CreateOpClassItem {
6766    fn equal(&self, other: &Self) -> bool {
6767        self.itemtype == other.itemtype
6768            && self.name.equal(&other.name)
6769            && self.number == other.number
6770            && self.order_family.equal(&other.order_family)
6771            && self.class_args.equal(&other.class_args)
6772            && self.storedtype.equal(&other.storedtype)
6773    }
6774}
6775
6776impl Equal for CreateOpClassStmt {
6777    fn equal(&self, other: &Self) -> bool {
6778        self.opclassname.equal(&other.opclassname)
6779            && self.opfamilyname.equal(&other.opfamilyname)
6780            && self.amname == other.amname
6781            && self.datatype.equal(&other.datatype)
6782            && self.items.equal(&other.items)
6783            && self.isDefault == other.isDefault
6784    }
6785}
6786
6787impl Equal for CreateOpFamilyStmt {
6788    fn equal(&self, other: &Self) -> bool {
6789        self.opfamilyname.equal(&other.opfamilyname) && self.amname == other.amname
6790    }
6791}
6792
6793impl Equal for CreatePLangStmt {
6794    fn equal(&self, other: &Self) -> bool {
6795        self.replace == other.replace
6796            && self.plname == other.plname
6797            && self.plhandler.equal(&other.plhandler)
6798            && self.plinline.equal(&other.plinline)
6799            && self.plvalidator.equal(&other.plvalidator)
6800            && self.pltrusted == other.pltrusted
6801    }
6802}
6803
6804impl Equal for CreatePolicyStmt {
6805    fn equal(&self, other: &Self) -> bool {
6806        self.policy_name == other.policy_name
6807            && self.table.equal(&other.table)
6808            && self.cmd_name == other.cmd_name
6809            && self.permissive == other.permissive
6810            && self.roles.equal(&other.roles)
6811            && self.qual.equal(&other.qual)
6812            && self.with_check.equal(&other.with_check)
6813    }
6814}
6815
6816impl Equal for CreatePublicationStmt {
6817    fn equal(&self, other: &Self) -> bool {
6818        self.pubname == other.pubname
6819            && self.options.equal(&other.options)
6820            && self.pubobjects.equal(&other.pubobjects)
6821            && self.for_all_tables == other.for_all_tables
6822            && self.for_all_sequences == other.for_all_sequences
6823    }
6824}
6825
6826impl Equal for CreateRangeStmt {
6827    fn equal(&self, other: &Self) -> bool {
6828        self.typeName.equal(&other.typeName) && self.params.equal(&other.params)
6829    }
6830}
6831
6832impl Equal for CreateRoleStmt {
6833    fn equal(&self, other: &Self) -> bool {
6834        self.stmt_type == other.stmt_type
6835            && self.role == other.role
6836            && self.options.equal(&other.options)
6837    }
6838}
6839
6840impl Equal for CreateSchemaStmt {
6841    fn equal(&self, other: &Self) -> bool {
6842        self.schemaname == other.schemaname
6843            && self.authrole.equal(&other.authrole)
6844            && self.schemaElts.equal(&other.schemaElts)
6845            && self.if_not_exists == other.if_not_exists
6846    }
6847}
6848
6849impl Equal for CreateSeqStmt {
6850    fn equal(&self, other: &Self) -> bool {
6851        self.sequence.equal(&other.sequence)
6852            && self.options.equal(&other.options)
6853            && self.ownerId == other.ownerId
6854            && self.for_identity == other.for_identity
6855            && self.if_not_exists == other.if_not_exists
6856    }
6857}
6858
6859impl Equal for CreateStatsStmt {
6860    fn equal(&self, other: &Self) -> bool {
6861        self.defnames.equal(&other.defnames)
6862            && self.stat_types.equal(&other.stat_types)
6863            && self.exprs.equal(&other.exprs)
6864            && self.relations.equal(&other.relations)
6865            && self.stxcomment == other.stxcomment
6866            && self.transformed == other.transformed
6867            && self.if_not_exists == other.if_not_exists
6868            && self.owner == other.owner
6869    }
6870}
6871
6872impl Equal for CreateStmt {
6873    fn equal(&self, other: &Self) -> bool {
6874        self.relation.equal(&other.relation)
6875            && self.tableElts.equal(&other.tableElts)
6876            && self.inhRelations.equal(&other.inhRelations)
6877            && self.partbound.equal(&other.partbound)
6878            && self.partspec.equal(&other.partspec)
6879            && self.ofTypename.equal(&other.ofTypename)
6880            && self.constraints.equal(&other.constraints)
6881            && self.nnconstraints.equal(&other.nnconstraints)
6882            && self.options.equal(&other.options)
6883            && self.oncommit == other.oncommit
6884            && self.tablespacename == other.tablespacename
6885            && self.accessMethod == other.accessMethod
6886            && self.if_not_exists == other.if_not_exists
6887    }
6888}
6889
6890impl Equal for CreateSubscriptionStmt {
6891    fn equal(&self, other: &Self) -> bool {
6892        self.subname == other.subname
6893            && self.servername == other.servername
6894            && self.conninfo == other.conninfo
6895            && self.publication.equal(&other.publication)
6896            && self.options.equal(&other.options)
6897    }
6898}
6899
6900impl Equal for CreateTableAsStmt {
6901    fn equal(&self, other: &Self) -> bool {
6902        self.query.equal(&other.query)
6903            && self.into.equal(&other.into)
6904            && self.objtype == other.objtype
6905            && self.is_select_into == other.is_select_into
6906            && self.if_not_exists == other.if_not_exists
6907    }
6908}
6909
6910impl Equal for CreateTableSpaceStmt {
6911    fn equal(&self, other: &Self) -> bool {
6912        self.tablespacename == other.tablespacename
6913            && self.owner.equal(&other.owner)
6914            && self.location == other.location
6915            && self.options.equal(&other.options)
6916    }
6917}
6918
6919impl Equal for CreateTransformStmt {
6920    fn equal(&self, other: &Self) -> bool {
6921        self.replace == other.replace
6922            && self.type_name.equal(&other.type_name)
6923            && self.lang == other.lang
6924            && self.fromsql.equal(&other.fromsql)
6925            && self.tosql.equal(&other.tosql)
6926    }
6927}
6928
6929impl Equal for CreateTrigStmt {
6930    fn equal(&self, other: &Self) -> bool {
6931        self.replace == other.replace
6932            && self.isconstraint == other.isconstraint
6933            && self.trigname == other.trigname
6934            && self.relation.equal(&other.relation)
6935            && self.funcname.equal(&other.funcname)
6936            && self.args.equal(&other.args)
6937            && self.row == other.row
6938            && self.timing == other.timing
6939            && self.events == other.events
6940            && self.columns.equal(&other.columns)
6941            && self.whenClause.equal(&other.whenClause)
6942            && self.transitionRels.equal(&other.transitionRels)
6943            && self.deferrable == other.deferrable
6944            && self.initdeferred == other.initdeferred
6945            && self.constrrel.equal(&other.constrrel)
6946    }
6947}
6948
6949impl Equal for CreateUserMappingStmt {
6950    fn equal(&self, other: &Self) -> bool {
6951        self.user.equal(&other.user)
6952            && self.servername == other.servername
6953            && self.if_not_exists == other.if_not_exists
6954            && self.options.equal(&other.options)
6955    }
6956}
6957
6958impl Equal for CreatedbStmt {
6959    fn equal(&self, other: &Self) -> bool {
6960        self.dbname == other.dbname && self.options.equal(&other.options)
6961    }
6962}
6963
6964impl Equal for CurrentOfExpr {
6965    fn equal(&self, other: &Self) -> bool {
6966        self.cvarno == other.cvarno
6967            && self.cursor_name == other.cursor_name
6968            && self.cursor_param == other.cursor_param
6969    }
6970}
6971
6972impl Equal for DeallocateStmt {
6973    fn equal(&self, other: &Self) -> bool {
6974        self.name == other.name && self.isall == other.isall
6975    }
6976}
6977
6978impl Equal for DeclareCursorStmt {
6979    fn equal(&self, other: &Self) -> bool {
6980        self.portalname == other.portalname
6981            && self.options == other.options
6982            && self.query.equal(&other.query)
6983    }
6984}
6985
6986impl Equal for DefElem {
6987    fn equal(&self, other: &Self) -> bool {
6988        self.defnamespace == other.defnamespace
6989            && self.defname == other.defname
6990            && self.arg.equal(&other.arg)
6991            && self.defaction == other.defaction
6992    }
6993}
6994
6995impl Equal for DefineStmt {
6996    fn equal(&self, other: &Self) -> bool {
6997        self.kind == other.kind
6998            && self.oldstyle == other.oldstyle
6999            && self.defnames.equal(&other.defnames)
7000            && self.args.equal(&other.args)
7001            && self.definition.equal(&other.definition)
7002            && self.if_not_exists == other.if_not_exists
7003            && self.replace == other.replace
7004    }
7005}
7006
7007impl Equal for DeleteStmt {
7008    fn equal(&self, other: &Self) -> bool {
7009        self.relation.equal(&other.relation)
7010            && self.usingClause.equal(&other.usingClause)
7011            && self.whereClause.equal(&other.whereClause)
7012            && self.returningClause.equal(&other.returningClause)
7013            && self.withClause.equal(&other.withClause)
7014    }
7015}
7016
7017impl Equal for DiscardStmt {
7018    fn equal(&self, other: &Self) -> bool {
7019        self.target == other.target
7020    }
7021}
7022
7023impl Equal for DoStmt {
7024    fn equal(&self, other: &Self) -> bool {
7025        self.args.equal(&other.args)
7026    }
7027}
7028
7029impl Equal for DropOwnedStmt {
7030    fn equal(&self, other: &Self) -> bool {
7031        self.roles.equal(&other.roles) && self.behavior == other.behavior
7032    }
7033}
7034
7035impl Equal for DropRoleStmt {
7036    fn equal(&self, other: &Self) -> bool {
7037        self.roles.equal(&other.roles) && self.missing_ok == other.missing_ok
7038    }
7039}
7040
7041impl Equal for DropStmt {
7042    fn equal(&self, other: &Self) -> bool {
7043        self.objects.equal(&other.objects)
7044            && self.removeType == other.removeType
7045            && self.behavior == other.behavior
7046            && self.missing_ok == other.missing_ok
7047            && self.concurrent == other.concurrent
7048    }
7049}
7050
7051impl Equal for DropSubscriptionStmt {
7052    fn equal(&self, other: &Self) -> bool {
7053        self.subname == other.subname
7054            && self.missing_ok == other.missing_ok
7055            && self.behavior == other.behavior
7056    }
7057}
7058
7059impl Equal for DropTableSpaceStmt {
7060    fn equal(&self, other: &Self) -> bool {
7061        self.tablespacename == other.tablespacename && self.missing_ok == other.missing_ok
7062    }
7063}
7064
7065impl Equal for DropUserMappingStmt {
7066    fn equal(&self, other: &Self) -> bool {
7067        self.user.equal(&other.user)
7068            && self.servername == other.servername
7069            && self.missing_ok == other.missing_ok
7070    }
7071}
7072
7073impl Equal for DropdbStmt {
7074    fn equal(&self, other: &Self) -> bool {
7075        self.dbname == other.dbname
7076            && self.missing_ok == other.missing_ok
7077            && self.options.equal(&other.options)
7078    }
7079}
7080
7081impl Equal for ExecuteStmt {
7082    fn equal(&self, other: &Self) -> bool {
7083        self.name == other.name && self.params.equal(&other.params)
7084    }
7085}
7086
7087impl Equal for ExplainStmt {
7088    fn equal(&self, other: &Self) -> bool {
7089        self.query.equal(&other.query) && self.options.equal(&other.options)
7090    }
7091}
7092
7093impl Equal for FetchStmt {
7094    fn equal(&self, other: &Self) -> bool {
7095        self.direction == other.direction
7096            && self.howMany == other.howMany
7097            && self.portalname == other.portalname
7098            && self.ismove == other.ismove
7099            && self.direction_keyword == other.direction_keyword
7100    }
7101}
7102
7103impl Equal for FuncCall {
7104    fn equal(&self, other: &Self) -> bool {
7105        self.funcname.equal(&other.funcname)
7106            && self.args.equal(&other.args)
7107            && self.agg_order.equal(&other.agg_order)
7108            && self.agg_filter.equal(&other.agg_filter)
7109            && self.over.equal(&other.over)
7110            && self.ignore_nulls == other.ignore_nulls
7111            && self.agg_within_group == other.agg_within_group
7112            && self.agg_star == other.agg_star
7113            && self.agg_distinct == other.agg_distinct
7114            && self.func_variadic == other.func_variadic
7115            && self.funcformat == other.funcformat
7116    }
7117}
7118
7119impl Equal for FunctionParameter {
7120    fn equal(&self, other: &Self) -> bool {
7121        self.name == other.name
7122            && self.argType.equal(&other.argType)
7123            && self.mode == other.mode
7124            && self.defexpr.equal(&other.defexpr)
7125    }
7126}
7127
7128impl Equal for GrantRoleStmt {
7129    fn equal(&self, other: &Self) -> bool {
7130        self.granted_roles.equal(&other.granted_roles)
7131            && self.grantee_roles.equal(&other.grantee_roles)
7132            && self.is_grant == other.is_grant
7133            && self.opt.equal(&other.opt)
7134            && self.grantor.equal(&other.grantor)
7135            && self.behavior == other.behavior
7136    }
7137}
7138
7139impl Equal for GrantStmt {
7140    fn equal(&self, other: &Self) -> bool {
7141        self.is_grant == other.is_grant
7142            && self.targtype == other.targtype
7143            && self.objtype == other.objtype
7144            && self.objects.equal(&other.objects)
7145            && self.privileges.equal(&other.privileges)
7146            && self.grantees.equal(&other.grantees)
7147            && self.grant_option == other.grant_option
7148            && self.grantor.equal(&other.grantor)
7149            && self.behavior == other.behavior
7150    }
7151}
7152
7153impl Equal for GroupingFunc {
7154    fn equal(&self, other: &Self) -> bool {
7155        self.args.equal(&other.args) && self.agglevelsup == other.agglevelsup
7156    }
7157}
7158
7159impl Equal for GroupingSet {
7160    fn equal(&self, other: &Self) -> bool {
7161        self.kind == other.kind && self.content.equal(&other.content)
7162    }
7163}
7164
7165impl Equal for ImportForeignSchemaStmt {
7166    fn equal(&self, other: &Self) -> bool {
7167        self.server_name == other.server_name
7168            && self.remote_schema == other.remote_schema
7169            && self.local_schema == other.local_schema
7170            && self.list_type == other.list_type
7171            && self.table_list.equal(&other.table_list)
7172            && self.options.equal(&other.options)
7173    }
7174}
7175
7176impl Equal for IndexElem {
7177    fn equal(&self, other: &Self) -> bool {
7178        self.name == other.name
7179            && self.expr.equal(&other.expr)
7180            && self.indexcolname == other.indexcolname
7181            && self.collation.equal(&other.collation)
7182            && self.opclass.equal(&other.opclass)
7183            && self.opclassopts.equal(&other.opclassopts)
7184            && self.ordering == other.ordering
7185            && self.nulls_ordering == other.nulls_ordering
7186    }
7187}
7188
7189impl Equal for IndexStmt {
7190    fn equal(&self, other: &Self) -> bool {
7191        self.idxname == other.idxname
7192            && self.relation.equal(&other.relation)
7193            && self.accessMethod == other.accessMethod
7194            && self.tableSpace == other.tableSpace
7195            && self.indexParams.equal(&other.indexParams)
7196            && self.indexIncludingParams.equal(&other.indexIncludingParams)
7197            && self.options.equal(&other.options)
7198            && self.whereClause.equal(&other.whereClause)
7199            && self.excludeOpNames.equal(&other.excludeOpNames)
7200            && self.idxcomment == other.idxcomment
7201            && self.indexOid == other.indexOid
7202            && self.oldNumber == other.oldNumber
7203            && self.oldCreateSubid == other.oldCreateSubid
7204            && self.oldFirstRelfilelocatorSubid == other.oldFirstRelfilelocatorSubid
7205            && self.unique == other.unique
7206            && self.nulls_not_distinct == other.nulls_not_distinct
7207            && self.primary == other.primary
7208            && self.isconstraint == other.isconstraint
7209            && self.iswithoutoverlaps == other.iswithoutoverlaps
7210            && self.deferrable == other.deferrable
7211            && self.initdeferred == other.initdeferred
7212            && self.transformed == other.transformed
7213            && self.concurrent == other.concurrent
7214            && self.if_not_exists == other.if_not_exists
7215            && self.reset_default_tblspc == other.reset_default_tblspc
7216    }
7217}
7218
7219impl Equal for InferClause {
7220    fn equal(&self, other: &Self) -> bool {
7221        self.indexElems.equal(&other.indexElems)
7222            && self.whereClause.equal(&other.whereClause)
7223            && self.conname == other.conname
7224    }
7225}
7226
7227impl Equal for InsertStmt {
7228    fn equal(&self, other: &Self) -> bool {
7229        self.relation.equal(&other.relation)
7230            && self.cols.equal(&other.cols)
7231            && self.selectStmt.equal(&other.selectStmt)
7232            && self.onConflictClause.equal(&other.onConflictClause)
7233            && self.returningClause.equal(&other.returningClause)
7234            && self.withClause.equal(&other.withClause)
7235            && self.r#override == other.r#override
7236    }
7237}
7238
7239impl Equal for IntoClause {
7240    fn equal(&self, other: &Self) -> bool {
7241        self.rel.equal(&other.rel)
7242            && self.colNames.equal(&other.colNames)
7243            && self.accessMethod == other.accessMethod
7244            && self.options.equal(&other.options)
7245            && self.onCommit == other.onCommit
7246            && self.tableSpaceName == other.tableSpaceName
7247            && self.viewQuery.equal(&other.viewQuery)
7248            && self.skipData == other.skipData
7249    }
7250}
7251
7252impl Equal for JoinExpr {
7253    fn equal(&self, other: &Self) -> bool {
7254        self.jointype == other.jointype
7255            && self.isNatural == other.isNatural
7256            && self.larg.equal(&other.larg)
7257            && self.rarg.equal(&other.rarg)
7258            && self.usingClause.equal(&other.usingClause)
7259            && self.join_using_alias.equal(&other.join_using_alias)
7260            && self.quals.equal(&other.quals)
7261            && self.alias.equal(&other.alias)
7262            && self.rtindex == other.rtindex
7263    }
7264}
7265
7266impl Equal for JsonAggConstructor {
7267    fn equal(&self, other: &Self) -> bool {
7268        self.output.equal(&other.output)
7269            && self.agg_filter.equal(&other.agg_filter)
7270            && self.agg_order.equal(&other.agg_order)
7271            && self.over.equal(&other.over)
7272    }
7273}
7274
7275impl Equal for JsonArgument {
7276    fn equal(&self, other: &Self) -> bool {
7277        self.val.equal(&other.val) && self.name == other.name
7278    }
7279}
7280
7281impl Equal for JsonArrayAgg {
7282    fn equal(&self, other: &Self) -> bool {
7283        self.constructor.equal(&other.constructor)
7284            && self.arg.equal(&other.arg)
7285            && self.absent_on_null == other.absent_on_null
7286    }
7287}
7288
7289impl Equal for JsonArrayConstructor {
7290    fn equal(&self, other: &Self) -> bool {
7291        self.exprs.equal(&other.exprs)
7292            && self.output.equal(&other.output)
7293            && self.absent_on_null == other.absent_on_null
7294    }
7295}
7296
7297impl Equal for JsonArrayQueryConstructor {
7298    fn equal(&self, other: &Self) -> bool {
7299        self.query.equal(&other.query)
7300            && self.output.equal(&other.output)
7301            && self.format.equal(&other.format)
7302            && self.absent_on_null == other.absent_on_null
7303    }
7304}
7305
7306impl Equal for JsonBehavior {
7307    fn equal(&self, other: &Self) -> bool {
7308        self.btype == other.btype && self.expr.equal(&other.expr) && self.coerce == other.coerce
7309    }
7310}
7311
7312impl Equal for JsonFormat {
7313    fn equal(&self, other: &Self) -> bool {
7314        self.format_type == other.format_type && self.encoding == other.encoding
7315    }
7316}
7317
7318impl Equal for JsonFuncExpr {
7319    fn equal(&self, other: &Self) -> bool {
7320        self.op == other.op
7321            && self.column_name == other.column_name
7322            && self.context_item.equal(&other.context_item)
7323            && self.pathspec.equal(&other.pathspec)
7324            && self.passing.equal(&other.passing)
7325            && self.output.equal(&other.output)
7326            && self.on_empty.equal(&other.on_empty)
7327            && self.on_error.equal(&other.on_error)
7328            && self.wrapper == other.wrapper
7329            && self.quotes == other.quotes
7330    }
7331}
7332
7333impl Equal for JsonIsPredicate {
7334    fn equal(&self, other: &Self) -> bool {
7335        self.expr.equal(&other.expr)
7336            && self.format.equal(&other.format)
7337            && self.item_type == other.item_type
7338            && self.unique_keys == other.unique_keys
7339            && self.exprBaseType == other.exprBaseType
7340    }
7341}
7342
7343impl Equal for JsonKeyValue {
7344    fn equal(&self, other: &Self) -> bool {
7345        self.key.equal(&other.key) && self.value.equal(&other.value)
7346    }
7347}
7348
7349impl Equal for JsonObjectAgg {
7350    fn equal(&self, other: &Self) -> bool {
7351        self.constructor.equal(&other.constructor)
7352            && self.arg.equal(&other.arg)
7353            && self.absent_on_null == other.absent_on_null
7354            && self.unique == other.unique
7355    }
7356}
7357
7358impl Equal for JsonObjectConstructor {
7359    fn equal(&self, other: &Self) -> bool {
7360        self.exprs.equal(&other.exprs)
7361            && self.output.equal(&other.output)
7362            && self.absent_on_null == other.absent_on_null
7363            && self.unique == other.unique
7364    }
7365}
7366
7367impl Equal for JsonOutput {
7368    fn equal(&self, other: &Self) -> bool {
7369        self.typeName.equal(&other.typeName) && self.returning.equal(&other.returning)
7370    }
7371}
7372
7373impl Equal for JsonParseExpr {
7374    fn equal(&self, other: &Self) -> bool {
7375        self.expr.equal(&other.expr)
7376            && self.output.equal(&other.output)
7377            && self.unique_keys == other.unique_keys
7378    }
7379}
7380
7381impl Equal for JsonReturning {
7382    fn equal(&self, other: &Self) -> bool {
7383        self.format.equal(&other.format) && self.typid == other.typid && self.typmod == other.typmod
7384    }
7385}
7386
7387impl Equal for JsonScalarExpr {
7388    fn equal(&self, other: &Self) -> bool {
7389        self.expr.equal(&other.expr) && self.output.equal(&other.output)
7390    }
7391}
7392
7393impl Equal for JsonSerializeExpr {
7394    fn equal(&self, other: &Self) -> bool {
7395        self.expr.equal(&other.expr) && self.output.equal(&other.output)
7396    }
7397}
7398
7399impl Equal for JsonTable {
7400    fn equal(&self, other: &Self) -> bool {
7401        self.context_item.equal(&other.context_item)
7402            && self.pathspec.equal(&other.pathspec)
7403            && self.passing.equal(&other.passing)
7404            && self.columns.equal(&other.columns)
7405            && self.on_error.equal(&other.on_error)
7406            && self.alias.equal(&other.alias)
7407            && self.lateral == other.lateral
7408    }
7409}
7410
7411impl Equal for JsonTableColumn {
7412    fn equal(&self, other: &Self) -> bool {
7413        self.coltype == other.coltype
7414            && self.name == other.name
7415            && self.typeName.equal(&other.typeName)
7416            && self.pathspec.equal(&other.pathspec)
7417            && self.format.equal(&other.format)
7418            && self.wrapper == other.wrapper
7419            && self.quotes == other.quotes
7420            && self.columns.equal(&other.columns)
7421            && self.on_empty.equal(&other.on_empty)
7422            && self.on_error.equal(&other.on_error)
7423    }
7424}
7425
7426impl Equal for JsonTablePathSpec {
7427    fn equal(&self, other: &Self) -> bool {
7428        self.string.equal(&other.string) && self.name == other.name
7429    }
7430}
7431
7432impl Equal for JsonValueExpr {
7433    fn equal(&self, other: &Self) -> bool {
7434        self.raw_expr.equal(&other.raw_expr)
7435            && self.formatted_expr.equal(&other.formatted_expr)
7436            && self.format.equal(&other.format)
7437    }
7438}
7439
7440impl Equal for ListenStmt {
7441    fn equal(&self, other: &Self) -> bool {
7442        self.conditionname == other.conditionname
7443    }
7444}
7445
7446impl Equal for LoadStmt {
7447    fn equal(&self, other: &Self) -> bool {
7448        self.filename == other.filename
7449    }
7450}
7451
7452impl Equal for LockStmt {
7453    fn equal(&self, other: &Self) -> bool {
7454        self.relations.equal(&other.relations)
7455            && self.mode == other.mode
7456            && self.nowait == other.nowait
7457    }
7458}
7459
7460impl Equal for LockingClause {
7461    fn equal(&self, other: &Self) -> bool {
7462        self.lockedRels.equal(&other.lockedRels)
7463            && self.strength == other.strength
7464            && self.waitPolicy == other.waitPolicy
7465    }
7466}
7467
7468impl Equal for MergeStmt {
7469    fn equal(&self, other: &Self) -> bool {
7470        self.relation.equal(&other.relation)
7471            && self.sourceRelation.equal(&other.sourceRelation)
7472            && self.joinCondition.equal(&other.joinCondition)
7473            && self.mergeWhenClauses.equal(&other.mergeWhenClauses)
7474            && self.returningClause.equal(&other.returningClause)
7475            && self.withClause.equal(&other.withClause)
7476    }
7477}
7478
7479impl Equal for MergeSupportFunc {
7480    fn equal(&self, other: &Self) -> bool {
7481        self.msftype == other.msftype && self.msfcollid == other.msfcollid
7482    }
7483}
7484
7485impl Equal for MergeWhenClause {
7486    fn equal(&self, other: &Self) -> bool {
7487        self.matchKind == other.matchKind
7488            && self.commandType == other.commandType
7489            && self.r#override == other.r#override
7490            && self.condition.equal(&other.condition)
7491            && self.targetList.equal(&other.targetList)
7492            && self.values.equal(&other.values)
7493    }
7494}
7495
7496impl Equal for MinMaxExpr {
7497    fn equal(&self, other: &Self) -> bool {
7498        self.minmaxtype == other.minmaxtype
7499            && self.minmaxcollid == other.minmaxcollid
7500            && self.inputcollid == other.inputcollid
7501            && self.op == other.op
7502            && self.args.equal(&other.args)
7503    }
7504}
7505
7506impl Equal for MultiAssignRef {
7507    fn equal(&self, other: &Self) -> bool {
7508        self.source.equal(&other.source)
7509            && self.colno == other.colno
7510            && self.ncolumns == other.ncolumns
7511    }
7512}
7513
7514impl Equal for NamedArgExpr {
7515    fn equal(&self, other: &Self) -> bool {
7516        self.arg.equal(&other.arg) && self.name == other.name && self.argnumber == other.argnumber
7517    }
7518}
7519
7520impl Equal for NotifyStmt {
7521    fn equal(&self, other: &Self) -> bool {
7522        self.conditionname == other.conditionname && self.payload == other.payload
7523    }
7524}
7525
7526impl Equal for NullTest {
7527    fn equal(&self, other: &Self) -> bool {
7528        self.arg.equal(&other.arg)
7529            && self.nulltesttype == other.nulltesttype
7530            && self.argisrow == other.argisrow
7531    }
7532}
7533
7534impl Equal for ObjectWithArgs {
7535    fn equal(&self, other: &Self) -> bool {
7536        self.objname.equal(&other.objname)
7537            && self.objargs.equal(&other.objargs)
7538            && self.objfuncargs.equal(&other.objfuncargs)
7539            && self.args_unspecified == other.args_unspecified
7540    }
7541}
7542
7543impl Equal for OnConflictClause {
7544    fn equal(&self, other: &Self) -> bool {
7545        self.action == other.action
7546            && self.infer.equal(&other.infer)
7547            && self.lockStrength == other.lockStrength
7548            && self.targetList.equal(&other.targetList)
7549            && self.whereClause.equal(&other.whereClause)
7550    }
7551}
7552
7553impl Equal for PLAssignStmt {
7554    fn equal(&self, other: &Self) -> bool {
7555        self.name == other.name
7556            && self.indirection.equal(&other.indirection)
7557            && self.nnames == other.nnames
7558            && self.val.equal(&other.val)
7559    }
7560}
7561
7562impl Equal for ParamRef {
7563    fn equal(&self, other: &Self) -> bool {
7564        self.number == other.number
7565    }
7566}
7567
7568impl Equal for PartitionBoundSpec {
7569    fn equal(&self, other: &Self) -> bool {
7570        self.strategy == other.strategy
7571            && self.is_default == other.is_default
7572            && self.modulus == other.modulus
7573            && self.remainder == other.remainder
7574            && self.listdatums.equal(&other.listdatums)
7575            && self.lowerdatums.equal(&other.lowerdatums)
7576            && self.upperdatums.equal(&other.upperdatums)
7577    }
7578}
7579
7580impl Equal for PartitionCmd {
7581    fn equal(&self, other: &Self) -> bool {
7582        self.name.equal(&other.name)
7583            && self.bound.equal(&other.bound)
7584            && self.concurrent == other.concurrent
7585    }
7586}
7587
7588impl Equal for PartitionElem {
7589    fn equal(&self, other: &Self) -> bool {
7590        self.name == other.name
7591            && self.expr.equal(&other.expr)
7592            && self.collation.equal(&other.collation)
7593            && self.opclass.equal(&other.opclass)
7594    }
7595}
7596
7597impl Equal for PartitionSpec {
7598    fn equal(&self, other: &Self) -> bool {
7599        self.strategy == other.strategy && self.partParams.equal(&other.partParams)
7600    }
7601}
7602
7603impl Equal for PrepareStmt {
7604    fn equal(&self, other: &Self) -> bool {
7605        self.name == other.name
7606            && self.argtypes.equal(&other.argtypes)
7607            && self.query.equal(&other.query)
7608    }
7609}
7610
7611impl Equal for PublicationAllObjSpec {
7612    fn equal(&self, other: &Self) -> bool {
7613        self.pubobjtype == other.pubobjtype && self.except_tables.equal(&other.except_tables)
7614    }
7615}
7616
7617impl Equal for PublicationObjSpec {
7618    fn equal(&self, other: &Self) -> bool {
7619        self.pubobjtype == other.pubobjtype
7620            && self.name == other.name
7621            && self.pubtable.equal(&other.pubtable)
7622    }
7623}
7624
7625impl Equal for PublicationTable {
7626    fn equal(&self, other: &Self) -> bool {
7627        self.relation.equal(&other.relation)
7628            && self.whereClause.equal(&other.whereClause)
7629            && self.columns.equal(&other.columns)
7630            && self.except == other.except
7631    }
7632}
7633
7634impl Equal for RangeFunction {
7635    fn equal(&self, other: &Self) -> bool {
7636        self.lateral == other.lateral
7637            && self.ordinality == other.ordinality
7638            && self.is_rowsfrom == other.is_rowsfrom
7639            && self.functions.equal(&other.functions)
7640            && self.alias.equal(&other.alias)
7641            && self.coldeflist.equal(&other.coldeflist)
7642    }
7643}
7644
7645impl Equal for RangeSubselect {
7646    fn equal(&self, other: &Self) -> bool {
7647        self.lateral == other.lateral
7648            && self.subquery.equal(&other.subquery)
7649            && self.alias.equal(&other.alias)
7650    }
7651}
7652
7653impl Equal for RangeTableFunc {
7654    fn equal(&self, other: &Self) -> bool {
7655        self.lateral == other.lateral
7656            && self.docexpr.equal(&other.docexpr)
7657            && self.rowexpr.equal(&other.rowexpr)
7658            && self.namespaces.equal(&other.namespaces)
7659            && self.columns.equal(&other.columns)
7660            && self.alias.equal(&other.alias)
7661    }
7662}
7663
7664impl Equal for RangeTableFuncCol {
7665    fn equal(&self, other: &Self) -> bool {
7666        self.colname == other.colname
7667            && self.typeName.equal(&other.typeName)
7668            && self.for_ordinality == other.for_ordinality
7669            && self.is_not_null == other.is_not_null
7670            && self.colexpr.equal(&other.colexpr)
7671            && self.coldefexpr.equal(&other.coldefexpr)
7672    }
7673}
7674
7675impl Equal for RangeTableSample {
7676    fn equal(&self, other: &Self) -> bool {
7677        self.relation.equal(&other.relation)
7678            && self.method.equal(&other.method)
7679            && self.args.equal(&other.args)
7680            && self.repeatable.equal(&other.repeatable)
7681    }
7682}
7683
7684impl Equal for RangeVar {
7685    fn equal(&self, other: &Self) -> bool {
7686        self.catalogname == other.catalogname
7687            && self.schemaname == other.schemaname
7688            && self.relname == other.relname
7689            && self.inh == other.inh
7690            && self.relpersistence == other.relpersistence
7691            && self.alias.equal(&other.alias)
7692    }
7693}
7694
7695impl Equal for RawStmt {
7696    fn equal(&self, other: &Self) -> bool {
7697        self.stmt.equal(&other.stmt)
7698    }
7699}
7700
7701impl Equal for ReassignOwnedStmt {
7702    fn equal(&self, other: &Self) -> bool {
7703        self.roles.equal(&other.roles) && self.newrole.equal(&other.newrole)
7704    }
7705}
7706
7707impl Equal for RefreshMatViewStmt {
7708    fn equal(&self, other: &Self) -> bool {
7709        self.concurrent == other.concurrent
7710            && self.skipData == other.skipData
7711            && self.relation.equal(&other.relation)
7712    }
7713}
7714
7715impl Equal for ReindexStmt {
7716    fn equal(&self, other: &Self) -> bool {
7717        self.kind == other.kind
7718            && self.relation.equal(&other.relation)
7719            && self.name == other.name
7720            && self.params.equal(&other.params)
7721    }
7722}
7723
7724impl Equal for RenameStmt {
7725    fn equal(&self, other: &Self) -> bool {
7726        self.renameType == other.renameType
7727            && self.relationType == other.relationType
7728            && self.relation.equal(&other.relation)
7729            && self.object.equal(&other.object)
7730            && self.subname == other.subname
7731            && self.newname == other.newname
7732            && self.behavior == other.behavior
7733            && self.missing_ok == other.missing_ok
7734    }
7735}
7736
7737impl Equal for RepackStmt {
7738    fn equal(&self, other: &Self) -> bool {
7739        self.command == other.command
7740            && self.relation.equal(&other.relation)
7741            && self.indexname == other.indexname
7742            && self.usingindex == other.usingindex
7743            && self.params.equal(&other.params)
7744    }
7745}
7746
7747impl Equal for ReplicaIdentityStmt {
7748    fn equal(&self, other: &Self) -> bool {
7749        self.identity_type == other.identity_type && self.name == other.name
7750    }
7751}
7752
7753impl Equal for ResTarget {
7754    fn equal(&self, other: &Self) -> bool {
7755        self.name == other.name
7756            && self.indirection.equal(&other.indirection)
7757            && self.val.equal(&other.val)
7758    }
7759}
7760
7761impl Equal for ReturnStmt {
7762    fn equal(&self, other: &Self) -> bool {
7763        self.returnval.equal(&other.returnval)
7764    }
7765}
7766
7767impl Equal for ReturningClause {
7768    fn equal(&self, other: &Self) -> bool {
7769        self.options.equal(&other.options) && self.exprs.equal(&other.exprs)
7770    }
7771}
7772
7773impl Equal for ReturningOption {
7774    fn equal(&self, other: &Self) -> bool {
7775        self.option == other.option && self.value == other.value
7776    }
7777}
7778
7779impl Equal for RoleSpec {
7780    fn equal(&self, other: &Self) -> bool {
7781        self.roletype == other.roletype && self.rolename == other.rolename
7782    }
7783}
7784
7785impl Equal for RowExpr {
7786    fn equal(&self, other: &Self) -> bool {
7787        self.args.equal(&other.args)
7788            && self.row_typeid == other.row_typeid
7789            && self.row_format == other.row_format
7790            && self.colnames.equal(&other.colnames)
7791    }
7792}
7793
7794impl Equal for RuleStmt {
7795    fn equal(&self, other: &Self) -> bool {
7796        self.relation.equal(&other.relation)
7797            && self.rulename == other.rulename
7798            && self.whereClause.equal(&other.whereClause)
7799            && self.event == other.event
7800            && self.instead == other.instead
7801            && self.actions.equal(&other.actions)
7802            && self.replace == other.replace
7803    }
7804}
7805
7806impl Equal for SQLValueFunction {
7807    fn equal(&self, other: &Self) -> bool {
7808        self.op == other.op && self.r#type == other.r#type && self.typmod == other.typmod
7809    }
7810}
7811
7812impl Equal for SecLabelStmt {
7813    fn equal(&self, other: &Self) -> bool {
7814        self.objtype == other.objtype
7815            && self.object.equal(&other.object)
7816            && self.provider == other.provider
7817            && self.label == other.label
7818    }
7819}
7820
7821impl Equal for SelectStmt {
7822    fn equal(&self, other: &Self) -> bool {
7823        self.distinctClause.equal(&other.distinctClause)
7824            && self.intoClause.equal(&other.intoClause)
7825            && self.targetList.equal(&other.targetList)
7826            && self.fromClause.equal(&other.fromClause)
7827            && self.whereClause.equal(&other.whereClause)
7828            && self.groupClause.equal(&other.groupClause)
7829            && self.groupDistinct == other.groupDistinct
7830            && self.havingClause.equal(&other.havingClause)
7831            && self.windowClause.equal(&other.windowClause)
7832            && self.valuesLists.equal(&other.valuesLists)
7833            && self.sortClause.equal(&other.sortClause)
7834            && self.limitOffset.equal(&other.limitOffset)
7835            && self.limitCount.equal(&other.limitCount)
7836            && self.limitOption == other.limitOption
7837            && self.lockingClause.equal(&other.lockingClause)
7838            && self.withClause.equal(&other.withClause)
7839            && self.op == other.op
7840            && self.all == other.all
7841            && self.larg.equal(&other.larg)
7842            && self.rarg.equal(&other.rarg)
7843    }
7844}
7845
7846impl Equal for SetToDefault {
7847    fn equal(&self, other: &Self) -> bool {
7848        self.typeId == other.typeId
7849            && self.typeMod == other.typeMod
7850            && self.collation == other.collation
7851    }
7852}
7853
7854impl Equal for SortBy {
7855    fn equal(&self, other: &Self) -> bool {
7856        self.node.equal(&other.node)
7857            && self.sortby_dir == other.sortby_dir
7858            && self.sortby_nulls == other.sortby_nulls
7859            && self.useOp.equal(&other.useOp)
7860    }
7861}
7862
7863impl Equal for StatsElem {
7864    fn equal(&self, other: &Self) -> bool {
7865        self.name == other.name && self.expr.equal(&other.expr)
7866    }
7867}
7868
7869impl Equal for SubLink {
7870    fn equal(&self, other: &Self) -> bool {
7871        self.subLinkType == other.subLinkType
7872            && self.subLinkId == other.subLinkId
7873            && self.testexpr.equal(&other.testexpr)
7874            && self.operName.equal(&other.operName)
7875            && self.subselect.equal(&other.subselect)
7876    }
7877}
7878
7879impl Equal for TableLikeClause {
7880    fn equal(&self, other: &Self) -> bool {
7881        self.relation.equal(&other.relation)
7882            && self.options == other.options
7883            && self.relationOid == other.relationOid
7884    }
7885}
7886
7887impl Equal for TransactionStmt {
7888    fn equal(&self, other: &Self) -> bool {
7889        self.kind == other.kind
7890            && self.options.equal(&other.options)
7891            && self.savepoint_name == other.savepoint_name
7892            && self.gid == other.gid
7893            && self.chain == other.chain
7894    }
7895}
7896
7897impl Equal for TriggerTransition {
7898    fn equal(&self, other: &Self) -> bool {
7899        self.name == other.name && self.isNew == other.isNew && self.isTable == other.isTable
7900    }
7901}
7902
7903impl Equal for TruncateStmt {
7904    fn equal(&self, other: &Self) -> bool {
7905        self.relations.equal(&other.relations)
7906            && self.restart_seqs == other.restart_seqs
7907            && self.behavior == other.behavior
7908    }
7909}
7910
7911impl Equal for TypeCast {
7912    fn equal(&self, other: &Self) -> bool {
7913        self.arg.equal(&other.arg) && self.typeName.equal(&other.typeName)
7914    }
7915}
7916
7917impl Equal for TypeName {
7918    fn equal(&self, other: &Self) -> bool {
7919        self.names.equal(&other.names)
7920            && self.typeOid == other.typeOid
7921            && self.setof == other.setof
7922            && self.pct_type == other.pct_type
7923            && self.typmods.equal(&other.typmods)
7924            && self.typemod == other.typemod
7925            && self.arrayBounds.equal(&other.arrayBounds)
7926    }
7927}
7928
7929impl Equal for UnlistenStmt {
7930    fn equal(&self, other: &Self) -> bool {
7931        self.conditionname == other.conditionname
7932    }
7933}
7934
7935impl Equal for UpdateStmt {
7936    fn equal(&self, other: &Self) -> bool {
7937        self.relation.equal(&other.relation)
7938            && self.targetList.equal(&other.targetList)
7939            && self.whereClause.equal(&other.whereClause)
7940            && self.fromClause.equal(&other.fromClause)
7941            && self.returningClause.equal(&other.returningClause)
7942            && self.withClause.equal(&other.withClause)
7943    }
7944}
7945
7946impl Equal for VacuumRelation {
7947    fn equal(&self, other: &Self) -> bool {
7948        self.relation.equal(&other.relation)
7949            && self.oid == other.oid
7950            && self.va_cols.equal(&other.va_cols)
7951    }
7952}
7953
7954impl Equal for VacuumStmt {
7955    fn equal(&self, other: &Self) -> bool {
7956        self.options.equal(&other.options)
7957            && self.rels.equal(&other.rels)
7958            && self.is_vacuumcmd == other.is_vacuumcmd
7959    }
7960}
7961
7962impl Equal for VariableSetStmt {
7963    fn equal(&self, other: &Self) -> bool {
7964        self.kind == other.kind
7965            && self.name == other.name
7966            && self.args.equal(&other.args)
7967            && self.jumble_args == other.jumble_args
7968            && self.is_local == other.is_local
7969    }
7970}
7971
7972impl Equal for VariableShowStmt {
7973    fn equal(&self, other: &Self) -> bool {
7974        self.name == other.name
7975    }
7976}
7977
7978impl Equal for ViewStmt {
7979    fn equal(&self, other: &Self) -> bool {
7980        self.view.equal(&other.view)
7981            && self.aliases.equal(&other.aliases)
7982            && self.query.equal(&other.query)
7983            && self.replace == other.replace
7984            && self.options.equal(&other.options)
7985            && self.withCheckOption == other.withCheckOption
7986    }
7987}
7988
7989impl Equal for WaitStmt {
7990    fn equal(&self, other: &Self) -> bool {
7991        self.lsn_literal == other.lsn_literal && self.options.equal(&other.options)
7992    }
7993}
7994
7995impl Equal for WindowDef {
7996    fn equal(&self, other: &Self) -> bool {
7997        self.name == other.name
7998            && self.refname == other.refname
7999            && self.partitionClause.equal(&other.partitionClause)
8000            && self.orderClause.equal(&other.orderClause)
8001            && self.frameOptions == other.frameOptions
8002            && self.startOffset.equal(&other.startOffset)
8003            && self.endOffset.equal(&other.endOffset)
8004    }
8005}
8006
8007impl Equal for WithClause {
8008    fn equal(&self, other: &Self) -> bool {
8009        self.ctes.equal(&other.ctes) && self.recursive == other.recursive
8010    }
8011}
8012
8013impl Equal for XmlExpr {
8014    fn equal(&self, other: &Self) -> bool {
8015        self.op == other.op
8016            && self.name == other.name
8017            && self.named_args.equal(&other.named_args)
8018            && self.arg_names.equal(&other.arg_names)
8019            && self.args.equal(&other.args)
8020            && self.xmloption == other.xmloption
8021            && self.indent == other.indent
8022            && self.r#type == other.r#type
8023            && self.typmod == other.typmod
8024    }
8025}
8026
8027impl Equal for XmlSerialize {
8028    fn equal(&self, other: &Self) -> bool {
8029        self.xmloption == other.xmloption
8030            && self.expr.equal(&other.expr)
8031            && self.typeName.equal(&other.typeName)
8032            && self.indent == other.indent
8033    }
8034}
8035
8036/// A node of the raw parse tree. The nodes of `value.h` hold their value, and the other
8037/// node types are boxed.
8038#[derive(Clone, Debug, PartialEq)]
8039pub enum Node {
8040    List(List),
8041    Integer(i32),
8042    Float(Str),
8043    Boolean(bool),
8044    String(Str),
8045    BitString(Str),
8046    ATAlterConstraint(Box<ATAlterConstraint>),
8047    A_ArrayExpr(Box<A_ArrayExpr>),
8048    A_Const(Box<A_Const>),
8049    A_Expr(Box<A_Expr>),
8050    A_Indices(Box<A_Indices>),
8051    A_Indirection(Box<A_Indirection>),
8052    A_Star(Box<A_Star>),
8053    AccessPriv(Box<AccessPriv>),
8054    Alias(Box<Alias>),
8055    AlterCollationStmt(Box<AlterCollationStmt>),
8056    AlterDatabaseRefreshCollStmt(Box<AlterDatabaseRefreshCollStmt>),
8057    AlterDatabaseSetStmt(Box<AlterDatabaseSetStmt>),
8058    AlterDatabaseStmt(Box<AlterDatabaseStmt>),
8059    AlterDefaultPrivilegesStmt(Box<AlterDefaultPrivilegesStmt>),
8060    AlterDomainStmt(Box<AlterDomainStmt>),
8061    AlterEnumStmt(Box<AlterEnumStmt>),
8062    AlterEventTrigStmt(Box<AlterEventTrigStmt>),
8063    AlterExtensionContentsStmt(Box<AlterExtensionContentsStmt>),
8064    AlterExtensionStmt(Box<AlterExtensionStmt>),
8065    AlterFdwStmt(Box<AlterFdwStmt>),
8066    AlterForeignServerStmt(Box<AlterForeignServerStmt>),
8067    AlterFunctionStmt(Box<AlterFunctionStmt>),
8068    AlterObjectDependsStmt(Box<AlterObjectDependsStmt>),
8069    AlterObjectSchemaStmt(Box<AlterObjectSchemaStmt>),
8070    AlterOpFamilyStmt(Box<AlterOpFamilyStmt>),
8071    AlterOperatorStmt(Box<AlterOperatorStmt>),
8072    AlterOwnerStmt(Box<AlterOwnerStmt>),
8073    AlterPolicyStmt(Box<AlterPolicyStmt>),
8074    AlterPublicationStmt(Box<AlterPublicationStmt>),
8075    AlterRoleSetStmt(Box<AlterRoleSetStmt>),
8076    AlterRoleStmt(Box<AlterRoleStmt>),
8077    AlterSeqStmt(Box<AlterSeqStmt>),
8078    AlterStatsStmt(Box<AlterStatsStmt>),
8079    AlterSubscriptionStmt(Box<AlterSubscriptionStmt>),
8080    AlterSystemStmt(Box<AlterSystemStmt>),
8081    AlterTSConfigurationStmt(Box<AlterTSConfigurationStmt>),
8082    AlterTSDictionaryStmt(Box<AlterTSDictionaryStmt>),
8083    AlterTableCmd(Box<AlterTableCmd>),
8084    AlterTableMoveAllStmt(Box<AlterTableMoveAllStmt>),
8085    AlterTableSpaceOptionsStmt(Box<AlterTableSpaceOptionsStmt>),
8086    AlterTableStmt(Box<AlterTableStmt>),
8087    AlterTypeStmt(Box<AlterTypeStmt>),
8088    AlterUserMappingStmt(Box<AlterUserMappingStmt>),
8089    BoolExpr(Box<BoolExpr>),
8090    BooleanTest(Box<BooleanTest>),
8091    CTECycleClause(Box<CTECycleClause>),
8092    CTESearchClause(Box<CTESearchClause>),
8093    CallStmt(Box<CallStmt>),
8094    CaseExpr(Box<CaseExpr>),
8095    CaseWhen(Box<CaseWhen>),
8096    CheckPointStmt(Box<CheckPointStmt>),
8097    ClosePortalStmt(Box<ClosePortalStmt>),
8098    CoalesceExpr(Box<CoalesceExpr>),
8099    CollateClause(Box<CollateClause>),
8100    ColumnDef(Box<ColumnDef>),
8101    ColumnRef(Box<ColumnRef>),
8102    CommentStmt(Box<CommentStmt>),
8103    CommonTableExpr(Box<CommonTableExpr>),
8104    CompositeTypeStmt(Box<CompositeTypeStmt>),
8105    Constraint(Box<Constraint>),
8106    ConstraintsSetStmt(Box<ConstraintsSetStmt>),
8107    CopyStmt(Box<CopyStmt>),
8108    CreateAmStmt(Box<CreateAmStmt>),
8109    CreateCastStmt(Box<CreateCastStmt>),
8110    CreateConversionStmt(Box<CreateConversionStmt>),
8111    CreateDomainStmt(Box<CreateDomainStmt>),
8112    CreateEnumStmt(Box<CreateEnumStmt>),
8113    CreateEventTrigStmt(Box<CreateEventTrigStmt>),
8114    CreateExtensionStmt(Box<CreateExtensionStmt>),
8115    CreateFdwStmt(Box<CreateFdwStmt>),
8116    CreateForeignServerStmt(Box<CreateForeignServerStmt>),
8117    CreateForeignTableStmt(Box<CreateForeignTableStmt>),
8118    CreateFunctionStmt(Box<CreateFunctionStmt>),
8119    CreateOpClassItem(Box<CreateOpClassItem>),
8120    CreateOpClassStmt(Box<CreateOpClassStmt>),
8121    CreateOpFamilyStmt(Box<CreateOpFamilyStmt>),
8122    CreatePLangStmt(Box<CreatePLangStmt>),
8123    CreatePolicyStmt(Box<CreatePolicyStmt>),
8124    CreatePublicationStmt(Box<CreatePublicationStmt>),
8125    CreateRangeStmt(Box<CreateRangeStmt>),
8126    CreateRoleStmt(Box<CreateRoleStmt>),
8127    CreateSchemaStmt(Box<CreateSchemaStmt>),
8128    CreateSeqStmt(Box<CreateSeqStmt>),
8129    CreateStatsStmt(Box<CreateStatsStmt>),
8130    CreateStmt(Box<CreateStmt>),
8131    CreateSubscriptionStmt(Box<CreateSubscriptionStmt>),
8132    CreateTableAsStmt(Box<CreateTableAsStmt>),
8133    CreateTableSpaceStmt(Box<CreateTableSpaceStmt>),
8134    CreateTransformStmt(Box<CreateTransformStmt>),
8135    CreateTrigStmt(Box<CreateTrigStmt>),
8136    CreateUserMappingStmt(Box<CreateUserMappingStmt>),
8137    CreatedbStmt(Box<CreatedbStmt>),
8138    CurrentOfExpr(Box<CurrentOfExpr>),
8139    DeallocateStmt(Box<DeallocateStmt>),
8140    DeclareCursorStmt(Box<DeclareCursorStmt>),
8141    DefElem(Box<DefElem>),
8142    DefineStmt(Box<DefineStmt>),
8143    DeleteStmt(Box<DeleteStmt>),
8144    DiscardStmt(Box<DiscardStmt>),
8145    DoStmt(Box<DoStmt>),
8146    DropOwnedStmt(Box<DropOwnedStmt>),
8147    DropRoleStmt(Box<DropRoleStmt>),
8148    DropStmt(Box<DropStmt>),
8149    DropSubscriptionStmt(Box<DropSubscriptionStmt>),
8150    DropTableSpaceStmt(Box<DropTableSpaceStmt>),
8151    DropUserMappingStmt(Box<DropUserMappingStmt>),
8152    DropdbStmt(Box<DropdbStmt>),
8153    ExecuteStmt(Box<ExecuteStmt>),
8154    ExplainStmt(Box<ExplainStmt>),
8155    FetchStmt(Box<FetchStmt>),
8156    FuncCall(Box<FuncCall>),
8157    FunctionParameter(Box<FunctionParameter>),
8158    GrantRoleStmt(Box<GrantRoleStmt>),
8159    GrantStmt(Box<GrantStmt>),
8160    GroupingFunc(Box<GroupingFunc>),
8161    GroupingSet(Box<GroupingSet>),
8162    ImportForeignSchemaStmt(Box<ImportForeignSchemaStmt>),
8163    IndexElem(Box<IndexElem>),
8164    IndexStmt(Box<IndexStmt>),
8165    InferClause(Box<InferClause>),
8166    InsertStmt(Box<InsertStmt>),
8167    IntoClause(Box<IntoClause>),
8168    JoinExpr(Box<JoinExpr>),
8169    JsonAggConstructor(Box<JsonAggConstructor>),
8170    JsonArgument(Box<JsonArgument>),
8171    JsonArrayAgg(Box<JsonArrayAgg>),
8172    JsonArrayConstructor(Box<JsonArrayConstructor>),
8173    JsonArrayQueryConstructor(Box<JsonArrayQueryConstructor>),
8174    JsonBehavior(Box<JsonBehavior>),
8175    JsonFormat(Box<JsonFormat>),
8176    JsonFuncExpr(Box<JsonFuncExpr>),
8177    JsonIsPredicate(Box<JsonIsPredicate>),
8178    JsonKeyValue(Box<JsonKeyValue>),
8179    JsonObjectAgg(Box<JsonObjectAgg>),
8180    JsonObjectConstructor(Box<JsonObjectConstructor>),
8181    JsonOutput(Box<JsonOutput>),
8182    JsonParseExpr(Box<JsonParseExpr>),
8183    JsonReturning(Box<JsonReturning>),
8184    JsonScalarExpr(Box<JsonScalarExpr>),
8185    JsonSerializeExpr(Box<JsonSerializeExpr>),
8186    JsonTable(Box<JsonTable>),
8187    JsonTableColumn(Box<JsonTableColumn>),
8188    JsonTablePathSpec(Box<JsonTablePathSpec>),
8189    JsonValueExpr(Box<JsonValueExpr>),
8190    ListenStmt(Box<ListenStmt>),
8191    LoadStmt(Box<LoadStmt>),
8192    LockStmt(Box<LockStmt>),
8193    LockingClause(Box<LockingClause>),
8194    MergeStmt(Box<MergeStmt>),
8195    MergeSupportFunc(Box<MergeSupportFunc>),
8196    MergeWhenClause(Box<MergeWhenClause>),
8197    MinMaxExpr(Box<MinMaxExpr>),
8198    MultiAssignRef(Box<MultiAssignRef>),
8199    NamedArgExpr(Box<NamedArgExpr>),
8200    NotifyStmt(Box<NotifyStmt>),
8201    NullTest(Box<NullTest>),
8202    ObjectWithArgs(Box<ObjectWithArgs>),
8203    OnConflictClause(Box<OnConflictClause>),
8204    PLAssignStmt(Box<PLAssignStmt>),
8205    ParamRef(Box<ParamRef>),
8206    PartitionBoundSpec(Box<PartitionBoundSpec>),
8207    PartitionCmd(Box<PartitionCmd>),
8208    PartitionElem(Box<PartitionElem>),
8209    PartitionSpec(Box<PartitionSpec>),
8210    PrepareStmt(Box<PrepareStmt>),
8211    PublicationAllObjSpec(Box<PublicationAllObjSpec>),
8212    PublicationObjSpec(Box<PublicationObjSpec>),
8213    PublicationTable(Box<PublicationTable>),
8214    RangeFunction(Box<RangeFunction>),
8215    RangeSubselect(Box<RangeSubselect>),
8216    RangeTableFunc(Box<RangeTableFunc>),
8217    RangeTableFuncCol(Box<RangeTableFuncCol>),
8218    RangeTableSample(Box<RangeTableSample>),
8219    RangeVar(Box<RangeVar>),
8220    RawStmt(Box<RawStmt>),
8221    ReassignOwnedStmt(Box<ReassignOwnedStmt>),
8222    RefreshMatViewStmt(Box<RefreshMatViewStmt>),
8223    ReindexStmt(Box<ReindexStmt>),
8224    RenameStmt(Box<RenameStmt>),
8225    RepackStmt(Box<RepackStmt>),
8226    ReplicaIdentityStmt(Box<ReplicaIdentityStmt>),
8227    ResTarget(Box<ResTarget>),
8228    ReturnStmt(Box<ReturnStmt>),
8229    ReturningClause(Box<ReturningClause>),
8230    ReturningOption(Box<ReturningOption>),
8231    RoleSpec(Box<RoleSpec>),
8232    RowExpr(Box<RowExpr>),
8233    RuleStmt(Box<RuleStmt>),
8234    SQLValueFunction(Box<SQLValueFunction>),
8235    SecLabelStmt(Box<SecLabelStmt>),
8236    SelectStmt(Box<SelectStmt>),
8237    SetToDefault(Box<SetToDefault>),
8238    SortBy(Box<SortBy>),
8239    StatsElem(Box<StatsElem>),
8240    SubLink(Box<SubLink>),
8241    TableLikeClause(Box<TableLikeClause>),
8242    TransactionStmt(Box<TransactionStmt>),
8243    TriggerTransition(Box<TriggerTransition>),
8244    TruncateStmt(Box<TruncateStmt>),
8245    TypeCast(Box<TypeCast>),
8246    TypeName(Box<TypeName>),
8247    UnlistenStmt(Box<UnlistenStmt>),
8248    UpdateStmt(Box<UpdateStmt>),
8249    VacuumRelation(Box<VacuumRelation>),
8250    VacuumStmt(Box<VacuumStmt>),
8251    VariableSetStmt(Box<VariableSetStmt>),
8252    VariableShowStmt(Box<VariableShowStmt>),
8253    ViewStmt(Box<ViewStmt>),
8254    WaitStmt(Box<WaitStmt>),
8255    WindowDef(Box<WindowDef>),
8256    WithClause(Box<WithClause>),
8257    XmlExpr(Box<XmlExpr>),
8258    XmlSerialize(Box<XmlSerialize>),
8259}
8260
8261impl Node {
8262    /// Writes the node as `outNode` writes it.
8263    pub(crate) fn write(&self, s: &mut String) {
8264        match self {
8265            Node::List(list) => w::items(s, list),
8266            Node::Integer(value) => w::integer(s, *value),
8267            Node::Float(value) => s.push_str(value),
8268            Node::Boolean(value) => s.push_str(if *value { "true" } else { "false" }),
8269            Node::String(value) => w::string(s, value),
8270            Node::BitString(value) => w::token(s, Some(value)),
8271            Node::ATAlterConstraint(node) => w::braced(s, &**node),
8272            Node::A_ArrayExpr(node) => w::braced(s, &**node),
8273            Node::A_Const(node) => w::braced(s, &**node),
8274            Node::A_Expr(node) => w::braced(s, &**node),
8275            Node::A_Indices(node) => w::braced(s, &**node),
8276            Node::A_Indirection(node) => w::braced(s, &**node),
8277            Node::A_Star(node) => w::braced(s, &**node),
8278            Node::AccessPriv(node) => w::braced(s, &**node),
8279            Node::Alias(node) => w::braced(s, &**node),
8280            Node::AlterCollationStmt(node) => w::braced(s, &**node),
8281            Node::AlterDatabaseRefreshCollStmt(node) => w::braced(s, &**node),
8282            Node::AlterDatabaseSetStmt(node) => w::braced(s, &**node),
8283            Node::AlterDatabaseStmt(node) => w::braced(s, &**node),
8284            Node::AlterDefaultPrivilegesStmt(node) => w::braced(s, &**node),
8285            Node::AlterDomainStmt(node) => w::braced(s, &**node),
8286            Node::AlterEnumStmt(node) => w::braced(s, &**node),
8287            Node::AlterEventTrigStmt(node) => w::braced(s, &**node),
8288            Node::AlterExtensionContentsStmt(node) => w::braced(s, &**node),
8289            Node::AlterExtensionStmt(node) => w::braced(s, &**node),
8290            Node::AlterFdwStmt(node) => w::braced(s, &**node),
8291            Node::AlterForeignServerStmt(node) => w::braced(s, &**node),
8292            Node::AlterFunctionStmt(node) => w::braced(s, &**node),
8293            Node::AlterObjectDependsStmt(node) => w::braced(s, &**node),
8294            Node::AlterObjectSchemaStmt(node) => w::braced(s, &**node),
8295            Node::AlterOpFamilyStmt(node) => w::braced(s, &**node),
8296            Node::AlterOperatorStmt(node) => w::braced(s, &**node),
8297            Node::AlterOwnerStmt(node) => w::braced(s, &**node),
8298            Node::AlterPolicyStmt(node) => w::braced(s, &**node),
8299            Node::AlterPublicationStmt(node) => w::braced(s, &**node),
8300            Node::AlterRoleSetStmt(node) => w::braced(s, &**node),
8301            Node::AlterRoleStmt(node) => w::braced(s, &**node),
8302            Node::AlterSeqStmt(node) => w::braced(s, &**node),
8303            Node::AlterStatsStmt(node) => w::braced(s, &**node),
8304            Node::AlterSubscriptionStmt(node) => w::braced(s, &**node),
8305            Node::AlterSystemStmt(node) => w::braced(s, &**node),
8306            Node::AlterTSConfigurationStmt(node) => w::braced(s, &**node),
8307            Node::AlterTSDictionaryStmt(node) => w::braced(s, &**node),
8308            Node::AlterTableCmd(node) => w::braced(s, &**node),
8309            Node::AlterTableMoveAllStmt(node) => w::braced(s, &**node),
8310            Node::AlterTableSpaceOptionsStmt(node) => w::braced(s, &**node),
8311            Node::AlterTableStmt(node) => w::braced(s, &**node),
8312            Node::AlterTypeStmt(node) => w::braced(s, &**node),
8313            Node::AlterUserMappingStmt(node) => w::braced(s, &**node),
8314            Node::BoolExpr(node) => w::braced(s, &**node),
8315            Node::BooleanTest(node) => w::braced(s, &**node),
8316            Node::CTECycleClause(node) => w::braced(s, &**node),
8317            Node::CTESearchClause(node) => w::braced(s, &**node),
8318            Node::CallStmt(node) => w::braced(s, &**node),
8319            Node::CaseExpr(node) => w::braced(s, &**node),
8320            Node::CaseWhen(node) => w::braced(s, &**node),
8321            Node::CheckPointStmt(node) => w::braced(s, &**node),
8322            Node::ClosePortalStmt(node) => w::braced(s, &**node),
8323            Node::CoalesceExpr(node) => w::braced(s, &**node),
8324            Node::CollateClause(node) => w::braced(s, &**node),
8325            Node::ColumnDef(node) => w::braced(s, &**node),
8326            Node::ColumnRef(node) => w::braced(s, &**node),
8327            Node::CommentStmt(node) => w::braced(s, &**node),
8328            Node::CommonTableExpr(node) => w::braced(s, &**node),
8329            Node::CompositeTypeStmt(node) => w::braced(s, &**node),
8330            Node::Constraint(node) => w::braced(s, &**node),
8331            Node::ConstraintsSetStmt(node) => w::braced(s, &**node),
8332            Node::CopyStmt(node) => w::braced(s, &**node),
8333            Node::CreateAmStmt(node) => w::braced(s, &**node),
8334            Node::CreateCastStmt(node) => w::braced(s, &**node),
8335            Node::CreateConversionStmt(node) => w::braced(s, &**node),
8336            Node::CreateDomainStmt(node) => w::braced(s, &**node),
8337            Node::CreateEnumStmt(node) => w::braced(s, &**node),
8338            Node::CreateEventTrigStmt(node) => w::braced(s, &**node),
8339            Node::CreateExtensionStmt(node) => w::braced(s, &**node),
8340            Node::CreateFdwStmt(node) => w::braced(s, &**node),
8341            Node::CreateForeignServerStmt(node) => w::braced(s, &**node),
8342            Node::CreateForeignTableStmt(node) => w::braced(s, &**node),
8343            Node::CreateFunctionStmt(node) => w::braced(s, &**node),
8344            Node::CreateOpClassItem(node) => w::braced(s, &**node),
8345            Node::CreateOpClassStmt(node) => w::braced(s, &**node),
8346            Node::CreateOpFamilyStmt(node) => w::braced(s, &**node),
8347            Node::CreatePLangStmt(node) => w::braced(s, &**node),
8348            Node::CreatePolicyStmt(node) => w::braced(s, &**node),
8349            Node::CreatePublicationStmt(node) => w::braced(s, &**node),
8350            Node::CreateRangeStmt(node) => w::braced(s, &**node),
8351            Node::CreateRoleStmt(node) => w::braced(s, &**node),
8352            Node::CreateSchemaStmt(node) => w::braced(s, &**node),
8353            Node::CreateSeqStmt(node) => w::braced(s, &**node),
8354            Node::CreateStatsStmt(node) => w::braced(s, &**node),
8355            Node::CreateStmt(node) => w::braced(s, &**node),
8356            Node::CreateSubscriptionStmt(node) => w::braced(s, &**node),
8357            Node::CreateTableAsStmt(node) => w::braced(s, &**node),
8358            Node::CreateTableSpaceStmt(node) => w::braced(s, &**node),
8359            Node::CreateTransformStmt(node) => w::braced(s, &**node),
8360            Node::CreateTrigStmt(node) => w::braced(s, &**node),
8361            Node::CreateUserMappingStmt(node) => w::braced(s, &**node),
8362            Node::CreatedbStmt(node) => w::braced(s, &**node),
8363            Node::CurrentOfExpr(node) => w::braced(s, &**node),
8364            Node::DeallocateStmt(node) => w::braced(s, &**node),
8365            Node::DeclareCursorStmt(node) => w::braced(s, &**node),
8366            Node::DefElem(node) => w::braced(s, &**node),
8367            Node::DefineStmt(node) => w::braced(s, &**node),
8368            Node::DeleteStmt(node) => w::braced(s, &**node),
8369            Node::DiscardStmt(node) => w::braced(s, &**node),
8370            Node::DoStmt(node) => w::braced(s, &**node),
8371            Node::DropOwnedStmt(node) => w::braced(s, &**node),
8372            Node::DropRoleStmt(node) => w::braced(s, &**node),
8373            Node::DropStmt(node) => w::braced(s, &**node),
8374            Node::DropSubscriptionStmt(node) => w::braced(s, &**node),
8375            Node::DropTableSpaceStmt(node) => w::braced(s, &**node),
8376            Node::DropUserMappingStmt(node) => w::braced(s, &**node),
8377            Node::DropdbStmt(node) => w::braced(s, &**node),
8378            Node::ExecuteStmt(node) => w::braced(s, &**node),
8379            Node::ExplainStmt(node) => w::braced(s, &**node),
8380            Node::FetchStmt(node) => w::braced(s, &**node),
8381            Node::FuncCall(node) => w::braced(s, &**node),
8382            Node::FunctionParameter(node) => w::braced(s, &**node),
8383            Node::GrantRoleStmt(node) => w::braced(s, &**node),
8384            Node::GrantStmt(node) => w::braced(s, &**node),
8385            Node::GroupingFunc(node) => w::braced(s, &**node),
8386            Node::GroupingSet(node) => w::braced(s, &**node),
8387            Node::ImportForeignSchemaStmt(node) => w::braced(s, &**node),
8388            Node::IndexElem(node) => w::braced(s, &**node),
8389            Node::IndexStmt(node) => w::braced(s, &**node),
8390            Node::InferClause(node) => w::braced(s, &**node),
8391            Node::InsertStmt(node) => w::braced(s, &**node),
8392            Node::IntoClause(node) => w::braced(s, &**node),
8393            Node::JoinExpr(node) => w::braced(s, &**node),
8394            Node::JsonAggConstructor(node) => w::braced(s, &**node),
8395            Node::JsonArgument(node) => w::braced(s, &**node),
8396            Node::JsonArrayAgg(node) => w::braced(s, &**node),
8397            Node::JsonArrayConstructor(node) => w::braced(s, &**node),
8398            Node::JsonArrayQueryConstructor(node) => w::braced(s, &**node),
8399            Node::JsonBehavior(node) => w::braced(s, &**node),
8400            Node::JsonFormat(node) => w::braced(s, &**node),
8401            Node::JsonFuncExpr(node) => w::braced(s, &**node),
8402            Node::JsonIsPredicate(node) => w::braced(s, &**node),
8403            Node::JsonKeyValue(node) => w::braced(s, &**node),
8404            Node::JsonObjectAgg(node) => w::braced(s, &**node),
8405            Node::JsonObjectConstructor(node) => w::braced(s, &**node),
8406            Node::JsonOutput(node) => w::braced(s, &**node),
8407            Node::JsonParseExpr(node) => w::braced(s, &**node),
8408            Node::JsonReturning(node) => w::braced(s, &**node),
8409            Node::JsonScalarExpr(node) => w::braced(s, &**node),
8410            Node::JsonSerializeExpr(node) => w::braced(s, &**node),
8411            Node::JsonTable(node) => w::braced(s, &**node),
8412            Node::JsonTableColumn(node) => w::braced(s, &**node),
8413            Node::JsonTablePathSpec(node) => w::braced(s, &**node),
8414            Node::JsonValueExpr(node) => w::braced(s, &**node),
8415            Node::ListenStmt(node) => w::braced(s, &**node),
8416            Node::LoadStmt(node) => w::braced(s, &**node),
8417            Node::LockStmt(node) => w::braced(s, &**node),
8418            Node::LockingClause(node) => w::braced(s, &**node),
8419            Node::MergeStmt(node) => w::braced(s, &**node),
8420            Node::MergeSupportFunc(node) => w::braced(s, &**node),
8421            Node::MergeWhenClause(node) => w::braced(s, &**node),
8422            Node::MinMaxExpr(node) => w::braced(s, &**node),
8423            Node::MultiAssignRef(node) => w::braced(s, &**node),
8424            Node::NamedArgExpr(node) => w::braced(s, &**node),
8425            Node::NotifyStmt(node) => w::braced(s, &**node),
8426            Node::NullTest(node) => w::braced(s, &**node),
8427            Node::ObjectWithArgs(node) => w::braced(s, &**node),
8428            Node::OnConflictClause(node) => w::braced(s, &**node),
8429            Node::PLAssignStmt(node) => w::braced(s, &**node),
8430            Node::ParamRef(node) => w::braced(s, &**node),
8431            Node::PartitionBoundSpec(node) => w::braced(s, &**node),
8432            Node::PartitionCmd(node) => w::braced(s, &**node),
8433            Node::PartitionElem(node) => w::braced(s, &**node),
8434            Node::PartitionSpec(node) => w::braced(s, &**node),
8435            Node::PrepareStmt(node) => w::braced(s, &**node),
8436            Node::PublicationAllObjSpec(node) => w::braced(s, &**node),
8437            Node::PublicationObjSpec(node) => w::braced(s, &**node),
8438            Node::PublicationTable(node) => w::braced(s, &**node),
8439            Node::RangeFunction(node) => w::braced(s, &**node),
8440            Node::RangeSubselect(node) => w::braced(s, &**node),
8441            Node::RangeTableFunc(node) => w::braced(s, &**node),
8442            Node::RangeTableFuncCol(node) => w::braced(s, &**node),
8443            Node::RangeTableSample(node) => w::braced(s, &**node),
8444            Node::RangeVar(node) => w::braced(s, &**node),
8445            Node::RawStmt(node) => w::braced(s, &**node),
8446            Node::ReassignOwnedStmt(node) => w::braced(s, &**node),
8447            Node::RefreshMatViewStmt(node) => w::braced(s, &**node),
8448            Node::ReindexStmt(node) => w::braced(s, &**node),
8449            Node::RenameStmt(node) => w::braced(s, &**node),
8450            Node::RepackStmt(node) => w::braced(s, &**node),
8451            Node::ReplicaIdentityStmt(node) => w::braced(s, &**node),
8452            Node::ResTarget(node) => w::braced(s, &**node),
8453            Node::ReturnStmt(node) => w::braced(s, &**node),
8454            Node::ReturningClause(node) => w::braced(s, &**node),
8455            Node::ReturningOption(node) => w::braced(s, &**node),
8456            Node::RoleSpec(node) => w::braced(s, &**node),
8457            Node::RowExpr(node) => w::braced(s, &**node),
8458            Node::RuleStmt(node) => w::braced(s, &**node),
8459            Node::SQLValueFunction(node) => w::braced(s, &**node),
8460            Node::SecLabelStmt(node) => w::braced(s, &**node),
8461            Node::SelectStmt(node) => w::braced(s, &**node),
8462            Node::SetToDefault(node) => w::braced(s, &**node),
8463            Node::SortBy(node) => w::braced(s, &**node),
8464            Node::StatsElem(node) => w::braced(s, &**node),
8465            Node::SubLink(node) => w::braced(s, &**node),
8466            Node::TableLikeClause(node) => w::braced(s, &**node),
8467            Node::TransactionStmt(node) => w::braced(s, &**node),
8468            Node::TriggerTransition(node) => w::braced(s, &**node),
8469            Node::TruncateStmt(node) => w::braced(s, &**node),
8470            Node::TypeCast(node) => w::braced(s, &**node),
8471            Node::TypeName(node) => w::braced(s, &**node),
8472            Node::UnlistenStmt(node) => w::braced(s, &**node),
8473            Node::UpdateStmt(node) => w::braced(s, &**node),
8474            Node::VacuumRelation(node) => w::braced(s, &**node),
8475            Node::VacuumStmt(node) => w::braced(s, &**node),
8476            Node::VariableSetStmt(node) => w::braced(s, &**node),
8477            Node::VariableShowStmt(node) => w::braced(s, &**node),
8478            Node::ViewStmt(node) => w::braced(s, &**node),
8479            Node::WaitStmt(node) => w::braced(s, &**node),
8480            Node::WindowDef(node) => w::braced(s, &**node),
8481            Node::WithClause(node) => w::braced(s, &**node),
8482            Node::XmlExpr(node) => w::braced(s, &**node),
8483            Node::XmlSerialize(node) => w::braced(s, &**node),
8484        }
8485    }
8486}
8487
8488impl Equal for Node {
8489    fn equal(&self, other: &Node) -> bool {
8490        match (self, other) {
8491            (Node::List(a), Node::List(b)) => a.equal(b),
8492            (Node::Integer(a), Node::Integer(b)) => a == b,
8493            (Node::Float(a), Node::Float(b)) => a == b,
8494            (Node::Boolean(a), Node::Boolean(b)) => a == b,
8495            (Node::String(a), Node::String(b)) => a == b,
8496            (Node::BitString(a), Node::BitString(b)) => a == b,
8497            (Node::ATAlterConstraint(a), Node::ATAlterConstraint(b)) => a.equal(b),
8498            (Node::A_ArrayExpr(a), Node::A_ArrayExpr(b)) => a.equal(b),
8499            (Node::A_Const(a), Node::A_Const(b)) => a.equal(b),
8500            (Node::A_Expr(a), Node::A_Expr(b)) => a.equal(b),
8501            (Node::A_Indices(a), Node::A_Indices(b)) => a.equal(b),
8502            (Node::A_Indirection(a), Node::A_Indirection(b)) => a.equal(b),
8503            (Node::A_Star(a), Node::A_Star(b)) => a.equal(b),
8504            (Node::AccessPriv(a), Node::AccessPriv(b)) => a.equal(b),
8505            (Node::Alias(a), Node::Alias(b)) => a.equal(b),
8506            (Node::AlterCollationStmt(a), Node::AlterCollationStmt(b)) => a.equal(b),
8507            (Node::AlterDatabaseRefreshCollStmt(a), Node::AlterDatabaseRefreshCollStmt(b)) => {
8508                a.equal(b)
8509            }
8510            (Node::AlterDatabaseSetStmt(a), Node::AlterDatabaseSetStmt(b)) => a.equal(b),
8511            (Node::AlterDatabaseStmt(a), Node::AlterDatabaseStmt(b)) => a.equal(b),
8512            (Node::AlterDefaultPrivilegesStmt(a), Node::AlterDefaultPrivilegesStmt(b)) => {
8513                a.equal(b)
8514            }
8515            (Node::AlterDomainStmt(a), Node::AlterDomainStmt(b)) => a.equal(b),
8516            (Node::AlterEnumStmt(a), Node::AlterEnumStmt(b)) => a.equal(b),
8517            (Node::AlterEventTrigStmt(a), Node::AlterEventTrigStmt(b)) => a.equal(b),
8518            (Node::AlterExtensionContentsStmt(a), Node::AlterExtensionContentsStmt(b)) => {
8519                a.equal(b)
8520            }
8521            (Node::AlterExtensionStmt(a), Node::AlterExtensionStmt(b)) => a.equal(b),
8522            (Node::AlterFdwStmt(a), Node::AlterFdwStmt(b)) => a.equal(b),
8523            (Node::AlterForeignServerStmt(a), Node::AlterForeignServerStmt(b)) => a.equal(b),
8524            (Node::AlterFunctionStmt(a), Node::AlterFunctionStmt(b)) => a.equal(b),
8525            (Node::AlterObjectDependsStmt(a), Node::AlterObjectDependsStmt(b)) => a.equal(b),
8526            (Node::AlterObjectSchemaStmt(a), Node::AlterObjectSchemaStmt(b)) => a.equal(b),
8527            (Node::AlterOpFamilyStmt(a), Node::AlterOpFamilyStmt(b)) => a.equal(b),
8528            (Node::AlterOperatorStmt(a), Node::AlterOperatorStmt(b)) => a.equal(b),
8529            (Node::AlterOwnerStmt(a), Node::AlterOwnerStmt(b)) => a.equal(b),
8530            (Node::AlterPolicyStmt(a), Node::AlterPolicyStmt(b)) => a.equal(b),
8531            (Node::AlterPublicationStmt(a), Node::AlterPublicationStmt(b)) => a.equal(b),
8532            (Node::AlterRoleSetStmt(a), Node::AlterRoleSetStmt(b)) => a.equal(b),
8533            (Node::AlterRoleStmt(a), Node::AlterRoleStmt(b)) => a.equal(b),
8534            (Node::AlterSeqStmt(a), Node::AlterSeqStmt(b)) => a.equal(b),
8535            (Node::AlterStatsStmt(a), Node::AlterStatsStmt(b)) => a.equal(b),
8536            (Node::AlterSubscriptionStmt(a), Node::AlterSubscriptionStmt(b)) => a.equal(b),
8537            (Node::AlterSystemStmt(a), Node::AlterSystemStmt(b)) => a.equal(b),
8538            (Node::AlterTSConfigurationStmt(a), Node::AlterTSConfigurationStmt(b)) => a.equal(b),
8539            (Node::AlterTSDictionaryStmt(a), Node::AlterTSDictionaryStmt(b)) => a.equal(b),
8540            (Node::AlterTableCmd(a), Node::AlterTableCmd(b)) => a.equal(b),
8541            (Node::AlterTableMoveAllStmt(a), Node::AlterTableMoveAllStmt(b)) => a.equal(b),
8542            (Node::AlterTableSpaceOptionsStmt(a), Node::AlterTableSpaceOptionsStmt(b)) => {
8543                a.equal(b)
8544            }
8545            (Node::AlterTableStmt(a), Node::AlterTableStmt(b)) => a.equal(b),
8546            (Node::AlterTypeStmt(a), Node::AlterTypeStmt(b)) => a.equal(b),
8547            (Node::AlterUserMappingStmt(a), Node::AlterUserMappingStmt(b)) => a.equal(b),
8548            (Node::BoolExpr(a), Node::BoolExpr(b)) => a.equal(b),
8549            (Node::BooleanTest(a), Node::BooleanTest(b)) => a.equal(b),
8550            (Node::CTECycleClause(a), Node::CTECycleClause(b)) => a.equal(b),
8551            (Node::CTESearchClause(a), Node::CTESearchClause(b)) => a.equal(b),
8552            (Node::CallStmt(a), Node::CallStmt(b)) => a.equal(b),
8553            (Node::CaseExpr(a), Node::CaseExpr(b)) => a.equal(b),
8554            (Node::CaseWhen(a), Node::CaseWhen(b)) => a.equal(b),
8555            (Node::CheckPointStmt(a), Node::CheckPointStmt(b)) => a.equal(b),
8556            (Node::ClosePortalStmt(a), Node::ClosePortalStmt(b)) => a.equal(b),
8557            (Node::CoalesceExpr(a), Node::CoalesceExpr(b)) => a.equal(b),
8558            (Node::CollateClause(a), Node::CollateClause(b)) => a.equal(b),
8559            (Node::ColumnDef(a), Node::ColumnDef(b)) => a.equal(b),
8560            (Node::ColumnRef(a), Node::ColumnRef(b)) => a.equal(b),
8561            (Node::CommentStmt(a), Node::CommentStmt(b)) => a.equal(b),
8562            (Node::CommonTableExpr(a), Node::CommonTableExpr(b)) => a.equal(b),
8563            (Node::CompositeTypeStmt(a), Node::CompositeTypeStmt(b)) => a.equal(b),
8564            (Node::Constraint(a), Node::Constraint(b)) => a.equal(b),
8565            (Node::ConstraintsSetStmt(a), Node::ConstraintsSetStmt(b)) => a.equal(b),
8566            (Node::CopyStmt(a), Node::CopyStmt(b)) => a.equal(b),
8567            (Node::CreateAmStmt(a), Node::CreateAmStmt(b)) => a.equal(b),
8568            (Node::CreateCastStmt(a), Node::CreateCastStmt(b)) => a.equal(b),
8569            (Node::CreateConversionStmt(a), Node::CreateConversionStmt(b)) => a.equal(b),
8570            (Node::CreateDomainStmt(a), Node::CreateDomainStmt(b)) => a.equal(b),
8571            (Node::CreateEnumStmt(a), Node::CreateEnumStmt(b)) => a.equal(b),
8572            (Node::CreateEventTrigStmt(a), Node::CreateEventTrigStmt(b)) => a.equal(b),
8573            (Node::CreateExtensionStmt(a), Node::CreateExtensionStmt(b)) => a.equal(b),
8574            (Node::CreateFdwStmt(a), Node::CreateFdwStmt(b)) => a.equal(b),
8575            (Node::CreateForeignServerStmt(a), Node::CreateForeignServerStmt(b)) => a.equal(b),
8576            (Node::CreateForeignTableStmt(a), Node::CreateForeignTableStmt(b)) => a.equal(b),
8577            (Node::CreateFunctionStmt(a), Node::CreateFunctionStmt(b)) => a.equal(b),
8578            (Node::CreateOpClassItem(a), Node::CreateOpClassItem(b)) => a.equal(b),
8579            (Node::CreateOpClassStmt(a), Node::CreateOpClassStmt(b)) => a.equal(b),
8580            (Node::CreateOpFamilyStmt(a), Node::CreateOpFamilyStmt(b)) => a.equal(b),
8581            (Node::CreatePLangStmt(a), Node::CreatePLangStmt(b)) => a.equal(b),
8582            (Node::CreatePolicyStmt(a), Node::CreatePolicyStmt(b)) => a.equal(b),
8583            (Node::CreatePublicationStmt(a), Node::CreatePublicationStmt(b)) => a.equal(b),
8584            (Node::CreateRangeStmt(a), Node::CreateRangeStmt(b)) => a.equal(b),
8585            (Node::CreateRoleStmt(a), Node::CreateRoleStmt(b)) => a.equal(b),
8586            (Node::CreateSchemaStmt(a), Node::CreateSchemaStmt(b)) => a.equal(b),
8587            (Node::CreateSeqStmt(a), Node::CreateSeqStmt(b)) => a.equal(b),
8588            (Node::CreateStatsStmt(a), Node::CreateStatsStmt(b)) => a.equal(b),
8589            (Node::CreateStmt(a), Node::CreateStmt(b)) => a.equal(b),
8590            (Node::CreateSubscriptionStmt(a), Node::CreateSubscriptionStmt(b)) => a.equal(b),
8591            (Node::CreateTableAsStmt(a), Node::CreateTableAsStmt(b)) => a.equal(b),
8592            (Node::CreateTableSpaceStmt(a), Node::CreateTableSpaceStmt(b)) => a.equal(b),
8593            (Node::CreateTransformStmt(a), Node::CreateTransformStmt(b)) => a.equal(b),
8594            (Node::CreateTrigStmt(a), Node::CreateTrigStmt(b)) => a.equal(b),
8595            (Node::CreateUserMappingStmt(a), Node::CreateUserMappingStmt(b)) => a.equal(b),
8596            (Node::CreatedbStmt(a), Node::CreatedbStmt(b)) => a.equal(b),
8597            (Node::CurrentOfExpr(a), Node::CurrentOfExpr(b)) => a.equal(b),
8598            (Node::DeallocateStmt(a), Node::DeallocateStmt(b)) => a.equal(b),
8599            (Node::DeclareCursorStmt(a), Node::DeclareCursorStmt(b)) => a.equal(b),
8600            (Node::DefElem(a), Node::DefElem(b)) => a.equal(b),
8601            (Node::DefineStmt(a), Node::DefineStmt(b)) => a.equal(b),
8602            (Node::DeleteStmt(a), Node::DeleteStmt(b)) => a.equal(b),
8603            (Node::DiscardStmt(a), Node::DiscardStmt(b)) => a.equal(b),
8604            (Node::DoStmt(a), Node::DoStmt(b)) => a.equal(b),
8605            (Node::DropOwnedStmt(a), Node::DropOwnedStmt(b)) => a.equal(b),
8606            (Node::DropRoleStmt(a), Node::DropRoleStmt(b)) => a.equal(b),
8607            (Node::DropStmt(a), Node::DropStmt(b)) => a.equal(b),
8608            (Node::DropSubscriptionStmt(a), Node::DropSubscriptionStmt(b)) => a.equal(b),
8609            (Node::DropTableSpaceStmt(a), Node::DropTableSpaceStmt(b)) => a.equal(b),
8610            (Node::DropUserMappingStmt(a), Node::DropUserMappingStmt(b)) => a.equal(b),
8611            (Node::DropdbStmt(a), Node::DropdbStmt(b)) => a.equal(b),
8612            (Node::ExecuteStmt(a), Node::ExecuteStmt(b)) => a.equal(b),
8613            (Node::ExplainStmt(a), Node::ExplainStmt(b)) => a.equal(b),
8614            (Node::FetchStmt(a), Node::FetchStmt(b)) => a.equal(b),
8615            (Node::FuncCall(a), Node::FuncCall(b)) => a.equal(b),
8616            (Node::FunctionParameter(a), Node::FunctionParameter(b)) => a.equal(b),
8617            (Node::GrantRoleStmt(a), Node::GrantRoleStmt(b)) => a.equal(b),
8618            (Node::GrantStmt(a), Node::GrantStmt(b)) => a.equal(b),
8619            (Node::GroupingFunc(a), Node::GroupingFunc(b)) => a.equal(b),
8620            (Node::GroupingSet(a), Node::GroupingSet(b)) => a.equal(b),
8621            (Node::ImportForeignSchemaStmt(a), Node::ImportForeignSchemaStmt(b)) => a.equal(b),
8622            (Node::IndexElem(a), Node::IndexElem(b)) => a.equal(b),
8623            (Node::IndexStmt(a), Node::IndexStmt(b)) => a.equal(b),
8624            (Node::InferClause(a), Node::InferClause(b)) => a.equal(b),
8625            (Node::InsertStmt(a), Node::InsertStmt(b)) => a.equal(b),
8626            (Node::IntoClause(a), Node::IntoClause(b)) => a.equal(b),
8627            (Node::JoinExpr(a), Node::JoinExpr(b)) => a.equal(b),
8628            (Node::JsonAggConstructor(a), Node::JsonAggConstructor(b)) => a.equal(b),
8629            (Node::JsonArgument(a), Node::JsonArgument(b)) => a.equal(b),
8630            (Node::JsonArrayAgg(a), Node::JsonArrayAgg(b)) => a.equal(b),
8631            (Node::JsonArrayConstructor(a), Node::JsonArrayConstructor(b)) => a.equal(b),
8632            (Node::JsonArrayQueryConstructor(a), Node::JsonArrayQueryConstructor(b)) => a.equal(b),
8633            (Node::JsonBehavior(a), Node::JsonBehavior(b)) => a.equal(b),
8634            (Node::JsonFormat(a), Node::JsonFormat(b)) => a.equal(b),
8635            (Node::JsonFuncExpr(a), Node::JsonFuncExpr(b)) => a.equal(b),
8636            (Node::JsonIsPredicate(a), Node::JsonIsPredicate(b)) => a.equal(b),
8637            (Node::JsonKeyValue(a), Node::JsonKeyValue(b)) => a.equal(b),
8638            (Node::JsonObjectAgg(a), Node::JsonObjectAgg(b)) => a.equal(b),
8639            (Node::JsonObjectConstructor(a), Node::JsonObjectConstructor(b)) => a.equal(b),
8640            (Node::JsonOutput(a), Node::JsonOutput(b)) => a.equal(b),
8641            (Node::JsonParseExpr(a), Node::JsonParseExpr(b)) => a.equal(b),
8642            (Node::JsonReturning(a), Node::JsonReturning(b)) => a.equal(b),
8643            (Node::JsonScalarExpr(a), Node::JsonScalarExpr(b)) => a.equal(b),
8644            (Node::JsonSerializeExpr(a), Node::JsonSerializeExpr(b)) => a.equal(b),
8645            (Node::JsonTable(a), Node::JsonTable(b)) => a.equal(b),
8646            (Node::JsonTableColumn(a), Node::JsonTableColumn(b)) => a.equal(b),
8647            (Node::JsonTablePathSpec(a), Node::JsonTablePathSpec(b)) => a.equal(b),
8648            (Node::JsonValueExpr(a), Node::JsonValueExpr(b)) => a.equal(b),
8649            (Node::ListenStmt(a), Node::ListenStmt(b)) => a.equal(b),
8650            (Node::LoadStmt(a), Node::LoadStmt(b)) => a.equal(b),
8651            (Node::LockStmt(a), Node::LockStmt(b)) => a.equal(b),
8652            (Node::LockingClause(a), Node::LockingClause(b)) => a.equal(b),
8653            (Node::MergeStmt(a), Node::MergeStmt(b)) => a.equal(b),
8654            (Node::MergeSupportFunc(a), Node::MergeSupportFunc(b)) => a.equal(b),
8655            (Node::MergeWhenClause(a), Node::MergeWhenClause(b)) => a.equal(b),
8656            (Node::MinMaxExpr(a), Node::MinMaxExpr(b)) => a.equal(b),
8657            (Node::MultiAssignRef(a), Node::MultiAssignRef(b)) => a.equal(b),
8658            (Node::NamedArgExpr(a), Node::NamedArgExpr(b)) => a.equal(b),
8659            (Node::NotifyStmt(a), Node::NotifyStmt(b)) => a.equal(b),
8660            (Node::NullTest(a), Node::NullTest(b)) => a.equal(b),
8661            (Node::ObjectWithArgs(a), Node::ObjectWithArgs(b)) => a.equal(b),
8662            (Node::OnConflictClause(a), Node::OnConflictClause(b)) => a.equal(b),
8663            (Node::PLAssignStmt(a), Node::PLAssignStmt(b)) => a.equal(b),
8664            (Node::ParamRef(a), Node::ParamRef(b)) => a.equal(b),
8665            (Node::PartitionBoundSpec(a), Node::PartitionBoundSpec(b)) => a.equal(b),
8666            (Node::PartitionCmd(a), Node::PartitionCmd(b)) => a.equal(b),
8667            (Node::PartitionElem(a), Node::PartitionElem(b)) => a.equal(b),
8668            (Node::PartitionSpec(a), Node::PartitionSpec(b)) => a.equal(b),
8669            (Node::PrepareStmt(a), Node::PrepareStmt(b)) => a.equal(b),
8670            (Node::PublicationAllObjSpec(a), Node::PublicationAllObjSpec(b)) => a.equal(b),
8671            (Node::PublicationObjSpec(a), Node::PublicationObjSpec(b)) => a.equal(b),
8672            (Node::PublicationTable(a), Node::PublicationTable(b)) => a.equal(b),
8673            (Node::RangeFunction(a), Node::RangeFunction(b)) => a.equal(b),
8674            (Node::RangeSubselect(a), Node::RangeSubselect(b)) => a.equal(b),
8675            (Node::RangeTableFunc(a), Node::RangeTableFunc(b)) => a.equal(b),
8676            (Node::RangeTableFuncCol(a), Node::RangeTableFuncCol(b)) => a.equal(b),
8677            (Node::RangeTableSample(a), Node::RangeTableSample(b)) => a.equal(b),
8678            (Node::RangeVar(a), Node::RangeVar(b)) => a.equal(b),
8679            (Node::RawStmt(a), Node::RawStmt(b)) => a.equal(b),
8680            (Node::ReassignOwnedStmt(a), Node::ReassignOwnedStmt(b)) => a.equal(b),
8681            (Node::RefreshMatViewStmt(a), Node::RefreshMatViewStmt(b)) => a.equal(b),
8682            (Node::ReindexStmt(a), Node::ReindexStmt(b)) => a.equal(b),
8683            (Node::RenameStmt(a), Node::RenameStmt(b)) => a.equal(b),
8684            (Node::RepackStmt(a), Node::RepackStmt(b)) => a.equal(b),
8685            (Node::ReplicaIdentityStmt(a), Node::ReplicaIdentityStmt(b)) => a.equal(b),
8686            (Node::ResTarget(a), Node::ResTarget(b)) => a.equal(b),
8687            (Node::ReturnStmt(a), Node::ReturnStmt(b)) => a.equal(b),
8688            (Node::ReturningClause(a), Node::ReturningClause(b)) => a.equal(b),
8689            (Node::ReturningOption(a), Node::ReturningOption(b)) => a.equal(b),
8690            (Node::RoleSpec(a), Node::RoleSpec(b)) => a.equal(b),
8691            (Node::RowExpr(a), Node::RowExpr(b)) => a.equal(b),
8692            (Node::RuleStmt(a), Node::RuleStmt(b)) => a.equal(b),
8693            (Node::SQLValueFunction(a), Node::SQLValueFunction(b)) => a.equal(b),
8694            (Node::SecLabelStmt(a), Node::SecLabelStmt(b)) => a.equal(b),
8695            (Node::SelectStmt(a), Node::SelectStmt(b)) => a.equal(b),
8696            (Node::SetToDefault(a), Node::SetToDefault(b)) => a.equal(b),
8697            (Node::SortBy(a), Node::SortBy(b)) => a.equal(b),
8698            (Node::StatsElem(a), Node::StatsElem(b)) => a.equal(b),
8699            (Node::SubLink(a), Node::SubLink(b)) => a.equal(b),
8700            (Node::TableLikeClause(a), Node::TableLikeClause(b)) => a.equal(b),
8701            (Node::TransactionStmt(a), Node::TransactionStmt(b)) => a.equal(b),
8702            (Node::TriggerTransition(a), Node::TriggerTransition(b)) => a.equal(b),
8703            (Node::TruncateStmt(a), Node::TruncateStmt(b)) => a.equal(b),
8704            (Node::TypeCast(a), Node::TypeCast(b)) => a.equal(b),
8705            (Node::TypeName(a), Node::TypeName(b)) => a.equal(b),
8706            (Node::UnlistenStmt(a), Node::UnlistenStmt(b)) => a.equal(b),
8707            (Node::UpdateStmt(a), Node::UpdateStmt(b)) => a.equal(b),
8708            (Node::VacuumRelation(a), Node::VacuumRelation(b)) => a.equal(b),
8709            (Node::VacuumStmt(a), Node::VacuumStmt(b)) => a.equal(b),
8710            (Node::VariableSetStmt(a), Node::VariableSetStmt(b)) => a.equal(b),
8711            (Node::VariableShowStmt(a), Node::VariableShowStmt(b)) => a.equal(b),
8712            (Node::ViewStmt(a), Node::ViewStmt(b)) => a.equal(b),
8713            (Node::WaitStmt(a), Node::WaitStmt(b)) => a.equal(b),
8714            (Node::WindowDef(a), Node::WindowDef(b)) => a.equal(b),
8715            (Node::WithClause(a), Node::WithClause(b)) => a.equal(b),
8716            (Node::XmlExpr(a), Node::XmlExpr(b)) => a.equal(b),
8717            (Node::XmlSerialize(a), Node::XmlSerialize(b)) => a.equal(b),
8718            _ => false,
8719        }
8720    }
8721}
8722
8723impl NodeType for ATAlterConstraint {
8724    fn into_node(self: Box<Self>) -> Node {
8725        Node::ATAlterConstraint(self)
8726    }
8727
8728    fn from_node(node: Node) -> Result<Box<Self>, Node> {
8729        match node {
8730            Node::ATAlterConstraint(node) => Ok(node),
8731            other => Err(other),
8732        }
8733    }
8734
8735    fn peek(node: &Node) -> Option<&Self> {
8736        match node {
8737            Node::ATAlterConstraint(node) => Some(node),
8738            _ => None,
8739        }
8740    }
8741
8742    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
8743        match node {
8744            Node::ATAlterConstraint(node) => Some(node),
8745            _ => None,
8746        }
8747    }
8748}
8749
8750impl From<ATAlterConstraint> for Node {
8751    fn from(node: ATAlterConstraint) -> Node {
8752        Node::ATAlterConstraint(Box::new(node))
8753    }
8754}
8755
8756impl NodeType for A_ArrayExpr {
8757    fn into_node(self: Box<Self>) -> Node {
8758        Node::A_ArrayExpr(self)
8759    }
8760
8761    fn from_node(node: Node) -> Result<Box<Self>, Node> {
8762        match node {
8763            Node::A_ArrayExpr(node) => Ok(node),
8764            other => Err(other),
8765        }
8766    }
8767
8768    fn peek(node: &Node) -> Option<&Self> {
8769        match node {
8770            Node::A_ArrayExpr(node) => Some(node),
8771            _ => None,
8772        }
8773    }
8774
8775    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
8776        match node {
8777            Node::A_ArrayExpr(node) => Some(node),
8778            _ => None,
8779        }
8780    }
8781}
8782
8783impl From<A_ArrayExpr> for Node {
8784    fn from(node: A_ArrayExpr) -> Node {
8785        Node::A_ArrayExpr(Box::new(node))
8786    }
8787}
8788
8789impl NodeType for A_Const {
8790    fn into_node(self: Box<Self>) -> Node {
8791        Node::A_Const(self)
8792    }
8793
8794    fn from_node(node: Node) -> Result<Box<Self>, Node> {
8795        match node {
8796            Node::A_Const(node) => Ok(node),
8797            other => Err(other),
8798        }
8799    }
8800
8801    fn peek(node: &Node) -> Option<&Self> {
8802        match node {
8803            Node::A_Const(node) => Some(node),
8804            _ => None,
8805        }
8806    }
8807
8808    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
8809        match node {
8810            Node::A_Const(node) => Some(node),
8811            _ => None,
8812        }
8813    }
8814}
8815
8816impl From<A_Const> for Node {
8817    fn from(node: A_Const) -> Node {
8818        Node::A_Const(Box::new(node))
8819    }
8820}
8821
8822impl NodeType for A_Expr {
8823    fn into_node(self: Box<Self>) -> Node {
8824        Node::A_Expr(self)
8825    }
8826
8827    fn from_node(node: Node) -> Result<Box<Self>, Node> {
8828        match node {
8829            Node::A_Expr(node) => Ok(node),
8830            other => Err(other),
8831        }
8832    }
8833
8834    fn peek(node: &Node) -> Option<&Self> {
8835        match node {
8836            Node::A_Expr(node) => Some(node),
8837            _ => None,
8838        }
8839    }
8840
8841    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
8842        match node {
8843            Node::A_Expr(node) => Some(node),
8844            _ => None,
8845        }
8846    }
8847}
8848
8849impl From<A_Expr> for Node {
8850    fn from(node: A_Expr) -> Node {
8851        Node::A_Expr(Box::new(node))
8852    }
8853}
8854
8855impl NodeType for A_Indices {
8856    fn into_node(self: Box<Self>) -> Node {
8857        Node::A_Indices(self)
8858    }
8859
8860    fn from_node(node: Node) -> Result<Box<Self>, Node> {
8861        match node {
8862            Node::A_Indices(node) => Ok(node),
8863            other => Err(other),
8864        }
8865    }
8866
8867    fn peek(node: &Node) -> Option<&Self> {
8868        match node {
8869            Node::A_Indices(node) => Some(node),
8870            _ => None,
8871        }
8872    }
8873
8874    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
8875        match node {
8876            Node::A_Indices(node) => Some(node),
8877            _ => None,
8878        }
8879    }
8880}
8881
8882impl From<A_Indices> for Node {
8883    fn from(node: A_Indices) -> Node {
8884        Node::A_Indices(Box::new(node))
8885    }
8886}
8887
8888impl NodeType for A_Indirection {
8889    fn into_node(self: Box<Self>) -> Node {
8890        Node::A_Indirection(self)
8891    }
8892
8893    fn from_node(node: Node) -> Result<Box<Self>, Node> {
8894        match node {
8895            Node::A_Indirection(node) => Ok(node),
8896            other => Err(other),
8897        }
8898    }
8899
8900    fn peek(node: &Node) -> Option<&Self> {
8901        match node {
8902            Node::A_Indirection(node) => Some(node),
8903            _ => None,
8904        }
8905    }
8906
8907    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
8908        match node {
8909            Node::A_Indirection(node) => Some(node),
8910            _ => None,
8911        }
8912    }
8913}
8914
8915impl From<A_Indirection> for Node {
8916    fn from(node: A_Indirection) -> Node {
8917        Node::A_Indirection(Box::new(node))
8918    }
8919}
8920
8921impl NodeType for A_Star {
8922    fn into_node(self: Box<Self>) -> Node {
8923        Node::A_Star(self)
8924    }
8925
8926    fn from_node(node: Node) -> Result<Box<Self>, Node> {
8927        match node {
8928            Node::A_Star(node) => Ok(node),
8929            other => Err(other),
8930        }
8931    }
8932
8933    fn peek(node: &Node) -> Option<&Self> {
8934        match node {
8935            Node::A_Star(node) => Some(node),
8936            _ => None,
8937        }
8938    }
8939
8940    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
8941        match node {
8942            Node::A_Star(node) => Some(node),
8943            _ => None,
8944        }
8945    }
8946}
8947
8948impl From<A_Star> for Node {
8949    fn from(node: A_Star) -> Node {
8950        Node::A_Star(Box::new(node))
8951    }
8952}
8953
8954impl NodeType for AccessPriv {
8955    fn into_node(self: Box<Self>) -> Node {
8956        Node::AccessPriv(self)
8957    }
8958
8959    fn from_node(node: Node) -> Result<Box<Self>, Node> {
8960        match node {
8961            Node::AccessPriv(node) => Ok(node),
8962            other => Err(other),
8963        }
8964    }
8965
8966    fn peek(node: &Node) -> Option<&Self> {
8967        match node {
8968            Node::AccessPriv(node) => Some(node),
8969            _ => None,
8970        }
8971    }
8972
8973    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
8974        match node {
8975            Node::AccessPriv(node) => Some(node),
8976            _ => None,
8977        }
8978    }
8979}
8980
8981impl From<AccessPriv> for Node {
8982    fn from(node: AccessPriv) -> Node {
8983        Node::AccessPriv(Box::new(node))
8984    }
8985}
8986
8987impl NodeType for Alias {
8988    fn into_node(self: Box<Self>) -> Node {
8989        Node::Alias(self)
8990    }
8991
8992    fn from_node(node: Node) -> Result<Box<Self>, Node> {
8993        match node {
8994            Node::Alias(node) => Ok(node),
8995            other => Err(other),
8996        }
8997    }
8998
8999    fn peek(node: &Node) -> Option<&Self> {
9000        match node {
9001            Node::Alias(node) => Some(node),
9002            _ => None,
9003        }
9004    }
9005
9006    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9007        match node {
9008            Node::Alias(node) => Some(node),
9009            _ => None,
9010        }
9011    }
9012}
9013
9014impl From<Alias> for Node {
9015    fn from(node: Alias) -> Node {
9016        Node::Alias(Box::new(node))
9017    }
9018}
9019
9020impl NodeType for AlterCollationStmt {
9021    fn into_node(self: Box<Self>) -> Node {
9022        Node::AlterCollationStmt(self)
9023    }
9024
9025    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9026        match node {
9027            Node::AlterCollationStmt(node) => Ok(node),
9028            other => Err(other),
9029        }
9030    }
9031
9032    fn peek(node: &Node) -> Option<&Self> {
9033        match node {
9034            Node::AlterCollationStmt(node) => Some(node),
9035            _ => None,
9036        }
9037    }
9038
9039    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9040        match node {
9041            Node::AlterCollationStmt(node) => Some(node),
9042            _ => None,
9043        }
9044    }
9045}
9046
9047impl From<AlterCollationStmt> for Node {
9048    fn from(node: AlterCollationStmt) -> Node {
9049        Node::AlterCollationStmt(Box::new(node))
9050    }
9051}
9052
9053impl NodeType for AlterDatabaseRefreshCollStmt {
9054    fn into_node(self: Box<Self>) -> Node {
9055        Node::AlterDatabaseRefreshCollStmt(self)
9056    }
9057
9058    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9059        match node {
9060            Node::AlterDatabaseRefreshCollStmt(node) => Ok(node),
9061            other => Err(other),
9062        }
9063    }
9064
9065    fn peek(node: &Node) -> Option<&Self> {
9066        match node {
9067            Node::AlterDatabaseRefreshCollStmt(node) => Some(node),
9068            _ => None,
9069        }
9070    }
9071
9072    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9073        match node {
9074            Node::AlterDatabaseRefreshCollStmt(node) => Some(node),
9075            _ => None,
9076        }
9077    }
9078}
9079
9080impl From<AlterDatabaseRefreshCollStmt> for Node {
9081    fn from(node: AlterDatabaseRefreshCollStmt) -> Node {
9082        Node::AlterDatabaseRefreshCollStmt(Box::new(node))
9083    }
9084}
9085
9086impl NodeType for AlterDatabaseSetStmt {
9087    fn into_node(self: Box<Self>) -> Node {
9088        Node::AlterDatabaseSetStmt(self)
9089    }
9090
9091    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9092        match node {
9093            Node::AlterDatabaseSetStmt(node) => Ok(node),
9094            other => Err(other),
9095        }
9096    }
9097
9098    fn peek(node: &Node) -> Option<&Self> {
9099        match node {
9100            Node::AlterDatabaseSetStmt(node) => Some(node),
9101            _ => None,
9102        }
9103    }
9104
9105    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9106        match node {
9107            Node::AlterDatabaseSetStmt(node) => Some(node),
9108            _ => None,
9109        }
9110    }
9111}
9112
9113impl From<AlterDatabaseSetStmt> for Node {
9114    fn from(node: AlterDatabaseSetStmt) -> Node {
9115        Node::AlterDatabaseSetStmt(Box::new(node))
9116    }
9117}
9118
9119impl NodeType for AlterDatabaseStmt {
9120    fn into_node(self: Box<Self>) -> Node {
9121        Node::AlterDatabaseStmt(self)
9122    }
9123
9124    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9125        match node {
9126            Node::AlterDatabaseStmt(node) => Ok(node),
9127            other => Err(other),
9128        }
9129    }
9130
9131    fn peek(node: &Node) -> Option<&Self> {
9132        match node {
9133            Node::AlterDatabaseStmt(node) => Some(node),
9134            _ => None,
9135        }
9136    }
9137
9138    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9139        match node {
9140            Node::AlterDatabaseStmt(node) => Some(node),
9141            _ => None,
9142        }
9143    }
9144}
9145
9146impl From<AlterDatabaseStmt> for Node {
9147    fn from(node: AlterDatabaseStmt) -> Node {
9148        Node::AlterDatabaseStmt(Box::new(node))
9149    }
9150}
9151
9152impl NodeType for AlterDefaultPrivilegesStmt {
9153    fn into_node(self: Box<Self>) -> Node {
9154        Node::AlterDefaultPrivilegesStmt(self)
9155    }
9156
9157    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9158        match node {
9159            Node::AlterDefaultPrivilegesStmt(node) => Ok(node),
9160            other => Err(other),
9161        }
9162    }
9163
9164    fn peek(node: &Node) -> Option<&Self> {
9165        match node {
9166            Node::AlterDefaultPrivilegesStmt(node) => Some(node),
9167            _ => None,
9168        }
9169    }
9170
9171    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9172        match node {
9173            Node::AlterDefaultPrivilegesStmt(node) => Some(node),
9174            _ => None,
9175        }
9176    }
9177}
9178
9179impl From<AlterDefaultPrivilegesStmt> for Node {
9180    fn from(node: AlterDefaultPrivilegesStmt) -> Node {
9181        Node::AlterDefaultPrivilegesStmt(Box::new(node))
9182    }
9183}
9184
9185impl NodeType for AlterDomainStmt {
9186    fn into_node(self: Box<Self>) -> Node {
9187        Node::AlterDomainStmt(self)
9188    }
9189
9190    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9191        match node {
9192            Node::AlterDomainStmt(node) => Ok(node),
9193            other => Err(other),
9194        }
9195    }
9196
9197    fn peek(node: &Node) -> Option<&Self> {
9198        match node {
9199            Node::AlterDomainStmt(node) => Some(node),
9200            _ => None,
9201        }
9202    }
9203
9204    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9205        match node {
9206            Node::AlterDomainStmt(node) => Some(node),
9207            _ => None,
9208        }
9209    }
9210}
9211
9212impl From<AlterDomainStmt> for Node {
9213    fn from(node: AlterDomainStmt) -> Node {
9214        Node::AlterDomainStmt(Box::new(node))
9215    }
9216}
9217
9218impl NodeType for AlterEnumStmt {
9219    fn into_node(self: Box<Self>) -> Node {
9220        Node::AlterEnumStmt(self)
9221    }
9222
9223    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9224        match node {
9225            Node::AlterEnumStmt(node) => Ok(node),
9226            other => Err(other),
9227        }
9228    }
9229
9230    fn peek(node: &Node) -> Option<&Self> {
9231        match node {
9232            Node::AlterEnumStmt(node) => Some(node),
9233            _ => None,
9234        }
9235    }
9236
9237    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9238        match node {
9239            Node::AlterEnumStmt(node) => Some(node),
9240            _ => None,
9241        }
9242    }
9243}
9244
9245impl From<AlterEnumStmt> for Node {
9246    fn from(node: AlterEnumStmt) -> Node {
9247        Node::AlterEnumStmt(Box::new(node))
9248    }
9249}
9250
9251impl NodeType for AlterEventTrigStmt {
9252    fn into_node(self: Box<Self>) -> Node {
9253        Node::AlterEventTrigStmt(self)
9254    }
9255
9256    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9257        match node {
9258            Node::AlterEventTrigStmt(node) => Ok(node),
9259            other => Err(other),
9260        }
9261    }
9262
9263    fn peek(node: &Node) -> Option<&Self> {
9264        match node {
9265            Node::AlterEventTrigStmt(node) => Some(node),
9266            _ => None,
9267        }
9268    }
9269
9270    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9271        match node {
9272            Node::AlterEventTrigStmt(node) => Some(node),
9273            _ => None,
9274        }
9275    }
9276}
9277
9278impl From<AlterEventTrigStmt> for Node {
9279    fn from(node: AlterEventTrigStmt) -> Node {
9280        Node::AlterEventTrigStmt(Box::new(node))
9281    }
9282}
9283
9284impl NodeType for AlterExtensionContentsStmt {
9285    fn into_node(self: Box<Self>) -> Node {
9286        Node::AlterExtensionContentsStmt(self)
9287    }
9288
9289    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9290        match node {
9291            Node::AlterExtensionContentsStmt(node) => Ok(node),
9292            other => Err(other),
9293        }
9294    }
9295
9296    fn peek(node: &Node) -> Option<&Self> {
9297        match node {
9298            Node::AlterExtensionContentsStmt(node) => Some(node),
9299            _ => None,
9300        }
9301    }
9302
9303    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9304        match node {
9305            Node::AlterExtensionContentsStmt(node) => Some(node),
9306            _ => None,
9307        }
9308    }
9309}
9310
9311impl From<AlterExtensionContentsStmt> for Node {
9312    fn from(node: AlterExtensionContentsStmt) -> Node {
9313        Node::AlterExtensionContentsStmt(Box::new(node))
9314    }
9315}
9316
9317impl NodeType for AlterExtensionStmt {
9318    fn into_node(self: Box<Self>) -> Node {
9319        Node::AlterExtensionStmt(self)
9320    }
9321
9322    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9323        match node {
9324            Node::AlterExtensionStmt(node) => Ok(node),
9325            other => Err(other),
9326        }
9327    }
9328
9329    fn peek(node: &Node) -> Option<&Self> {
9330        match node {
9331            Node::AlterExtensionStmt(node) => Some(node),
9332            _ => None,
9333        }
9334    }
9335
9336    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9337        match node {
9338            Node::AlterExtensionStmt(node) => Some(node),
9339            _ => None,
9340        }
9341    }
9342}
9343
9344impl From<AlterExtensionStmt> for Node {
9345    fn from(node: AlterExtensionStmt) -> Node {
9346        Node::AlterExtensionStmt(Box::new(node))
9347    }
9348}
9349
9350impl NodeType for AlterFdwStmt {
9351    fn into_node(self: Box<Self>) -> Node {
9352        Node::AlterFdwStmt(self)
9353    }
9354
9355    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9356        match node {
9357            Node::AlterFdwStmt(node) => Ok(node),
9358            other => Err(other),
9359        }
9360    }
9361
9362    fn peek(node: &Node) -> Option<&Self> {
9363        match node {
9364            Node::AlterFdwStmt(node) => Some(node),
9365            _ => None,
9366        }
9367    }
9368
9369    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9370        match node {
9371            Node::AlterFdwStmt(node) => Some(node),
9372            _ => None,
9373        }
9374    }
9375}
9376
9377impl From<AlterFdwStmt> for Node {
9378    fn from(node: AlterFdwStmt) -> Node {
9379        Node::AlterFdwStmt(Box::new(node))
9380    }
9381}
9382
9383impl NodeType for AlterForeignServerStmt {
9384    fn into_node(self: Box<Self>) -> Node {
9385        Node::AlterForeignServerStmt(self)
9386    }
9387
9388    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9389        match node {
9390            Node::AlterForeignServerStmt(node) => Ok(node),
9391            other => Err(other),
9392        }
9393    }
9394
9395    fn peek(node: &Node) -> Option<&Self> {
9396        match node {
9397            Node::AlterForeignServerStmt(node) => Some(node),
9398            _ => None,
9399        }
9400    }
9401
9402    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9403        match node {
9404            Node::AlterForeignServerStmt(node) => Some(node),
9405            _ => None,
9406        }
9407    }
9408}
9409
9410impl From<AlterForeignServerStmt> for Node {
9411    fn from(node: AlterForeignServerStmt) -> Node {
9412        Node::AlterForeignServerStmt(Box::new(node))
9413    }
9414}
9415
9416impl NodeType for AlterFunctionStmt {
9417    fn into_node(self: Box<Self>) -> Node {
9418        Node::AlterFunctionStmt(self)
9419    }
9420
9421    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9422        match node {
9423            Node::AlterFunctionStmt(node) => Ok(node),
9424            other => Err(other),
9425        }
9426    }
9427
9428    fn peek(node: &Node) -> Option<&Self> {
9429        match node {
9430            Node::AlterFunctionStmt(node) => Some(node),
9431            _ => None,
9432        }
9433    }
9434
9435    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9436        match node {
9437            Node::AlterFunctionStmt(node) => Some(node),
9438            _ => None,
9439        }
9440    }
9441}
9442
9443impl From<AlterFunctionStmt> for Node {
9444    fn from(node: AlterFunctionStmt) -> Node {
9445        Node::AlterFunctionStmt(Box::new(node))
9446    }
9447}
9448
9449impl NodeType for AlterObjectDependsStmt {
9450    fn into_node(self: Box<Self>) -> Node {
9451        Node::AlterObjectDependsStmt(self)
9452    }
9453
9454    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9455        match node {
9456            Node::AlterObjectDependsStmt(node) => Ok(node),
9457            other => Err(other),
9458        }
9459    }
9460
9461    fn peek(node: &Node) -> Option<&Self> {
9462        match node {
9463            Node::AlterObjectDependsStmt(node) => Some(node),
9464            _ => None,
9465        }
9466    }
9467
9468    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9469        match node {
9470            Node::AlterObjectDependsStmt(node) => Some(node),
9471            _ => None,
9472        }
9473    }
9474}
9475
9476impl From<AlterObjectDependsStmt> for Node {
9477    fn from(node: AlterObjectDependsStmt) -> Node {
9478        Node::AlterObjectDependsStmt(Box::new(node))
9479    }
9480}
9481
9482impl NodeType for AlterObjectSchemaStmt {
9483    fn into_node(self: Box<Self>) -> Node {
9484        Node::AlterObjectSchemaStmt(self)
9485    }
9486
9487    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9488        match node {
9489            Node::AlterObjectSchemaStmt(node) => Ok(node),
9490            other => Err(other),
9491        }
9492    }
9493
9494    fn peek(node: &Node) -> Option<&Self> {
9495        match node {
9496            Node::AlterObjectSchemaStmt(node) => Some(node),
9497            _ => None,
9498        }
9499    }
9500
9501    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9502        match node {
9503            Node::AlterObjectSchemaStmt(node) => Some(node),
9504            _ => None,
9505        }
9506    }
9507}
9508
9509impl From<AlterObjectSchemaStmt> for Node {
9510    fn from(node: AlterObjectSchemaStmt) -> Node {
9511        Node::AlterObjectSchemaStmt(Box::new(node))
9512    }
9513}
9514
9515impl NodeType for AlterOpFamilyStmt {
9516    fn into_node(self: Box<Self>) -> Node {
9517        Node::AlterOpFamilyStmt(self)
9518    }
9519
9520    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9521        match node {
9522            Node::AlterOpFamilyStmt(node) => Ok(node),
9523            other => Err(other),
9524        }
9525    }
9526
9527    fn peek(node: &Node) -> Option<&Self> {
9528        match node {
9529            Node::AlterOpFamilyStmt(node) => Some(node),
9530            _ => None,
9531        }
9532    }
9533
9534    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9535        match node {
9536            Node::AlterOpFamilyStmt(node) => Some(node),
9537            _ => None,
9538        }
9539    }
9540}
9541
9542impl From<AlterOpFamilyStmt> for Node {
9543    fn from(node: AlterOpFamilyStmt) -> Node {
9544        Node::AlterOpFamilyStmt(Box::new(node))
9545    }
9546}
9547
9548impl NodeType for AlterOperatorStmt {
9549    fn into_node(self: Box<Self>) -> Node {
9550        Node::AlterOperatorStmt(self)
9551    }
9552
9553    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9554        match node {
9555            Node::AlterOperatorStmt(node) => Ok(node),
9556            other => Err(other),
9557        }
9558    }
9559
9560    fn peek(node: &Node) -> Option<&Self> {
9561        match node {
9562            Node::AlterOperatorStmt(node) => Some(node),
9563            _ => None,
9564        }
9565    }
9566
9567    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9568        match node {
9569            Node::AlterOperatorStmt(node) => Some(node),
9570            _ => None,
9571        }
9572    }
9573}
9574
9575impl From<AlterOperatorStmt> for Node {
9576    fn from(node: AlterOperatorStmt) -> Node {
9577        Node::AlterOperatorStmt(Box::new(node))
9578    }
9579}
9580
9581impl NodeType for AlterOwnerStmt {
9582    fn into_node(self: Box<Self>) -> Node {
9583        Node::AlterOwnerStmt(self)
9584    }
9585
9586    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9587        match node {
9588            Node::AlterOwnerStmt(node) => Ok(node),
9589            other => Err(other),
9590        }
9591    }
9592
9593    fn peek(node: &Node) -> Option<&Self> {
9594        match node {
9595            Node::AlterOwnerStmt(node) => Some(node),
9596            _ => None,
9597        }
9598    }
9599
9600    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9601        match node {
9602            Node::AlterOwnerStmt(node) => Some(node),
9603            _ => None,
9604        }
9605    }
9606}
9607
9608impl From<AlterOwnerStmt> for Node {
9609    fn from(node: AlterOwnerStmt) -> Node {
9610        Node::AlterOwnerStmt(Box::new(node))
9611    }
9612}
9613
9614impl NodeType for AlterPolicyStmt {
9615    fn into_node(self: Box<Self>) -> Node {
9616        Node::AlterPolicyStmt(self)
9617    }
9618
9619    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9620        match node {
9621            Node::AlterPolicyStmt(node) => Ok(node),
9622            other => Err(other),
9623        }
9624    }
9625
9626    fn peek(node: &Node) -> Option<&Self> {
9627        match node {
9628            Node::AlterPolicyStmt(node) => Some(node),
9629            _ => None,
9630        }
9631    }
9632
9633    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9634        match node {
9635            Node::AlterPolicyStmt(node) => Some(node),
9636            _ => None,
9637        }
9638    }
9639}
9640
9641impl From<AlterPolicyStmt> for Node {
9642    fn from(node: AlterPolicyStmt) -> Node {
9643        Node::AlterPolicyStmt(Box::new(node))
9644    }
9645}
9646
9647impl NodeType for AlterPublicationStmt {
9648    fn into_node(self: Box<Self>) -> Node {
9649        Node::AlterPublicationStmt(self)
9650    }
9651
9652    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9653        match node {
9654            Node::AlterPublicationStmt(node) => Ok(node),
9655            other => Err(other),
9656        }
9657    }
9658
9659    fn peek(node: &Node) -> Option<&Self> {
9660        match node {
9661            Node::AlterPublicationStmt(node) => Some(node),
9662            _ => None,
9663        }
9664    }
9665
9666    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9667        match node {
9668            Node::AlterPublicationStmt(node) => Some(node),
9669            _ => None,
9670        }
9671    }
9672}
9673
9674impl From<AlterPublicationStmt> for Node {
9675    fn from(node: AlterPublicationStmt) -> Node {
9676        Node::AlterPublicationStmt(Box::new(node))
9677    }
9678}
9679
9680impl NodeType for AlterRoleSetStmt {
9681    fn into_node(self: Box<Self>) -> Node {
9682        Node::AlterRoleSetStmt(self)
9683    }
9684
9685    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9686        match node {
9687            Node::AlterRoleSetStmt(node) => Ok(node),
9688            other => Err(other),
9689        }
9690    }
9691
9692    fn peek(node: &Node) -> Option<&Self> {
9693        match node {
9694            Node::AlterRoleSetStmt(node) => Some(node),
9695            _ => None,
9696        }
9697    }
9698
9699    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9700        match node {
9701            Node::AlterRoleSetStmt(node) => Some(node),
9702            _ => None,
9703        }
9704    }
9705}
9706
9707impl From<AlterRoleSetStmt> for Node {
9708    fn from(node: AlterRoleSetStmt) -> Node {
9709        Node::AlterRoleSetStmt(Box::new(node))
9710    }
9711}
9712
9713impl NodeType for AlterRoleStmt {
9714    fn into_node(self: Box<Self>) -> Node {
9715        Node::AlterRoleStmt(self)
9716    }
9717
9718    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9719        match node {
9720            Node::AlterRoleStmt(node) => Ok(node),
9721            other => Err(other),
9722        }
9723    }
9724
9725    fn peek(node: &Node) -> Option<&Self> {
9726        match node {
9727            Node::AlterRoleStmt(node) => Some(node),
9728            _ => None,
9729        }
9730    }
9731
9732    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9733        match node {
9734            Node::AlterRoleStmt(node) => Some(node),
9735            _ => None,
9736        }
9737    }
9738}
9739
9740impl From<AlterRoleStmt> for Node {
9741    fn from(node: AlterRoleStmt) -> Node {
9742        Node::AlterRoleStmt(Box::new(node))
9743    }
9744}
9745
9746impl NodeType for AlterSeqStmt {
9747    fn into_node(self: Box<Self>) -> Node {
9748        Node::AlterSeqStmt(self)
9749    }
9750
9751    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9752        match node {
9753            Node::AlterSeqStmt(node) => Ok(node),
9754            other => Err(other),
9755        }
9756    }
9757
9758    fn peek(node: &Node) -> Option<&Self> {
9759        match node {
9760            Node::AlterSeqStmt(node) => Some(node),
9761            _ => None,
9762        }
9763    }
9764
9765    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9766        match node {
9767            Node::AlterSeqStmt(node) => Some(node),
9768            _ => None,
9769        }
9770    }
9771}
9772
9773impl From<AlterSeqStmt> for Node {
9774    fn from(node: AlterSeqStmt) -> Node {
9775        Node::AlterSeqStmt(Box::new(node))
9776    }
9777}
9778
9779impl NodeType for AlterStatsStmt {
9780    fn into_node(self: Box<Self>) -> Node {
9781        Node::AlterStatsStmt(self)
9782    }
9783
9784    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9785        match node {
9786            Node::AlterStatsStmt(node) => Ok(node),
9787            other => Err(other),
9788        }
9789    }
9790
9791    fn peek(node: &Node) -> Option<&Self> {
9792        match node {
9793            Node::AlterStatsStmt(node) => Some(node),
9794            _ => None,
9795        }
9796    }
9797
9798    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9799        match node {
9800            Node::AlterStatsStmt(node) => Some(node),
9801            _ => None,
9802        }
9803    }
9804}
9805
9806impl From<AlterStatsStmt> for Node {
9807    fn from(node: AlterStatsStmt) -> Node {
9808        Node::AlterStatsStmt(Box::new(node))
9809    }
9810}
9811
9812impl NodeType for AlterSubscriptionStmt {
9813    fn into_node(self: Box<Self>) -> Node {
9814        Node::AlterSubscriptionStmt(self)
9815    }
9816
9817    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9818        match node {
9819            Node::AlterSubscriptionStmt(node) => Ok(node),
9820            other => Err(other),
9821        }
9822    }
9823
9824    fn peek(node: &Node) -> Option<&Self> {
9825        match node {
9826            Node::AlterSubscriptionStmt(node) => Some(node),
9827            _ => None,
9828        }
9829    }
9830
9831    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9832        match node {
9833            Node::AlterSubscriptionStmt(node) => Some(node),
9834            _ => None,
9835        }
9836    }
9837}
9838
9839impl From<AlterSubscriptionStmt> for Node {
9840    fn from(node: AlterSubscriptionStmt) -> Node {
9841        Node::AlterSubscriptionStmt(Box::new(node))
9842    }
9843}
9844
9845impl NodeType for AlterSystemStmt {
9846    fn into_node(self: Box<Self>) -> Node {
9847        Node::AlterSystemStmt(self)
9848    }
9849
9850    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9851        match node {
9852            Node::AlterSystemStmt(node) => Ok(node),
9853            other => Err(other),
9854        }
9855    }
9856
9857    fn peek(node: &Node) -> Option<&Self> {
9858        match node {
9859            Node::AlterSystemStmt(node) => Some(node),
9860            _ => None,
9861        }
9862    }
9863
9864    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9865        match node {
9866            Node::AlterSystemStmt(node) => Some(node),
9867            _ => None,
9868        }
9869    }
9870}
9871
9872impl From<AlterSystemStmt> for Node {
9873    fn from(node: AlterSystemStmt) -> Node {
9874        Node::AlterSystemStmt(Box::new(node))
9875    }
9876}
9877
9878impl NodeType for AlterTSConfigurationStmt {
9879    fn into_node(self: Box<Self>) -> Node {
9880        Node::AlterTSConfigurationStmt(self)
9881    }
9882
9883    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9884        match node {
9885            Node::AlterTSConfigurationStmt(node) => Ok(node),
9886            other => Err(other),
9887        }
9888    }
9889
9890    fn peek(node: &Node) -> Option<&Self> {
9891        match node {
9892            Node::AlterTSConfigurationStmt(node) => Some(node),
9893            _ => None,
9894        }
9895    }
9896
9897    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9898        match node {
9899            Node::AlterTSConfigurationStmt(node) => Some(node),
9900            _ => None,
9901        }
9902    }
9903}
9904
9905impl From<AlterTSConfigurationStmt> for Node {
9906    fn from(node: AlterTSConfigurationStmt) -> Node {
9907        Node::AlterTSConfigurationStmt(Box::new(node))
9908    }
9909}
9910
9911impl NodeType for AlterTSDictionaryStmt {
9912    fn into_node(self: Box<Self>) -> Node {
9913        Node::AlterTSDictionaryStmt(self)
9914    }
9915
9916    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9917        match node {
9918            Node::AlterTSDictionaryStmt(node) => Ok(node),
9919            other => Err(other),
9920        }
9921    }
9922
9923    fn peek(node: &Node) -> Option<&Self> {
9924        match node {
9925            Node::AlterTSDictionaryStmt(node) => Some(node),
9926            _ => None,
9927        }
9928    }
9929
9930    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9931        match node {
9932            Node::AlterTSDictionaryStmt(node) => Some(node),
9933            _ => None,
9934        }
9935    }
9936}
9937
9938impl From<AlterTSDictionaryStmt> for Node {
9939    fn from(node: AlterTSDictionaryStmt) -> Node {
9940        Node::AlterTSDictionaryStmt(Box::new(node))
9941    }
9942}
9943
9944impl NodeType for AlterTableCmd {
9945    fn into_node(self: Box<Self>) -> Node {
9946        Node::AlterTableCmd(self)
9947    }
9948
9949    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9950        match node {
9951            Node::AlterTableCmd(node) => Ok(node),
9952            other => Err(other),
9953        }
9954    }
9955
9956    fn peek(node: &Node) -> Option<&Self> {
9957        match node {
9958            Node::AlterTableCmd(node) => Some(node),
9959            _ => None,
9960        }
9961    }
9962
9963    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9964        match node {
9965            Node::AlterTableCmd(node) => Some(node),
9966            _ => None,
9967        }
9968    }
9969}
9970
9971impl From<AlterTableCmd> for Node {
9972    fn from(node: AlterTableCmd) -> Node {
9973        Node::AlterTableCmd(Box::new(node))
9974    }
9975}
9976
9977impl NodeType for AlterTableMoveAllStmt {
9978    fn into_node(self: Box<Self>) -> Node {
9979        Node::AlterTableMoveAllStmt(self)
9980    }
9981
9982    fn from_node(node: Node) -> Result<Box<Self>, Node> {
9983        match node {
9984            Node::AlterTableMoveAllStmt(node) => Ok(node),
9985            other => Err(other),
9986        }
9987    }
9988
9989    fn peek(node: &Node) -> Option<&Self> {
9990        match node {
9991            Node::AlterTableMoveAllStmt(node) => Some(node),
9992            _ => None,
9993        }
9994    }
9995
9996    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
9997        match node {
9998            Node::AlterTableMoveAllStmt(node) => Some(node),
9999            _ => None,
10000        }
10001    }
10002}
10003
10004impl From<AlterTableMoveAllStmt> for Node {
10005    fn from(node: AlterTableMoveAllStmt) -> Node {
10006        Node::AlterTableMoveAllStmt(Box::new(node))
10007    }
10008}
10009
10010impl NodeType for AlterTableSpaceOptionsStmt {
10011    fn into_node(self: Box<Self>) -> Node {
10012        Node::AlterTableSpaceOptionsStmt(self)
10013    }
10014
10015    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10016        match node {
10017            Node::AlterTableSpaceOptionsStmt(node) => Ok(node),
10018            other => Err(other),
10019        }
10020    }
10021
10022    fn peek(node: &Node) -> Option<&Self> {
10023        match node {
10024            Node::AlterTableSpaceOptionsStmt(node) => Some(node),
10025            _ => None,
10026        }
10027    }
10028
10029    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10030        match node {
10031            Node::AlterTableSpaceOptionsStmt(node) => Some(node),
10032            _ => None,
10033        }
10034    }
10035}
10036
10037impl From<AlterTableSpaceOptionsStmt> for Node {
10038    fn from(node: AlterTableSpaceOptionsStmt) -> Node {
10039        Node::AlterTableSpaceOptionsStmt(Box::new(node))
10040    }
10041}
10042
10043impl NodeType for AlterTableStmt {
10044    fn into_node(self: Box<Self>) -> Node {
10045        Node::AlterTableStmt(self)
10046    }
10047
10048    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10049        match node {
10050            Node::AlterTableStmt(node) => Ok(node),
10051            other => Err(other),
10052        }
10053    }
10054
10055    fn peek(node: &Node) -> Option<&Self> {
10056        match node {
10057            Node::AlterTableStmt(node) => Some(node),
10058            _ => None,
10059        }
10060    }
10061
10062    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10063        match node {
10064            Node::AlterTableStmt(node) => Some(node),
10065            _ => None,
10066        }
10067    }
10068}
10069
10070impl From<AlterTableStmt> for Node {
10071    fn from(node: AlterTableStmt) -> Node {
10072        Node::AlterTableStmt(Box::new(node))
10073    }
10074}
10075
10076impl NodeType for AlterTypeStmt {
10077    fn into_node(self: Box<Self>) -> Node {
10078        Node::AlterTypeStmt(self)
10079    }
10080
10081    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10082        match node {
10083            Node::AlterTypeStmt(node) => Ok(node),
10084            other => Err(other),
10085        }
10086    }
10087
10088    fn peek(node: &Node) -> Option<&Self> {
10089        match node {
10090            Node::AlterTypeStmt(node) => Some(node),
10091            _ => None,
10092        }
10093    }
10094
10095    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10096        match node {
10097            Node::AlterTypeStmt(node) => Some(node),
10098            _ => None,
10099        }
10100    }
10101}
10102
10103impl From<AlterTypeStmt> for Node {
10104    fn from(node: AlterTypeStmt) -> Node {
10105        Node::AlterTypeStmt(Box::new(node))
10106    }
10107}
10108
10109impl NodeType for AlterUserMappingStmt {
10110    fn into_node(self: Box<Self>) -> Node {
10111        Node::AlterUserMappingStmt(self)
10112    }
10113
10114    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10115        match node {
10116            Node::AlterUserMappingStmt(node) => Ok(node),
10117            other => Err(other),
10118        }
10119    }
10120
10121    fn peek(node: &Node) -> Option<&Self> {
10122        match node {
10123            Node::AlterUserMappingStmt(node) => Some(node),
10124            _ => None,
10125        }
10126    }
10127
10128    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10129        match node {
10130            Node::AlterUserMappingStmt(node) => Some(node),
10131            _ => None,
10132        }
10133    }
10134}
10135
10136impl From<AlterUserMappingStmt> for Node {
10137    fn from(node: AlterUserMappingStmt) -> Node {
10138        Node::AlterUserMappingStmt(Box::new(node))
10139    }
10140}
10141
10142impl NodeType for BoolExpr {
10143    fn into_node(self: Box<Self>) -> Node {
10144        Node::BoolExpr(self)
10145    }
10146
10147    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10148        match node {
10149            Node::BoolExpr(node) => Ok(node),
10150            other => Err(other),
10151        }
10152    }
10153
10154    fn peek(node: &Node) -> Option<&Self> {
10155        match node {
10156            Node::BoolExpr(node) => Some(node),
10157            _ => None,
10158        }
10159    }
10160
10161    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10162        match node {
10163            Node::BoolExpr(node) => Some(node),
10164            _ => None,
10165        }
10166    }
10167}
10168
10169impl From<BoolExpr> for Node {
10170    fn from(node: BoolExpr) -> Node {
10171        Node::BoolExpr(Box::new(node))
10172    }
10173}
10174
10175impl NodeType for BooleanTest {
10176    fn into_node(self: Box<Self>) -> Node {
10177        Node::BooleanTest(self)
10178    }
10179
10180    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10181        match node {
10182            Node::BooleanTest(node) => Ok(node),
10183            other => Err(other),
10184        }
10185    }
10186
10187    fn peek(node: &Node) -> Option<&Self> {
10188        match node {
10189            Node::BooleanTest(node) => Some(node),
10190            _ => None,
10191        }
10192    }
10193
10194    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10195        match node {
10196            Node::BooleanTest(node) => Some(node),
10197            _ => None,
10198        }
10199    }
10200}
10201
10202impl From<BooleanTest> for Node {
10203    fn from(node: BooleanTest) -> Node {
10204        Node::BooleanTest(Box::new(node))
10205    }
10206}
10207
10208impl NodeType for CTECycleClause {
10209    fn into_node(self: Box<Self>) -> Node {
10210        Node::CTECycleClause(self)
10211    }
10212
10213    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10214        match node {
10215            Node::CTECycleClause(node) => Ok(node),
10216            other => Err(other),
10217        }
10218    }
10219
10220    fn peek(node: &Node) -> Option<&Self> {
10221        match node {
10222            Node::CTECycleClause(node) => Some(node),
10223            _ => None,
10224        }
10225    }
10226
10227    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10228        match node {
10229            Node::CTECycleClause(node) => Some(node),
10230            _ => None,
10231        }
10232    }
10233}
10234
10235impl From<CTECycleClause> for Node {
10236    fn from(node: CTECycleClause) -> Node {
10237        Node::CTECycleClause(Box::new(node))
10238    }
10239}
10240
10241impl NodeType for CTESearchClause {
10242    fn into_node(self: Box<Self>) -> Node {
10243        Node::CTESearchClause(self)
10244    }
10245
10246    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10247        match node {
10248            Node::CTESearchClause(node) => Ok(node),
10249            other => Err(other),
10250        }
10251    }
10252
10253    fn peek(node: &Node) -> Option<&Self> {
10254        match node {
10255            Node::CTESearchClause(node) => Some(node),
10256            _ => None,
10257        }
10258    }
10259
10260    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10261        match node {
10262            Node::CTESearchClause(node) => Some(node),
10263            _ => None,
10264        }
10265    }
10266}
10267
10268impl From<CTESearchClause> for Node {
10269    fn from(node: CTESearchClause) -> Node {
10270        Node::CTESearchClause(Box::new(node))
10271    }
10272}
10273
10274impl NodeType for CallStmt {
10275    fn into_node(self: Box<Self>) -> Node {
10276        Node::CallStmt(self)
10277    }
10278
10279    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10280        match node {
10281            Node::CallStmt(node) => Ok(node),
10282            other => Err(other),
10283        }
10284    }
10285
10286    fn peek(node: &Node) -> Option<&Self> {
10287        match node {
10288            Node::CallStmt(node) => Some(node),
10289            _ => None,
10290        }
10291    }
10292
10293    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10294        match node {
10295            Node::CallStmt(node) => Some(node),
10296            _ => None,
10297        }
10298    }
10299}
10300
10301impl From<CallStmt> for Node {
10302    fn from(node: CallStmt) -> Node {
10303        Node::CallStmt(Box::new(node))
10304    }
10305}
10306
10307impl NodeType for CaseExpr {
10308    fn into_node(self: Box<Self>) -> Node {
10309        Node::CaseExpr(self)
10310    }
10311
10312    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10313        match node {
10314            Node::CaseExpr(node) => Ok(node),
10315            other => Err(other),
10316        }
10317    }
10318
10319    fn peek(node: &Node) -> Option<&Self> {
10320        match node {
10321            Node::CaseExpr(node) => Some(node),
10322            _ => None,
10323        }
10324    }
10325
10326    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10327        match node {
10328            Node::CaseExpr(node) => Some(node),
10329            _ => None,
10330        }
10331    }
10332}
10333
10334impl From<CaseExpr> for Node {
10335    fn from(node: CaseExpr) -> Node {
10336        Node::CaseExpr(Box::new(node))
10337    }
10338}
10339
10340impl NodeType for CaseWhen {
10341    fn into_node(self: Box<Self>) -> Node {
10342        Node::CaseWhen(self)
10343    }
10344
10345    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10346        match node {
10347            Node::CaseWhen(node) => Ok(node),
10348            other => Err(other),
10349        }
10350    }
10351
10352    fn peek(node: &Node) -> Option<&Self> {
10353        match node {
10354            Node::CaseWhen(node) => Some(node),
10355            _ => None,
10356        }
10357    }
10358
10359    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10360        match node {
10361            Node::CaseWhen(node) => Some(node),
10362            _ => None,
10363        }
10364    }
10365}
10366
10367impl From<CaseWhen> for Node {
10368    fn from(node: CaseWhen) -> Node {
10369        Node::CaseWhen(Box::new(node))
10370    }
10371}
10372
10373impl NodeType for CheckPointStmt {
10374    fn into_node(self: Box<Self>) -> Node {
10375        Node::CheckPointStmt(self)
10376    }
10377
10378    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10379        match node {
10380            Node::CheckPointStmt(node) => Ok(node),
10381            other => Err(other),
10382        }
10383    }
10384
10385    fn peek(node: &Node) -> Option<&Self> {
10386        match node {
10387            Node::CheckPointStmt(node) => Some(node),
10388            _ => None,
10389        }
10390    }
10391
10392    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10393        match node {
10394            Node::CheckPointStmt(node) => Some(node),
10395            _ => None,
10396        }
10397    }
10398}
10399
10400impl From<CheckPointStmt> for Node {
10401    fn from(node: CheckPointStmt) -> Node {
10402        Node::CheckPointStmt(Box::new(node))
10403    }
10404}
10405
10406impl NodeType for ClosePortalStmt {
10407    fn into_node(self: Box<Self>) -> Node {
10408        Node::ClosePortalStmt(self)
10409    }
10410
10411    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10412        match node {
10413            Node::ClosePortalStmt(node) => Ok(node),
10414            other => Err(other),
10415        }
10416    }
10417
10418    fn peek(node: &Node) -> Option<&Self> {
10419        match node {
10420            Node::ClosePortalStmt(node) => Some(node),
10421            _ => None,
10422        }
10423    }
10424
10425    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10426        match node {
10427            Node::ClosePortalStmt(node) => Some(node),
10428            _ => None,
10429        }
10430    }
10431}
10432
10433impl From<ClosePortalStmt> for Node {
10434    fn from(node: ClosePortalStmt) -> Node {
10435        Node::ClosePortalStmt(Box::new(node))
10436    }
10437}
10438
10439impl NodeType for CoalesceExpr {
10440    fn into_node(self: Box<Self>) -> Node {
10441        Node::CoalesceExpr(self)
10442    }
10443
10444    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10445        match node {
10446            Node::CoalesceExpr(node) => Ok(node),
10447            other => Err(other),
10448        }
10449    }
10450
10451    fn peek(node: &Node) -> Option<&Self> {
10452        match node {
10453            Node::CoalesceExpr(node) => Some(node),
10454            _ => None,
10455        }
10456    }
10457
10458    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10459        match node {
10460            Node::CoalesceExpr(node) => Some(node),
10461            _ => None,
10462        }
10463    }
10464}
10465
10466impl From<CoalesceExpr> for Node {
10467    fn from(node: CoalesceExpr) -> Node {
10468        Node::CoalesceExpr(Box::new(node))
10469    }
10470}
10471
10472impl NodeType for CollateClause {
10473    fn into_node(self: Box<Self>) -> Node {
10474        Node::CollateClause(self)
10475    }
10476
10477    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10478        match node {
10479            Node::CollateClause(node) => Ok(node),
10480            other => Err(other),
10481        }
10482    }
10483
10484    fn peek(node: &Node) -> Option<&Self> {
10485        match node {
10486            Node::CollateClause(node) => Some(node),
10487            _ => None,
10488        }
10489    }
10490
10491    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10492        match node {
10493            Node::CollateClause(node) => Some(node),
10494            _ => None,
10495        }
10496    }
10497}
10498
10499impl From<CollateClause> for Node {
10500    fn from(node: CollateClause) -> Node {
10501        Node::CollateClause(Box::new(node))
10502    }
10503}
10504
10505impl NodeType for ColumnDef {
10506    fn into_node(self: Box<Self>) -> Node {
10507        Node::ColumnDef(self)
10508    }
10509
10510    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10511        match node {
10512            Node::ColumnDef(node) => Ok(node),
10513            other => Err(other),
10514        }
10515    }
10516
10517    fn peek(node: &Node) -> Option<&Self> {
10518        match node {
10519            Node::ColumnDef(node) => Some(node),
10520            _ => None,
10521        }
10522    }
10523
10524    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10525        match node {
10526            Node::ColumnDef(node) => Some(node),
10527            _ => None,
10528        }
10529    }
10530}
10531
10532impl From<ColumnDef> for Node {
10533    fn from(node: ColumnDef) -> Node {
10534        Node::ColumnDef(Box::new(node))
10535    }
10536}
10537
10538impl NodeType for ColumnRef {
10539    fn into_node(self: Box<Self>) -> Node {
10540        Node::ColumnRef(self)
10541    }
10542
10543    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10544        match node {
10545            Node::ColumnRef(node) => Ok(node),
10546            other => Err(other),
10547        }
10548    }
10549
10550    fn peek(node: &Node) -> Option<&Self> {
10551        match node {
10552            Node::ColumnRef(node) => Some(node),
10553            _ => None,
10554        }
10555    }
10556
10557    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10558        match node {
10559            Node::ColumnRef(node) => Some(node),
10560            _ => None,
10561        }
10562    }
10563}
10564
10565impl From<ColumnRef> for Node {
10566    fn from(node: ColumnRef) -> Node {
10567        Node::ColumnRef(Box::new(node))
10568    }
10569}
10570
10571impl NodeType for CommentStmt {
10572    fn into_node(self: Box<Self>) -> Node {
10573        Node::CommentStmt(self)
10574    }
10575
10576    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10577        match node {
10578            Node::CommentStmt(node) => Ok(node),
10579            other => Err(other),
10580        }
10581    }
10582
10583    fn peek(node: &Node) -> Option<&Self> {
10584        match node {
10585            Node::CommentStmt(node) => Some(node),
10586            _ => None,
10587        }
10588    }
10589
10590    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10591        match node {
10592            Node::CommentStmt(node) => Some(node),
10593            _ => None,
10594        }
10595    }
10596}
10597
10598impl From<CommentStmt> for Node {
10599    fn from(node: CommentStmt) -> Node {
10600        Node::CommentStmt(Box::new(node))
10601    }
10602}
10603
10604impl NodeType for CommonTableExpr {
10605    fn into_node(self: Box<Self>) -> Node {
10606        Node::CommonTableExpr(self)
10607    }
10608
10609    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10610        match node {
10611            Node::CommonTableExpr(node) => Ok(node),
10612            other => Err(other),
10613        }
10614    }
10615
10616    fn peek(node: &Node) -> Option<&Self> {
10617        match node {
10618            Node::CommonTableExpr(node) => Some(node),
10619            _ => None,
10620        }
10621    }
10622
10623    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10624        match node {
10625            Node::CommonTableExpr(node) => Some(node),
10626            _ => None,
10627        }
10628    }
10629}
10630
10631impl From<CommonTableExpr> for Node {
10632    fn from(node: CommonTableExpr) -> Node {
10633        Node::CommonTableExpr(Box::new(node))
10634    }
10635}
10636
10637impl NodeType for CompositeTypeStmt {
10638    fn into_node(self: Box<Self>) -> Node {
10639        Node::CompositeTypeStmt(self)
10640    }
10641
10642    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10643        match node {
10644            Node::CompositeTypeStmt(node) => Ok(node),
10645            other => Err(other),
10646        }
10647    }
10648
10649    fn peek(node: &Node) -> Option<&Self> {
10650        match node {
10651            Node::CompositeTypeStmt(node) => Some(node),
10652            _ => None,
10653        }
10654    }
10655
10656    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10657        match node {
10658            Node::CompositeTypeStmt(node) => Some(node),
10659            _ => None,
10660        }
10661    }
10662}
10663
10664impl From<CompositeTypeStmt> for Node {
10665    fn from(node: CompositeTypeStmt) -> Node {
10666        Node::CompositeTypeStmt(Box::new(node))
10667    }
10668}
10669
10670impl NodeType for Constraint {
10671    fn into_node(self: Box<Self>) -> Node {
10672        Node::Constraint(self)
10673    }
10674
10675    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10676        match node {
10677            Node::Constraint(node) => Ok(node),
10678            other => Err(other),
10679        }
10680    }
10681
10682    fn peek(node: &Node) -> Option<&Self> {
10683        match node {
10684            Node::Constraint(node) => Some(node),
10685            _ => None,
10686        }
10687    }
10688
10689    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10690        match node {
10691            Node::Constraint(node) => Some(node),
10692            _ => None,
10693        }
10694    }
10695}
10696
10697impl From<Constraint> for Node {
10698    fn from(node: Constraint) -> Node {
10699        Node::Constraint(Box::new(node))
10700    }
10701}
10702
10703impl NodeType for ConstraintsSetStmt {
10704    fn into_node(self: Box<Self>) -> Node {
10705        Node::ConstraintsSetStmt(self)
10706    }
10707
10708    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10709        match node {
10710            Node::ConstraintsSetStmt(node) => Ok(node),
10711            other => Err(other),
10712        }
10713    }
10714
10715    fn peek(node: &Node) -> Option<&Self> {
10716        match node {
10717            Node::ConstraintsSetStmt(node) => Some(node),
10718            _ => None,
10719        }
10720    }
10721
10722    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10723        match node {
10724            Node::ConstraintsSetStmt(node) => Some(node),
10725            _ => None,
10726        }
10727    }
10728}
10729
10730impl From<ConstraintsSetStmt> for Node {
10731    fn from(node: ConstraintsSetStmt) -> Node {
10732        Node::ConstraintsSetStmt(Box::new(node))
10733    }
10734}
10735
10736impl NodeType for CopyStmt {
10737    fn into_node(self: Box<Self>) -> Node {
10738        Node::CopyStmt(self)
10739    }
10740
10741    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10742        match node {
10743            Node::CopyStmt(node) => Ok(node),
10744            other => Err(other),
10745        }
10746    }
10747
10748    fn peek(node: &Node) -> Option<&Self> {
10749        match node {
10750            Node::CopyStmt(node) => Some(node),
10751            _ => None,
10752        }
10753    }
10754
10755    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10756        match node {
10757            Node::CopyStmt(node) => Some(node),
10758            _ => None,
10759        }
10760    }
10761}
10762
10763impl From<CopyStmt> for Node {
10764    fn from(node: CopyStmt) -> Node {
10765        Node::CopyStmt(Box::new(node))
10766    }
10767}
10768
10769impl NodeType for CreateAmStmt {
10770    fn into_node(self: Box<Self>) -> Node {
10771        Node::CreateAmStmt(self)
10772    }
10773
10774    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10775        match node {
10776            Node::CreateAmStmt(node) => Ok(node),
10777            other => Err(other),
10778        }
10779    }
10780
10781    fn peek(node: &Node) -> Option<&Self> {
10782        match node {
10783            Node::CreateAmStmt(node) => Some(node),
10784            _ => None,
10785        }
10786    }
10787
10788    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10789        match node {
10790            Node::CreateAmStmt(node) => Some(node),
10791            _ => None,
10792        }
10793    }
10794}
10795
10796impl From<CreateAmStmt> for Node {
10797    fn from(node: CreateAmStmt) -> Node {
10798        Node::CreateAmStmt(Box::new(node))
10799    }
10800}
10801
10802impl NodeType for CreateCastStmt {
10803    fn into_node(self: Box<Self>) -> Node {
10804        Node::CreateCastStmt(self)
10805    }
10806
10807    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10808        match node {
10809            Node::CreateCastStmt(node) => Ok(node),
10810            other => Err(other),
10811        }
10812    }
10813
10814    fn peek(node: &Node) -> Option<&Self> {
10815        match node {
10816            Node::CreateCastStmt(node) => Some(node),
10817            _ => None,
10818        }
10819    }
10820
10821    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10822        match node {
10823            Node::CreateCastStmt(node) => Some(node),
10824            _ => None,
10825        }
10826    }
10827}
10828
10829impl From<CreateCastStmt> for Node {
10830    fn from(node: CreateCastStmt) -> Node {
10831        Node::CreateCastStmt(Box::new(node))
10832    }
10833}
10834
10835impl NodeType for CreateConversionStmt {
10836    fn into_node(self: Box<Self>) -> Node {
10837        Node::CreateConversionStmt(self)
10838    }
10839
10840    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10841        match node {
10842            Node::CreateConversionStmt(node) => Ok(node),
10843            other => Err(other),
10844        }
10845    }
10846
10847    fn peek(node: &Node) -> Option<&Self> {
10848        match node {
10849            Node::CreateConversionStmt(node) => Some(node),
10850            _ => None,
10851        }
10852    }
10853
10854    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10855        match node {
10856            Node::CreateConversionStmt(node) => Some(node),
10857            _ => None,
10858        }
10859    }
10860}
10861
10862impl From<CreateConversionStmt> for Node {
10863    fn from(node: CreateConversionStmt) -> Node {
10864        Node::CreateConversionStmt(Box::new(node))
10865    }
10866}
10867
10868impl NodeType for CreateDomainStmt {
10869    fn into_node(self: Box<Self>) -> Node {
10870        Node::CreateDomainStmt(self)
10871    }
10872
10873    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10874        match node {
10875            Node::CreateDomainStmt(node) => Ok(node),
10876            other => Err(other),
10877        }
10878    }
10879
10880    fn peek(node: &Node) -> Option<&Self> {
10881        match node {
10882            Node::CreateDomainStmt(node) => Some(node),
10883            _ => None,
10884        }
10885    }
10886
10887    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10888        match node {
10889            Node::CreateDomainStmt(node) => Some(node),
10890            _ => None,
10891        }
10892    }
10893}
10894
10895impl From<CreateDomainStmt> for Node {
10896    fn from(node: CreateDomainStmt) -> Node {
10897        Node::CreateDomainStmt(Box::new(node))
10898    }
10899}
10900
10901impl NodeType for CreateEnumStmt {
10902    fn into_node(self: Box<Self>) -> Node {
10903        Node::CreateEnumStmt(self)
10904    }
10905
10906    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10907        match node {
10908            Node::CreateEnumStmt(node) => Ok(node),
10909            other => Err(other),
10910        }
10911    }
10912
10913    fn peek(node: &Node) -> Option<&Self> {
10914        match node {
10915            Node::CreateEnumStmt(node) => Some(node),
10916            _ => None,
10917        }
10918    }
10919
10920    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10921        match node {
10922            Node::CreateEnumStmt(node) => Some(node),
10923            _ => None,
10924        }
10925    }
10926}
10927
10928impl From<CreateEnumStmt> for Node {
10929    fn from(node: CreateEnumStmt) -> Node {
10930        Node::CreateEnumStmt(Box::new(node))
10931    }
10932}
10933
10934impl NodeType for CreateEventTrigStmt {
10935    fn into_node(self: Box<Self>) -> Node {
10936        Node::CreateEventTrigStmt(self)
10937    }
10938
10939    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10940        match node {
10941            Node::CreateEventTrigStmt(node) => Ok(node),
10942            other => Err(other),
10943        }
10944    }
10945
10946    fn peek(node: &Node) -> Option<&Self> {
10947        match node {
10948            Node::CreateEventTrigStmt(node) => Some(node),
10949            _ => None,
10950        }
10951    }
10952
10953    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10954        match node {
10955            Node::CreateEventTrigStmt(node) => Some(node),
10956            _ => None,
10957        }
10958    }
10959}
10960
10961impl From<CreateEventTrigStmt> for Node {
10962    fn from(node: CreateEventTrigStmt) -> Node {
10963        Node::CreateEventTrigStmt(Box::new(node))
10964    }
10965}
10966
10967impl NodeType for CreateExtensionStmt {
10968    fn into_node(self: Box<Self>) -> Node {
10969        Node::CreateExtensionStmt(self)
10970    }
10971
10972    fn from_node(node: Node) -> Result<Box<Self>, Node> {
10973        match node {
10974            Node::CreateExtensionStmt(node) => Ok(node),
10975            other => Err(other),
10976        }
10977    }
10978
10979    fn peek(node: &Node) -> Option<&Self> {
10980        match node {
10981            Node::CreateExtensionStmt(node) => Some(node),
10982            _ => None,
10983        }
10984    }
10985
10986    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
10987        match node {
10988            Node::CreateExtensionStmt(node) => Some(node),
10989            _ => None,
10990        }
10991    }
10992}
10993
10994impl From<CreateExtensionStmt> for Node {
10995    fn from(node: CreateExtensionStmt) -> Node {
10996        Node::CreateExtensionStmt(Box::new(node))
10997    }
10998}
10999
11000impl NodeType for CreateFdwStmt {
11001    fn into_node(self: Box<Self>) -> Node {
11002        Node::CreateFdwStmt(self)
11003    }
11004
11005    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11006        match node {
11007            Node::CreateFdwStmt(node) => Ok(node),
11008            other => Err(other),
11009        }
11010    }
11011
11012    fn peek(node: &Node) -> Option<&Self> {
11013        match node {
11014            Node::CreateFdwStmt(node) => Some(node),
11015            _ => None,
11016        }
11017    }
11018
11019    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11020        match node {
11021            Node::CreateFdwStmt(node) => Some(node),
11022            _ => None,
11023        }
11024    }
11025}
11026
11027impl From<CreateFdwStmt> for Node {
11028    fn from(node: CreateFdwStmt) -> Node {
11029        Node::CreateFdwStmt(Box::new(node))
11030    }
11031}
11032
11033impl NodeType for CreateForeignServerStmt {
11034    fn into_node(self: Box<Self>) -> Node {
11035        Node::CreateForeignServerStmt(self)
11036    }
11037
11038    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11039        match node {
11040            Node::CreateForeignServerStmt(node) => Ok(node),
11041            other => Err(other),
11042        }
11043    }
11044
11045    fn peek(node: &Node) -> Option<&Self> {
11046        match node {
11047            Node::CreateForeignServerStmt(node) => Some(node),
11048            _ => None,
11049        }
11050    }
11051
11052    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11053        match node {
11054            Node::CreateForeignServerStmt(node) => Some(node),
11055            _ => None,
11056        }
11057    }
11058}
11059
11060impl From<CreateForeignServerStmt> for Node {
11061    fn from(node: CreateForeignServerStmt) -> Node {
11062        Node::CreateForeignServerStmt(Box::new(node))
11063    }
11064}
11065
11066impl NodeType for CreateForeignTableStmt {
11067    fn into_node(self: Box<Self>) -> Node {
11068        Node::CreateForeignTableStmt(self)
11069    }
11070
11071    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11072        match node {
11073            Node::CreateForeignTableStmt(node) => Ok(node),
11074            other => Err(other),
11075        }
11076    }
11077
11078    fn peek(node: &Node) -> Option<&Self> {
11079        match node {
11080            Node::CreateForeignTableStmt(node) => Some(node),
11081            _ => None,
11082        }
11083    }
11084
11085    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11086        match node {
11087            Node::CreateForeignTableStmt(node) => Some(node),
11088            _ => None,
11089        }
11090    }
11091}
11092
11093impl From<CreateForeignTableStmt> for Node {
11094    fn from(node: CreateForeignTableStmt) -> Node {
11095        Node::CreateForeignTableStmt(Box::new(node))
11096    }
11097}
11098
11099impl NodeType for CreateFunctionStmt {
11100    fn into_node(self: Box<Self>) -> Node {
11101        Node::CreateFunctionStmt(self)
11102    }
11103
11104    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11105        match node {
11106            Node::CreateFunctionStmt(node) => Ok(node),
11107            other => Err(other),
11108        }
11109    }
11110
11111    fn peek(node: &Node) -> Option<&Self> {
11112        match node {
11113            Node::CreateFunctionStmt(node) => Some(node),
11114            _ => None,
11115        }
11116    }
11117
11118    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11119        match node {
11120            Node::CreateFunctionStmt(node) => Some(node),
11121            _ => None,
11122        }
11123    }
11124}
11125
11126impl From<CreateFunctionStmt> for Node {
11127    fn from(node: CreateFunctionStmt) -> Node {
11128        Node::CreateFunctionStmt(Box::new(node))
11129    }
11130}
11131
11132impl NodeType for CreateOpClassItem {
11133    fn into_node(self: Box<Self>) -> Node {
11134        Node::CreateOpClassItem(self)
11135    }
11136
11137    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11138        match node {
11139            Node::CreateOpClassItem(node) => Ok(node),
11140            other => Err(other),
11141        }
11142    }
11143
11144    fn peek(node: &Node) -> Option<&Self> {
11145        match node {
11146            Node::CreateOpClassItem(node) => Some(node),
11147            _ => None,
11148        }
11149    }
11150
11151    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11152        match node {
11153            Node::CreateOpClassItem(node) => Some(node),
11154            _ => None,
11155        }
11156    }
11157}
11158
11159impl From<CreateOpClassItem> for Node {
11160    fn from(node: CreateOpClassItem) -> Node {
11161        Node::CreateOpClassItem(Box::new(node))
11162    }
11163}
11164
11165impl NodeType for CreateOpClassStmt {
11166    fn into_node(self: Box<Self>) -> Node {
11167        Node::CreateOpClassStmt(self)
11168    }
11169
11170    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11171        match node {
11172            Node::CreateOpClassStmt(node) => Ok(node),
11173            other => Err(other),
11174        }
11175    }
11176
11177    fn peek(node: &Node) -> Option<&Self> {
11178        match node {
11179            Node::CreateOpClassStmt(node) => Some(node),
11180            _ => None,
11181        }
11182    }
11183
11184    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11185        match node {
11186            Node::CreateOpClassStmt(node) => Some(node),
11187            _ => None,
11188        }
11189    }
11190}
11191
11192impl From<CreateOpClassStmt> for Node {
11193    fn from(node: CreateOpClassStmt) -> Node {
11194        Node::CreateOpClassStmt(Box::new(node))
11195    }
11196}
11197
11198impl NodeType for CreateOpFamilyStmt {
11199    fn into_node(self: Box<Self>) -> Node {
11200        Node::CreateOpFamilyStmt(self)
11201    }
11202
11203    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11204        match node {
11205            Node::CreateOpFamilyStmt(node) => Ok(node),
11206            other => Err(other),
11207        }
11208    }
11209
11210    fn peek(node: &Node) -> Option<&Self> {
11211        match node {
11212            Node::CreateOpFamilyStmt(node) => Some(node),
11213            _ => None,
11214        }
11215    }
11216
11217    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11218        match node {
11219            Node::CreateOpFamilyStmt(node) => Some(node),
11220            _ => None,
11221        }
11222    }
11223}
11224
11225impl From<CreateOpFamilyStmt> for Node {
11226    fn from(node: CreateOpFamilyStmt) -> Node {
11227        Node::CreateOpFamilyStmt(Box::new(node))
11228    }
11229}
11230
11231impl NodeType for CreatePLangStmt {
11232    fn into_node(self: Box<Self>) -> Node {
11233        Node::CreatePLangStmt(self)
11234    }
11235
11236    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11237        match node {
11238            Node::CreatePLangStmt(node) => Ok(node),
11239            other => Err(other),
11240        }
11241    }
11242
11243    fn peek(node: &Node) -> Option<&Self> {
11244        match node {
11245            Node::CreatePLangStmt(node) => Some(node),
11246            _ => None,
11247        }
11248    }
11249
11250    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11251        match node {
11252            Node::CreatePLangStmt(node) => Some(node),
11253            _ => None,
11254        }
11255    }
11256}
11257
11258impl From<CreatePLangStmt> for Node {
11259    fn from(node: CreatePLangStmt) -> Node {
11260        Node::CreatePLangStmt(Box::new(node))
11261    }
11262}
11263
11264impl NodeType for CreatePolicyStmt {
11265    fn into_node(self: Box<Self>) -> Node {
11266        Node::CreatePolicyStmt(self)
11267    }
11268
11269    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11270        match node {
11271            Node::CreatePolicyStmt(node) => Ok(node),
11272            other => Err(other),
11273        }
11274    }
11275
11276    fn peek(node: &Node) -> Option<&Self> {
11277        match node {
11278            Node::CreatePolicyStmt(node) => Some(node),
11279            _ => None,
11280        }
11281    }
11282
11283    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11284        match node {
11285            Node::CreatePolicyStmt(node) => Some(node),
11286            _ => None,
11287        }
11288    }
11289}
11290
11291impl From<CreatePolicyStmt> for Node {
11292    fn from(node: CreatePolicyStmt) -> Node {
11293        Node::CreatePolicyStmt(Box::new(node))
11294    }
11295}
11296
11297impl NodeType for CreatePublicationStmt {
11298    fn into_node(self: Box<Self>) -> Node {
11299        Node::CreatePublicationStmt(self)
11300    }
11301
11302    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11303        match node {
11304            Node::CreatePublicationStmt(node) => Ok(node),
11305            other => Err(other),
11306        }
11307    }
11308
11309    fn peek(node: &Node) -> Option<&Self> {
11310        match node {
11311            Node::CreatePublicationStmt(node) => Some(node),
11312            _ => None,
11313        }
11314    }
11315
11316    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11317        match node {
11318            Node::CreatePublicationStmt(node) => Some(node),
11319            _ => None,
11320        }
11321    }
11322}
11323
11324impl From<CreatePublicationStmt> for Node {
11325    fn from(node: CreatePublicationStmt) -> Node {
11326        Node::CreatePublicationStmt(Box::new(node))
11327    }
11328}
11329
11330impl NodeType for CreateRangeStmt {
11331    fn into_node(self: Box<Self>) -> Node {
11332        Node::CreateRangeStmt(self)
11333    }
11334
11335    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11336        match node {
11337            Node::CreateRangeStmt(node) => Ok(node),
11338            other => Err(other),
11339        }
11340    }
11341
11342    fn peek(node: &Node) -> Option<&Self> {
11343        match node {
11344            Node::CreateRangeStmt(node) => Some(node),
11345            _ => None,
11346        }
11347    }
11348
11349    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11350        match node {
11351            Node::CreateRangeStmt(node) => Some(node),
11352            _ => None,
11353        }
11354    }
11355}
11356
11357impl From<CreateRangeStmt> for Node {
11358    fn from(node: CreateRangeStmt) -> Node {
11359        Node::CreateRangeStmt(Box::new(node))
11360    }
11361}
11362
11363impl NodeType for CreateRoleStmt {
11364    fn into_node(self: Box<Self>) -> Node {
11365        Node::CreateRoleStmt(self)
11366    }
11367
11368    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11369        match node {
11370            Node::CreateRoleStmt(node) => Ok(node),
11371            other => Err(other),
11372        }
11373    }
11374
11375    fn peek(node: &Node) -> Option<&Self> {
11376        match node {
11377            Node::CreateRoleStmt(node) => Some(node),
11378            _ => None,
11379        }
11380    }
11381
11382    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11383        match node {
11384            Node::CreateRoleStmt(node) => Some(node),
11385            _ => None,
11386        }
11387    }
11388}
11389
11390impl From<CreateRoleStmt> for Node {
11391    fn from(node: CreateRoleStmt) -> Node {
11392        Node::CreateRoleStmt(Box::new(node))
11393    }
11394}
11395
11396impl NodeType for CreateSchemaStmt {
11397    fn into_node(self: Box<Self>) -> Node {
11398        Node::CreateSchemaStmt(self)
11399    }
11400
11401    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11402        match node {
11403            Node::CreateSchemaStmt(node) => Ok(node),
11404            other => Err(other),
11405        }
11406    }
11407
11408    fn peek(node: &Node) -> Option<&Self> {
11409        match node {
11410            Node::CreateSchemaStmt(node) => Some(node),
11411            _ => None,
11412        }
11413    }
11414
11415    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11416        match node {
11417            Node::CreateSchemaStmt(node) => Some(node),
11418            _ => None,
11419        }
11420    }
11421}
11422
11423impl From<CreateSchemaStmt> for Node {
11424    fn from(node: CreateSchemaStmt) -> Node {
11425        Node::CreateSchemaStmt(Box::new(node))
11426    }
11427}
11428
11429impl NodeType for CreateSeqStmt {
11430    fn into_node(self: Box<Self>) -> Node {
11431        Node::CreateSeqStmt(self)
11432    }
11433
11434    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11435        match node {
11436            Node::CreateSeqStmt(node) => Ok(node),
11437            other => Err(other),
11438        }
11439    }
11440
11441    fn peek(node: &Node) -> Option<&Self> {
11442        match node {
11443            Node::CreateSeqStmt(node) => Some(node),
11444            _ => None,
11445        }
11446    }
11447
11448    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11449        match node {
11450            Node::CreateSeqStmt(node) => Some(node),
11451            _ => None,
11452        }
11453    }
11454}
11455
11456impl From<CreateSeqStmt> for Node {
11457    fn from(node: CreateSeqStmt) -> Node {
11458        Node::CreateSeqStmt(Box::new(node))
11459    }
11460}
11461
11462impl NodeType for CreateStatsStmt {
11463    fn into_node(self: Box<Self>) -> Node {
11464        Node::CreateStatsStmt(self)
11465    }
11466
11467    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11468        match node {
11469            Node::CreateStatsStmt(node) => Ok(node),
11470            other => Err(other),
11471        }
11472    }
11473
11474    fn peek(node: &Node) -> Option<&Self> {
11475        match node {
11476            Node::CreateStatsStmt(node) => Some(node),
11477            _ => None,
11478        }
11479    }
11480
11481    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11482        match node {
11483            Node::CreateStatsStmt(node) => Some(node),
11484            _ => None,
11485        }
11486    }
11487}
11488
11489impl From<CreateStatsStmt> for Node {
11490    fn from(node: CreateStatsStmt) -> Node {
11491        Node::CreateStatsStmt(Box::new(node))
11492    }
11493}
11494
11495impl NodeType for CreateStmt {
11496    fn into_node(self: Box<Self>) -> Node {
11497        Node::CreateStmt(self)
11498    }
11499
11500    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11501        match node {
11502            Node::CreateStmt(node) => Ok(node),
11503            other => Err(other),
11504        }
11505    }
11506
11507    fn peek(node: &Node) -> Option<&Self> {
11508        match node {
11509            Node::CreateStmt(node) => Some(node),
11510            _ => None,
11511        }
11512    }
11513
11514    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11515        match node {
11516            Node::CreateStmt(node) => Some(node),
11517            _ => None,
11518        }
11519    }
11520}
11521
11522impl From<CreateStmt> for Node {
11523    fn from(node: CreateStmt) -> Node {
11524        Node::CreateStmt(Box::new(node))
11525    }
11526}
11527
11528impl NodeType for CreateSubscriptionStmt {
11529    fn into_node(self: Box<Self>) -> Node {
11530        Node::CreateSubscriptionStmt(self)
11531    }
11532
11533    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11534        match node {
11535            Node::CreateSubscriptionStmt(node) => Ok(node),
11536            other => Err(other),
11537        }
11538    }
11539
11540    fn peek(node: &Node) -> Option<&Self> {
11541        match node {
11542            Node::CreateSubscriptionStmt(node) => Some(node),
11543            _ => None,
11544        }
11545    }
11546
11547    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11548        match node {
11549            Node::CreateSubscriptionStmt(node) => Some(node),
11550            _ => None,
11551        }
11552    }
11553}
11554
11555impl From<CreateSubscriptionStmt> for Node {
11556    fn from(node: CreateSubscriptionStmt) -> Node {
11557        Node::CreateSubscriptionStmt(Box::new(node))
11558    }
11559}
11560
11561impl NodeType for CreateTableAsStmt {
11562    fn into_node(self: Box<Self>) -> Node {
11563        Node::CreateTableAsStmt(self)
11564    }
11565
11566    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11567        match node {
11568            Node::CreateTableAsStmt(node) => Ok(node),
11569            other => Err(other),
11570        }
11571    }
11572
11573    fn peek(node: &Node) -> Option<&Self> {
11574        match node {
11575            Node::CreateTableAsStmt(node) => Some(node),
11576            _ => None,
11577        }
11578    }
11579
11580    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11581        match node {
11582            Node::CreateTableAsStmt(node) => Some(node),
11583            _ => None,
11584        }
11585    }
11586}
11587
11588impl From<CreateTableAsStmt> for Node {
11589    fn from(node: CreateTableAsStmt) -> Node {
11590        Node::CreateTableAsStmt(Box::new(node))
11591    }
11592}
11593
11594impl NodeType for CreateTableSpaceStmt {
11595    fn into_node(self: Box<Self>) -> Node {
11596        Node::CreateTableSpaceStmt(self)
11597    }
11598
11599    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11600        match node {
11601            Node::CreateTableSpaceStmt(node) => Ok(node),
11602            other => Err(other),
11603        }
11604    }
11605
11606    fn peek(node: &Node) -> Option<&Self> {
11607        match node {
11608            Node::CreateTableSpaceStmt(node) => Some(node),
11609            _ => None,
11610        }
11611    }
11612
11613    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11614        match node {
11615            Node::CreateTableSpaceStmt(node) => Some(node),
11616            _ => None,
11617        }
11618    }
11619}
11620
11621impl From<CreateTableSpaceStmt> for Node {
11622    fn from(node: CreateTableSpaceStmt) -> Node {
11623        Node::CreateTableSpaceStmt(Box::new(node))
11624    }
11625}
11626
11627impl NodeType for CreateTransformStmt {
11628    fn into_node(self: Box<Self>) -> Node {
11629        Node::CreateTransformStmt(self)
11630    }
11631
11632    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11633        match node {
11634            Node::CreateTransformStmt(node) => Ok(node),
11635            other => Err(other),
11636        }
11637    }
11638
11639    fn peek(node: &Node) -> Option<&Self> {
11640        match node {
11641            Node::CreateTransformStmt(node) => Some(node),
11642            _ => None,
11643        }
11644    }
11645
11646    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11647        match node {
11648            Node::CreateTransformStmt(node) => Some(node),
11649            _ => None,
11650        }
11651    }
11652}
11653
11654impl From<CreateTransformStmt> for Node {
11655    fn from(node: CreateTransformStmt) -> Node {
11656        Node::CreateTransformStmt(Box::new(node))
11657    }
11658}
11659
11660impl NodeType for CreateTrigStmt {
11661    fn into_node(self: Box<Self>) -> Node {
11662        Node::CreateTrigStmt(self)
11663    }
11664
11665    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11666        match node {
11667            Node::CreateTrigStmt(node) => Ok(node),
11668            other => Err(other),
11669        }
11670    }
11671
11672    fn peek(node: &Node) -> Option<&Self> {
11673        match node {
11674            Node::CreateTrigStmt(node) => Some(node),
11675            _ => None,
11676        }
11677    }
11678
11679    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11680        match node {
11681            Node::CreateTrigStmt(node) => Some(node),
11682            _ => None,
11683        }
11684    }
11685}
11686
11687impl From<CreateTrigStmt> for Node {
11688    fn from(node: CreateTrigStmt) -> Node {
11689        Node::CreateTrigStmt(Box::new(node))
11690    }
11691}
11692
11693impl NodeType for CreateUserMappingStmt {
11694    fn into_node(self: Box<Self>) -> Node {
11695        Node::CreateUserMappingStmt(self)
11696    }
11697
11698    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11699        match node {
11700            Node::CreateUserMappingStmt(node) => Ok(node),
11701            other => Err(other),
11702        }
11703    }
11704
11705    fn peek(node: &Node) -> Option<&Self> {
11706        match node {
11707            Node::CreateUserMappingStmt(node) => Some(node),
11708            _ => None,
11709        }
11710    }
11711
11712    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11713        match node {
11714            Node::CreateUserMappingStmt(node) => Some(node),
11715            _ => None,
11716        }
11717    }
11718}
11719
11720impl From<CreateUserMappingStmt> for Node {
11721    fn from(node: CreateUserMappingStmt) -> Node {
11722        Node::CreateUserMappingStmt(Box::new(node))
11723    }
11724}
11725
11726impl NodeType for CreatedbStmt {
11727    fn into_node(self: Box<Self>) -> Node {
11728        Node::CreatedbStmt(self)
11729    }
11730
11731    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11732        match node {
11733            Node::CreatedbStmt(node) => Ok(node),
11734            other => Err(other),
11735        }
11736    }
11737
11738    fn peek(node: &Node) -> Option<&Self> {
11739        match node {
11740            Node::CreatedbStmt(node) => Some(node),
11741            _ => None,
11742        }
11743    }
11744
11745    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11746        match node {
11747            Node::CreatedbStmt(node) => Some(node),
11748            _ => None,
11749        }
11750    }
11751}
11752
11753impl From<CreatedbStmt> for Node {
11754    fn from(node: CreatedbStmt) -> Node {
11755        Node::CreatedbStmt(Box::new(node))
11756    }
11757}
11758
11759impl NodeType for CurrentOfExpr {
11760    fn into_node(self: Box<Self>) -> Node {
11761        Node::CurrentOfExpr(self)
11762    }
11763
11764    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11765        match node {
11766            Node::CurrentOfExpr(node) => Ok(node),
11767            other => Err(other),
11768        }
11769    }
11770
11771    fn peek(node: &Node) -> Option<&Self> {
11772        match node {
11773            Node::CurrentOfExpr(node) => Some(node),
11774            _ => None,
11775        }
11776    }
11777
11778    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11779        match node {
11780            Node::CurrentOfExpr(node) => Some(node),
11781            _ => None,
11782        }
11783    }
11784}
11785
11786impl From<CurrentOfExpr> for Node {
11787    fn from(node: CurrentOfExpr) -> Node {
11788        Node::CurrentOfExpr(Box::new(node))
11789    }
11790}
11791
11792impl NodeType for DeallocateStmt {
11793    fn into_node(self: Box<Self>) -> Node {
11794        Node::DeallocateStmt(self)
11795    }
11796
11797    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11798        match node {
11799            Node::DeallocateStmt(node) => Ok(node),
11800            other => Err(other),
11801        }
11802    }
11803
11804    fn peek(node: &Node) -> Option<&Self> {
11805        match node {
11806            Node::DeallocateStmt(node) => Some(node),
11807            _ => None,
11808        }
11809    }
11810
11811    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11812        match node {
11813            Node::DeallocateStmt(node) => Some(node),
11814            _ => None,
11815        }
11816    }
11817}
11818
11819impl From<DeallocateStmt> for Node {
11820    fn from(node: DeallocateStmt) -> Node {
11821        Node::DeallocateStmt(Box::new(node))
11822    }
11823}
11824
11825impl NodeType for DeclareCursorStmt {
11826    fn into_node(self: Box<Self>) -> Node {
11827        Node::DeclareCursorStmt(self)
11828    }
11829
11830    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11831        match node {
11832            Node::DeclareCursorStmt(node) => Ok(node),
11833            other => Err(other),
11834        }
11835    }
11836
11837    fn peek(node: &Node) -> Option<&Self> {
11838        match node {
11839            Node::DeclareCursorStmt(node) => Some(node),
11840            _ => None,
11841        }
11842    }
11843
11844    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11845        match node {
11846            Node::DeclareCursorStmt(node) => Some(node),
11847            _ => None,
11848        }
11849    }
11850}
11851
11852impl From<DeclareCursorStmt> for Node {
11853    fn from(node: DeclareCursorStmt) -> Node {
11854        Node::DeclareCursorStmt(Box::new(node))
11855    }
11856}
11857
11858impl NodeType for DefElem {
11859    fn into_node(self: Box<Self>) -> Node {
11860        Node::DefElem(self)
11861    }
11862
11863    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11864        match node {
11865            Node::DefElem(node) => Ok(node),
11866            other => Err(other),
11867        }
11868    }
11869
11870    fn peek(node: &Node) -> Option<&Self> {
11871        match node {
11872            Node::DefElem(node) => Some(node),
11873            _ => None,
11874        }
11875    }
11876
11877    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11878        match node {
11879            Node::DefElem(node) => Some(node),
11880            _ => None,
11881        }
11882    }
11883}
11884
11885impl From<DefElem> for Node {
11886    fn from(node: DefElem) -> Node {
11887        Node::DefElem(Box::new(node))
11888    }
11889}
11890
11891impl NodeType for DefineStmt {
11892    fn into_node(self: Box<Self>) -> Node {
11893        Node::DefineStmt(self)
11894    }
11895
11896    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11897        match node {
11898            Node::DefineStmt(node) => Ok(node),
11899            other => Err(other),
11900        }
11901    }
11902
11903    fn peek(node: &Node) -> Option<&Self> {
11904        match node {
11905            Node::DefineStmt(node) => Some(node),
11906            _ => None,
11907        }
11908    }
11909
11910    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11911        match node {
11912            Node::DefineStmt(node) => Some(node),
11913            _ => None,
11914        }
11915    }
11916}
11917
11918impl From<DefineStmt> for Node {
11919    fn from(node: DefineStmt) -> Node {
11920        Node::DefineStmt(Box::new(node))
11921    }
11922}
11923
11924impl NodeType for DeleteStmt {
11925    fn into_node(self: Box<Self>) -> Node {
11926        Node::DeleteStmt(self)
11927    }
11928
11929    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11930        match node {
11931            Node::DeleteStmt(node) => Ok(node),
11932            other => Err(other),
11933        }
11934    }
11935
11936    fn peek(node: &Node) -> Option<&Self> {
11937        match node {
11938            Node::DeleteStmt(node) => Some(node),
11939            _ => None,
11940        }
11941    }
11942
11943    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11944        match node {
11945            Node::DeleteStmt(node) => Some(node),
11946            _ => None,
11947        }
11948    }
11949}
11950
11951impl From<DeleteStmt> for Node {
11952    fn from(node: DeleteStmt) -> Node {
11953        Node::DeleteStmt(Box::new(node))
11954    }
11955}
11956
11957impl NodeType for DiscardStmt {
11958    fn into_node(self: Box<Self>) -> Node {
11959        Node::DiscardStmt(self)
11960    }
11961
11962    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11963        match node {
11964            Node::DiscardStmt(node) => Ok(node),
11965            other => Err(other),
11966        }
11967    }
11968
11969    fn peek(node: &Node) -> Option<&Self> {
11970        match node {
11971            Node::DiscardStmt(node) => Some(node),
11972            _ => None,
11973        }
11974    }
11975
11976    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
11977        match node {
11978            Node::DiscardStmt(node) => Some(node),
11979            _ => None,
11980        }
11981    }
11982}
11983
11984impl From<DiscardStmt> for Node {
11985    fn from(node: DiscardStmt) -> Node {
11986        Node::DiscardStmt(Box::new(node))
11987    }
11988}
11989
11990impl NodeType for DoStmt {
11991    fn into_node(self: Box<Self>) -> Node {
11992        Node::DoStmt(self)
11993    }
11994
11995    fn from_node(node: Node) -> Result<Box<Self>, Node> {
11996        match node {
11997            Node::DoStmt(node) => Ok(node),
11998            other => Err(other),
11999        }
12000    }
12001
12002    fn peek(node: &Node) -> Option<&Self> {
12003        match node {
12004            Node::DoStmt(node) => Some(node),
12005            _ => None,
12006        }
12007    }
12008
12009    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12010        match node {
12011            Node::DoStmt(node) => Some(node),
12012            _ => None,
12013        }
12014    }
12015}
12016
12017impl From<DoStmt> for Node {
12018    fn from(node: DoStmt) -> Node {
12019        Node::DoStmt(Box::new(node))
12020    }
12021}
12022
12023impl NodeType for DropOwnedStmt {
12024    fn into_node(self: Box<Self>) -> Node {
12025        Node::DropOwnedStmt(self)
12026    }
12027
12028    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12029        match node {
12030            Node::DropOwnedStmt(node) => Ok(node),
12031            other => Err(other),
12032        }
12033    }
12034
12035    fn peek(node: &Node) -> Option<&Self> {
12036        match node {
12037            Node::DropOwnedStmt(node) => Some(node),
12038            _ => None,
12039        }
12040    }
12041
12042    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12043        match node {
12044            Node::DropOwnedStmt(node) => Some(node),
12045            _ => None,
12046        }
12047    }
12048}
12049
12050impl From<DropOwnedStmt> for Node {
12051    fn from(node: DropOwnedStmt) -> Node {
12052        Node::DropOwnedStmt(Box::new(node))
12053    }
12054}
12055
12056impl NodeType for DropRoleStmt {
12057    fn into_node(self: Box<Self>) -> Node {
12058        Node::DropRoleStmt(self)
12059    }
12060
12061    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12062        match node {
12063            Node::DropRoleStmt(node) => Ok(node),
12064            other => Err(other),
12065        }
12066    }
12067
12068    fn peek(node: &Node) -> Option<&Self> {
12069        match node {
12070            Node::DropRoleStmt(node) => Some(node),
12071            _ => None,
12072        }
12073    }
12074
12075    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12076        match node {
12077            Node::DropRoleStmt(node) => Some(node),
12078            _ => None,
12079        }
12080    }
12081}
12082
12083impl From<DropRoleStmt> for Node {
12084    fn from(node: DropRoleStmt) -> Node {
12085        Node::DropRoleStmt(Box::new(node))
12086    }
12087}
12088
12089impl NodeType for DropStmt {
12090    fn into_node(self: Box<Self>) -> Node {
12091        Node::DropStmt(self)
12092    }
12093
12094    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12095        match node {
12096            Node::DropStmt(node) => Ok(node),
12097            other => Err(other),
12098        }
12099    }
12100
12101    fn peek(node: &Node) -> Option<&Self> {
12102        match node {
12103            Node::DropStmt(node) => Some(node),
12104            _ => None,
12105        }
12106    }
12107
12108    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12109        match node {
12110            Node::DropStmt(node) => Some(node),
12111            _ => None,
12112        }
12113    }
12114}
12115
12116impl From<DropStmt> for Node {
12117    fn from(node: DropStmt) -> Node {
12118        Node::DropStmt(Box::new(node))
12119    }
12120}
12121
12122impl NodeType for DropSubscriptionStmt {
12123    fn into_node(self: Box<Self>) -> Node {
12124        Node::DropSubscriptionStmt(self)
12125    }
12126
12127    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12128        match node {
12129            Node::DropSubscriptionStmt(node) => Ok(node),
12130            other => Err(other),
12131        }
12132    }
12133
12134    fn peek(node: &Node) -> Option<&Self> {
12135        match node {
12136            Node::DropSubscriptionStmt(node) => Some(node),
12137            _ => None,
12138        }
12139    }
12140
12141    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12142        match node {
12143            Node::DropSubscriptionStmt(node) => Some(node),
12144            _ => None,
12145        }
12146    }
12147}
12148
12149impl From<DropSubscriptionStmt> for Node {
12150    fn from(node: DropSubscriptionStmt) -> Node {
12151        Node::DropSubscriptionStmt(Box::new(node))
12152    }
12153}
12154
12155impl NodeType for DropTableSpaceStmt {
12156    fn into_node(self: Box<Self>) -> Node {
12157        Node::DropTableSpaceStmt(self)
12158    }
12159
12160    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12161        match node {
12162            Node::DropTableSpaceStmt(node) => Ok(node),
12163            other => Err(other),
12164        }
12165    }
12166
12167    fn peek(node: &Node) -> Option<&Self> {
12168        match node {
12169            Node::DropTableSpaceStmt(node) => Some(node),
12170            _ => None,
12171        }
12172    }
12173
12174    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12175        match node {
12176            Node::DropTableSpaceStmt(node) => Some(node),
12177            _ => None,
12178        }
12179    }
12180}
12181
12182impl From<DropTableSpaceStmt> for Node {
12183    fn from(node: DropTableSpaceStmt) -> Node {
12184        Node::DropTableSpaceStmt(Box::new(node))
12185    }
12186}
12187
12188impl NodeType for DropUserMappingStmt {
12189    fn into_node(self: Box<Self>) -> Node {
12190        Node::DropUserMappingStmt(self)
12191    }
12192
12193    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12194        match node {
12195            Node::DropUserMappingStmt(node) => Ok(node),
12196            other => Err(other),
12197        }
12198    }
12199
12200    fn peek(node: &Node) -> Option<&Self> {
12201        match node {
12202            Node::DropUserMappingStmt(node) => Some(node),
12203            _ => None,
12204        }
12205    }
12206
12207    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12208        match node {
12209            Node::DropUserMappingStmt(node) => Some(node),
12210            _ => None,
12211        }
12212    }
12213}
12214
12215impl From<DropUserMappingStmt> for Node {
12216    fn from(node: DropUserMappingStmt) -> Node {
12217        Node::DropUserMappingStmt(Box::new(node))
12218    }
12219}
12220
12221impl NodeType for DropdbStmt {
12222    fn into_node(self: Box<Self>) -> Node {
12223        Node::DropdbStmt(self)
12224    }
12225
12226    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12227        match node {
12228            Node::DropdbStmt(node) => Ok(node),
12229            other => Err(other),
12230        }
12231    }
12232
12233    fn peek(node: &Node) -> Option<&Self> {
12234        match node {
12235            Node::DropdbStmt(node) => Some(node),
12236            _ => None,
12237        }
12238    }
12239
12240    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12241        match node {
12242            Node::DropdbStmt(node) => Some(node),
12243            _ => None,
12244        }
12245    }
12246}
12247
12248impl From<DropdbStmt> for Node {
12249    fn from(node: DropdbStmt) -> Node {
12250        Node::DropdbStmt(Box::new(node))
12251    }
12252}
12253
12254impl NodeType for ExecuteStmt {
12255    fn into_node(self: Box<Self>) -> Node {
12256        Node::ExecuteStmt(self)
12257    }
12258
12259    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12260        match node {
12261            Node::ExecuteStmt(node) => Ok(node),
12262            other => Err(other),
12263        }
12264    }
12265
12266    fn peek(node: &Node) -> Option<&Self> {
12267        match node {
12268            Node::ExecuteStmt(node) => Some(node),
12269            _ => None,
12270        }
12271    }
12272
12273    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12274        match node {
12275            Node::ExecuteStmt(node) => Some(node),
12276            _ => None,
12277        }
12278    }
12279}
12280
12281impl From<ExecuteStmt> for Node {
12282    fn from(node: ExecuteStmt) -> Node {
12283        Node::ExecuteStmt(Box::new(node))
12284    }
12285}
12286
12287impl NodeType for ExplainStmt {
12288    fn into_node(self: Box<Self>) -> Node {
12289        Node::ExplainStmt(self)
12290    }
12291
12292    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12293        match node {
12294            Node::ExplainStmt(node) => Ok(node),
12295            other => Err(other),
12296        }
12297    }
12298
12299    fn peek(node: &Node) -> Option<&Self> {
12300        match node {
12301            Node::ExplainStmt(node) => Some(node),
12302            _ => None,
12303        }
12304    }
12305
12306    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12307        match node {
12308            Node::ExplainStmt(node) => Some(node),
12309            _ => None,
12310        }
12311    }
12312}
12313
12314impl From<ExplainStmt> for Node {
12315    fn from(node: ExplainStmt) -> Node {
12316        Node::ExplainStmt(Box::new(node))
12317    }
12318}
12319
12320impl NodeType for FetchStmt {
12321    fn into_node(self: Box<Self>) -> Node {
12322        Node::FetchStmt(self)
12323    }
12324
12325    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12326        match node {
12327            Node::FetchStmt(node) => Ok(node),
12328            other => Err(other),
12329        }
12330    }
12331
12332    fn peek(node: &Node) -> Option<&Self> {
12333        match node {
12334            Node::FetchStmt(node) => Some(node),
12335            _ => None,
12336        }
12337    }
12338
12339    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12340        match node {
12341            Node::FetchStmt(node) => Some(node),
12342            _ => None,
12343        }
12344    }
12345}
12346
12347impl From<FetchStmt> for Node {
12348    fn from(node: FetchStmt) -> Node {
12349        Node::FetchStmt(Box::new(node))
12350    }
12351}
12352
12353impl NodeType for FuncCall {
12354    fn into_node(self: Box<Self>) -> Node {
12355        Node::FuncCall(self)
12356    }
12357
12358    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12359        match node {
12360            Node::FuncCall(node) => Ok(node),
12361            other => Err(other),
12362        }
12363    }
12364
12365    fn peek(node: &Node) -> Option<&Self> {
12366        match node {
12367            Node::FuncCall(node) => Some(node),
12368            _ => None,
12369        }
12370    }
12371
12372    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12373        match node {
12374            Node::FuncCall(node) => Some(node),
12375            _ => None,
12376        }
12377    }
12378}
12379
12380impl From<FuncCall> for Node {
12381    fn from(node: FuncCall) -> Node {
12382        Node::FuncCall(Box::new(node))
12383    }
12384}
12385
12386impl NodeType for FunctionParameter {
12387    fn into_node(self: Box<Self>) -> Node {
12388        Node::FunctionParameter(self)
12389    }
12390
12391    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12392        match node {
12393            Node::FunctionParameter(node) => Ok(node),
12394            other => Err(other),
12395        }
12396    }
12397
12398    fn peek(node: &Node) -> Option<&Self> {
12399        match node {
12400            Node::FunctionParameter(node) => Some(node),
12401            _ => None,
12402        }
12403    }
12404
12405    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12406        match node {
12407            Node::FunctionParameter(node) => Some(node),
12408            _ => None,
12409        }
12410    }
12411}
12412
12413impl From<FunctionParameter> for Node {
12414    fn from(node: FunctionParameter) -> Node {
12415        Node::FunctionParameter(Box::new(node))
12416    }
12417}
12418
12419impl NodeType for GrantRoleStmt {
12420    fn into_node(self: Box<Self>) -> Node {
12421        Node::GrantRoleStmt(self)
12422    }
12423
12424    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12425        match node {
12426            Node::GrantRoleStmt(node) => Ok(node),
12427            other => Err(other),
12428        }
12429    }
12430
12431    fn peek(node: &Node) -> Option<&Self> {
12432        match node {
12433            Node::GrantRoleStmt(node) => Some(node),
12434            _ => None,
12435        }
12436    }
12437
12438    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12439        match node {
12440            Node::GrantRoleStmt(node) => Some(node),
12441            _ => None,
12442        }
12443    }
12444}
12445
12446impl From<GrantRoleStmt> for Node {
12447    fn from(node: GrantRoleStmt) -> Node {
12448        Node::GrantRoleStmt(Box::new(node))
12449    }
12450}
12451
12452impl NodeType for GrantStmt {
12453    fn into_node(self: Box<Self>) -> Node {
12454        Node::GrantStmt(self)
12455    }
12456
12457    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12458        match node {
12459            Node::GrantStmt(node) => Ok(node),
12460            other => Err(other),
12461        }
12462    }
12463
12464    fn peek(node: &Node) -> Option<&Self> {
12465        match node {
12466            Node::GrantStmt(node) => Some(node),
12467            _ => None,
12468        }
12469    }
12470
12471    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12472        match node {
12473            Node::GrantStmt(node) => Some(node),
12474            _ => None,
12475        }
12476    }
12477}
12478
12479impl From<GrantStmt> for Node {
12480    fn from(node: GrantStmt) -> Node {
12481        Node::GrantStmt(Box::new(node))
12482    }
12483}
12484
12485impl NodeType for GroupingFunc {
12486    fn into_node(self: Box<Self>) -> Node {
12487        Node::GroupingFunc(self)
12488    }
12489
12490    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12491        match node {
12492            Node::GroupingFunc(node) => Ok(node),
12493            other => Err(other),
12494        }
12495    }
12496
12497    fn peek(node: &Node) -> Option<&Self> {
12498        match node {
12499            Node::GroupingFunc(node) => Some(node),
12500            _ => None,
12501        }
12502    }
12503
12504    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12505        match node {
12506            Node::GroupingFunc(node) => Some(node),
12507            _ => None,
12508        }
12509    }
12510}
12511
12512impl From<GroupingFunc> for Node {
12513    fn from(node: GroupingFunc) -> Node {
12514        Node::GroupingFunc(Box::new(node))
12515    }
12516}
12517
12518impl NodeType for GroupingSet {
12519    fn into_node(self: Box<Self>) -> Node {
12520        Node::GroupingSet(self)
12521    }
12522
12523    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12524        match node {
12525            Node::GroupingSet(node) => Ok(node),
12526            other => Err(other),
12527        }
12528    }
12529
12530    fn peek(node: &Node) -> Option<&Self> {
12531        match node {
12532            Node::GroupingSet(node) => Some(node),
12533            _ => None,
12534        }
12535    }
12536
12537    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12538        match node {
12539            Node::GroupingSet(node) => Some(node),
12540            _ => None,
12541        }
12542    }
12543}
12544
12545impl From<GroupingSet> for Node {
12546    fn from(node: GroupingSet) -> Node {
12547        Node::GroupingSet(Box::new(node))
12548    }
12549}
12550
12551impl NodeType for ImportForeignSchemaStmt {
12552    fn into_node(self: Box<Self>) -> Node {
12553        Node::ImportForeignSchemaStmt(self)
12554    }
12555
12556    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12557        match node {
12558            Node::ImportForeignSchemaStmt(node) => Ok(node),
12559            other => Err(other),
12560        }
12561    }
12562
12563    fn peek(node: &Node) -> Option<&Self> {
12564        match node {
12565            Node::ImportForeignSchemaStmt(node) => Some(node),
12566            _ => None,
12567        }
12568    }
12569
12570    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12571        match node {
12572            Node::ImportForeignSchemaStmt(node) => Some(node),
12573            _ => None,
12574        }
12575    }
12576}
12577
12578impl From<ImportForeignSchemaStmt> for Node {
12579    fn from(node: ImportForeignSchemaStmt) -> Node {
12580        Node::ImportForeignSchemaStmt(Box::new(node))
12581    }
12582}
12583
12584impl NodeType for IndexElem {
12585    fn into_node(self: Box<Self>) -> Node {
12586        Node::IndexElem(self)
12587    }
12588
12589    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12590        match node {
12591            Node::IndexElem(node) => Ok(node),
12592            other => Err(other),
12593        }
12594    }
12595
12596    fn peek(node: &Node) -> Option<&Self> {
12597        match node {
12598            Node::IndexElem(node) => Some(node),
12599            _ => None,
12600        }
12601    }
12602
12603    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12604        match node {
12605            Node::IndexElem(node) => Some(node),
12606            _ => None,
12607        }
12608    }
12609}
12610
12611impl From<IndexElem> for Node {
12612    fn from(node: IndexElem) -> Node {
12613        Node::IndexElem(Box::new(node))
12614    }
12615}
12616
12617impl NodeType for IndexStmt {
12618    fn into_node(self: Box<Self>) -> Node {
12619        Node::IndexStmt(self)
12620    }
12621
12622    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12623        match node {
12624            Node::IndexStmt(node) => Ok(node),
12625            other => Err(other),
12626        }
12627    }
12628
12629    fn peek(node: &Node) -> Option<&Self> {
12630        match node {
12631            Node::IndexStmt(node) => Some(node),
12632            _ => None,
12633        }
12634    }
12635
12636    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12637        match node {
12638            Node::IndexStmt(node) => Some(node),
12639            _ => None,
12640        }
12641    }
12642}
12643
12644impl From<IndexStmt> for Node {
12645    fn from(node: IndexStmt) -> Node {
12646        Node::IndexStmt(Box::new(node))
12647    }
12648}
12649
12650impl NodeType for InferClause {
12651    fn into_node(self: Box<Self>) -> Node {
12652        Node::InferClause(self)
12653    }
12654
12655    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12656        match node {
12657            Node::InferClause(node) => Ok(node),
12658            other => Err(other),
12659        }
12660    }
12661
12662    fn peek(node: &Node) -> Option<&Self> {
12663        match node {
12664            Node::InferClause(node) => Some(node),
12665            _ => None,
12666        }
12667    }
12668
12669    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12670        match node {
12671            Node::InferClause(node) => Some(node),
12672            _ => None,
12673        }
12674    }
12675}
12676
12677impl From<InferClause> for Node {
12678    fn from(node: InferClause) -> Node {
12679        Node::InferClause(Box::new(node))
12680    }
12681}
12682
12683impl NodeType for InsertStmt {
12684    fn into_node(self: Box<Self>) -> Node {
12685        Node::InsertStmt(self)
12686    }
12687
12688    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12689        match node {
12690            Node::InsertStmt(node) => Ok(node),
12691            other => Err(other),
12692        }
12693    }
12694
12695    fn peek(node: &Node) -> Option<&Self> {
12696        match node {
12697            Node::InsertStmt(node) => Some(node),
12698            _ => None,
12699        }
12700    }
12701
12702    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12703        match node {
12704            Node::InsertStmt(node) => Some(node),
12705            _ => None,
12706        }
12707    }
12708}
12709
12710impl From<InsertStmt> for Node {
12711    fn from(node: InsertStmt) -> Node {
12712        Node::InsertStmt(Box::new(node))
12713    }
12714}
12715
12716impl NodeType for IntoClause {
12717    fn into_node(self: Box<Self>) -> Node {
12718        Node::IntoClause(self)
12719    }
12720
12721    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12722        match node {
12723            Node::IntoClause(node) => Ok(node),
12724            other => Err(other),
12725        }
12726    }
12727
12728    fn peek(node: &Node) -> Option<&Self> {
12729        match node {
12730            Node::IntoClause(node) => Some(node),
12731            _ => None,
12732        }
12733    }
12734
12735    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12736        match node {
12737            Node::IntoClause(node) => Some(node),
12738            _ => None,
12739        }
12740    }
12741}
12742
12743impl From<IntoClause> for Node {
12744    fn from(node: IntoClause) -> Node {
12745        Node::IntoClause(Box::new(node))
12746    }
12747}
12748
12749impl NodeType for JoinExpr {
12750    fn into_node(self: Box<Self>) -> Node {
12751        Node::JoinExpr(self)
12752    }
12753
12754    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12755        match node {
12756            Node::JoinExpr(node) => Ok(node),
12757            other => Err(other),
12758        }
12759    }
12760
12761    fn peek(node: &Node) -> Option<&Self> {
12762        match node {
12763            Node::JoinExpr(node) => Some(node),
12764            _ => None,
12765        }
12766    }
12767
12768    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12769        match node {
12770            Node::JoinExpr(node) => Some(node),
12771            _ => None,
12772        }
12773    }
12774}
12775
12776impl From<JoinExpr> for Node {
12777    fn from(node: JoinExpr) -> Node {
12778        Node::JoinExpr(Box::new(node))
12779    }
12780}
12781
12782impl NodeType for JsonAggConstructor {
12783    fn into_node(self: Box<Self>) -> Node {
12784        Node::JsonAggConstructor(self)
12785    }
12786
12787    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12788        match node {
12789            Node::JsonAggConstructor(node) => Ok(node),
12790            other => Err(other),
12791        }
12792    }
12793
12794    fn peek(node: &Node) -> Option<&Self> {
12795        match node {
12796            Node::JsonAggConstructor(node) => Some(node),
12797            _ => None,
12798        }
12799    }
12800
12801    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12802        match node {
12803            Node::JsonAggConstructor(node) => Some(node),
12804            _ => None,
12805        }
12806    }
12807}
12808
12809impl From<JsonAggConstructor> for Node {
12810    fn from(node: JsonAggConstructor) -> Node {
12811        Node::JsonAggConstructor(Box::new(node))
12812    }
12813}
12814
12815impl NodeType for JsonArgument {
12816    fn into_node(self: Box<Self>) -> Node {
12817        Node::JsonArgument(self)
12818    }
12819
12820    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12821        match node {
12822            Node::JsonArgument(node) => Ok(node),
12823            other => Err(other),
12824        }
12825    }
12826
12827    fn peek(node: &Node) -> Option<&Self> {
12828        match node {
12829            Node::JsonArgument(node) => Some(node),
12830            _ => None,
12831        }
12832    }
12833
12834    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12835        match node {
12836            Node::JsonArgument(node) => Some(node),
12837            _ => None,
12838        }
12839    }
12840}
12841
12842impl From<JsonArgument> for Node {
12843    fn from(node: JsonArgument) -> Node {
12844        Node::JsonArgument(Box::new(node))
12845    }
12846}
12847
12848impl NodeType for JsonArrayAgg {
12849    fn into_node(self: Box<Self>) -> Node {
12850        Node::JsonArrayAgg(self)
12851    }
12852
12853    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12854        match node {
12855            Node::JsonArrayAgg(node) => Ok(node),
12856            other => Err(other),
12857        }
12858    }
12859
12860    fn peek(node: &Node) -> Option<&Self> {
12861        match node {
12862            Node::JsonArrayAgg(node) => Some(node),
12863            _ => None,
12864        }
12865    }
12866
12867    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12868        match node {
12869            Node::JsonArrayAgg(node) => Some(node),
12870            _ => None,
12871        }
12872    }
12873}
12874
12875impl From<JsonArrayAgg> for Node {
12876    fn from(node: JsonArrayAgg) -> Node {
12877        Node::JsonArrayAgg(Box::new(node))
12878    }
12879}
12880
12881impl NodeType for JsonArrayConstructor {
12882    fn into_node(self: Box<Self>) -> Node {
12883        Node::JsonArrayConstructor(self)
12884    }
12885
12886    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12887        match node {
12888            Node::JsonArrayConstructor(node) => Ok(node),
12889            other => Err(other),
12890        }
12891    }
12892
12893    fn peek(node: &Node) -> Option<&Self> {
12894        match node {
12895            Node::JsonArrayConstructor(node) => Some(node),
12896            _ => None,
12897        }
12898    }
12899
12900    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12901        match node {
12902            Node::JsonArrayConstructor(node) => Some(node),
12903            _ => None,
12904        }
12905    }
12906}
12907
12908impl From<JsonArrayConstructor> for Node {
12909    fn from(node: JsonArrayConstructor) -> Node {
12910        Node::JsonArrayConstructor(Box::new(node))
12911    }
12912}
12913
12914impl NodeType for JsonArrayQueryConstructor {
12915    fn into_node(self: Box<Self>) -> Node {
12916        Node::JsonArrayQueryConstructor(self)
12917    }
12918
12919    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12920        match node {
12921            Node::JsonArrayQueryConstructor(node) => Ok(node),
12922            other => Err(other),
12923        }
12924    }
12925
12926    fn peek(node: &Node) -> Option<&Self> {
12927        match node {
12928            Node::JsonArrayQueryConstructor(node) => Some(node),
12929            _ => None,
12930        }
12931    }
12932
12933    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12934        match node {
12935            Node::JsonArrayQueryConstructor(node) => Some(node),
12936            _ => None,
12937        }
12938    }
12939}
12940
12941impl From<JsonArrayQueryConstructor> for Node {
12942    fn from(node: JsonArrayQueryConstructor) -> Node {
12943        Node::JsonArrayQueryConstructor(Box::new(node))
12944    }
12945}
12946
12947impl NodeType for JsonBehavior {
12948    fn into_node(self: Box<Self>) -> Node {
12949        Node::JsonBehavior(self)
12950    }
12951
12952    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12953        match node {
12954            Node::JsonBehavior(node) => Ok(node),
12955            other => Err(other),
12956        }
12957    }
12958
12959    fn peek(node: &Node) -> Option<&Self> {
12960        match node {
12961            Node::JsonBehavior(node) => Some(node),
12962            _ => None,
12963        }
12964    }
12965
12966    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
12967        match node {
12968            Node::JsonBehavior(node) => Some(node),
12969            _ => None,
12970        }
12971    }
12972}
12973
12974impl From<JsonBehavior> for Node {
12975    fn from(node: JsonBehavior) -> Node {
12976        Node::JsonBehavior(Box::new(node))
12977    }
12978}
12979
12980impl NodeType for JsonFormat {
12981    fn into_node(self: Box<Self>) -> Node {
12982        Node::JsonFormat(self)
12983    }
12984
12985    fn from_node(node: Node) -> Result<Box<Self>, Node> {
12986        match node {
12987            Node::JsonFormat(node) => Ok(node),
12988            other => Err(other),
12989        }
12990    }
12991
12992    fn peek(node: &Node) -> Option<&Self> {
12993        match node {
12994            Node::JsonFormat(node) => Some(node),
12995            _ => None,
12996        }
12997    }
12998
12999    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13000        match node {
13001            Node::JsonFormat(node) => Some(node),
13002            _ => None,
13003        }
13004    }
13005}
13006
13007impl From<JsonFormat> for Node {
13008    fn from(node: JsonFormat) -> Node {
13009        Node::JsonFormat(Box::new(node))
13010    }
13011}
13012
13013impl NodeType for JsonFuncExpr {
13014    fn into_node(self: Box<Self>) -> Node {
13015        Node::JsonFuncExpr(self)
13016    }
13017
13018    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13019        match node {
13020            Node::JsonFuncExpr(node) => Ok(node),
13021            other => Err(other),
13022        }
13023    }
13024
13025    fn peek(node: &Node) -> Option<&Self> {
13026        match node {
13027            Node::JsonFuncExpr(node) => Some(node),
13028            _ => None,
13029        }
13030    }
13031
13032    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13033        match node {
13034            Node::JsonFuncExpr(node) => Some(node),
13035            _ => None,
13036        }
13037    }
13038}
13039
13040impl From<JsonFuncExpr> for Node {
13041    fn from(node: JsonFuncExpr) -> Node {
13042        Node::JsonFuncExpr(Box::new(node))
13043    }
13044}
13045
13046impl NodeType for JsonIsPredicate {
13047    fn into_node(self: Box<Self>) -> Node {
13048        Node::JsonIsPredicate(self)
13049    }
13050
13051    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13052        match node {
13053            Node::JsonIsPredicate(node) => Ok(node),
13054            other => Err(other),
13055        }
13056    }
13057
13058    fn peek(node: &Node) -> Option<&Self> {
13059        match node {
13060            Node::JsonIsPredicate(node) => Some(node),
13061            _ => None,
13062        }
13063    }
13064
13065    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13066        match node {
13067            Node::JsonIsPredicate(node) => Some(node),
13068            _ => None,
13069        }
13070    }
13071}
13072
13073impl From<JsonIsPredicate> for Node {
13074    fn from(node: JsonIsPredicate) -> Node {
13075        Node::JsonIsPredicate(Box::new(node))
13076    }
13077}
13078
13079impl NodeType for JsonKeyValue {
13080    fn into_node(self: Box<Self>) -> Node {
13081        Node::JsonKeyValue(self)
13082    }
13083
13084    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13085        match node {
13086            Node::JsonKeyValue(node) => Ok(node),
13087            other => Err(other),
13088        }
13089    }
13090
13091    fn peek(node: &Node) -> Option<&Self> {
13092        match node {
13093            Node::JsonKeyValue(node) => Some(node),
13094            _ => None,
13095        }
13096    }
13097
13098    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13099        match node {
13100            Node::JsonKeyValue(node) => Some(node),
13101            _ => None,
13102        }
13103    }
13104}
13105
13106impl From<JsonKeyValue> for Node {
13107    fn from(node: JsonKeyValue) -> Node {
13108        Node::JsonKeyValue(Box::new(node))
13109    }
13110}
13111
13112impl NodeType for JsonObjectAgg {
13113    fn into_node(self: Box<Self>) -> Node {
13114        Node::JsonObjectAgg(self)
13115    }
13116
13117    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13118        match node {
13119            Node::JsonObjectAgg(node) => Ok(node),
13120            other => Err(other),
13121        }
13122    }
13123
13124    fn peek(node: &Node) -> Option<&Self> {
13125        match node {
13126            Node::JsonObjectAgg(node) => Some(node),
13127            _ => None,
13128        }
13129    }
13130
13131    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13132        match node {
13133            Node::JsonObjectAgg(node) => Some(node),
13134            _ => None,
13135        }
13136    }
13137}
13138
13139impl From<JsonObjectAgg> for Node {
13140    fn from(node: JsonObjectAgg) -> Node {
13141        Node::JsonObjectAgg(Box::new(node))
13142    }
13143}
13144
13145impl NodeType for JsonObjectConstructor {
13146    fn into_node(self: Box<Self>) -> Node {
13147        Node::JsonObjectConstructor(self)
13148    }
13149
13150    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13151        match node {
13152            Node::JsonObjectConstructor(node) => Ok(node),
13153            other => Err(other),
13154        }
13155    }
13156
13157    fn peek(node: &Node) -> Option<&Self> {
13158        match node {
13159            Node::JsonObjectConstructor(node) => Some(node),
13160            _ => None,
13161        }
13162    }
13163
13164    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13165        match node {
13166            Node::JsonObjectConstructor(node) => Some(node),
13167            _ => None,
13168        }
13169    }
13170}
13171
13172impl From<JsonObjectConstructor> for Node {
13173    fn from(node: JsonObjectConstructor) -> Node {
13174        Node::JsonObjectConstructor(Box::new(node))
13175    }
13176}
13177
13178impl NodeType for JsonOutput {
13179    fn into_node(self: Box<Self>) -> Node {
13180        Node::JsonOutput(self)
13181    }
13182
13183    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13184        match node {
13185            Node::JsonOutput(node) => Ok(node),
13186            other => Err(other),
13187        }
13188    }
13189
13190    fn peek(node: &Node) -> Option<&Self> {
13191        match node {
13192            Node::JsonOutput(node) => Some(node),
13193            _ => None,
13194        }
13195    }
13196
13197    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13198        match node {
13199            Node::JsonOutput(node) => Some(node),
13200            _ => None,
13201        }
13202    }
13203}
13204
13205impl From<JsonOutput> for Node {
13206    fn from(node: JsonOutput) -> Node {
13207        Node::JsonOutput(Box::new(node))
13208    }
13209}
13210
13211impl NodeType for JsonParseExpr {
13212    fn into_node(self: Box<Self>) -> Node {
13213        Node::JsonParseExpr(self)
13214    }
13215
13216    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13217        match node {
13218            Node::JsonParseExpr(node) => Ok(node),
13219            other => Err(other),
13220        }
13221    }
13222
13223    fn peek(node: &Node) -> Option<&Self> {
13224        match node {
13225            Node::JsonParseExpr(node) => Some(node),
13226            _ => None,
13227        }
13228    }
13229
13230    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13231        match node {
13232            Node::JsonParseExpr(node) => Some(node),
13233            _ => None,
13234        }
13235    }
13236}
13237
13238impl From<JsonParseExpr> for Node {
13239    fn from(node: JsonParseExpr) -> Node {
13240        Node::JsonParseExpr(Box::new(node))
13241    }
13242}
13243
13244impl NodeType for JsonReturning {
13245    fn into_node(self: Box<Self>) -> Node {
13246        Node::JsonReturning(self)
13247    }
13248
13249    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13250        match node {
13251            Node::JsonReturning(node) => Ok(node),
13252            other => Err(other),
13253        }
13254    }
13255
13256    fn peek(node: &Node) -> Option<&Self> {
13257        match node {
13258            Node::JsonReturning(node) => Some(node),
13259            _ => None,
13260        }
13261    }
13262
13263    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13264        match node {
13265            Node::JsonReturning(node) => Some(node),
13266            _ => None,
13267        }
13268    }
13269}
13270
13271impl From<JsonReturning> for Node {
13272    fn from(node: JsonReturning) -> Node {
13273        Node::JsonReturning(Box::new(node))
13274    }
13275}
13276
13277impl NodeType for JsonScalarExpr {
13278    fn into_node(self: Box<Self>) -> Node {
13279        Node::JsonScalarExpr(self)
13280    }
13281
13282    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13283        match node {
13284            Node::JsonScalarExpr(node) => Ok(node),
13285            other => Err(other),
13286        }
13287    }
13288
13289    fn peek(node: &Node) -> Option<&Self> {
13290        match node {
13291            Node::JsonScalarExpr(node) => Some(node),
13292            _ => None,
13293        }
13294    }
13295
13296    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13297        match node {
13298            Node::JsonScalarExpr(node) => Some(node),
13299            _ => None,
13300        }
13301    }
13302}
13303
13304impl From<JsonScalarExpr> for Node {
13305    fn from(node: JsonScalarExpr) -> Node {
13306        Node::JsonScalarExpr(Box::new(node))
13307    }
13308}
13309
13310impl NodeType for JsonSerializeExpr {
13311    fn into_node(self: Box<Self>) -> Node {
13312        Node::JsonSerializeExpr(self)
13313    }
13314
13315    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13316        match node {
13317            Node::JsonSerializeExpr(node) => Ok(node),
13318            other => Err(other),
13319        }
13320    }
13321
13322    fn peek(node: &Node) -> Option<&Self> {
13323        match node {
13324            Node::JsonSerializeExpr(node) => Some(node),
13325            _ => None,
13326        }
13327    }
13328
13329    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13330        match node {
13331            Node::JsonSerializeExpr(node) => Some(node),
13332            _ => None,
13333        }
13334    }
13335}
13336
13337impl From<JsonSerializeExpr> for Node {
13338    fn from(node: JsonSerializeExpr) -> Node {
13339        Node::JsonSerializeExpr(Box::new(node))
13340    }
13341}
13342
13343impl NodeType for JsonTable {
13344    fn into_node(self: Box<Self>) -> Node {
13345        Node::JsonTable(self)
13346    }
13347
13348    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13349        match node {
13350            Node::JsonTable(node) => Ok(node),
13351            other => Err(other),
13352        }
13353    }
13354
13355    fn peek(node: &Node) -> Option<&Self> {
13356        match node {
13357            Node::JsonTable(node) => Some(node),
13358            _ => None,
13359        }
13360    }
13361
13362    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13363        match node {
13364            Node::JsonTable(node) => Some(node),
13365            _ => None,
13366        }
13367    }
13368}
13369
13370impl From<JsonTable> for Node {
13371    fn from(node: JsonTable) -> Node {
13372        Node::JsonTable(Box::new(node))
13373    }
13374}
13375
13376impl NodeType for JsonTableColumn {
13377    fn into_node(self: Box<Self>) -> Node {
13378        Node::JsonTableColumn(self)
13379    }
13380
13381    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13382        match node {
13383            Node::JsonTableColumn(node) => Ok(node),
13384            other => Err(other),
13385        }
13386    }
13387
13388    fn peek(node: &Node) -> Option<&Self> {
13389        match node {
13390            Node::JsonTableColumn(node) => Some(node),
13391            _ => None,
13392        }
13393    }
13394
13395    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13396        match node {
13397            Node::JsonTableColumn(node) => Some(node),
13398            _ => None,
13399        }
13400    }
13401}
13402
13403impl From<JsonTableColumn> for Node {
13404    fn from(node: JsonTableColumn) -> Node {
13405        Node::JsonTableColumn(Box::new(node))
13406    }
13407}
13408
13409impl NodeType for JsonTablePathSpec {
13410    fn into_node(self: Box<Self>) -> Node {
13411        Node::JsonTablePathSpec(self)
13412    }
13413
13414    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13415        match node {
13416            Node::JsonTablePathSpec(node) => Ok(node),
13417            other => Err(other),
13418        }
13419    }
13420
13421    fn peek(node: &Node) -> Option<&Self> {
13422        match node {
13423            Node::JsonTablePathSpec(node) => Some(node),
13424            _ => None,
13425        }
13426    }
13427
13428    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13429        match node {
13430            Node::JsonTablePathSpec(node) => Some(node),
13431            _ => None,
13432        }
13433    }
13434}
13435
13436impl From<JsonTablePathSpec> for Node {
13437    fn from(node: JsonTablePathSpec) -> Node {
13438        Node::JsonTablePathSpec(Box::new(node))
13439    }
13440}
13441
13442impl NodeType for JsonValueExpr {
13443    fn into_node(self: Box<Self>) -> Node {
13444        Node::JsonValueExpr(self)
13445    }
13446
13447    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13448        match node {
13449            Node::JsonValueExpr(node) => Ok(node),
13450            other => Err(other),
13451        }
13452    }
13453
13454    fn peek(node: &Node) -> Option<&Self> {
13455        match node {
13456            Node::JsonValueExpr(node) => Some(node),
13457            _ => None,
13458        }
13459    }
13460
13461    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13462        match node {
13463            Node::JsonValueExpr(node) => Some(node),
13464            _ => None,
13465        }
13466    }
13467}
13468
13469impl From<JsonValueExpr> for Node {
13470    fn from(node: JsonValueExpr) -> Node {
13471        Node::JsonValueExpr(Box::new(node))
13472    }
13473}
13474
13475impl NodeType for ListenStmt {
13476    fn into_node(self: Box<Self>) -> Node {
13477        Node::ListenStmt(self)
13478    }
13479
13480    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13481        match node {
13482            Node::ListenStmt(node) => Ok(node),
13483            other => Err(other),
13484        }
13485    }
13486
13487    fn peek(node: &Node) -> Option<&Self> {
13488        match node {
13489            Node::ListenStmt(node) => Some(node),
13490            _ => None,
13491        }
13492    }
13493
13494    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13495        match node {
13496            Node::ListenStmt(node) => Some(node),
13497            _ => None,
13498        }
13499    }
13500}
13501
13502impl From<ListenStmt> for Node {
13503    fn from(node: ListenStmt) -> Node {
13504        Node::ListenStmt(Box::new(node))
13505    }
13506}
13507
13508impl NodeType for LoadStmt {
13509    fn into_node(self: Box<Self>) -> Node {
13510        Node::LoadStmt(self)
13511    }
13512
13513    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13514        match node {
13515            Node::LoadStmt(node) => Ok(node),
13516            other => Err(other),
13517        }
13518    }
13519
13520    fn peek(node: &Node) -> Option<&Self> {
13521        match node {
13522            Node::LoadStmt(node) => Some(node),
13523            _ => None,
13524        }
13525    }
13526
13527    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13528        match node {
13529            Node::LoadStmt(node) => Some(node),
13530            _ => None,
13531        }
13532    }
13533}
13534
13535impl From<LoadStmt> for Node {
13536    fn from(node: LoadStmt) -> Node {
13537        Node::LoadStmt(Box::new(node))
13538    }
13539}
13540
13541impl NodeType for LockStmt {
13542    fn into_node(self: Box<Self>) -> Node {
13543        Node::LockStmt(self)
13544    }
13545
13546    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13547        match node {
13548            Node::LockStmt(node) => Ok(node),
13549            other => Err(other),
13550        }
13551    }
13552
13553    fn peek(node: &Node) -> Option<&Self> {
13554        match node {
13555            Node::LockStmt(node) => Some(node),
13556            _ => None,
13557        }
13558    }
13559
13560    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13561        match node {
13562            Node::LockStmt(node) => Some(node),
13563            _ => None,
13564        }
13565    }
13566}
13567
13568impl From<LockStmt> for Node {
13569    fn from(node: LockStmt) -> Node {
13570        Node::LockStmt(Box::new(node))
13571    }
13572}
13573
13574impl NodeType for LockingClause {
13575    fn into_node(self: Box<Self>) -> Node {
13576        Node::LockingClause(self)
13577    }
13578
13579    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13580        match node {
13581            Node::LockingClause(node) => Ok(node),
13582            other => Err(other),
13583        }
13584    }
13585
13586    fn peek(node: &Node) -> Option<&Self> {
13587        match node {
13588            Node::LockingClause(node) => Some(node),
13589            _ => None,
13590        }
13591    }
13592
13593    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13594        match node {
13595            Node::LockingClause(node) => Some(node),
13596            _ => None,
13597        }
13598    }
13599}
13600
13601impl From<LockingClause> for Node {
13602    fn from(node: LockingClause) -> Node {
13603        Node::LockingClause(Box::new(node))
13604    }
13605}
13606
13607impl NodeType for MergeStmt {
13608    fn into_node(self: Box<Self>) -> Node {
13609        Node::MergeStmt(self)
13610    }
13611
13612    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13613        match node {
13614            Node::MergeStmt(node) => Ok(node),
13615            other => Err(other),
13616        }
13617    }
13618
13619    fn peek(node: &Node) -> Option<&Self> {
13620        match node {
13621            Node::MergeStmt(node) => Some(node),
13622            _ => None,
13623        }
13624    }
13625
13626    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13627        match node {
13628            Node::MergeStmt(node) => Some(node),
13629            _ => None,
13630        }
13631    }
13632}
13633
13634impl From<MergeStmt> for Node {
13635    fn from(node: MergeStmt) -> Node {
13636        Node::MergeStmt(Box::new(node))
13637    }
13638}
13639
13640impl NodeType for MergeSupportFunc {
13641    fn into_node(self: Box<Self>) -> Node {
13642        Node::MergeSupportFunc(self)
13643    }
13644
13645    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13646        match node {
13647            Node::MergeSupportFunc(node) => Ok(node),
13648            other => Err(other),
13649        }
13650    }
13651
13652    fn peek(node: &Node) -> Option<&Self> {
13653        match node {
13654            Node::MergeSupportFunc(node) => Some(node),
13655            _ => None,
13656        }
13657    }
13658
13659    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13660        match node {
13661            Node::MergeSupportFunc(node) => Some(node),
13662            _ => None,
13663        }
13664    }
13665}
13666
13667impl From<MergeSupportFunc> for Node {
13668    fn from(node: MergeSupportFunc) -> Node {
13669        Node::MergeSupportFunc(Box::new(node))
13670    }
13671}
13672
13673impl NodeType for MergeWhenClause {
13674    fn into_node(self: Box<Self>) -> Node {
13675        Node::MergeWhenClause(self)
13676    }
13677
13678    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13679        match node {
13680            Node::MergeWhenClause(node) => Ok(node),
13681            other => Err(other),
13682        }
13683    }
13684
13685    fn peek(node: &Node) -> Option<&Self> {
13686        match node {
13687            Node::MergeWhenClause(node) => Some(node),
13688            _ => None,
13689        }
13690    }
13691
13692    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13693        match node {
13694            Node::MergeWhenClause(node) => Some(node),
13695            _ => None,
13696        }
13697    }
13698}
13699
13700impl From<MergeWhenClause> for Node {
13701    fn from(node: MergeWhenClause) -> Node {
13702        Node::MergeWhenClause(Box::new(node))
13703    }
13704}
13705
13706impl NodeType for MinMaxExpr {
13707    fn into_node(self: Box<Self>) -> Node {
13708        Node::MinMaxExpr(self)
13709    }
13710
13711    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13712        match node {
13713            Node::MinMaxExpr(node) => Ok(node),
13714            other => Err(other),
13715        }
13716    }
13717
13718    fn peek(node: &Node) -> Option<&Self> {
13719        match node {
13720            Node::MinMaxExpr(node) => Some(node),
13721            _ => None,
13722        }
13723    }
13724
13725    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13726        match node {
13727            Node::MinMaxExpr(node) => Some(node),
13728            _ => None,
13729        }
13730    }
13731}
13732
13733impl From<MinMaxExpr> for Node {
13734    fn from(node: MinMaxExpr) -> Node {
13735        Node::MinMaxExpr(Box::new(node))
13736    }
13737}
13738
13739impl NodeType for MultiAssignRef {
13740    fn into_node(self: Box<Self>) -> Node {
13741        Node::MultiAssignRef(self)
13742    }
13743
13744    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13745        match node {
13746            Node::MultiAssignRef(node) => Ok(node),
13747            other => Err(other),
13748        }
13749    }
13750
13751    fn peek(node: &Node) -> Option<&Self> {
13752        match node {
13753            Node::MultiAssignRef(node) => Some(node),
13754            _ => None,
13755        }
13756    }
13757
13758    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13759        match node {
13760            Node::MultiAssignRef(node) => Some(node),
13761            _ => None,
13762        }
13763    }
13764}
13765
13766impl From<MultiAssignRef> for Node {
13767    fn from(node: MultiAssignRef) -> Node {
13768        Node::MultiAssignRef(Box::new(node))
13769    }
13770}
13771
13772impl NodeType for NamedArgExpr {
13773    fn into_node(self: Box<Self>) -> Node {
13774        Node::NamedArgExpr(self)
13775    }
13776
13777    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13778        match node {
13779            Node::NamedArgExpr(node) => Ok(node),
13780            other => Err(other),
13781        }
13782    }
13783
13784    fn peek(node: &Node) -> Option<&Self> {
13785        match node {
13786            Node::NamedArgExpr(node) => Some(node),
13787            _ => None,
13788        }
13789    }
13790
13791    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13792        match node {
13793            Node::NamedArgExpr(node) => Some(node),
13794            _ => None,
13795        }
13796    }
13797}
13798
13799impl From<NamedArgExpr> for Node {
13800    fn from(node: NamedArgExpr) -> Node {
13801        Node::NamedArgExpr(Box::new(node))
13802    }
13803}
13804
13805impl NodeType for NotifyStmt {
13806    fn into_node(self: Box<Self>) -> Node {
13807        Node::NotifyStmt(self)
13808    }
13809
13810    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13811        match node {
13812            Node::NotifyStmt(node) => Ok(node),
13813            other => Err(other),
13814        }
13815    }
13816
13817    fn peek(node: &Node) -> Option<&Self> {
13818        match node {
13819            Node::NotifyStmt(node) => Some(node),
13820            _ => None,
13821        }
13822    }
13823
13824    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13825        match node {
13826            Node::NotifyStmt(node) => Some(node),
13827            _ => None,
13828        }
13829    }
13830}
13831
13832impl From<NotifyStmt> for Node {
13833    fn from(node: NotifyStmt) -> Node {
13834        Node::NotifyStmt(Box::new(node))
13835    }
13836}
13837
13838impl NodeType for NullTest {
13839    fn into_node(self: Box<Self>) -> Node {
13840        Node::NullTest(self)
13841    }
13842
13843    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13844        match node {
13845            Node::NullTest(node) => Ok(node),
13846            other => Err(other),
13847        }
13848    }
13849
13850    fn peek(node: &Node) -> Option<&Self> {
13851        match node {
13852            Node::NullTest(node) => Some(node),
13853            _ => None,
13854        }
13855    }
13856
13857    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13858        match node {
13859            Node::NullTest(node) => Some(node),
13860            _ => None,
13861        }
13862    }
13863}
13864
13865impl From<NullTest> for Node {
13866    fn from(node: NullTest) -> Node {
13867        Node::NullTest(Box::new(node))
13868    }
13869}
13870
13871impl NodeType for ObjectWithArgs {
13872    fn into_node(self: Box<Self>) -> Node {
13873        Node::ObjectWithArgs(self)
13874    }
13875
13876    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13877        match node {
13878            Node::ObjectWithArgs(node) => Ok(node),
13879            other => Err(other),
13880        }
13881    }
13882
13883    fn peek(node: &Node) -> Option<&Self> {
13884        match node {
13885            Node::ObjectWithArgs(node) => Some(node),
13886            _ => None,
13887        }
13888    }
13889
13890    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13891        match node {
13892            Node::ObjectWithArgs(node) => Some(node),
13893            _ => None,
13894        }
13895    }
13896}
13897
13898impl From<ObjectWithArgs> for Node {
13899    fn from(node: ObjectWithArgs) -> Node {
13900        Node::ObjectWithArgs(Box::new(node))
13901    }
13902}
13903
13904impl NodeType for OnConflictClause {
13905    fn into_node(self: Box<Self>) -> Node {
13906        Node::OnConflictClause(self)
13907    }
13908
13909    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13910        match node {
13911            Node::OnConflictClause(node) => Ok(node),
13912            other => Err(other),
13913        }
13914    }
13915
13916    fn peek(node: &Node) -> Option<&Self> {
13917        match node {
13918            Node::OnConflictClause(node) => Some(node),
13919            _ => None,
13920        }
13921    }
13922
13923    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13924        match node {
13925            Node::OnConflictClause(node) => Some(node),
13926            _ => None,
13927        }
13928    }
13929}
13930
13931impl From<OnConflictClause> for Node {
13932    fn from(node: OnConflictClause) -> Node {
13933        Node::OnConflictClause(Box::new(node))
13934    }
13935}
13936
13937impl NodeType for PLAssignStmt {
13938    fn into_node(self: Box<Self>) -> Node {
13939        Node::PLAssignStmt(self)
13940    }
13941
13942    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13943        match node {
13944            Node::PLAssignStmt(node) => Ok(node),
13945            other => Err(other),
13946        }
13947    }
13948
13949    fn peek(node: &Node) -> Option<&Self> {
13950        match node {
13951            Node::PLAssignStmt(node) => Some(node),
13952            _ => None,
13953        }
13954    }
13955
13956    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13957        match node {
13958            Node::PLAssignStmt(node) => Some(node),
13959            _ => None,
13960        }
13961    }
13962}
13963
13964impl From<PLAssignStmt> for Node {
13965    fn from(node: PLAssignStmt) -> Node {
13966        Node::PLAssignStmt(Box::new(node))
13967    }
13968}
13969
13970impl NodeType for ParamRef {
13971    fn into_node(self: Box<Self>) -> Node {
13972        Node::ParamRef(self)
13973    }
13974
13975    fn from_node(node: Node) -> Result<Box<Self>, Node> {
13976        match node {
13977            Node::ParamRef(node) => Ok(node),
13978            other => Err(other),
13979        }
13980    }
13981
13982    fn peek(node: &Node) -> Option<&Self> {
13983        match node {
13984            Node::ParamRef(node) => Some(node),
13985            _ => None,
13986        }
13987    }
13988
13989    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
13990        match node {
13991            Node::ParamRef(node) => Some(node),
13992            _ => None,
13993        }
13994    }
13995}
13996
13997impl From<ParamRef> for Node {
13998    fn from(node: ParamRef) -> Node {
13999        Node::ParamRef(Box::new(node))
14000    }
14001}
14002
14003impl NodeType for PartitionBoundSpec {
14004    fn into_node(self: Box<Self>) -> Node {
14005        Node::PartitionBoundSpec(self)
14006    }
14007
14008    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14009        match node {
14010            Node::PartitionBoundSpec(node) => Ok(node),
14011            other => Err(other),
14012        }
14013    }
14014
14015    fn peek(node: &Node) -> Option<&Self> {
14016        match node {
14017            Node::PartitionBoundSpec(node) => Some(node),
14018            _ => None,
14019        }
14020    }
14021
14022    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14023        match node {
14024            Node::PartitionBoundSpec(node) => Some(node),
14025            _ => None,
14026        }
14027    }
14028}
14029
14030impl From<PartitionBoundSpec> for Node {
14031    fn from(node: PartitionBoundSpec) -> Node {
14032        Node::PartitionBoundSpec(Box::new(node))
14033    }
14034}
14035
14036impl NodeType for PartitionCmd {
14037    fn into_node(self: Box<Self>) -> Node {
14038        Node::PartitionCmd(self)
14039    }
14040
14041    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14042        match node {
14043            Node::PartitionCmd(node) => Ok(node),
14044            other => Err(other),
14045        }
14046    }
14047
14048    fn peek(node: &Node) -> Option<&Self> {
14049        match node {
14050            Node::PartitionCmd(node) => Some(node),
14051            _ => None,
14052        }
14053    }
14054
14055    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14056        match node {
14057            Node::PartitionCmd(node) => Some(node),
14058            _ => None,
14059        }
14060    }
14061}
14062
14063impl From<PartitionCmd> for Node {
14064    fn from(node: PartitionCmd) -> Node {
14065        Node::PartitionCmd(Box::new(node))
14066    }
14067}
14068
14069impl NodeType for PartitionElem {
14070    fn into_node(self: Box<Self>) -> Node {
14071        Node::PartitionElem(self)
14072    }
14073
14074    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14075        match node {
14076            Node::PartitionElem(node) => Ok(node),
14077            other => Err(other),
14078        }
14079    }
14080
14081    fn peek(node: &Node) -> Option<&Self> {
14082        match node {
14083            Node::PartitionElem(node) => Some(node),
14084            _ => None,
14085        }
14086    }
14087
14088    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14089        match node {
14090            Node::PartitionElem(node) => Some(node),
14091            _ => None,
14092        }
14093    }
14094}
14095
14096impl From<PartitionElem> for Node {
14097    fn from(node: PartitionElem) -> Node {
14098        Node::PartitionElem(Box::new(node))
14099    }
14100}
14101
14102impl NodeType for PartitionSpec {
14103    fn into_node(self: Box<Self>) -> Node {
14104        Node::PartitionSpec(self)
14105    }
14106
14107    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14108        match node {
14109            Node::PartitionSpec(node) => Ok(node),
14110            other => Err(other),
14111        }
14112    }
14113
14114    fn peek(node: &Node) -> Option<&Self> {
14115        match node {
14116            Node::PartitionSpec(node) => Some(node),
14117            _ => None,
14118        }
14119    }
14120
14121    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14122        match node {
14123            Node::PartitionSpec(node) => Some(node),
14124            _ => None,
14125        }
14126    }
14127}
14128
14129impl From<PartitionSpec> for Node {
14130    fn from(node: PartitionSpec) -> Node {
14131        Node::PartitionSpec(Box::new(node))
14132    }
14133}
14134
14135impl NodeType for PrepareStmt {
14136    fn into_node(self: Box<Self>) -> Node {
14137        Node::PrepareStmt(self)
14138    }
14139
14140    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14141        match node {
14142            Node::PrepareStmt(node) => Ok(node),
14143            other => Err(other),
14144        }
14145    }
14146
14147    fn peek(node: &Node) -> Option<&Self> {
14148        match node {
14149            Node::PrepareStmt(node) => Some(node),
14150            _ => None,
14151        }
14152    }
14153
14154    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14155        match node {
14156            Node::PrepareStmt(node) => Some(node),
14157            _ => None,
14158        }
14159    }
14160}
14161
14162impl From<PrepareStmt> for Node {
14163    fn from(node: PrepareStmt) -> Node {
14164        Node::PrepareStmt(Box::new(node))
14165    }
14166}
14167
14168impl NodeType for PublicationAllObjSpec {
14169    fn into_node(self: Box<Self>) -> Node {
14170        Node::PublicationAllObjSpec(self)
14171    }
14172
14173    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14174        match node {
14175            Node::PublicationAllObjSpec(node) => Ok(node),
14176            other => Err(other),
14177        }
14178    }
14179
14180    fn peek(node: &Node) -> Option<&Self> {
14181        match node {
14182            Node::PublicationAllObjSpec(node) => Some(node),
14183            _ => None,
14184        }
14185    }
14186
14187    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14188        match node {
14189            Node::PublicationAllObjSpec(node) => Some(node),
14190            _ => None,
14191        }
14192    }
14193}
14194
14195impl From<PublicationAllObjSpec> for Node {
14196    fn from(node: PublicationAllObjSpec) -> Node {
14197        Node::PublicationAllObjSpec(Box::new(node))
14198    }
14199}
14200
14201impl NodeType for PublicationObjSpec {
14202    fn into_node(self: Box<Self>) -> Node {
14203        Node::PublicationObjSpec(self)
14204    }
14205
14206    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14207        match node {
14208            Node::PublicationObjSpec(node) => Ok(node),
14209            other => Err(other),
14210        }
14211    }
14212
14213    fn peek(node: &Node) -> Option<&Self> {
14214        match node {
14215            Node::PublicationObjSpec(node) => Some(node),
14216            _ => None,
14217        }
14218    }
14219
14220    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14221        match node {
14222            Node::PublicationObjSpec(node) => Some(node),
14223            _ => None,
14224        }
14225    }
14226}
14227
14228impl From<PublicationObjSpec> for Node {
14229    fn from(node: PublicationObjSpec) -> Node {
14230        Node::PublicationObjSpec(Box::new(node))
14231    }
14232}
14233
14234impl NodeType for PublicationTable {
14235    fn into_node(self: Box<Self>) -> Node {
14236        Node::PublicationTable(self)
14237    }
14238
14239    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14240        match node {
14241            Node::PublicationTable(node) => Ok(node),
14242            other => Err(other),
14243        }
14244    }
14245
14246    fn peek(node: &Node) -> Option<&Self> {
14247        match node {
14248            Node::PublicationTable(node) => Some(node),
14249            _ => None,
14250        }
14251    }
14252
14253    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14254        match node {
14255            Node::PublicationTable(node) => Some(node),
14256            _ => None,
14257        }
14258    }
14259}
14260
14261impl From<PublicationTable> for Node {
14262    fn from(node: PublicationTable) -> Node {
14263        Node::PublicationTable(Box::new(node))
14264    }
14265}
14266
14267impl NodeType for RangeFunction {
14268    fn into_node(self: Box<Self>) -> Node {
14269        Node::RangeFunction(self)
14270    }
14271
14272    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14273        match node {
14274            Node::RangeFunction(node) => Ok(node),
14275            other => Err(other),
14276        }
14277    }
14278
14279    fn peek(node: &Node) -> Option<&Self> {
14280        match node {
14281            Node::RangeFunction(node) => Some(node),
14282            _ => None,
14283        }
14284    }
14285
14286    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14287        match node {
14288            Node::RangeFunction(node) => Some(node),
14289            _ => None,
14290        }
14291    }
14292}
14293
14294impl From<RangeFunction> for Node {
14295    fn from(node: RangeFunction) -> Node {
14296        Node::RangeFunction(Box::new(node))
14297    }
14298}
14299
14300impl NodeType for RangeSubselect {
14301    fn into_node(self: Box<Self>) -> Node {
14302        Node::RangeSubselect(self)
14303    }
14304
14305    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14306        match node {
14307            Node::RangeSubselect(node) => Ok(node),
14308            other => Err(other),
14309        }
14310    }
14311
14312    fn peek(node: &Node) -> Option<&Self> {
14313        match node {
14314            Node::RangeSubselect(node) => Some(node),
14315            _ => None,
14316        }
14317    }
14318
14319    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14320        match node {
14321            Node::RangeSubselect(node) => Some(node),
14322            _ => None,
14323        }
14324    }
14325}
14326
14327impl From<RangeSubselect> for Node {
14328    fn from(node: RangeSubselect) -> Node {
14329        Node::RangeSubselect(Box::new(node))
14330    }
14331}
14332
14333impl NodeType for RangeTableFunc {
14334    fn into_node(self: Box<Self>) -> Node {
14335        Node::RangeTableFunc(self)
14336    }
14337
14338    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14339        match node {
14340            Node::RangeTableFunc(node) => Ok(node),
14341            other => Err(other),
14342        }
14343    }
14344
14345    fn peek(node: &Node) -> Option<&Self> {
14346        match node {
14347            Node::RangeTableFunc(node) => Some(node),
14348            _ => None,
14349        }
14350    }
14351
14352    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14353        match node {
14354            Node::RangeTableFunc(node) => Some(node),
14355            _ => None,
14356        }
14357    }
14358}
14359
14360impl From<RangeTableFunc> for Node {
14361    fn from(node: RangeTableFunc) -> Node {
14362        Node::RangeTableFunc(Box::new(node))
14363    }
14364}
14365
14366impl NodeType for RangeTableFuncCol {
14367    fn into_node(self: Box<Self>) -> Node {
14368        Node::RangeTableFuncCol(self)
14369    }
14370
14371    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14372        match node {
14373            Node::RangeTableFuncCol(node) => Ok(node),
14374            other => Err(other),
14375        }
14376    }
14377
14378    fn peek(node: &Node) -> Option<&Self> {
14379        match node {
14380            Node::RangeTableFuncCol(node) => Some(node),
14381            _ => None,
14382        }
14383    }
14384
14385    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14386        match node {
14387            Node::RangeTableFuncCol(node) => Some(node),
14388            _ => None,
14389        }
14390    }
14391}
14392
14393impl From<RangeTableFuncCol> for Node {
14394    fn from(node: RangeTableFuncCol) -> Node {
14395        Node::RangeTableFuncCol(Box::new(node))
14396    }
14397}
14398
14399impl NodeType for RangeTableSample {
14400    fn into_node(self: Box<Self>) -> Node {
14401        Node::RangeTableSample(self)
14402    }
14403
14404    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14405        match node {
14406            Node::RangeTableSample(node) => Ok(node),
14407            other => Err(other),
14408        }
14409    }
14410
14411    fn peek(node: &Node) -> Option<&Self> {
14412        match node {
14413            Node::RangeTableSample(node) => Some(node),
14414            _ => None,
14415        }
14416    }
14417
14418    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14419        match node {
14420            Node::RangeTableSample(node) => Some(node),
14421            _ => None,
14422        }
14423    }
14424}
14425
14426impl From<RangeTableSample> for Node {
14427    fn from(node: RangeTableSample) -> Node {
14428        Node::RangeTableSample(Box::new(node))
14429    }
14430}
14431
14432impl NodeType for RangeVar {
14433    fn into_node(self: Box<Self>) -> Node {
14434        Node::RangeVar(self)
14435    }
14436
14437    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14438        match node {
14439            Node::RangeVar(node) => Ok(node),
14440            other => Err(other),
14441        }
14442    }
14443
14444    fn peek(node: &Node) -> Option<&Self> {
14445        match node {
14446            Node::RangeVar(node) => Some(node),
14447            _ => None,
14448        }
14449    }
14450
14451    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14452        match node {
14453            Node::RangeVar(node) => Some(node),
14454            _ => None,
14455        }
14456    }
14457}
14458
14459impl From<RangeVar> for Node {
14460    fn from(node: RangeVar) -> Node {
14461        Node::RangeVar(Box::new(node))
14462    }
14463}
14464
14465impl NodeType for RawStmt {
14466    fn into_node(self: Box<Self>) -> Node {
14467        Node::RawStmt(self)
14468    }
14469
14470    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14471        match node {
14472            Node::RawStmt(node) => Ok(node),
14473            other => Err(other),
14474        }
14475    }
14476
14477    fn peek(node: &Node) -> Option<&Self> {
14478        match node {
14479            Node::RawStmt(node) => Some(node),
14480            _ => None,
14481        }
14482    }
14483
14484    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14485        match node {
14486            Node::RawStmt(node) => Some(node),
14487            _ => None,
14488        }
14489    }
14490}
14491
14492impl From<RawStmt> for Node {
14493    fn from(node: RawStmt) -> Node {
14494        Node::RawStmt(Box::new(node))
14495    }
14496}
14497
14498impl NodeType for ReassignOwnedStmt {
14499    fn into_node(self: Box<Self>) -> Node {
14500        Node::ReassignOwnedStmt(self)
14501    }
14502
14503    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14504        match node {
14505            Node::ReassignOwnedStmt(node) => Ok(node),
14506            other => Err(other),
14507        }
14508    }
14509
14510    fn peek(node: &Node) -> Option<&Self> {
14511        match node {
14512            Node::ReassignOwnedStmt(node) => Some(node),
14513            _ => None,
14514        }
14515    }
14516
14517    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14518        match node {
14519            Node::ReassignOwnedStmt(node) => Some(node),
14520            _ => None,
14521        }
14522    }
14523}
14524
14525impl From<ReassignOwnedStmt> for Node {
14526    fn from(node: ReassignOwnedStmt) -> Node {
14527        Node::ReassignOwnedStmt(Box::new(node))
14528    }
14529}
14530
14531impl NodeType for RefreshMatViewStmt {
14532    fn into_node(self: Box<Self>) -> Node {
14533        Node::RefreshMatViewStmt(self)
14534    }
14535
14536    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14537        match node {
14538            Node::RefreshMatViewStmt(node) => Ok(node),
14539            other => Err(other),
14540        }
14541    }
14542
14543    fn peek(node: &Node) -> Option<&Self> {
14544        match node {
14545            Node::RefreshMatViewStmt(node) => Some(node),
14546            _ => None,
14547        }
14548    }
14549
14550    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14551        match node {
14552            Node::RefreshMatViewStmt(node) => Some(node),
14553            _ => None,
14554        }
14555    }
14556}
14557
14558impl From<RefreshMatViewStmt> for Node {
14559    fn from(node: RefreshMatViewStmt) -> Node {
14560        Node::RefreshMatViewStmt(Box::new(node))
14561    }
14562}
14563
14564impl NodeType for ReindexStmt {
14565    fn into_node(self: Box<Self>) -> Node {
14566        Node::ReindexStmt(self)
14567    }
14568
14569    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14570        match node {
14571            Node::ReindexStmt(node) => Ok(node),
14572            other => Err(other),
14573        }
14574    }
14575
14576    fn peek(node: &Node) -> Option<&Self> {
14577        match node {
14578            Node::ReindexStmt(node) => Some(node),
14579            _ => None,
14580        }
14581    }
14582
14583    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14584        match node {
14585            Node::ReindexStmt(node) => Some(node),
14586            _ => None,
14587        }
14588    }
14589}
14590
14591impl From<ReindexStmt> for Node {
14592    fn from(node: ReindexStmt) -> Node {
14593        Node::ReindexStmt(Box::new(node))
14594    }
14595}
14596
14597impl NodeType for RenameStmt {
14598    fn into_node(self: Box<Self>) -> Node {
14599        Node::RenameStmt(self)
14600    }
14601
14602    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14603        match node {
14604            Node::RenameStmt(node) => Ok(node),
14605            other => Err(other),
14606        }
14607    }
14608
14609    fn peek(node: &Node) -> Option<&Self> {
14610        match node {
14611            Node::RenameStmt(node) => Some(node),
14612            _ => None,
14613        }
14614    }
14615
14616    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14617        match node {
14618            Node::RenameStmt(node) => Some(node),
14619            _ => None,
14620        }
14621    }
14622}
14623
14624impl From<RenameStmt> for Node {
14625    fn from(node: RenameStmt) -> Node {
14626        Node::RenameStmt(Box::new(node))
14627    }
14628}
14629
14630impl NodeType for RepackStmt {
14631    fn into_node(self: Box<Self>) -> Node {
14632        Node::RepackStmt(self)
14633    }
14634
14635    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14636        match node {
14637            Node::RepackStmt(node) => Ok(node),
14638            other => Err(other),
14639        }
14640    }
14641
14642    fn peek(node: &Node) -> Option<&Self> {
14643        match node {
14644            Node::RepackStmt(node) => Some(node),
14645            _ => None,
14646        }
14647    }
14648
14649    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14650        match node {
14651            Node::RepackStmt(node) => Some(node),
14652            _ => None,
14653        }
14654    }
14655}
14656
14657impl From<RepackStmt> for Node {
14658    fn from(node: RepackStmt) -> Node {
14659        Node::RepackStmt(Box::new(node))
14660    }
14661}
14662
14663impl NodeType for ReplicaIdentityStmt {
14664    fn into_node(self: Box<Self>) -> Node {
14665        Node::ReplicaIdentityStmt(self)
14666    }
14667
14668    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14669        match node {
14670            Node::ReplicaIdentityStmt(node) => Ok(node),
14671            other => Err(other),
14672        }
14673    }
14674
14675    fn peek(node: &Node) -> Option<&Self> {
14676        match node {
14677            Node::ReplicaIdentityStmt(node) => Some(node),
14678            _ => None,
14679        }
14680    }
14681
14682    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14683        match node {
14684            Node::ReplicaIdentityStmt(node) => Some(node),
14685            _ => None,
14686        }
14687    }
14688}
14689
14690impl From<ReplicaIdentityStmt> for Node {
14691    fn from(node: ReplicaIdentityStmt) -> Node {
14692        Node::ReplicaIdentityStmt(Box::new(node))
14693    }
14694}
14695
14696impl NodeType for ResTarget {
14697    fn into_node(self: Box<Self>) -> Node {
14698        Node::ResTarget(self)
14699    }
14700
14701    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14702        match node {
14703            Node::ResTarget(node) => Ok(node),
14704            other => Err(other),
14705        }
14706    }
14707
14708    fn peek(node: &Node) -> Option<&Self> {
14709        match node {
14710            Node::ResTarget(node) => Some(node),
14711            _ => None,
14712        }
14713    }
14714
14715    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14716        match node {
14717            Node::ResTarget(node) => Some(node),
14718            _ => None,
14719        }
14720    }
14721}
14722
14723impl From<ResTarget> for Node {
14724    fn from(node: ResTarget) -> Node {
14725        Node::ResTarget(Box::new(node))
14726    }
14727}
14728
14729impl NodeType for ReturnStmt {
14730    fn into_node(self: Box<Self>) -> Node {
14731        Node::ReturnStmt(self)
14732    }
14733
14734    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14735        match node {
14736            Node::ReturnStmt(node) => Ok(node),
14737            other => Err(other),
14738        }
14739    }
14740
14741    fn peek(node: &Node) -> Option<&Self> {
14742        match node {
14743            Node::ReturnStmt(node) => Some(node),
14744            _ => None,
14745        }
14746    }
14747
14748    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14749        match node {
14750            Node::ReturnStmt(node) => Some(node),
14751            _ => None,
14752        }
14753    }
14754}
14755
14756impl From<ReturnStmt> for Node {
14757    fn from(node: ReturnStmt) -> Node {
14758        Node::ReturnStmt(Box::new(node))
14759    }
14760}
14761
14762impl NodeType for ReturningClause {
14763    fn into_node(self: Box<Self>) -> Node {
14764        Node::ReturningClause(self)
14765    }
14766
14767    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14768        match node {
14769            Node::ReturningClause(node) => Ok(node),
14770            other => Err(other),
14771        }
14772    }
14773
14774    fn peek(node: &Node) -> Option<&Self> {
14775        match node {
14776            Node::ReturningClause(node) => Some(node),
14777            _ => None,
14778        }
14779    }
14780
14781    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14782        match node {
14783            Node::ReturningClause(node) => Some(node),
14784            _ => None,
14785        }
14786    }
14787}
14788
14789impl From<ReturningClause> for Node {
14790    fn from(node: ReturningClause) -> Node {
14791        Node::ReturningClause(Box::new(node))
14792    }
14793}
14794
14795impl NodeType for ReturningOption {
14796    fn into_node(self: Box<Self>) -> Node {
14797        Node::ReturningOption(self)
14798    }
14799
14800    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14801        match node {
14802            Node::ReturningOption(node) => Ok(node),
14803            other => Err(other),
14804        }
14805    }
14806
14807    fn peek(node: &Node) -> Option<&Self> {
14808        match node {
14809            Node::ReturningOption(node) => Some(node),
14810            _ => None,
14811        }
14812    }
14813
14814    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14815        match node {
14816            Node::ReturningOption(node) => Some(node),
14817            _ => None,
14818        }
14819    }
14820}
14821
14822impl From<ReturningOption> for Node {
14823    fn from(node: ReturningOption) -> Node {
14824        Node::ReturningOption(Box::new(node))
14825    }
14826}
14827
14828impl NodeType for RoleSpec {
14829    fn into_node(self: Box<Self>) -> Node {
14830        Node::RoleSpec(self)
14831    }
14832
14833    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14834        match node {
14835            Node::RoleSpec(node) => Ok(node),
14836            other => Err(other),
14837        }
14838    }
14839
14840    fn peek(node: &Node) -> Option<&Self> {
14841        match node {
14842            Node::RoleSpec(node) => Some(node),
14843            _ => None,
14844        }
14845    }
14846
14847    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14848        match node {
14849            Node::RoleSpec(node) => Some(node),
14850            _ => None,
14851        }
14852    }
14853}
14854
14855impl From<RoleSpec> for Node {
14856    fn from(node: RoleSpec) -> Node {
14857        Node::RoleSpec(Box::new(node))
14858    }
14859}
14860
14861impl NodeType for RowExpr {
14862    fn into_node(self: Box<Self>) -> Node {
14863        Node::RowExpr(self)
14864    }
14865
14866    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14867        match node {
14868            Node::RowExpr(node) => Ok(node),
14869            other => Err(other),
14870        }
14871    }
14872
14873    fn peek(node: &Node) -> Option<&Self> {
14874        match node {
14875            Node::RowExpr(node) => Some(node),
14876            _ => None,
14877        }
14878    }
14879
14880    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14881        match node {
14882            Node::RowExpr(node) => Some(node),
14883            _ => None,
14884        }
14885    }
14886}
14887
14888impl From<RowExpr> for Node {
14889    fn from(node: RowExpr) -> Node {
14890        Node::RowExpr(Box::new(node))
14891    }
14892}
14893
14894impl NodeType for RuleStmt {
14895    fn into_node(self: Box<Self>) -> Node {
14896        Node::RuleStmt(self)
14897    }
14898
14899    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14900        match node {
14901            Node::RuleStmt(node) => Ok(node),
14902            other => Err(other),
14903        }
14904    }
14905
14906    fn peek(node: &Node) -> Option<&Self> {
14907        match node {
14908            Node::RuleStmt(node) => Some(node),
14909            _ => None,
14910        }
14911    }
14912
14913    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14914        match node {
14915            Node::RuleStmt(node) => Some(node),
14916            _ => None,
14917        }
14918    }
14919}
14920
14921impl From<RuleStmt> for Node {
14922    fn from(node: RuleStmt) -> Node {
14923        Node::RuleStmt(Box::new(node))
14924    }
14925}
14926
14927impl NodeType for SQLValueFunction {
14928    fn into_node(self: Box<Self>) -> Node {
14929        Node::SQLValueFunction(self)
14930    }
14931
14932    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14933        match node {
14934            Node::SQLValueFunction(node) => Ok(node),
14935            other => Err(other),
14936        }
14937    }
14938
14939    fn peek(node: &Node) -> Option<&Self> {
14940        match node {
14941            Node::SQLValueFunction(node) => Some(node),
14942            _ => None,
14943        }
14944    }
14945
14946    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14947        match node {
14948            Node::SQLValueFunction(node) => Some(node),
14949            _ => None,
14950        }
14951    }
14952}
14953
14954impl From<SQLValueFunction> for Node {
14955    fn from(node: SQLValueFunction) -> Node {
14956        Node::SQLValueFunction(Box::new(node))
14957    }
14958}
14959
14960impl NodeType for SecLabelStmt {
14961    fn into_node(self: Box<Self>) -> Node {
14962        Node::SecLabelStmt(self)
14963    }
14964
14965    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14966        match node {
14967            Node::SecLabelStmt(node) => Ok(node),
14968            other => Err(other),
14969        }
14970    }
14971
14972    fn peek(node: &Node) -> Option<&Self> {
14973        match node {
14974            Node::SecLabelStmt(node) => Some(node),
14975            _ => None,
14976        }
14977    }
14978
14979    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
14980        match node {
14981            Node::SecLabelStmt(node) => Some(node),
14982            _ => None,
14983        }
14984    }
14985}
14986
14987impl From<SecLabelStmt> for Node {
14988    fn from(node: SecLabelStmt) -> Node {
14989        Node::SecLabelStmt(Box::new(node))
14990    }
14991}
14992
14993impl NodeType for SelectStmt {
14994    fn into_node(self: Box<Self>) -> Node {
14995        Node::SelectStmt(self)
14996    }
14997
14998    fn from_node(node: Node) -> Result<Box<Self>, Node> {
14999        match node {
15000            Node::SelectStmt(node) => Ok(node),
15001            other => Err(other),
15002        }
15003    }
15004
15005    fn peek(node: &Node) -> Option<&Self> {
15006        match node {
15007            Node::SelectStmt(node) => Some(node),
15008            _ => None,
15009        }
15010    }
15011
15012    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15013        match node {
15014            Node::SelectStmt(node) => Some(node),
15015            _ => None,
15016        }
15017    }
15018}
15019
15020impl From<SelectStmt> for Node {
15021    fn from(node: SelectStmt) -> Node {
15022        Node::SelectStmt(Box::new(node))
15023    }
15024}
15025
15026impl NodeType for SetToDefault {
15027    fn into_node(self: Box<Self>) -> Node {
15028        Node::SetToDefault(self)
15029    }
15030
15031    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15032        match node {
15033            Node::SetToDefault(node) => Ok(node),
15034            other => Err(other),
15035        }
15036    }
15037
15038    fn peek(node: &Node) -> Option<&Self> {
15039        match node {
15040            Node::SetToDefault(node) => Some(node),
15041            _ => None,
15042        }
15043    }
15044
15045    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15046        match node {
15047            Node::SetToDefault(node) => Some(node),
15048            _ => None,
15049        }
15050    }
15051}
15052
15053impl From<SetToDefault> for Node {
15054    fn from(node: SetToDefault) -> Node {
15055        Node::SetToDefault(Box::new(node))
15056    }
15057}
15058
15059impl NodeType for SortBy {
15060    fn into_node(self: Box<Self>) -> Node {
15061        Node::SortBy(self)
15062    }
15063
15064    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15065        match node {
15066            Node::SortBy(node) => Ok(node),
15067            other => Err(other),
15068        }
15069    }
15070
15071    fn peek(node: &Node) -> Option<&Self> {
15072        match node {
15073            Node::SortBy(node) => Some(node),
15074            _ => None,
15075        }
15076    }
15077
15078    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15079        match node {
15080            Node::SortBy(node) => Some(node),
15081            _ => None,
15082        }
15083    }
15084}
15085
15086impl From<SortBy> for Node {
15087    fn from(node: SortBy) -> Node {
15088        Node::SortBy(Box::new(node))
15089    }
15090}
15091
15092impl NodeType for StatsElem {
15093    fn into_node(self: Box<Self>) -> Node {
15094        Node::StatsElem(self)
15095    }
15096
15097    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15098        match node {
15099            Node::StatsElem(node) => Ok(node),
15100            other => Err(other),
15101        }
15102    }
15103
15104    fn peek(node: &Node) -> Option<&Self> {
15105        match node {
15106            Node::StatsElem(node) => Some(node),
15107            _ => None,
15108        }
15109    }
15110
15111    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15112        match node {
15113            Node::StatsElem(node) => Some(node),
15114            _ => None,
15115        }
15116    }
15117}
15118
15119impl From<StatsElem> for Node {
15120    fn from(node: StatsElem) -> Node {
15121        Node::StatsElem(Box::new(node))
15122    }
15123}
15124
15125impl NodeType for SubLink {
15126    fn into_node(self: Box<Self>) -> Node {
15127        Node::SubLink(self)
15128    }
15129
15130    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15131        match node {
15132            Node::SubLink(node) => Ok(node),
15133            other => Err(other),
15134        }
15135    }
15136
15137    fn peek(node: &Node) -> Option<&Self> {
15138        match node {
15139            Node::SubLink(node) => Some(node),
15140            _ => None,
15141        }
15142    }
15143
15144    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15145        match node {
15146            Node::SubLink(node) => Some(node),
15147            _ => None,
15148        }
15149    }
15150}
15151
15152impl From<SubLink> for Node {
15153    fn from(node: SubLink) -> Node {
15154        Node::SubLink(Box::new(node))
15155    }
15156}
15157
15158impl NodeType for TableLikeClause {
15159    fn into_node(self: Box<Self>) -> Node {
15160        Node::TableLikeClause(self)
15161    }
15162
15163    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15164        match node {
15165            Node::TableLikeClause(node) => Ok(node),
15166            other => Err(other),
15167        }
15168    }
15169
15170    fn peek(node: &Node) -> Option<&Self> {
15171        match node {
15172            Node::TableLikeClause(node) => Some(node),
15173            _ => None,
15174        }
15175    }
15176
15177    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15178        match node {
15179            Node::TableLikeClause(node) => Some(node),
15180            _ => None,
15181        }
15182    }
15183}
15184
15185impl From<TableLikeClause> for Node {
15186    fn from(node: TableLikeClause) -> Node {
15187        Node::TableLikeClause(Box::new(node))
15188    }
15189}
15190
15191impl NodeType for TransactionStmt {
15192    fn into_node(self: Box<Self>) -> Node {
15193        Node::TransactionStmt(self)
15194    }
15195
15196    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15197        match node {
15198            Node::TransactionStmt(node) => Ok(node),
15199            other => Err(other),
15200        }
15201    }
15202
15203    fn peek(node: &Node) -> Option<&Self> {
15204        match node {
15205            Node::TransactionStmt(node) => Some(node),
15206            _ => None,
15207        }
15208    }
15209
15210    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15211        match node {
15212            Node::TransactionStmt(node) => Some(node),
15213            _ => None,
15214        }
15215    }
15216}
15217
15218impl From<TransactionStmt> for Node {
15219    fn from(node: TransactionStmt) -> Node {
15220        Node::TransactionStmt(Box::new(node))
15221    }
15222}
15223
15224impl NodeType for TriggerTransition {
15225    fn into_node(self: Box<Self>) -> Node {
15226        Node::TriggerTransition(self)
15227    }
15228
15229    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15230        match node {
15231            Node::TriggerTransition(node) => Ok(node),
15232            other => Err(other),
15233        }
15234    }
15235
15236    fn peek(node: &Node) -> Option<&Self> {
15237        match node {
15238            Node::TriggerTransition(node) => Some(node),
15239            _ => None,
15240        }
15241    }
15242
15243    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15244        match node {
15245            Node::TriggerTransition(node) => Some(node),
15246            _ => None,
15247        }
15248    }
15249}
15250
15251impl From<TriggerTransition> for Node {
15252    fn from(node: TriggerTransition) -> Node {
15253        Node::TriggerTransition(Box::new(node))
15254    }
15255}
15256
15257impl NodeType for TruncateStmt {
15258    fn into_node(self: Box<Self>) -> Node {
15259        Node::TruncateStmt(self)
15260    }
15261
15262    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15263        match node {
15264            Node::TruncateStmt(node) => Ok(node),
15265            other => Err(other),
15266        }
15267    }
15268
15269    fn peek(node: &Node) -> Option<&Self> {
15270        match node {
15271            Node::TruncateStmt(node) => Some(node),
15272            _ => None,
15273        }
15274    }
15275
15276    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15277        match node {
15278            Node::TruncateStmt(node) => Some(node),
15279            _ => None,
15280        }
15281    }
15282}
15283
15284impl From<TruncateStmt> for Node {
15285    fn from(node: TruncateStmt) -> Node {
15286        Node::TruncateStmt(Box::new(node))
15287    }
15288}
15289
15290impl NodeType for TypeCast {
15291    fn into_node(self: Box<Self>) -> Node {
15292        Node::TypeCast(self)
15293    }
15294
15295    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15296        match node {
15297            Node::TypeCast(node) => Ok(node),
15298            other => Err(other),
15299        }
15300    }
15301
15302    fn peek(node: &Node) -> Option<&Self> {
15303        match node {
15304            Node::TypeCast(node) => Some(node),
15305            _ => None,
15306        }
15307    }
15308
15309    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15310        match node {
15311            Node::TypeCast(node) => Some(node),
15312            _ => None,
15313        }
15314    }
15315}
15316
15317impl From<TypeCast> for Node {
15318    fn from(node: TypeCast) -> Node {
15319        Node::TypeCast(Box::new(node))
15320    }
15321}
15322
15323impl NodeType for TypeName {
15324    fn into_node(self: Box<Self>) -> Node {
15325        Node::TypeName(self)
15326    }
15327
15328    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15329        match node {
15330            Node::TypeName(node) => Ok(node),
15331            other => Err(other),
15332        }
15333    }
15334
15335    fn peek(node: &Node) -> Option<&Self> {
15336        match node {
15337            Node::TypeName(node) => Some(node),
15338            _ => None,
15339        }
15340    }
15341
15342    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15343        match node {
15344            Node::TypeName(node) => Some(node),
15345            _ => None,
15346        }
15347    }
15348}
15349
15350impl From<TypeName> for Node {
15351    fn from(node: TypeName) -> Node {
15352        Node::TypeName(Box::new(node))
15353    }
15354}
15355
15356impl NodeType for UnlistenStmt {
15357    fn into_node(self: Box<Self>) -> Node {
15358        Node::UnlistenStmt(self)
15359    }
15360
15361    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15362        match node {
15363            Node::UnlistenStmt(node) => Ok(node),
15364            other => Err(other),
15365        }
15366    }
15367
15368    fn peek(node: &Node) -> Option<&Self> {
15369        match node {
15370            Node::UnlistenStmt(node) => Some(node),
15371            _ => None,
15372        }
15373    }
15374
15375    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15376        match node {
15377            Node::UnlistenStmt(node) => Some(node),
15378            _ => None,
15379        }
15380    }
15381}
15382
15383impl From<UnlistenStmt> for Node {
15384    fn from(node: UnlistenStmt) -> Node {
15385        Node::UnlistenStmt(Box::new(node))
15386    }
15387}
15388
15389impl NodeType for UpdateStmt {
15390    fn into_node(self: Box<Self>) -> Node {
15391        Node::UpdateStmt(self)
15392    }
15393
15394    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15395        match node {
15396            Node::UpdateStmt(node) => Ok(node),
15397            other => Err(other),
15398        }
15399    }
15400
15401    fn peek(node: &Node) -> Option<&Self> {
15402        match node {
15403            Node::UpdateStmt(node) => Some(node),
15404            _ => None,
15405        }
15406    }
15407
15408    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15409        match node {
15410            Node::UpdateStmt(node) => Some(node),
15411            _ => None,
15412        }
15413    }
15414}
15415
15416impl From<UpdateStmt> for Node {
15417    fn from(node: UpdateStmt) -> Node {
15418        Node::UpdateStmt(Box::new(node))
15419    }
15420}
15421
15422impl NodeType for VacuumRelation {
15423    fn into_node(self: Box<Self>) -> Node {
15424        Node::VacuumRelation(self)
15425    }
15426
15427    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15428        match node {
15429            Node::VacuumRelation(node) => Ok(node),
15430            other => Err(other),
15431        }
15432    }
15433
15434    fn peek(node: &Node) -> Option<&Self> {
15435        match node {
15436            Node::VacuumRelation(node) => Some(node),
15437            _ => None,
15438        }
15439    }
15440
15441    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15442        match node {
15443            Node::VacuumRelation(node) => Some(node),
15444            _ => None,
15445        }
15446    }
15447}
15448
15449impl From<VacuumRelation> for Node {
15450    fn from(node: VacuumRelation) -> Node {
15451        Node::VacuumRelation(Box::new(node))
15452    }
15453}
15454
15455impl NodeType for VacuumStmt {
15456    fn into_node(self: Box<Self>) -> Node {
15457        Node::VacuumStmt(self)
15458    }
15459
15460    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15461        match node {
15462            Node::VacuumStmt(node) => Ok(node),
15463            other => Err(other),
15464        }
15465    }
15466
15467    fn peek(node: &Node) -> Option<&Self> {
15468        match node {
15469            Node::VacuumStmt(node) => Some(node),
15470            _ => None,
15471        }
15472    }
15473
15474    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15475        match node {
15476            Node::VacuumStmt(node) => Some(node),
15477            _ => None,
15478        }
15479    }
15480}
15481
15482impl From<VacuumStmt> for Node {
15483    fn from(node: VacuumStmt) -> Node {
15484        Node::VacuumStmt(Box::new(node))
15485    }
15486}
15487
15488impl NodeType for VariableSetStmt {
15489    fn into_node(self: Box<Self>) -> Node {
15490        Node::VariableSetStmt(self)
15491    }
15492
15493    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15494        match node {
15495            Node::VariableSetStmt(node) => Ok(node),
15496            other => Err(other),
15497        }
15498    }
15499
15500    fn peek(node: &Node) -> Option<&Self> {
15501        match node {
15502            Node::VariableSetStmt(node) => Some(node),
15503            _ => None,
15504        }
15505    }
15506
15507    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15508        match node {
15509            Node::VariableSetStmt(node) => Some(node),
15510            _ => None,
15511        }
15512    }
15513}
15514
15515impl From<VariableSetStmt> for Node {
15516    fn from(node: VariableSetStmt) -> Node {
15517        Node::VariableSetStmt(Box::new(node))
15518    }
15519}
15520
15521impl NodeType for VariableShowStmt {
15522    fn into_node(self: Box<Self>) -> Node {
15523        Node::VariableShowStmt(self)
15524    }
15525
15526    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15527        match node {
15528            Node::VariableShowStmt(node) => Ok(node),
15529            other => Err(other),
15530        }
15531    }
15532
15533    fn peek(node: &Node) -> Option<&Self> {
15534        match node {
15535            Node::VariableShowStmt(node) => Some(node),
15536            _ => None,
15537        }
15538    }
15539
15540    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15541        match node {
15542            Node::VariableShowStmt(node) => Some(node),
15543            _ => None,
15544        }
15545    }
15546}
15547
15548impl From<VariableShowStmt> for Node {
15549    fn from(node: VariableShowStmt) -> Node {
15550        Node::VariableShowStmt(Box::new(node))
15551    }
15552}
15553
15554impl NodeType for ViewStmt {
15555    fn into_node(self: Box<Self>) -> Node {
15556        Node::ViewStmt(self)
15557    }
15558
15559    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15560        match node {
15561            Node::ViewStmt(node) => Ok(node),
15562            other => Err(other),
15563        }
15564    }
15565
15566    fn peek(node: &Node) -> Option<&Self> {
15567        match node {
15568            Node::ViewStmt(node) => Some(node),
15569            _ => None,
15570        }
15571    }
15572
15573    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15574        match node {
15575            Node::ViewStmt(node) => Some(node),
15576            _ => None,
15577        }
15578    }
15579}
15580
15581impl From<ViewStmt> for Node {
15582    fn from(node: ViewStmt) -> Node {
15583        Node::ViewStmt(Box::new(node))
15584    }
15585}
15586
15587impl NodeType for WaitStmt {
15588    fn into_node(self: Box<Self>) -> Node {
15589        Node::WaitStmt(self)
15590    }
15591
15592    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15593        match node {
15594            Node::WaitStmt(node) => Ok(node),
15595            other => Err(other),
15596        }
15597    }
15598
15599    fn peek(node: &Node) -> Option<&Self> {
15600        match node {
15601            Node::WaitStmt(node) => Some(node),
15602            _ => None,
15603        }
15604    }
15605
15606    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15607        match node {
15608            Node::WaitStmt(node) => Some(node),
15609            _ => None,
15610        }
15611    }
15612}
15613
15614impl From<WaitStmt> for Node {
15615    fn from(node: WaitStmt) -> Node {
15616        Node::WaitStmt(Box::new(node))
15617    }
15618}
15619
15620impl NodeType for WindowDef {
15621    fn into_node(self: Box<Self>) -> Node {
15622        Node::WindowDef(self)
15623    }
15624
15625    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15626        match node {
15627            Node::WindowDef(node) => Ok(node),
15628            other => Err(other),
15629        }
15630    }
15631
15632    fn peek(node: &Node) -> Option<&Self> {
15633        match node {
15634            Node::WindowDef(node) => Some(node),
15635            _ => None,
15636        }
15637    }
15638
15639    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15640        match node {
15641            Node::WindowDef(node) => Some(node),
15642            _ => None,
15643        }
15644    }
15645}
15646
15647impl From<WindowDef> for Node {
15648    fn from(node: WindowDef) -> Node {
15649        Node::WindowDef(Box::new(node))
15650    }
15651}
15652
15653impl NodeType for WithClause {
15654    fn into_node(self: Box<Self>) -> Node {
15655        Node::WithClause(self)
15656    }
15657
15658    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15659        match node {
15660            Node::WithClause(node) => Ok(node),
15661            other => Err(other),
15662        }
15663    }
15664
15665    fn peek(node: &Node) -> Option<&Self> {
15666        match node {
15667            Node::WithClause(node) => Some(node),
15668            _ => None,
15669        }
15670    }
15671
15672    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15673        match node {
15674            Node::WithClause(node) => Some(node),
15675            _ => None,
15676        }
15677    }
15678}
15679
15680impl From<WithClause> for Node {
15681    fn from(node: WithClause) -> Node {
15682        Node::WithClause(Box::new(node))
15683    }
15684}
15685
15686impl NodeType for XmlExpr {
15687    fn into_node(self: Box<Self>) -> Node {
15688        Node::XmlExpr(self)
15689    }
15690
15691    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15692        match node {
15693            Node::XmlExpr(node) => Ok(node),
15694            other => Err(other),
15695        }
15696    }
15697
15698    fn peek(node: &Node) -> Option<&Self> {
15699        match node {
15700            Node::XmlExpr(node) => Some(node),
15701            _ => None,
15702        }
15703    }
15704
15705    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15706        match node {
15707            Node::XmlExpr(node) => Some(node),
15708            _ => None,
15709        }
15710    }
15711}
15712
15713impl From<XmlExpr> for Node {
15714    fn from(node: XmlExpr) -> Node {
15715        Node::XmlExpr(Box::new(node))
15716    }
15717}
15718
15719impl NodeType for XmlSerialize {
15720    fn into_node(self: Box<Self>) -> Node {
15721        Node::XmlSerialize(self)
15722    }
15723
15724    fn from_node(node: Node) -> Result<Box<Self>, Node> {
15725        match node {
15726            Node::XmlSerialize(node) => Ok(node),
15727            other => Err(other),
15728        }
15729    }
15730
15731    fn peek(node: &Node) -> Option<&Self> {
15732        match node {
15733            Node::XmlSerialize(node) => Some(node),
15734            _ => None,
15735        }
15736    }
15737
15738    fn peek_mut(node: &mut Node) -> Option<&mut Self> {
15739        match node {
15740            Node::XmlSerialize(node) => Some(node),
15741            _ => None,
15742        }
15743    }
15744}
15745
15746impl From<XmlSerialize> for Node {
15747    fn from(node: XmlSerialize) -> Node {
15748        Node::XmlSerialize(Box::new(node))
15749    }
15750}