Coverage Report

Created: 2025-06-15 06:31

/src/postgres/bld/src/backend/nodes/outfuncs.funcs.c
Line
Count
Source (jump to first uncovered line)
1
/*-------------------------------------------------------------------------
2
 *
3
 * outfuncs.funcs.c
4
 *    Generated node infrastructure code
5
 *
6
 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
7
 * Portions Copyright (c) 1994, Regents of the University of California
8
 *
9
 * NOTES
10
 *  ******************************
11
 *  *** DO NOT EDIT THIS FILE! ***
12
 *  ******************************
13
 *
14
 *  It has been GENERATED by src/backend/nodes/gen_node_support.pl
15
 *
16
 *-------------------------------------------------------------------------
17
 */
18
#include "access/amapi.h"
19
#include "access/cmptype.h"
20
#include "access/sdir.h"
21
#include "access/tableam.h"
22
#include "access/tsmapi.h"
23
#include "commands/event_trigger.h"
24
#include "commands/trigger.h"
25
#include "executor/tuptable.h"
26
#include "foreign/fdwapi.h"
27
#include "nodes/bitmapset.h"
28
#include "nodes/execnodes.h"
29
#include "nodes/extensible.h"
30
#include "nodes/lockoptions.h"
31
#include "nodes/miscnodes.h"
32
#include "nodes/nodes.h"
33
#include "nodes/parsenodes.h"
34
#include "nodes/pathnodes.h"
35
#include "nodes/plannodes.h"
36
#include "nodes/primnodes.h"
37
#include "nodes/replnodes.h"
38
#include "nodes/supportnodes.h"
39
#include "nodes/value.h"
40
#include "utils/rel.h"
41
42
static void
43
_outAlias(StringInfo str, const Alias *node)
44
0
{
45
0
  WRITE_NODE_TYPE("ALIAS");
46
47
0
  WRITE_STRING_FIELD(aliasname);
48
0
  WRITE_NODE_FIELD(colnames);
49
0
}
50
51
static void
52
_outRangeVar(StringInfo str, const RangeVar *node)
53
0
{
54
0
  WRITE_NODE_TYPE("RANGEVAR");
55
56
0
  WRITE_STRING_FIELD(catalogname);
57
0
  WRITE_STRING_FIELD(schemaname);
58
0
  WRITE_STRING_FIELD(relname);
59
0
  WRITE_BOOL_FIELD(inh);
60
0
  WRITE_CHAR_FIELD(relpersistence);
61
0
  WRITE_NODE_FIELD(alias);
62
0
  WRITE_LOCATION_FIELD(location);
63
0
}
64
65
static void
66
_outTableFunc(StringInfo str, const TableFunc *node)
67
0
{
68
0
  WRITE_NODE_TYPE("TABLEFUNC");
69
70
0
  WRITE_ENUM_FIELD(functype, TableFuncType);
71
0
  WRITE_NODE_FIELD(ns_uris);
72
0
  WRITE_NODE_FIELD(ns_names);
73
0
  WRITE_NODE_FIELD(docexpr);
74
0
  WRITE_NODE_FIELD(rowexpr);
75
0
  WRITE_NODE_FIELD(colnames);
76
0
  WRITE_NODE_FIELD(coltypes);
77
0
  WRITE_NODE_FIELD(coltypmods);
78
0
  WRITE_NODE_FIELD(colcollations);
79
0
  WRITE_NODE_FIELD(colexprs);
80
0
  WRITE_NODE_FIELD(coldefexprs);
81
0
  WRITE_NODE_FIELD(colvalexprs);
82
0
  WRITE_NODE_FIELD(passingvalexprs);
83
0
  WRITE_BITMAPSET_FIELD(notnulls);
84
0
  WRITE_NODE_FIELD(plan);
85
0
  WRITE_INT_FIELD(ordinalitycol);
86
0
  WRITE_LOCATION_FIELD(location);
87
0
}
88
89
static void
90
_outIntoClause(StringInfo str, const IntoClause *node)
91
0
{
92
0
  WRITE_NODE_TYPE("INTOCLAUSE");
93
94
0
  WRITE_NODE_FIELD(rel);
95
0
  WRITE_NODE_FIELD(colNames);
96
0
  WRITE_STRING_FIELD(accessMethod);
97
0
  WRITE_NODE_FIELD(options);
98
0
  WRITE_ENUM_FIELD(onCommit, OnCommitAction);
99
0
  WRITE_STRING_FIELD(tableSpaceName);
100
0
  WRITE_NODE_FIELD(viewQuery);
101
0
  WRITE_BOOL_FIELD(skipData);
102
0
}
103
104
static void
105
_outVar(StringInfo str, const Var *node)
106
0
{
107
0
  WRITE_NODE_TYPE("VAR");
108
109
0
  WRITE_INT_FIELD(varno);
110
0
  WRITE_INT_FIELD(varattno);
111
0
  WRITE_OID_FIELD(vartype);
112
0
  WRITE_INT_FIELD(vartypmod);
113
0
  WRITE_OID_FIELD(varcollid);
114
0
  WRITE_BITMAPSET_FIELD(varnullingrels);
115
0
  WRITE_UINT_FIELD(varlevelsup);
116
0
  WRITE_ENUM_FIELD(varreturningtype, VarReturningType);
117
0
  WRITE_UINT_FIELD(varnosyn);
118
0
  WRITE_INT_FIELD(varattnosyn);
119
0
  WRITE_LOCATION_FIELD(location);
120
0
}
121
122
static void
123
_outParam(StringInfo str, const Param *node)
124
0
{
125
0
  WRITE_NODE_TYPE("PARAM");
126
127
0
  WRITE_ENUM_FIELD(paramkind, ParamKind);
128
0
  WRITE_INT_FIELD(paramid);
129
0
  WRITE_OID_FIELD(paramtype);
130
0
  WRITE_INT_FIELD(paramtypmod);
131
0
  WRITE_OID_FIELD(paramcollid);
132
0
  WRITE_LOCATION_FIELD(location);
133
0
}
134
135
static void
136
_outAggref(StringInfo str, const Aggref *node)
137
0
{
138
0
  WRITE_NODE_TYPE("AGGREF");
139
140
0
  WRITE_OID_FIELD(aggfnoid);
141
0
  WRITE_OID_FIELD(aggtype);
142
0
  WRITE_OID_FIELD(aggcollid);
143
0
  WRITE_OID_FIELD(inputcollid);
144
0
  WRITE_OID_FIELD(aggtranstype);
145
0
  WRITE_NODE_FIELD(aggargtypes);
146
0
  WRITE_NODE_FIELD(aggdirectargs);
147
0
  WRITE_NODE_FIELD(args);
148
0
  WRITE_NODE_FIELD(aggorder);
149
0
  WRITE_NODE_FIELD(aggdistinct);
150
0
  WRITE_NODE_FIELD(aggfilter);
151
0
  WRITE_BOOL_FIELD(aggstar);
152
0
  WRITE_BOOL_FIELD(aggvariadic);
153
0
  WRITE_CHAR_FIELD(aggkind);
154
0
  WRITE_BOOL_FIELD(aggpresorted);
155
0
  WRITE_UINT_FIELD(agglevelsup);
156
0
  WRITE_ENUM_FIELD(aggsplit, AggSplit);
157
0
  WRITE_INT_FIELD(aggno);
158
0
  WRITE_INT_FIELD(aggtransno);
159
0
  WRITE_LOCATION_FIELD(location);
160
0
}
161
162
static void
163
_outGroupingFunc(StringInfo str, const GroupingFunc *node)
164
0
{
165
0
  WRITE_NODE_TYPE("GROUPINGFUNC");
166
167
0
  WRITE_NODE_FIELD(args);
168
0
  WRITE_NODE_FIELD(refs);
169
0
  WRITE_NODE_FIELD(cols);
170
0
  WRITE_UINT_FIELD(agglevelsup);
171
0
  WRITE_LOCATION_FIELD(location);
172
0
}
173
174
static void
175
_outWindowFunc(StringInfo str, const WindowFunc *node)
176
0
{
177
0
  WRITE_NODE_TYPE("WINDOWFUNC");
178
179
0
  WRITE_OID_FIELD(winfnoid);
180
0
  WRITE_OID_FIELD(wintype);
181
0
  WRITE_OID_FIELD(wincollid);
182
0
  WRITE_OID_FIELD(inputcollid);
183
0
  WRITE_NODE_FIELD(args);
184
0
  WRITE_NODE_FIELD(aggfilter);
185
0
  WRITE_NODE_FIELD(runCondition);
186
0
  WRITE_UINT_FIELD(winref);
187
0
  WRITE_BOOL_FIELD(winstar);
188
0
  WRITE_BOOL_FIELD(winagg);
189
0
  WRITE_LOCATION_FIELD(location);
190
0
}
191
192
static void
193
_outWindowFuncRunCondition(StringInfo str, const WindowFuncRunCondition *node)
194
0
{
195
0
  WRITE_NODE_TYPE("WINDOWFUNCRUNCONDITION");
196
197
0
  WRITE_OID_FIELD(opno);
198
0
  WRITE_OID_FIELD(inputcollid);
199
0
  WRITE_BOOL_FIELD(wfunc_left);
200
0
  WRITE_NODE_FIELD(arg);
201
0
}
202
203
static void
204
_outMergeSupportFunc(StringInfo str, const MergeSupportFunc *node)
205
0
{
206
0
  WRITE_NODE_TYPE("MERGESUPPORTFUNC");
207
208
0
  WRITE_OID_FIELD(msftype);
209
0
  WRITE_OID_FIELD(msfcollid);
210
0
  WRITE_LOCATION_FIELD(location);
211
0
}
212
213
static void
214
_outSubscriptingRef(StringInfo str, const SubscriptingRef *node)
215
0
{
216
0
  WRITE_NODE_TYPE("SUBSCRIPTINGREF");
217
218
0
  WRITE_OID_FIELD(refcontainertype);
219
0
  WRITE_OID_FIELD(refelemtype);
220
0
  WRITE_OID_FIELD(refrestype);
221
0
  WRITE_INT_FIELD(reftypmod);
222
0
  WRITE_OID_FIELD(refcollid);
223
0
  WRITE_NODE_FIELD(refupperindexpr);
224
0
  WRITE_NODE_FIELD(reflowerindexpr);
225
0
  WRITE_NODE_FIELD(refexpr);
226
0
  WRITE_NODE_FIELD(refassgnexpr);
227
0
}
228
229
static void
230
_outFuncExpr(StringInfo str, const FuncExpr *node)
231
0
{
232
0
  WRITE_NODE_TYPE("FUNCEXPR");
233
234
0
  WRITE_OID_FIELD(funcid);
235
0
  WRITE_OID_FIELD(funcresulttype);
236
0
  WRITE_BOOL_FIELD(funcretset);
237
0
  WRITE_BOOL_FIELD(funcvariadic);
238
0
  WRITE_ENUM_FIELD(funcformat, CoercionForm);
239
0
  WRITE_OID_FIELD(funccollid);
240
0
  WRITE_OID_FIELD(inputcollid);
241
0
  WRITE_NODE_FIELD(args);
242
0
  WRITE_LOCATION_FIELD(location);
243
0
}
244
245
static void
246
_outNamedArgExpr(StringInfo str, const NamedArgExpr *node)
247
0
{
248
0
  WRITE_NODE_TYPE("NAMEDARGEXPR");
249
250
0
  WRITE_NODE_FIELD(arg);
251
0
  WRITE_STRING_FIELD(name);
252
0
  WRITE_INT_FIELD(argnumber);
253
0
  WRITE_LOCATION_FIELD(location);
254
0
}
255
256
static void
257
_outOpExpr(StringInfo str, const OpExpr *node)
258
0
{
259
0
  WRITE_NODE_TYPE("OPEXPR");
260
261
0
  WRITE_OID_FIELD(opno);
262
0
  WRITE_OID_FIELD(opfuncid);
263
0
  WRITE_OID_FIELD(opresulttype);
264
0
  WRITE_BOOL_FIELD(opretset);
265
0
  WRITE_OID_FIELD(opcollid);
266
0
  WRITE_OID_FIELD(inputcollid);
267
0
  WRITE_NODE_FIELD(args);
268
0
  WRITE_LOCATION_FIELD(location);
269
0
}
270
271
static void
272
_outDistinctExpr(StringInfo str, const DistinctExpr *node)
273
0
{
274
0
  WRITE_NODE_TYPE("DISTINCTEXPR");
275
276
0
  WRITE_OID_FIELD(opno);
277
0
  WRITE_OID_FIELD(opfuncid);
278
0
  WRITE_OID_FIELD(opresulttype);
279
0
  WRITE_BOOL_FIELD(opretset);
280
0
  WRITE_OID_FIELD(opcollid);
281
0
  WRITE_OID_FIELD(inputcollid);
282
0
  WRITE_NODE_FIELD(args);
283
0
  WRITE_LOCATION_FIELD(location);
284
0
}
285
286
static void
287
_outNullIfExpr(StringInfo str, const NullIfExpr *node)
288
0
{
289
0
  WRITE_NODE_TYPE("NULLIFEXPR");
290
291
0
  WRITE_OID_FIELD(opno);
292
0
  WRITE_OID_FIELD(opfuncid);
293
0
  WRITE_OID_FIELD(opresulttype);
294
0
  WRITE_BOOL_FIELD(opretset);
295
0
  WRITE_OID_FIELD(opcollid);
296
0
  WRITE_OID_FIELD(inputcollid);
297
0
  WRITE_NODE_FIELD(args);
298
0
  WRITE_LOCATION_FIELD(location);
299
0
}
300
301
static void
302
_outScalarArrayOpExpr(StringInfo str, const ScalarArrayOpExpr *node)
303
0
{
304
0
  WRITE_NODE_TYPE("SCALARARRAYOPEXPR");
305
306
0
  WRITE_OID_FIELD(opno);
307
0
  WRITE_OID_FIELD(opfuncid);
308
0
  WRITE_OID_FIELD(hashfuncid);
309
0
  WRITE_OID_FIELD(negfuncid);
310
0
  WRITE_BOOL_FIELD(useOr);
311
0
  WRITE_OID_FIELD(inputcollid);
312
0
  WRITE_NODE_FIELD(args);
313
0
  WRITE_LOCATION_FIELD(location);
314
0
}
315
316
static void
317
_outSubLink(StringInfo str, const SubLink *node)
318
0
{
319
0
  WRITE_NODE_TYPE("SUBLINK");
320
321
0
  WRITE_ENUM_FIELD(subLinkType, SubLinkType);
322
0
  WRITE_INT_FIELD(subLinkId);
323
0
  WRITE_NODE_FIELD(testexpr);
324
0
  WRITE_NODE_FIELD(operName);
325
0
  WRITE_NODE_FIELD(subselect);
326
0
  WRITE_LOCATION_FIELD(location);
327
0
}
328
329
static void
330
_outSubPlan(StringInfo str, const SubPlan *node)
331
0
{
332
0
  WRITE_NODE_TYPE("SUBPLAN");
333
334
0
  WRITE_ENUM_FIELD(subLinkType, SubLinkType);
335
0
  WRITE_NODE_FIELD(testexpr);
336
0
  WRITE_NODE_FIELD(paramIds);
337
0
  WRITE_INT_FIELD(plan_id);
338
0
  WRITE_STRING_FIELD(plan_name);
339
0
  WRITE_OID_FIELD(firstColType);
340
0
  WRITE_INT_FIELD(firstColTypmod);
341
0
  WRITE_OID_FIELD(firstColCollation);
342
0
  WRITE_BOOL_FIELD(useHashTable);
343
0
  WRITE_BOOL_FIELD(unknownEqFalse);
344
0
  WRITE_BOOL_FIELD(parallel_safe);
345
0
  WRITE_NODE_FIELD(setParam);
346
0
  WRITE_NODE_FIELD(parParam);
347
0
  WRITE_NODE_FIELD(args);
348
0
  WRITE_FLOAT_FIELD(startup_cost);
349
0
  WRITE_FLOAT_FIELD(per_call_cost);
350
0
}
351
352
static void
353
_outAlternativeSubPlan(StringInfo str, const AlternativeSubPlan *node)
354
0
{
355
0
  WRITE_NODE_TYPE("ALTERNATIVESUBPLAN");
356
357
0
  WRITE_NODE_FIELD(subplans);
358
0
}
359
360
static void
361
_outFieldSelect(StringInfo str, const FieldSelect *node)
362
0
{
363
0
  WRITE_NODE_TYPE("FIELDSELECT");
364
365
0
  WRITE_NODE_FIELD(arg);
366
0
  WRITE_INT_FIELD(fieldnum);
367
0
  WRITE_OID_FIELD(resulttype);
368
0
  WRITE_INT_FIELD(resulttypmod);
369
0
  WRITE_OID_FIELD(resultcollid);
370
0
}
371
372
static void
373
_outFieldStore(StringInfo str, const FieldStore *node)
374
0
{
375
0
  WRITE_NODE_TYPE("FIELDSTORE");
376
377
0
  WRITE_NODE_FIELD(arg);
378
0
  WRITE_NODE_FIELD(newvals);
379
0
  WRITE_NODE_FIELD(fieldnums);
380
0
  WRITE_OID_FIELD(resulttype);
381
0
}
382
383
static void
384
_outRelabelType(StringInfo str, const RelabelType *node)
385
0
{
386
0
  WRITE_NODE_TYPE("RELABELTYPE");
387
388
0
  WRITE_NODE_FIELD(arg);
389
0
  WRITE_OID_FIELD(resulttype);
390
0
  WRITE_INT_FIELD(resulttypmod);
391
0
  WRITE_OID_FIELD(resultcollid);
392
0
  WRITE_ENUM_FIELD(relabelformat, CoercionForm);
393
0
  WRITE_LOCATION_FIELD(location);
394
0
}
395
396
static void
397
_outCoerceViaIO(StringInfo str, const CoerceViaIO *node)
398
0
{
399
0
  WRITE_NODE_TYPE("COERCEVIAIO");
400
401
0
  WRITE_NODE_FIELD(arg);
402
0
  WRITE_OID_FIELD(resulttype);
403
0
  WRITE_OID_FIELD(resultcollid);
404
0
  WRITE_ENUM_FIELD(coerceformat, CoercionForm);
405
0
  WRITE_LOCATION_FIELD(location);
406
0
}
407
408
static void
409
_outArrayCoerceExpr(StringInfo str, const ArrayCoerceExpr *node)
410
0
{
411
0
  WRITE_NODE_TYPE("ARRAYCOERCEEXPR");
412
413
0
  WRITE_NODE_FIELD(arg);
414
0
  WRITE_NODE_FIELD(elemexpr);
415
0
  WRITE_OID_FIELD(resulttype);
416
0
  WRITE_INT_FIELD(resulttypmod);
417
0
  WRITE_OID_FIELD(resultcollid);
418
0
  WRITE_ENUM_FIELD(coerceformat, CoercionForm);
419
0
  WRITE_LOCATION_FIELD(location);
420
0
}
421
422
static void
423
_outConvertRowtypeExpr(StringInfo str, const ConvertRowtypeExpr *node)
424
0
{
425
0
  WRITE_NODE_TYPE("CONVERTROWTYPEEXPR");
426
427
0
  WRITE_NODE_FIELD(arg);
428
0
  WRITE_OID_FIELD(resulttype);
429
0
  WRITE_ENUM_FIELD(convertformat, CoercionForm);
430
0
  WRITE_LOCATION_FIELD(location);
431
0
}
432
433
static void
434
_outCollateExpr(StringInfo str, const CollateExpr *node)
435
0
{
436
0
  WRITE_NODE_TYPE("COLLATEEXPR");
437
438
0
  WRITE_NODE_FIELD(arg);
439
0
  WRITE_OID_FIELD(collOid);
440
0
  WRITE_LOCATION_FIELD(location);
441
0
}
442
443
static void
444
_outCaseExpr(StringInfo str, const CaseExpr *node)
445
0
{
446
0
  WRITE_NODE_TYPE("CASEEXPR");
447
448
0
  WRITE_OID_FIELD(casetype);
449
0
  WRITE_OID_FIELD(casecollid);
450
0
  WRITE_NODE_FIELD(arg);
451
0
  WRITE_NODE_FIELD(args);
452
0
  WRITE_NODE_FIELD(defresult);
453
0
  WRITE_LOCATION_FIELD(location);
454
0
}
455
456
static void
457
_outCaseWhen(StringInfo str, const CaseWhen *node)
458
0
{
459
0
  WRITE_NODE_TYPE("CASEWHEN");
460
461
0
  WRITE_NODE_FIELD(expr);
462
0
  WRITE_NODE_FIELD(result);
463
0
  WRITE_LOCATION_FIELD(location);
464
0
}
465
466
static void
467
_outCaseTestExpr(StringInfo str, const CaseTestExpr *node)
468
0
{
469
0
  WRITE_NODE_TYPE("CASETESTEXPR");
470
471
0
  WRITE_OID_FIELD(typeId);
472
0
  WRITE_INT_FIELD(typeMod);
473
0
  WRITE_OID_FIELD(collation);
474
0
}
475
476
static void
477
_outArrayExpr(StringInfo str, const ArrayExpr *node)
478
0
{
479
0
  WRITE_NODE_TYPE("ARRAYEXPR");
480
481
0
  WRITE_OID_FIELD(array_typeid);
482
0
  WRITE_OID_FIELD(array_collid);
483
0
  WRITE_OID_FIELD(element_typeid);
484
0
  WRITE_NODE_FIELD(elements);
485
0
  WRITE_BOOL_FIELD(multidims);
486
0
  WRITE_LOCATION_FIELD(list_start);
487
0
  WRITE_LOCATION_FIELD(list_end);
488
0
  WRITE_LOCATION_FIELD(location);
489
0
}
490
491
static void
492
_outRowExpr(StringInfo str, const RowExpr *node)
493
0
{
494
0
  WRITE_NODE_TYPE("ROWEXPR");
495
496
0
  WRITE_NODE_FIELD(args);
497
0
  WRITE_OID_FIELD(row_typeid);
498
0
  WRITE_ENUM_FIELD(row_format, CoercionForm);
499
0
  WRITE_NODE_FIELD(colnames);
500
0
  WRITE_LOCATION_FIELD(location);
501
0
}
502
503
static void
504
_outRowCompareExpr(StringInfo str, const RowCompareExpr *node)
505
0
{
506
0
  WRITE_NODE_TYPE("ROWCOMPAREEXPR");
507
508
0
  WRITE_ENUM_FIELD(cmptype, CompareType);
509
0
  WRITE_NODE_FIELD(opnos);
510
0
  WRITE_NODE_FIELD(opfamilies);
511
0
  WRITE_NODE_FIELD(inputcollids);
512
0
  WRITE_NODE_FIELD(largs);
513
0
  WRITE_NODE_FIELD(rargs);
514
0
}
515
516
static void
517
_outCoalesceExpr(StringInfo str, const CoalesceExpr *node)
518
0
{
519
0
  WRITE_NODE_TYPE("COALESCEEXPR");
520
521
0
  WRITE_OID_FIELD(coalescetype);
522
0
  WRITE_OID_FIELD(coalescecollid);
523
0
  WRITE_NODE_FIELD(args);
524
0
  WRITE_LOCATION_FIELD(location);
525
0
}
526
527
static void
528
_outMinMaxExpr(StringInfo str, const MinMaxExpr *node)
529
0
{
530
0
  WRITE_NODE_TYPE("MINMAXEXPR");
531
532
0
  WRITE_OID_FIELD(minmaxtype);
533
0
  WRITE_OID_FIELD(minmaxcollid);
534
0
  WRITE_OID_FIELD(inputcollid);
535
0
  WRITE_ENUM_FIELD(op, MinMaxOp);
536
0
  WRITE_NODE_FIELD(args);
537
0
  WRITE_LOCATION_FIELD(location);
538
0
}
539
540
static void
541
_outSQLValueFunction(StringInfo str, const SQLValueFunction *node)
542
0
{
543
0
  WRITE_NODE_TYPE("SQLVALUEFUNCTION");
544
545
0
  WRITE_ENUM_FIELD(op, SQLValueFunctionOp);
546
0
  WRITE_OID_FIELD(type);
547
0
  WRITE_INT_FIELD(typmod);
548
0
  WRITE_LOCATION_FIELD(location);
549
0
}
550
551
static void
552
_outXmlExpr(StringInfo str, const XmlExpr *node)
553
0
{
554
0
  WRITE_NODE_TYPE("XMLEXPR");
555
556
0
  WRITE_ENUM_FIELD(op, XmlExprOp);
557
0
  WRITE_STRING_FIELD(name);
558
0
  WRITE_NODE_FIELD(named_args);
559
0
  WRITE_NODE_FIELD(arg_names);
560
0
  WRITE_NODE_FIELD(args);
561
0
  WRITE_ENUM_FIELD(xmloption, XmlOptionType);
562
0
  WRITE_BOOL_FIELD(indent);
563
0
  WRITE_OID_FIELD(type);
564
0
  WRITE_INT_FIELD(typmod);
565
0
  WRITE_LOCATION_FIELD(location);
566
0
}
567
568
static void
569
_outJsonFormat(StringInfo str, const JsonFormat *node)
570
0
{
571
0
  WRITE_NODE_TYPE("JSONFORMAT");
572
573
0
  WRITE_ENUM_FIELD(format_type, JsonFormatType);
574
0
  WRITE_ENUM_FIELD(encoding, JsonEncoding);
575
0
  WRITE_LOCATION_FIELD(location);
576
0
}
577
578
static void
579
_outJsonReturning(StringInfo str, const JsonReturning *node)
580
0
{
581
0
  WRITE_NODE_TYPE("JSONRETURNING");
582
583
0
  WRITE_NODE_FIELD(format);
584
0
  WRITE_OID_FIELD(typid);
585
0
  WRITE_INT_FIELD(typmod);
586
0
}
587
588
static void
589
_outJsonValueExpr(StringInfo str, const JsonValueExpr *node)
590
0
{
591
0
  WRITE_NODE_TYPE("JSONVALUEEXPR");
592
593
0
  WRITE_NODE_FIELD(raw_expr);
594
0
  WRITE_NODE_FIELD(formatted_expr);
595
0
  WRITE_NODE_FIELD(format);
596
0
}
597
598
static void
599
_outJsonConstructorExpr(StringInfo str, const JsonConstructorExpr *node)
600
0
{
601
0
  WRITE_NODE_TYPE("JSONCONSTRUCTOREXPR");
602
603
0
  WRITE_ENUM_FIELD(type, JsonConstructorType);
604
0
  WRITE_NODE_FIELD(args);
605
0
  WRITE_NODE_FIELD(func);
606
0
  WRITE_NODE_FIELD(coercion);
607
0
  WRITE_NODE_FIELD(returning);
608
0
  WRITE_BOOL_FIELD(absent_on_null);
609
0
  WRITE_BOOL_FIELD(unique);
610
0
  WRITE_LOCATION_FIELD(location);
611
0
}
612
613
static void
614
_outJsonIsPredicate(StringInfo str, const JsonIsPredicate *node)
615
0
{
616
0
  WRITE_NODE_TYPE("JSONISPREDICATE");
617
618
0
  WRITE_NODE_FIELD(expr);
619
0
  WRITE_NODE_FIELD(format);
620
0
  WRITE_ENUM_FIELD(item_type, JsonValueType);
621
0
  WRITE_BOOL_FIELD(unique_keys);
622
0
  WRITE_LOCATION_FIELD(location);
623
0
}
624
625
static void
626
_outJsonBehavior(StringInfo str, const JsonBehavior *node)
627
0
{
628
0
  WRITE_NODE_TYPE("JSONBEHAVIOR");
629
630
0
  WRITE_ENUM_FIELD(btype, JsonBehaviorType);
631
0
  WRITE_NODE_FIELD(expr);
632
0
  WRITE_BOOL_FIELD(coerce);
633
0
  WRITE_LOCATION_FIELD(location);
634
0
}
635
636
static void
637
_outJsonExpr(StringInfo str, const JsonExpr *node)
638
0
{
639
0
  WRITE_NODE_TYPE("JSONEXPR");
640
641
0
  WRITE_ENUM_FIELD(op, JsonExprOp);
642
0
  WRITE_STRING_FIELD(column_name);
643
0
  WRITE_NODE_FIELD(formatted_expr);
644
0
  WRITE_NODE_FIELD(format);
645
0
  WRITE_NODE_FIELD(path_spec);
646
0
  WRITE_NODE_FIELD(returning);
647
0
  WRITE_NODE_FIELD(passing_names);
648
0
  WRITE_NODE_FIELD(passing_values);
649
0
  WRITE_NODE_FIELD(on_empty);
650
0
  WRITE_NODE_FIELD(on_error);
651
0
  WRITE_BOOL_FIELD(use_io_coercion);
652
0
  WRITE_BOOL_FIELD(use_json_coercion);
653
0
  WRITE_ENUM_FIELD(wrapper, JsonWrapper);
654
0
  WRITE_BOOL_FIELD(omit_quotes);
655
0
  WRITE_OID_FIELD(collation);
656
0
  WRITE_LOCATION_FIELD(location);
657
0
}
658
659
static void
660
_outJsonTablePath(StringInfo str, const JsonTablePath *node)
661
0
{
662
0
  WRITE_NODE_TYPE("JSONTABLEPATH");
663
664
0
  WRITE_NODE_FIELD(value);
665
0
  WRITE_STRING_FIELD(name);
666
0
}
667
668
static void
669
_outJsonTablePathScan(StringInfo str, const JsonTablePathScan *node)
670
0
{
671
0
  WRITE_NODE_TYPE("JSONTABLEPATHSCAN");
672
673
0
  WRITE_NODE_FIELD(path);
674
0
  WRITE_BOOL_FIELD(errorOnError);
675
0
  WRITE_NODE_FIELD(child);
676
0
  WRITE_INT_FIELD(colMin);
677
0
  WRITE_INT_FIELD(colMax);
678
0
}
679
680
static void
681
_outJsonTableSiblingJoin(StringInfo str, const JsonTableSiblingJoin *node)
682
0
{
683
0
  WRITE_NODE_TYPE("JSONTABLESIBLINGJOIN");
684
685
0
  WRITE_NODE_FIELD(lplan);
686
0
  WRITE_NODE_FIELD(rplan);
687
0
}
688
689
static void
690
_outNullTest(StringInfo str, const NullTest *node)
691
0
{
692
0
  WRITE_NODE_TYPE("NULLTEST");
693
694
0
  WRITE_NODE_FIELD(arg);
695
0
  WRITE_ENUM_FIELD(nulltesttype, NullTestType);
696
0
  WRITE_BOOL_FIELD(argisrow);
697
0
  WRITE_LOCATION_FIELD(location);
698
0
}
699
700
static void
701
_outBooleanTest(StringInfo str, const BooleanTest *node)
702
0
{
703
0
  WRITE_NODE_TYPE("BOOLEANTEST");
704
705
0
  WRITE_NODE_FIELD(arg);
706
0
  WRITE_ENUM_FIELD(booltesttype, BoolTestType);
707
0
  WRITE_LOCATION_FIELD(location);
708
0
}
709
710
static void
711
_outMergeAction(StringInfo str, const MergeAction *node)
712
0
{
713
0
  WRITE_NODE_TYPE("MERGEACTION");
714
715
0
  WRITE_ENUM_FIELD(matchKind, MergeMatchKind);
716
0
  WRITE_ENUM_FIELD(commandType, CmdType);
717
0
  WRITE_ENUM_FIELD(override, OverridingKind);
718
0
  WRITE_NODE_FIELD(qual);
719
0
  WRITE_NODE_FIELD(targetList);
720
0
  WRITE_NODE_FIELD(updateColnos);
721
0
}
722
723
static void
724
_outCoerceToDomain(StringInfo str, const CoerceToDomain *node)
725
0
{
726
0
  WRITE_NODE_TYPE("COERCETODOMAIN");
727
728
0
  WRITE_NODE_FIELD(arg);
729
0
  WRITE_OID_FIELD(resulttype);
730
0
  WRITE_INT_FIELD(resulttypmod);
731
0
  WRITE_OID_FIELD(resultcollid);
732
0
  WRITE_ENUM_FIELD(coercionformat, CoercionForm);
733
0
  WRITE_LOCATION_FIELD(location);
734
0
}
735
736
static void
737
_outCoerceToDomainValue(StringInfo str, const CoerceToDomainValue *node)
738
0
{
739
0
  WRITE_NODE_TYPE("COERCETODOMAINVALUE");
740
741
0
  WRITE_OID_FIELD(typeId);
742
0
  WRITE_INT_FIELD(typeMod);
743
0
  WRITE_OID_FIELD(collation);
744
0
  WRITE_LOCATION_FIELD(location);
745
0
}
746
747
static void
748
_outSetToDefault(StringInfo str, const SetToDefault *node)
749
0
{
750
0
  WRITE_NODE_TYPE("SETTODEFAULT");
751
752
0
  WRITE_OID_FIELD(typeId);
753
0
  WRITE_INT_FIELD(typeMod);
754
0
  WRITE_OID_FIELD(collation);
755
0
  WRITE_LOCATION_FIELD(location);
756
0
}
757
758
static void
759
_outCurrentOfExpr(StringInfo str, const CurrentOfExpr *node)
760
0
{
761
0
  WRITE_NODE_TYPE("CURRENTOFEXPR");
762
763
0
  WRITE_UINT_FIELD(cvarno);
764
0
  WRITE_STRING_FIELD(cursor_name);
765
0
  WRITE_INT_FIELD(cursor_param);
766
0
}
767
768
static void
769
_outNextValueExpr(StringInfo str, const NextValueExpr *node)
770
0
{
771
0
  WRITE_NODE_TYPE("NEXTVALUEEXPR");
772
773
0
  WRITE_OID_FIELD(seqid);
774
0
  WRITE_OID_FIELD(typeId);
775
0
}
776
777
static void
778
_outInferenceElem(StringInfo str, const InferenceElem *node)
779
0
{
780
0
  WRITE_NODE_TYPE("INFERENCEELEM");
781
782
0
  WRITE_NODE_FIELD(expr);
783
0
  WRITE_OID_FIELD(infercollid);
784
0
  WRITE_OID_FIELD(inferopclass);
785
0
}
786
787
static void
788
_outReturningExpr(StringInfo str, const ReturningExpr *node)
789
0
{
790
0
  WRITE_NODE_TYPE("RETURNINGEXPR");
791
792
0
  WRITE_INT_FIELD(retlevelsup);
793
0
  WRITE_BOOL_FIELD(retold);
794
0
  WRITE_NODE_FIELD(retexpr);
795
0
}
796
797
static void
798
_outTargetEntry(StringInfo str, const TargetEntry *node)
799
0
{
800
0
  WRITE_NODE_TYPE("TARGETENTRY");
801
802
0
  WRITE_NODE_FIELD(expr);
803
0
  WRITE_INT_FIELD(resno);
804
0
  WRITE_STRING_FIELD(resname);
805
0
  WRITE_UINT_FIELD(ressortgroupref);
806
0
  WRITE_OID_FIELD(resorigtbl);
807
0
  WRITE_INT_FIELD(resorigcol);
808
0
  WRITE_BOOL_FIELD(resjunk);
809
0
}
810
811
static void
812
_outRangeTblRef(StringInfo str, const RangeTblRef *node)
813
0
{
814
0
  WRITE_NODE_TYPE("RANGETBLREF");
815
816
0
  WRITE_INT_FIELD(rtindex);
817
0
}
818
819
static void
820
_outJoinExpr(StringInfo str, const JoinExpr *node)
821
0
{
822
0
  WRITE_NODE_TYPE("JOINEXPR");
823
824
0
  WRITE_ENUM_FIELD(jointype, JoinType);
825
0
  WRITE_BOOL_FIELD(isNatural);
826
0
  WRITE_NODE_FIELD(larg);
827
0
  WRITE_NODE_FIELD(rarg);
828
0
  WRITE_NODE_FIELD(usingClause);
829
0
  WRITE_NODE_FIELD(join_using_alias);
830
0
  WRITE_NODE_FIELD(quals);
831
0
  WRITE_NODE_FIELD(alias);
832
0
  WRITE_INT_FIELD(rtindex);
833
0
}
834
835
static void
836
_outFromExpr(StringInfo str, const FromExpr *node)
837
0
{
838
0
  WRITE_NODE_TYPE("FROMEXPR");
839
840
0
  WRITE_NODE_FIELD(fromlist);
841
0
  WRITE_NODE_FIELD(quals);
842
0
}
843
844
static void
845
_outOnConflictExpr(StringInfo str, const OnConflictExpr *node)
846
0
{
847
0
  WRITE_NODE_TYPE("ONCONFLICTEXPR");
848
849
0
  WRITE_ENUM_FIELD(action, OnConflictAction);
850
0
  WRITE_NODE_FIELD(arbiterElems);
851
0
  WRITE_NODE_FIELD(arbiterWhere);
852
0
  WRITE_OID_FIELD(constraint);
853
0
  WRITE_NODE_FIELD(onConflictSet);
854
0
  WRITE_NODE_FIELD(onConflictWhere);
855
0
  WRITE_INT_FIELD(exclRelIndex);
856
0
  WRITE_NODE_FIELD(exclRelTlist);
857
0
}
858
859
static void
860
_outQuery(StringInfo str, const Query *node)
861
0
{
862
0
  WRITE_NODE_TYPE("QUERY");
863
864
0
  WRITE_ENUM_FIELD(commandType, CmdType);
865
0
  WRITE_ENUM_FIELD(querySource, QuerySource);
866
0
  WRITE_BOOL_FIELD(canSetTag);
867
0
  WRITE_NODE_FIELD(utilityStmt);
868
0
  WRITE_INT_FIELD(resultRelation);
869
0
  WRITE_BOOL_FIELD(hasAggs);
870
0
  WRITE_BOOL_FIELD(hasWindowFuncs);
871
0
  WRITE_BOOL_FIELD(hasTargetSRFs);
872
0
  WRITE_BOOL_FIELD(hasSubLinks);
873
0
  WRITE_BOOL_FIELD(hasDistinctOn);
874
0
  WRITE_BOOL_FIELD(hasRecursive);
875
0
  WRITE_BOOL_FIELD(hasModifyingCTE);
876
0
  WRITE_BOOL_FIELD(hasForUpdate);
877
0
  WRITE_BOOL_FIELD(hasRowSecurity);
878
0
  WRITE_BOOL_FIELD(hasGroupRTE);
879
0
  WRITE_BOOL_FIELD(isReturn);
880
0
  WRITE_NODE_FIELD(cteList);
881
0
  WRITE_NODE_FIELD(rtable);
882
0
  WRITE_NODE_FIELD(rteperminfos);
883
0
  WRITE_NODE_FIELD(jointree);
884
0
  WRITE_NODE_FIELD(mergeActionList);
885
0
  WRITE_INT_FIELD(mergeTargetRelation);
886
0
  WRITE_NODE_FIELD(mergeJoinCondition);
887
0
  WRITE_NODE_FIELD(targetList);
888
0
  WRITE_ENUM_FIELD(override, OverridingKind);
889
0
  WRITE_NODE_FIELD(onConflict);
890
0
  WRITE_STRING_FIELD(returningOldAlias);
891
0
  WRITE_STRING_FIELD(returningNewAlias);
892
0
  WRITE_NODE_FIELD(returningList);
893
0
  WRITE_NODE_FIELD(groupClause);
894
0
  WRITE_BOOL_FIELD(groupDistinct);
895
0
  WRITE_NODE_FIELD(groupingSets);
896
0
  WRITE_NODE_FIELD(havingQual);
897
0
  WRITE_NODE_FIELD(windowClause);
898
0
  WRITE_NODE_FIELD(distinctClause);
899
0
  WRITE_NODE_FIELD(sortClause);
900
0
  WRITE_NODE_FIELD(limitOffset);
901
0
  WRITE_NODE_FIELD(limitCount);
902
0
  WRITE_ENUM_FIELD(limitOption, LimitOption);
903
0
  WRITE_NODE_FIELD(rowMarks);
904
0
  WRITE_NODE_FIELD(setOperations);
905
0
  WRITE_NODE_FIELD(constraintDeps);
906
0
  WRITE_NODE_FIELD(withCheckOptions);
907
0
  WRITE_LOCATION_FIELD(stmt_location);
908
0
  WRITE_LOCATION_FIELD(stmt_len);
909
0
}
910
911
static void
912
_outTypeName(StringInfo str, const TypeName *node)
913
0
{
914
0
  WRITE_NODE_TYPE("TYPENAME");
915
916
0
  WRITE_NODE_FIELD(names);
917
0
  WRITE_OID_FIELD(typeOid);
918
0
  WRITE_BOOL_FIELD(setof);
919
0
  WRITE_BOOL_FIELD(pct_type);
920
0
  WRITE_NODE_FIELD(typmods);
921
0
  WRITE_INT_FIELD(typemod);
922
0
  WRITE_NODE_FIELD(arrayBounds);
923
0
  WRITE_LOCATION_FIELD(location);
924
0
}
925
926
static void
927
_outColumnRef(StringInfo str, const ColumnRef *node)
928
0
{
929
0
  WRITE_NODE_TYPE("COLUMNREF");
930
931
0
  WRITE_NODE_FIELD(fields);
932
0
  WRITE_LOCATION_FIELD(location);
933
0
}
934
935
static void
936
_outParamRef(StringInfo str, const ParamRef *node)
937
0
{
938
0
  WRITE_NODE_TYPE("PARAMREF");
939
940
0
  WRITE_INT_FIELD(number);
941
0
  WRITE_LOCATION_FIELD(location);
942
0
}
943
944
static void
945
_outTypeCast(StringInfo str, const TypeCast *node)
946
0
{
947
0
  WRITE_NODE_TYPE("TYPECAST");
948
949
0
  WRITE_NODE_FIELD(arg);
950
0
  WRITE_NODE_FIELD(typeName);
951
0
  WRITE_LOCATION_FIELD(location);
952
0
}
953
954
static void
955
_outCollateClause(StringInfo str, const CollateClause *node)
956
0
{
957
0
  WRITE_NODE_TYPE("COLLATECLAUSE");
958
959
0
  WRITE_NODE_FIELD(arg);
960
0
  WRITE_NODE_FIELD(collname);
961
0
  WRITE_LOCATION_FIELD(location);
962
0
}
963
964
static void
965
_outRoleSpec(StringInfo str, const RoleSpec *node)
966
0
{
967
0
  WRITE_NODE_TYPE("ROLESPEC");
968
969
0
  WRITE_ENUM_FIELD(roletype, RoleSpecType);
970
0
  WRITE_STRING_FIELD(rolename);
971
0
  WRITE_LOCATION_FIELD(location);
972
0
}
973
974
static void
975
_outFuncCall(StringInfo str, const FuncCall *node)
976
0
{
977
0
  WRITE_NODE_TYPE("FUNCCALL");
978
979
0
  WRITE_NODE_FIELD(funcname);
980
0
  WRITE_NODE_FIELD(args);
981
0
  WRITE_NODE_FIELD(agg_order);
982
0
  WRITE_NODE_FIELD(agg_filter);
983
0
  WRITE_NODE_FIELD(over);
984
0
  WRITE_BOOL_FIELD(agg_within_group);
985
0
  WRITE_BOOL_FIELD(agg_star);
986
0
  WRITE_BOOL_FIELD(agg_distinct);
987
0
  WRITE_BOOL_FIELD(func_variadic);
988
0
  WRITE_ENUM_FIELD(funcformat, CoercionForm);
989
0
  WRITE_LOCATION_FIELD(location);
990
0
}
991
992
static void
993
_outA_Star(StringInfo str, const A_Star *node)
994
0
{
995
0
  WRITE_NODE_TYPE("A_STAR");
996
997
0
}
998
999
static void
1000
_outA_Indices(StringInfo str, const A_Indices *node)
1001
0
{
1002
0
  WRITE_NODE_TYPE("A_INDICES");
1003
1004
0
  WRITE_BOOL_FIELD(is_slice);
1005
0
  WRITE_NODE_FIELD(lidx);
1006
0
  WRITE_NODE_FIELD(uidx);
1007
0
}
1008
1009
static void
1010
_outA_Indirection(StringInfo str, const A_Indirection *node)
1011
0
{
1012
0
  WRITE_NODE_TYPE("A_INDIRECTION");
1013
1014
0
  WRITE_NODE_FIELD(arg);
1015
0
  WRITE_NODE_FIELD(indirection);
1016
0
}
1017
1018
static void
1019
_outA_ArrayExpr(StringInfo str, const A_ArrayExpr *node)
1020
0
{
1021
0
  WRITE_NODE_TYPE("A_ARRAYEXPR");
1022
1023
0
  WRITE_NODE_FIELD(elements);
1024
0
  WRITE_LOCATION_FIELD(list_start);
1025
0
  WRITE_LOCATION_FIELD(list_end);
1026
0
  WRITE_LOCATION_FIELD(location);
1027
0
}
1028
1029
static void
1030
_outResTarget(StringInfo str, const ResTarget *node)
1031
0
{
1032
0
  WRITE_NODE_TYPE("RESTARGET");
1033
1034
0
  WRITE_STRING_FIELD(name);
1035
0
  WRITE_NODE_FIELD(indirection);
1036
0
  WRITE_NODE_FIELD(val);
1037
0
  WRITE_LOCATION_FIELD(location);
1038
0
}
1039
1040
static void
1041
_outMultiAssignRef(StringInfo str, const MultiAssignRef *node)
1042
0
{
1043
0
  WRITE_NODE_TYPE("MULTIASSIGNREF");
1044
1045
0
  WRITE_NODE_FIELD(source);
1046
0
  WRITE_INT_FIELD(colno);
1047
0
  WRITE_INT_FIELD(ncolumns);
1048
0
}
1049
1050
static void
1051
_outSortBy(StringInfo str, const SortBy *node)
1052
0
{
1053
0
  WRITE_NODE_TYPE("SORTBY");
1054
1055
0
  WRITE_NODE_FIELD(node);
1056
0
  WRITE_ENUM_FIELD(sortby_dir, SortByDir);
1057
0
  WRITE_ENUM_FIELD(sortby_nulls, SortByNulls);
1058
0
  WRITE_NODE_FIELD(useOp);
1059
0
  WRITE_LOCATION_FIELD(location);
1060
0
}
1061
1062
static void
1063
_outWindowDef(StringInfo str, const WindowDef *node)
1064
0
{
1065
0
  WRITE_NODE_TYPE("WINDOWDEF");
1066
1067
0
  WRITE_STRING_FIELD(name);
1068
0
  WRITE_STRING_FIELD(refname);
1069
0
  WRITE_NODE_FIELD(partitionClause);
1070
0
  WRITE_NODE_FIELD(orderClause);
1071
0
  WRITE_INT_FIELD(frameOptions);
1072
0
  WRITE_NODE_FIELD(startOffset);
1073
0
  WRITE_NODE_FIELD(endOffset);
1074
0
  WRITE_LOCATION_FIELD(location);
1075
0
}
1076
1077
static void
1078
_outRangeSubselect(StringInfo str, const RangeSubselect *node)
1079
0
{
1080
0
  WRITE_NODE_TYPE("RANGESUBSELECT");
1081
1082
0
  WRITE_BOOL_FIELD(lateral);
1083
0
  WRITE_NODE_FIELD(subquery);
1084
0
  WRITE_NODE_FIELD(alias);
1085
0
}
1086
1087
static void
1088
_outRangeFunction(StringInfo str, const RangeFunction *node)
1089
0
{
1090
0
  WRITE_NODE_TYPE("RANGEFUNCTION");
1091
1092
0
  WRITE_BOOL_FIELD(lateral);
1093
0
  WRITE_BOOL_FIELD(ordinality);
1094
0
  WRITE_BOOL_FIELD(is_rowsfrom);
1095
0
  WRITE_NODE_FIELD(functions);
1096
0
  WRITE_NODE_FIELD(alias);
1097
0
  WRITE_NODE_FIELD(coldeflist);
1098
0
}
1099
1100
static void
1101
_outRangeTableFunc(StringInfo str, const RangeTableFunc *node)
1102
0
{
1103
0
  WRITE_NODE_TYPE("RANGETABLEFUNC");
1104
1105
0
  WRITE_BOOL_FIELD(lateral);
1106
0
  WRITE_NODE_FIELD(docexpr);
1107
0
  WRITE_NODE_FIELD(rowexpr);
1108
0
  WRITE_NODE_FIELD(namespaces);
1109
0
  WRITE_NODE_FIELD(columns);
1110
0
  WRITE_NODE_FIELD(alias);
1111
0
  WRITE_LOCATION_FIELD(location);
1112
0
}
1113
1114
static void
1115
_outRangeTableFuncCol(StringInfo str, const RangeTableFuncCol *node)
1116
0
{
1117
0
  WRITE_NODE_TYPE("RANGETABLEFUNCCOL");
1118
1119
0
  WRITE_STRING_FIELD(colname);
1120
0
  WRITE_NODE_FIELD(typeName);
1121
0
  WRITE_BOOL_FIELD(for_ordinality);
1122
0
  WRITE_BOOL_FIELD(is_not_null);
1123
0
  WRITE_NODE_FIELD(colexpr);
1124
0
  WRITE_NODE_FIELD(coldefexpr);
1125
0
  WRITE_LOCATION_FIELD(location);
1126
0
}
1127
1128
static void
1129
_outRangeTableSample(StringInfo str, const RangeTableSample *node)
1130
0
{
1131
0
  WRITE_NODE_TYPE("RANGETABLESAMPLE");
1132
1133
0
  WRITE_NODE_FIELD(relation);
1134
0
  WRITE_NODE_FIELD(method);
1135
0
  WRITE_NODE_FIELD(args);
1136
0
  WRITE_NODE_FIELD(repeatable);
1137
0
  WRITE_LOCATION_FIELD(location);
1138
0
}
1139
1140
static void
1141
_outColumnDef(StringInfo str, const ColumnDef *node)
1142
0
{
1143
0
  WRITE_NODE_TYPE("COLUMNDEF");
1144
1145
0
  WRITE_STRING_FIELD(colname);
1146
0
  WRITE_NODE_FIELD(typeName);
1147
0
  WRITE_STRING_FIELD(compression);
1148
0
  WRITE_INT_FIELD(inhcount);
1149
0
  WRITE_BOOL_FIELD(is_local);
1150
0
  WRITE_BOOL_FIELD(is_not_null);
1151
0
  WRITE_BOOL_FIELD(is_from_type);
1152
0
  WRITE_CHAR_FIELD(storage);
1153
0
  WRITE_STRING_FIELD(storage_name);
1154
0
  WRITE_NODE_FIELD(raw_default);
1155
0
  WRITE_NODE_FIELD(cooked_default);
1156
0
  WRITE_CHAR_FIELD(identity);
1157
0
  WRITE_NODE_FIELD(identitySequence);
1158
0
  WRITE_CHAR_FIELD(generated);
1159
0
  WRITE_NODE_FIELD(collClause);
1160
0
  WRITE_OID_FIELD(collOid);
1161
0
  WRITE_NODE_FIELD(constraints);
1162
0
  WRITE_NODE_FIELD(fdwoptions);
1163
0
  WRITE_LOCATION_FIELD(location);
1164
0
}
1165
1166
static void
1167
_outTableLikeClause(StringInfo str, const TableLikeClause *node)
1168
0
{
1169
0
  WRITE_NODE_TYPE("TABLELIKECLAUSE");
1170
1171
0
  WRITE_NODE_FIELD(relation);
1172
0
  WRITE_UINT_FIELD(options);
1173
0
  WRITE_OID_FIELD(relationOid);
1174
0
}
1175
1176
static void
1177
_outIndexElem(StringInfo str, const IndexElem *node)
1178
0
{
1179
0
  WRITE_NODE_TYPE("INDEXELEM");
1180
1181
0
  WRITE_STRING_FIELD(name);
1182
0
  WRITE_NODE_FIELD(expr);
1183
0
  WRITE_STRING_FIELD(indexcolname);
1184
0
  WRITE_NODE_FIELD(collation);
1185
0
  WRITE_NODE_FIELD(opclass);
1186
0
  WRITE_NODE_FIELD(opclassopts);
1187
0
  WRITE_ENUM_FIELD(ordering, SortByDir);
1188
0
  WRITE_ENUM_FIELD(nulls_ordering, SortByNulls);
1189
0
}
1190
1191
static void
1192
_outDefElem(StringInfo str, const DefElem *node)
1193
0
{
1194
0
  WRITE_NODE_TYPE("DEFELEM");
1195
1196
0
  WRITE_STRING_FIELD(defnamespace);
1197
0
  WRITE_STRING_FIELD(defname);
1198
0
  WRITE_NODE_FIELD(arg);
1199
0
  WRITE_ENUM_FIELD(defaction, DefElemAction);
1200
0
  WRITE_LOCATION_FIELD(location);
1201
0
}
1202
1203
static void
1204
_outLockingClause(StringInfo str, const LockingClause *node)
1205
0
{
1206
0
  WRITE_NODE_TYPE("LOCKINGCLAUSE");
1207
1208
0
  WRITE_NODE_FIELD(lockedRels);
1209
0
  WRITE_ENUM_FIELD(strength, LockClauseStrength);
1210
0
  WRITE_ENUM_FIELD(waitPolicy, LockWaitPolicy);
1211
0
}
1212
1213
static void
1214
_outXmlSerialize(StringInfo str, const XmlSerialize *node)
1215
0
{
1216
0
  WRITE_NODE_TYPE("XMLSERIALIZE");
1217
1218
0
  WRITE_ENUM_FIELD(xmloption, XmlOptionType);
1219
0
  WRITE_NODE_FIELD(expr);
1220
0
  WRITE_NODE_FIELD(typeName);
1221
0
  WRITE_BOOL_FIELD(indent);
1222
0
  WRITE_LOCATION_FIELD(location);
1223
0
}
1224
1225
static void
1226
_outPartitionElem(StringInfo str, const PartitionElem *node)
1227
0
{
1228
0
  WRITE_NODE_TYPE("PARTITIONELEM");
1229
1230
0
  WRITE_STRING_FIELD(name);
1231
0
  WRITE_NODE_FIELD(expr);
1232
0
  WRITE_NODE_FIELD(collation);
1233
0
  WRITE_NODE_FIELD(opclass);
1234
0
  WRITE_LOCATION_FIELD(location);
1235
0
}
1236
1237
static void
1238
_outPartitionSpec(StringInfo str, const PartitionSpec *node)
1239
0
{
1240
0
  WRITE_NODE_TYPE("PARTITIONSPEC");
1241
1242
0
  WRITE_ENUM_FIELD(strategy, PartitionStrategy);
1243
0
  WRITE_NODE_FIELD(partParams);
1244
0
  WRITE_LOCATION_FIELD(location);
1245
0
}
1246
1247
static void
1248
_outPartitionBoundSpec(StringInfo str, const PartitionBoundSpec *node)
1249
0
{
1250
0
  WRITE_NODE_TYPE("PARTITIONBOUNDSPEC");
1251
1252
0
  WRITE_CHAR_FIELD(strategy);
1253
0
  WRITE_BOOL_FIELD(is_default);
1254
0
  WRITE_INT_FIELD(modulus);
1255
0
  WRITE_INT_FIELD(remainder);
1256
0
  WRITE_NODE_FIELD(listdatums);
1257
0
  WRITE_NODE_FIELD(lowerdatums);
1258
0
  WRITE_NODE_FIELD(upperdatums);
1259
0
  WRITE_LOCATION_FIELD(location);
1260
0
}
1261
1262
static void
1263
_outPartitionRangeDatum(StringInfo str, const PartitionRangeDatum *node)
1264
0
{
1265
0
  WRITE_NODE_TYPE("PARTITIONRANGEDATUM");
1266
1267
0
  WRITE_ENUM_FIELD(kind, PartitionRangeDatumKind);
1268
0
  WRITE_NODE_FIELD(value);
1269
0
  WRITE_LOCATION_FIELD(location);
1270
0
}
1271
1272
static void
1273
_outPartitionCmd(StringInfo str, const PartitionCmd *node)
1274
0
{
1275
0
  WRITE_NODE_TYPE("PARTITIONCMD");
1276
1277
0
  WRITE_NODE_FIELD(name);
1278
0
  WRITE_NODE_FIELD(bound);
1279
0
  WRITE_BOOL_FIELD(concurrent);
1280
0
}
1281
1282
static void
1283
_outRTEPermissionInfo(StringInfo str, const RTEPermissionInfo *node)
1284
0
{
1285
0
  WRITE_NODE_TYPE("RTEPERMISSIONINFO");
1286
1287
0
  WRITE_OID_FIELD(relid);
1288
0
  WRITE_BOOL_FIELD(inh);
1289
0
  WRITE_UINT64_FIELD(requiredPerms);
1290
0
  WRITE_OID_FIELD(checkAsUser);
1291
0
  WRITE_BITMAPSET_FIELD(selectedCols);
1292
0
  WRITE_BITMAPSET_FIELD(insertedCols);
1293
0
  WRITE_BITMAPSET_FIELD(updatedCols);
1294
0
}
1295
1296
static void
1297
_outRangeTblFunction(StringInfo str, const RangeTblFunction *node)
1298
0
{
1299
0
  WRITE_NODE_TYPE("RANGETBLFUNCTION");
1300
1301
0
  WRITE_NODE_FIELD(funcexpr);
1302
0
  WRITE_INT_FIELD(funccolcount);
1303
0
  WRITE_NODE_FIELD(funccolnames);
1304
0
  WRITE_NODE_FIELD(funccoltypes);
1305
0
  WRITE_NODE_FIELD(funccoltypmods);
1306
0
  WRITE_NODE_FIELD(funccolcollations);
1307
0
  WRITE_BITMAPSET_FIELD(funcparams);
1308
0
}
1309
1310
static void
1311
_outTableSampleClause(StringInfo str, const TableSampleClause *node)
1312
0
{
1313
0
  WRITE_NODE_TYPE("TABLESAMPLECLAUSE");
1314
1315
0
  WRITE_OID_FIELD(tsmhandler);
1316
0
  WRITE_NODE_FIELD(args);
1317
0
  WRITE_NODE_FIELD(repeatable);
1318
0
}
1319
1320
static void
1321
_outWithCheckOption(StringInfo str, const WithCheckOption *node)
1322
0
{
1323
0
  WRITE_NODE_TYPE("WITHCHECKOPTION");
1324
1325
0
  WRITE_ENUM_FIELD(kind, WCOKind);
1326
0
  WRITE_STRING_FIELD(relname);
1327
0
  WRITE_STRING_FIELD(polname);
1328
0
  WRITE_NODE_FIELD(qual);
1329
0
  WRITE_BOOL_FIELD(cascaded);
1330
0
}
1331
1332
static void
1333
_outSortGroupClause(StringInfo str, const SortGroupClause *node)
1334
0
{
1335
0
  WRITE_NODE_TYPE("SORTGROUPCLAUSE");
1336
1337
0
  WRITE_UINT_FIELD(tleSortGroupRef);
1338
0
  WRITE_OID_FIELD(eqop);
1339
0
  WRITE_OID_FIELD(sortop);
1340
0
  WRITE_BOOL_FIELD(reverse_sort);
1341
0
  WRITE_BOOL_FIELD(nulls_first);
1342
0
  WRITE_BOOL_FIELD(hashable);
1343
0
}
1344
1345
static void
1346
_outGroupingSet(StringInfo str, const GroupingSet *node)
1347
0
{
1348
0
  WRITE_NODE_TYPE("GROUPINGSET");
1349
1350
0
  WRITE_ENUM_FIELD(kind, GroupingSetKind);
1351
0
  WRITE_NODE_FIELD(content);
1352
0
  WRITE_LOCATION_FIELD(location);
1353
0
}
1354
1355
static void
1356
_outWindowClause(StringInfo str, const WindowClause *node)
1357
0
{
1358
0
  WRITE_NODE_TYPE("WINDOWCLAUSE");
1359
1360
0
  WRITE_STRING_FIELD(name);
1361
0
  WRITE_STRING_FIELD(refname);
1362
0
  WRITE_NODE_FIELD(partitionClause);
1363
0
  WRITE_NODE_FIELD(orderClause);
1364
0
  WRITE_INT_FIELD(frameOptions);
1365
0
  WRITE_NODE_FIELD(startOffset);
1366
0
  WRITE_NODE_FIELD(endOffset);
1367
0
  WRITE_OID_FIELD(startInRangeFunc);
1368
0
  WRITE_OID_FIELD(endInRangeFunc);
1369
0
  WRITE_OID_FIELD(inRangeColl);
1370
0
  WRITE_BOOL_FIELD(inRangeAsc);
1371
0
  WRITE_BOOL_FIELD(inRangeNullsFirst);
1372
0
  WRITE_UINT_FIELD(winref);
1373
0
  WRITE_BOOL_FIELD(copiedOrder);
1374
0
}
1375
1376
static void
1377
_outRowMarkClause(StringInfo str, const RowMarkClause *node)
1378
0
{
1379
0
  WRITE_NODE_TYPE("ROWMARKCLAUSE");
1380
1381
0
  WRITE_UINT_FIELD(rti);
1382
0
  WRITE_ENUM_FIELD(strength, LockClauseStrength);
1383
0
  WRITE_ENUM_FIELD(waitPolicy, LockWaitPolicy);
1384
0
  WRITE_BOOL_FIELD(pushedDown);
1385
0
}
1386
1387
static void
1388
_outWithClause(StringInfo str, const WithClause *node)
1389
0
{
1390
0
  WRITE_NODE_TYPE("WITHCLAUSE");
1391
1392
0
  WRITE_NODE_FIELD(ctes);
1393
0
  WRITE_BOOL_FIELD(recursive);
1394
0
  WRITE_LOCATION_FIELD(location);
1395
0
}
1396
1397
static void
1398
_outInferClause(StringInfo str, const InferClause *node)
1399
0
{
1400
0
  WRITE_NODE_TYPE("INFERCLAUSE");
1401
1402
0
  WRITE_NODE_FIELD(indexElems);
1403
0
  WRITE_NODE_FIELD(whereClause);
1404
0
  WRITE_STRING_FIELD(conname);
1405
0
  WRITE_LOCATION_FIELD(location);
1406
0
}
1407
1408
static void
1409
_outOnConflictClause(StringInfo str, const OnConflictClause *node)
1410
0
{
1411
0
  WRITE_NODE_TYPE("ONCONFLICTCLAUSE");
1412
1413
0
  WRITE_ENUM_FIELD(action, OnConflictAction);
1414
0
  WRITE_NODE_FIELD(infer);
1415
0
  WRITE_NODE_FIELD(targetList);
1416
0
  WRITE_NODE_FIELD(whereClause);
1417
0
  WRITE_LOCATION_FIELD(location);
1418
0
}
1419
1420
static void
1421
_outCTESearchClause(StringInfo str, const CTESearchClause *node)
1422
0
{
1423
0
  WRITE_NODE_TYPE("CTESEARCHCLAUSE");
1424
1425
0
  WRITE_NODE_FIELD(search_col_list);
1426
0
  WRITE_BOOL_FIELD(search_breadth_first);
1427
0
  WRITE_STRING_FIELD(search_seq_column);
1428
0
  WRITE_LOCATION_FIELD(location);
1429
0
}
1430
1431
static void
1432
_outCTECycleClause(StringInfo str, const CTECycleClause *node)
1433
0
{
1434
0
  WRITE_NODE_TYPE("CTECYCLECLAUSE");
1435
1436
0
  WRITE_NODE_FIELD(cycle_col_list);
1437
0
  WRITE_STRING_FIELD(cycle_mark_column);
1438
0
  WRITE_NODE_FIELD(cycle_mark_value);
1439
0
  WRITE_NODE_FIELD(cycle_mark_default);
1440
0
  WRITE_STRING_FIELD(cycle_path_column);
1441
0
  WRITE_LOCATION_FIELD(location);
1442
0
  WRITE_OID_FIELD(cycle_mark_type);
1443
0
  WRITE_INT_FIELD(cycle_mark_typmod);
1444
0
  WRITE_OID_FIELD(cycle_mark_collation);
1445
0
  WRITE_OID_FIELD(cycle_mark_neop);
1446
0
}
1447
1448
static void
1449
_outCommonTableExpr(StringInfo str, const CommonTableExpr *node)
1450
0
{
1451
0
  WRITE_NODE_TYPE("COMMONTABLEEXPR");
1452
1453
0
  WRITE_STRING_FIELD(ctename);
1454
0
  WRITE_NODE_FIELD(aliascolnames);
1455
0
  WRITE_ENUM_FIELD(ctematerialized, CTEMaterialize);
1456
0
  WRITE_NODE_FIELD(ctequery);
1457
0
  WRITE_NODE_FIELD(search_clause);
1458
0
  WRITE_NODE_FIELD(cycle_clause);
1459
0
  WRITE_LOCATION_FIELD(location);
1460
0
  WRITE_BOOL_FIELD(cterecursive);
1461
0
  WRITE_INT_FIELD(cterefcount);
1462
0
  WRITE_NODE_FIELD(ctecolnames);
1463
0
  WRITE_NODE_FIELD(ctecoltypes);
1464
0
  WRITE_NODE_FIELD(ctecoltypmods);
1465
0
  WRITE_NODE_FIELD(ctecolcollations);
1466
0
}
1467
1468
static void
1469
_outMergeWhenClause(StringInfo str, const MergeWhenClause *node)
1470
0
{
1471
0
  WRITE_NODE_TYPE("MERGEWHENCLAUSE");
1472
1473
0
  WRITE_ENUM_FIELD(matchKind, MergeMatchKind);
1474
0
  WRITE_ENUM_FIELD(commandType, CmdType);
1475
0
  WRITE_ENUM_FIELD(override, OverridingKind);
1476
0
  WRITE_NODE_FIELD(condition);
1477
0
  WRITE_NODE_FIELD(targetList);
1478
0
  WRITE_NODE_FIELD(values);
1479
0
}
1480
1481
static void
1482
_outReturningOption(StringInfo str, const ReturningOption *node)
1483
0
{
1484
0
  WRITE_NODE_TYPE("RETURNINGOPTION");
1485
1486
0
  WRITE_ENUM_FIELD(option, ReturningOptionKind);
1487
0
  WRITE_STRING_FIELD(value);
1488
0
  WRITE_LOCATION_FIELD(location);
1489
0
}
1490
1491
static void
1492
_outReturningClause(StringInfo str, const ReturningClause *node)
1493
0
{
1494
0
  WRITE_NODE_TYPE("RETURNINGCLAUSE");
1495
1496
0
  WRITE_NODE_FIELD(options);
1497
0
  WRITE_NODE_FIELD(exprs);
1498
0
}
1499
1500
static void
1501
_outTriggerTransition(StringInfo str, const TriggerTransition *node)
1502
0
{
1503
0
  WRITE_NODE_TYPE("TRIGGERTRANSITION");
1504
1505
0
  WRITE_STRING_FIELD(name);
1506
0
  WRITE_BOOL_FIELD(isNew);
1507
0
  WRITE_BOOL_FIELD(isTable);
1508
0
}
1509
1510
static void
1511
_outJsonOutput(StringInfo str, const JsonOutput *node)
1512
0
{
1513
0
  WRITE_NODE_TYPE("JSONOUTPUT");
1514
1515
0
  WRITE_NODE_FIELD(typeName);
1516
0
  WRITE_NODE_FIELD(returning);
1517
0
}
1518
1519
static void
1520
_outJsonArgument(StringInfo str, const JsonArgument *node)
1521
0
{
1522
0
  WRITE_NODE_TYPE("JSONARGUMENT");
1523
1524
0
  WRITE_NODE_FIELD(val);
1525
0
  WRITE_STRING_FIELD(name);
1526
0
}
1527
1528
static void
1529
_outJsonFuncExpr(StringInfo str, const JsonFuncExpr *node)
1530
0
{
1531
0
  WRITE_NODE_TYPE("JSONFUNCEXPR");
1532
1533
0
  WRITE_ENUM_FIELD(op, JsonExprOp);
1534
0
  WRITE_STRING_FIELD(column_name);
1535
0
  WRITE_NODE_FIELD(context_item);
1536
0
  WRITE_NODE_FIELD(pathspec);
1537
0
  WRITE_NODE_FIELD(passing);
1538
0
  WRITE_NODE_FIELD(output);
1539
0
  WRITE_NODE_FIELD(on_empty);
1540
0
  WRITE_NODE_FIELD(on_error);
1541
0
  WRITE_ENUM_FIELD(wrapper, JsonWrapper);
1542
0
  WRITE_ENUM_FIELD(quotes, JsonQuotes);
1543
0
  WRITE_LOCATION_FIELD(location);
1544
0
}
1545
1546
static void
1547
_outJsonTablePathSpec(StringInfo str, const JsonTablePathSpec *node)
1548
0
{
1549
0
  WRITE_NODE_TYPE("JSONTABLEPATHSPEC");
1550
1551
0
  WRITE_NODE_FIELD(string);
1552
0
  WRITE_STRING_FIELD(name);
1553
0
  WRITE_LOCATION_FIELD(name_location);
1554
0
  WRITE_LOCATION_FIELD(location);
1555
0
}
1556
1557
static void
1558
_outJsonTable(StringInfo str, const JsonTable *node)
1559
0
{
1560
0
  WRITE_NODE_TYPE("JSONTABLE");
1561
1562
0
  WRITE_NODE_FIELD(context_item);
1563
0
  WRITE_NODE_FIELD(pathspec);
1564
0
  WRITE_NODE_FIELD(passing);
1565
0
  WRITE_NODE_FIELD(columns);
1566
0
  WRITE_NODE_FIELD(on_error);
1567
0
  WRITE_NODE_FIELD(alias);
1568
0
  WRITE_BOOL_FIELD(lateral);
1569
0
  WRITE_LOCATION_FIELD(location);
1570
0
}
1571
1572
static void
1573
_outJsonTableColumn(StringInfo str, const JsonTableColumn *node)
1574
0
{
1575
0
  WRITE_NODE_TYPE("JSONTABLECOLUMN");
1576
1577
0
  WRITE_ENUM_FIELD(coltype, JsonTableColumnType);
1578
0
  WRITE_STRING_FIELD(name);
1579
0
  WRITE_NODE_FIELD(typeName);
1580
0
  WRITE_NODE_FIELD(pathspec);
1581
0
  WRITE_NODE_FIELD(format);
1582
0
  WRITE_ENUM_FIELD(wrapper, JsonWrapper);
1583
0
  WRITE_ENUM_FIELD(quotes, JsonQuotes);
1584
0
  WRITE_NODE_FIELD(columns);
1585
0
  WRITE_NODE_FIELD(on_empty);
1586
0
  WRITE_NODE_FIELD(on_error);
1587
0
  WRITE_LOCATION_FIELD(location);
1588
0
}
1589
1590
static void
1591
_outJsonKeyValue(StringInfo str, const JsonKeyValue *node)
1592
0
{
1593
0
  WRITE_NODE_TYPE("JSONKEYVALUE");
1594
1595
0
  WRITE_NODE_FIELD(key);
1596
0
  WRITE_NODE_FIELD(value);
1597
0
}
1598
1599
static void
1600
_outJsonParseExpr(StringInfo str, const JsonParseExpr *node)
1601
0
{
1602
0
  WRITE_NODE_TYPE("JSONPARSEEXPR");
1603
1604
0
  WRITE_NODE_FIELD(expr);
1605
0
  WRITE_NODE_FIELD(output);
1606
0
  WRITE_BOOL_FIELD(unique_keys);
1607
0
  WRITE_LOCATION_FIELD(location);
1608
0
}
1609
1610
static void
1611
_outJsonScalarExpr(StringInfo str, const JsonScalarExpr *node)
1612
0
{
1613
0
  WRITE_NODE_TYPE("JSONSCALAREXPR");
1614
1615
0
  WRITE_NODE_FIELD(expr);
1616
0
  WRITE_NODE_FIELD(output);
1617
0
  WRITE_LOCATION_FIELD(location);
1618
0
}
1619
1620
static void
1621
_outJsonSerializeExpr(StringInfo str, const JsonSerializeExpr *node)
1622
0
{
1623
0
  WRITE_NODE_TYPE("JSONSERIALIZEEXPR");
1624
1625
0
  WRITE_NODE_FIELD(expr);
1626
0
  WRITE_NODE_FIELD(output);
1627
0
  WRITE_LOCATION_FIELD(location);
1628
0
}
1629
1630
static void
1631
_outJsonObjectConstructor(StringInfo str, const JsonObjectConstructor *node)
1632
0
{
1633
0
  WRITE_NODE_TYPE("JSONOBJECTCONSTRUCTOR");
1634
1635
0
  WRITE_NODE_FIELD(exprs);
1636
0
  WRITE_NODE_FIELD(output);
1637
0
  WRITE_BOOL_FIELD(absent_on_null);
1638
0
  WRITE_BOOL_FIELD(unique);
1639
0
  WRITE_LOCATION_FIELD(location);
1640
0
}
1641
1642
static void
1643
_outJsonArrayConstructor(StringInfo str, const JsonArrayConstructor *node)
1644
0
{
1645
0
  WRITE_NODE_TYPE("JSONARRAYCONSTRUCTOR");
1646
1647
0
  WRITE_NODE_FIELD(exprs);
1648
0
  WRITE_NODE_FIELD(output);
1649
0
  WRITE_BOOL_FIELD(absent_on_null);
1650
0
  WRITE_LOCATION_FIELD(location);
1651
0
}
1652
1653
static void
1654
_outJsonArrayQueryConstructor(StringInfo str, const JsonArrayQueryConstructor *node)
1655
0
{
1656
0
  WRITE_NODE_TYPE("JSONARRAYQUERYCONSTRUCTOR");
1657
1658
0
  WRITE_NODE_FIELD(query);
1659
0
  WRITE_NODE_FIELD(output);
1660
0
  WRITE_NODE_FIELD(format);
1661
0
  WRITE_BOOL_FIELD(absent_on_null);
1662
0
  WRITE_LOCATION_FIELD(location);
1663
0
}
1664
1665
static void
1666
_outJsonAggConstructor(StringInfo str, const JsonAggConstructor *node)
1667
0
{
1668
0
  WRITE_NODE_TYPE("JSONAGGCONSTRUCTOR");
1669
1670
0
  WRITE_NODE_FIELD(output);
1671
0
  WRITE_NODE_FIELD(agg_filter);
1672
0
  WRITE_NODE_FIELD(agg_order);
1673
0
  WRITE_NODE_FIELD(over);
1674
0
  WRITE_LOCATION_FIELD(location);
1675
0
}
1676
1677
static void
1678
_outJsonObjectAgg(StringInfo str, const JsonObjectAgg *node)
1679
0
{
1680
0
  WRITE_NODE_TYPE("JSONOBJECTAGG");
1681
1682
0
  WRITE_NODE_FIELD(constructor);
1683
0
  WRITE_NODE_FIELD(arg);
1684
0
  WRITE_BOOL_FIELD(absent_on_null);
1685
0
  WRITE_BOOL_FIELD(unique);
1686
0
}
1687
1688
static void
1689
_outJsonArrayAgg(StringInfo str, const JsonArrayAgg *node)
1690
0
{
1691
0
  WRITE_NODE_TYPE("JSONARRAYAGG");
1692
1693
0
  WRITE_NODE_FIELD(constructor);
1694
0
  WRITE_NODE_FIELD(arg);
1695
0
  WRITE_BOOL_FIELD(absent_on_null);
1696
0
}
1697
1698
static void
1699
_outRawStmt(StringInfo str, const RawStmt *node)
1700
0
{
1701
0
  WRITE_NODE_TYPE("RAWSTMT");
1702
1703
0
  WRITE_NODE_FIELD(stmt);
1704
0
  WRITE_LOCATION_FIELD(stmt_location);
1705
0
  WRITE_LOCATION_FIELD(stmt_len);
1706
0
}
1707
1708
static void
1709
_outInsertStmt(StringInfo str, const InsertStmt *node)
1710
0
{
1711
0
  WRITE_NODE_TYPE("INSERTSTMT");
1712
1713
0
  WRITE_NODE_FIELD(relation);
1714
0
  WRITE_NODE_FIELD(cols);
1715
0
  WRITE_NODE_FIELD(selectStmt);
1716
0
  WRITE_NODE_FIELD(onConflictClause);
1717
0
  WRITE_NODE_FIELD(returningClause);
1718
0
  WRITE_NODE_FIELD(withClause);
1719
0
  WRITE_ENUM_FIELD(override, OverridingKind);
1720
0
}
1721
1722
static void
1723
_outDeleteStmt(StringInfo str, const DeleteStmt *node)
1724
0
{
1725
0
  WRITE_NODE_TYPE("DELETESTMT");
1726
1727
0
  WRITE_NODE_FIELD(relation);
1728
0
  WRITE_NODE_FIELD(usingClause);
1729
0
  WRITE_NODE_FIELD(whereClause);
1730
0
  WRITE_NODE_FIELD(returningClause);
1731
0
  WRITE_NODE_FIELD(withClause);
1732
0
}
1733
1734
static void
1735
_outUpdateStmt(StringInfo str, const UpdateStmt *node)
1736
0
{
1737
0
  WRITE_NODE_TYPE("UPDATESTMT");
1738
1739
0
  WRITE_NODE_FIELD(relation);
1740
0
  WRITE_NODE_FIELD(targetList);
1741
0
  WRITE_NODE_FIELD(whereClause);
1742
0
  WRITE_NODE_FIELD(fromClause);
1743
0
  WRITE_NODE_FIELD(returningClause);
1744
0
  WRITE_NODE_FIELD(withClause);
1745
0
}
1746
1747
static void
1748
_outMergeStmt(StringInfo str, const MergeStmt *node)
1749
0
{
1750
0
  WRITE_NODE_TYPE("MERGESTMT");
1751
1752
0
  WRITE_NODE_FIELD(relation);
1753
0
  WRITE_NODE_FIELD(sourceRelation);
1754
0
  WRITE_NODE_FIELD(joinCondition);
1755
0
  WRITE_NODE_FIELD(mergeWhenClauses);
1756
0
  WRITE_NODE_FIELD(returningClause);
1757
0
  WRITE_NODE_FIELD(withClause);
1758
0
}
1759
1760
static void
1761
_outSelectStmt(StringInfo str, const SelectStmt *node)
1762
0
{
1763
0
  WRITE_NODE_TYPE("SELECTSTMT");
1764
1765
0
  WRITE_NODE_FIELD(distinctClause);
1766
0
  WRITE_NODE_FIELD(intoClause);
1767
0
  WRITE_NODE_FIELD(targetList);
1768
0
  WRITE_NODE_FIELD(fromClause);
1769
0
  WRITE_NODE_FIELD(whereClause);
1770
0
  WRITE_NODE_FIELD(groupClause);
1771
0
  WRITE_BOOL_FIELD(groupDistinct);
1772
0
  WRITE_NODE_FIELD(havingClause);
1773
0
  WRITE_NODE_FIELD(windowClause);
1774
0
  WRITE_NODE_FIELD(valuesLists);
1775
0
  WRITE_NODE_FIELD(sortClause);
1776
0
  WRITE_NODE_FIELD(limitOffset);
1777
0
  WRITE_NODE_FIELD(limitCount);
1778
0
  WRITE_ENUM_FIELD(limitOption, LimitOption);
1779
0
  WRITE_NODE_FIELD(lockingClause);
1780
0
  WRITE_NODE_FIELD(withClause);
1781
0
  WRITE_ENUM_FIELD(op, SetOperation);
1782
0
  WRITE_BOOL_FIELD(all);
1783
0
  WRITE_NODE_FIELD(larg);
1784
0
  WRITE_NODE_FIELD(rarg);
1785
0
}
1786
1787
static void
1788
_outSetOperationStmt(StringInfo str, const SetOperationStmt *node)
1789
0
{
1790
0
  WRITE_NODE_TYPE("SETOPERATIONSTMT");
1791
1792
0
  WRITE_ENUM_FIELD(op, SetOperation);
1793
0
  WRITE_BOOL_FIELD(all);
1794
0
  WRITE_NODE_FIELD(larg);
1795
0
  WRITE_NODE_FIELD(rarg);
1796
0
  WRITE_NODE_FIELD(colTypes);
1797
0
  WRITE_NODE_FIELD(colTypmods);
1798
0
  WRITE_NODE_FIELD(colCollations);
1799
0
  WRITE_NODE_FIELD(groupClauses);
1800
0
}
1801
1802
static void
1803
_outReturnStmt(StringInfo str, const ReturnStmt *node)
1804
0
{
1805
0
  WRITE_NODE_TYPE("RETURNSTMT");
1806
1807
0
  WRITE_NODE_FIELD(returnval);
1808
0
}
1809
1810
static void
1811
_outPLAssignStmt(StringInfo str, const PLAssignStmt *node)
1812
0
{
1813
0
  WRITE_NODE_TYPE("PLASSIGNSTMT");
1814
1815
0
  WRITE_STRING_FIELD(name);
1816
0
  WRITE_NODE_FIELD(indirection);
1817
0
  WRITE_INT_FIELD(nnames);
1818
0
  WRITE_NODE_FIELD(val);
1819
0
  WRITE_LOCATION_FIELD(location);
1820
0
}
1821
1822
static void
1823
_outCreateSchemaStmt(StringInfo str, const CreateSchemaStmt *node)
1824
0
{
1825
0
  WRITE_NODE_TYPE("CREATESCHEMASTMT");
1826
1827
0
  WRITE_STRING_FIELD(schemaname);
1828
0
  WRITE_NODE_FIELD(authrole);
1829
0
  WRITE_NODE_FIELD(schemaElts);
1830
0
  WRITE_BOOL_FIELD(if_not_exists);
1831
0
}
1832
1833
static void
1834
_outAlterTableStmt(StringInfo str, const AlterTableStmt *node)
1835
0
{
1836
0
  WRITE_NODE_TYPE("ALTERTABLESTMT");
1837
1838
0
  WRITE_NODE_FIELD(relation);
1839
0
  WRITE_NODE_FIELD(cmds);
1840
0
  WRITE_ENUM_FIELD(objtype, ObjectType);
1841
0
  WRITE_BOOL_FIELD(missing_ok);
1842
0
}
1843
1844
static void
1845
_outAlterTableCmd(StringInfo str, const AlterTableCmd *node)
1846
0
{
1847
0
  WRITE_NODE_TYPE("ALTERTABLECMD");
1848
1849
0
  WRITE_ENUM_FIELD(subtype, AlterTableType);
1850
0
  WRITE_STRING_FIELD(name);
1851
0
  WRITE_INT_FIELD(num);
1852
0
  WRITE_NODE_FIELD(newowner);
1853
0
  WRITE_NODE_FIELD(def);
1854
0
  WRITE_ENUM_FIELD(behavior, DropBehavior);
1855
0
  WRITE_BOOL_FIELD(missing_ok);
1856
0
  WRITE_BOOL_FIELD(recurse);
1857
0
}
1858
1859
static void
1860
_outATAlterConstraint(StringInfo str, const ATAlterConstraint *node)
1861
0
{
1862
0
  WRITE_NODE_TYPE("ATALTERCONSTRAINT");
1863
1864
0
  WRITE_STRING_FIELD(conname);
1865
0
  WRITE_BOOL_FIELD(alterEnforceability);
1866
0
  WRITE_BOOL_FIELD(is_enforced);
1867
0
  WRITE_BOOL_FIELD(alterDeferrability);
1868
0
  WRITE_BOOL_FIELD(deferrable);
1869
0
  WRITE_BOOL_FIELD(initdeferred);
1870
0
  WRITE_BOOL_FIELD(alterInheritability);
1871
0
  WRITE_BOOL_FIELD(noinherit);
1872
0
}
1873
1874
static void
1875
_outReplicaIdentityStmt(StringInfo str, const ReplicaIdentityStmt *node)
1876
0
{
1877
0
  WRITE_NODE_TYPE("REPLICAIDENTITYSTMT");
1878
1879
0
  WRITE_CHAR_FIELD(identity_type);
1880
0
  WRITE_STRING_FIELD(name);
1881
0
}
1882
1883
static void
1884
_outAlterCollationStmt(StringInfo str, const AlterCollationStmt *node)
1885
0
{
1886
0
  WRITE_NODE_TYPE("ALTERCOLLATIONSTMT");
1887
1888
0
  WRITE_NODE_FIELD(collname);
1889
0
}
1890
1891
static void
1892
_outAlterDomainStmt(StringInfo str, const AlterDomainStmt *node)
1893
0
{
1894
0
  WRITE_NODE_TYPE("ALTERDOMAINSTMT");
1895
1896
0
  WRITE_CHAR_FIELD(subtype);
1897
0
  WRITE_NODE_FIELD(typeName);
1898
0
  WRITE_STRING_FIELD(name);
1899
0
  WRITE_NODE_FIELD(def);
1900
0
  WRITE_ENUM_FIELD(behavior, DropBehavior);
1901
0
  WRITE_BOOL_FIELD(missing_ok);
1902
0
}
1903
1904
static void
1905
_outGrantStmt(StringInfo str, const GrantStmt *node)
1906
0
{
1907
0
  WRITE_NODE_TYPE("GRANTSTMT");
1908
1909
0
  WRITE_BOOL_FIELD(is_grant);
1910
0
  WRITE_ENUM_FIELD(targtype, GrantTargetType);
1911
0
  WRITE_ENUM_FIELD(objtype, ObjectType);
1912
0
  WRITE_NODE_FIELD(objects);
1913
0
  WRITE_NODE_FIELD(privileges);
1914
0
  WRITE_NODE_FIELD(grantees);
1915
0
  WRITE_BOOL_FIELD(grant_option);
1916
0
  WRITE_NODE_FIELD(grantor);
1917
0
  WRITE_ENUM_FIELD(behavior, DropBehavior);
1918
0
}
1919
1920
static void
1921
_outObjectWithArgs(StringInfo str, const ObjectWithArgs *node)
1922
0
{
1923
0
  WRITE_NODE_TYPE("OBJECTWITHARGS");
1924
1925
0
  WRITE_NODE_FIELD(objname);
1926
0
  WRITE_NODE_FIELD(objargs);
1927
0
  WRITE_NODE_FIELD(objfuncargs);
1928
0
  WRITE_BOOL_FIELD(args_unspecified);
1929
0
}
1930
1931
static void
1932
_outAccessPriv(StringInfo str, const AccessPriv *node)
1933
0
{
1934
0
  WRITE_NODE_TYPE("ACCESSPRIV");
1935
1936
0
  WRITE_STRING_FIELD(priv_name);
1937
0
  WRITE_NODE_FIELD(cols);
1938
0
}
1939
1940
static void
1941
_outGrantRoleStmt(StringInfo str, const GrantRoleStmt *node)
1942
0
{
1943
0
  WRITE_NODE_TYPE("GRANTROLESTMT");
1944
1945
0
  WRITE_NODE_FIELD(granted_roles);
1946
0
  WRITE_NODE_FIELD(grantee_roles);
1947
0
  WRITE_BOOL_FIELD(is_grant);
1948
0
  WRITE_NODE_FIELD(opt);
1949
0
  WRITE_NODE_FIELD(grantor);
1950
0
  WRITE_ENUM_FIELD(behavior, DropBehavior);
1951
0
}
1952
1953
static void
1954
_outAlterDefaultPrivilegesStmt(StringInfo str, const AlterDefaultPrivilegesStmt *node)
1955
0
{
1956
0
  WRITE_NODE_TYPE("ALTERDEFAULTPRIVILEGESSTMT");
1957
1958
0
  WRITE_NODE_FIELD(options);
1959
0
  WRITE_NODE_FIELD(action);
1960
0
}
1961
1962
static void
1963
_outCopyStmt(StringInfo str, const CopyStmt *node)
1964
0
{
1965
0
  WRITE_NODE_TYPE("COPYSTMT");
1966
1967
0
  WRITE_NODE_FIELD(relation);
1968
0
  WRITE_NODE_FIELD(query);
1969
0
  WRITE_NODE_FIELD(attlist);
1970
0
  WRITE_BOOL_FIELD(is_from);
1971
0
  WRITE_BOOL_FIELD(is_program);
1972
0
  WRITE_STRING_FIELD(filename);
1973
0
  WRITE_NODE_FIELD(options);
1974
0
  WRITE_NODE_FIELD(whereClause);
1975
0
}
1976
1977
static void
1978
_outVariableSetStmt(StringInfo str, const VariableSetStmt *node)
1979
0
{
1980
0
  WRITE_NODE_TYPE("VARIABLESETSTMT");
1981
1982
0
  WRITE_ENUM_FIELD(kind, VariableSetKind);
1983
0
  WRITE_STRING_FIELD(name);
1984
0
  WRITE_NODE_FIELD(args);
1985
0
  WRITE_BOOL_FIELD(jumble_args);
1986
0
  WRITE_BOOL_FIELD(is_local);
1987
0
  WRITE_LOCATION_FIELD(location);
1988
0
}
1989
1990
static void
1991
_outVariableShowStmt(StringInfo str, const VariableShowStmt *node)
1992
0
{
1993
0
  WRITE_NODE_TYPE("VARIABLESHOWSTMT");
1994
1995
0
  WRITE_STRING_FIELD(name);
1996
0
}
1997
1998
static void
1999
_outCreateStmt(StringInfo str, const CreateStmt *node)
2000
0
{
2001
0
  WRITE_NODE_TYPE("CREATESTMT");
2002
2003
0
  WRITE_NODE_FIELD(relation);
2004
0
  WRITE_NODE_FIELD(tableElts);
2005
0
  WRITE_NODE_FIELD(inhRelations);
2006
0
  WRITE_NODE_FIELD(partbound);
2007
0
  WRITE_NODE_FIELD(partspec);
2008
0
  WRITE_NODE_FIELD(ofTypename);
2009
0
  WRITE_NODE_FIELD(constraints);
2010
0
  WRITE_NODE_FIELD(nnconstraints);
2011
0
  WRITE_NODE_FIELD(options);
2012
0
  WRITE_ENUM_FIELD(oncommit, OnCommitAction);
2013
0
  WRITE_STRING_FIELD(tablespacename);
2014
0
  WRITE_STRING_FIELD(accessMethod);
2015
0
  WRITE_BOOL_FIELD(if_not_exists);
2016
0
}
2017
2018
static void
2019
_outConstraint(StringInfo str, const Constraint *node)
2020
0
{
2021
0
  WRITE_NODE_TYPE("CONSTRAINT");
2022
2023
0
  WRITE_ENUM_FIELD(contype, ConstrType);
2024
0
  WRITE_STRING_FIELD(conname);
2025
0
  WRITE_BOOL_FIELD(deferrable);
2026
0
  WRITE_BOOL_FIELD(initdeferred);
2027
0
  WRITE_BOOL_FIELD(is_enforced);
2028
0
  WRITE_BOOL_FIELD(skip_validation);
2029
0
  WRITE_BOOL_FIELD(initially_valid);
2030
0
  WRITE_BOOL_FIELD(is_no_inherit);
2031
0
  WRITE_NODE_FIELD(raw_expr);
2032
0
  WRITE_STRING_FIELD(cooked_expr);
2033
0
  WRITE_CHAR_FIELD(generated_when);
2034
0
  WRITE_CHAR_FIELD(generated_kind);
2035
0
  WRITE_BOOL_FIELD(nulls_not_distinct);
2036
0
  WRITE_NODE_FIELD(keys);
2037
0
  WRITE_BOOL_FIELD(without_overlaps);
2038
0
  WRITE_NODE_FIELD(including);
2039
0
  WRITE_NODE_FIELD(exclusions);
2040
0
  WRITE_NODE_FIELD(options);
2041
0
  WRITE_STRING_FIELD(indexname);
2042
0
  WRITE_STRING_FIELD(indexspace);
2043
0
  WRITE_BOOL_FIELD(reset_default_tblspc);
2044
0
  WRITE_STRING_FIELD(access_method);
2045
0
  WRITE_NODE_FIELD(where_clause);
2046
0
  WRITE_NODE_FIELD(pktable);
2047
0
  WRITE_NODE_FIELD(fk_attrs);
2048
0
  WRITE_NODE_FIELD(pk_attrs);
2049
0
  WRITE_BOOL_FIELD(fk_with_period);
2050
0
  WRITE_BOOL_FIELD(pk_with_period);
2051
0
  WRITE_CHAR_FIELD(fk_matchtype);
2052
0
  WRITE_CHAR_FIELD(fk_upd_action);
2053
0
  WRITE_CHAR_FIELD(fk_del_action);
2054
0
  WRITE_NODE_FIELD(fk_del_set_cols);
2055
0
  WRITE_NODE_FIELD(old_conpfeqop);
2056
0
  WRITE_OID_FIELD(old_pktable_oid);
2057
0
  WRITE_LOCATION_FIELD(location);
2058
0
}
2059
2060
static void
2061
_outCreateTableSpaceStmt(StringInfo str, const CreateTableSpaceStmt *node)
2062
0
{
2063
0
  WRITE_NODE_TYPE("CREATETABLESPACESTMT");
2064
2065
0
  WRITE_STRING_FIELD(tablespacename);
2066
0
  WRITE_NODE_FIELD(owner);
2067
0
  WRITE_STRING_FIELD(location);
2068
0
  WRITE_NODE_FIELD(options);
2069
0
}
2070
2071
static void
2072
_outDropTableSpaceStmt(StringInfo str, const DropTableSpaceStmt *node)
2073
0
{
2074
0
  WRITE_NODE_TYPE("DROPTABLESPACESTMT");
2075
2076
0
  WRITE_STRING_FIELD(tablespacename);
2077
0
  WRITE_BOOL_FIELD(missing_ok);
2078
0
}
2079
2080
static void
2081
_outAlterTableSpaceOptionsStmt(StringInfo str, const AlterTableSpaceOptionsStmt *node)
2082
0
{
2083
0
  WRITE_NODE_TYPE("ALTERTABLESPACEOPTIONSSTMT");
2084
2085
0
  WRITE_STRING_FIELD(tablespacename);
2086
0
  WRITE_NODE_FIELD(options);
2087
0
  WRITE_BOOL_FIELD(isReset);
2088
0
}
2089
2090
static void
2091
_outAlterTableMoveAllStmt(StringInfo str, const AlterTableMoveAllStmt *node)
2092
0
{
2093
0
  WRITE_NODE_TYPE("ALTERTABLEMOVEALLSTMT");
2094
2095
0
  WRITE_STRING_FIELD(orig_tablespacename);
2096
0
  WRITE_ENUM_FIELD(objtype, ObjectType);
2097
0
  WRITE_NODE_FIELD(roles);
2098
0
  WRITE_STRING_FIELD(new_tablespacename);
2099
0
  WRITE_BOOL_FIELD(nowait);
2100
0
}
2101
2102
static void
2103
_outCreateExtensionStmt(StringInfo str, const CreateExtensionStmt *node)
2104
0
{
2105
0
  WRITE_NODE_TYPE("CREATEEXTENSIONSTMT");
2106
2107
0
  WRITE_STRING_FIELD(extname);
2108
0
  WRITE_BOOL_FIELD(if_not_exists);
2109
0
  WRITE_NODE_FIELD(options);
2110
0
}
2111
2112
static void
2113
_outAlterExtensionStmt(StringInfo str, const AlterExtensionStmt *node)
2114
0
{
2115
0
  WRITE_NODE_TYPE("ALTEREXTENSIONSTMT");
2116
2117
0
  WRITE_STRING_FIELD(extname);
2118
0
  WRITE_NODE_FIELD(options);
2119
0
}
2120
2121
static void
2122
_outAlterExtensionContentsStmt(StringInfo str, const AlterExtensionContentsStmt *node)
2123
0
{
2124
0
  WRITE_NODE_TYPE("ALTEREXTENSIONCONTENTSSTMT");
2125
2126
0
  WRITE_STRING_FIELD(extname);
2127
0
  WRITE_INT_FIELD(action);
2128
0
  WRITE_ENUM_FIELD(objtype, ObjectType);
2129
0
  WRITE_NODE_FIELD(object);
2130
0
}
2131
2132
static void
2133
_outCreateFdwStmt(StringInfo str, const CreateFdwStmt *node)
2134
0
{
2135
0
  WRITE_NODE_TYPE("CREATEFDWSTMT");
2136
2137
0
  WRITE_STRING_FIELD(fdwname);
2138
0
  WRITE_NODE_FIELD(func_options);
2139
0
  WRITE_NODE_FIELD(options);
2140
0
}
2141
2142
static void
2143
_outAlterFdwStmt(StringInfo str, const AlterFdwStmt *node)
2144
0
{
2145
0
  WRITE_NODE_TYPE("ALTERFDWSTMT");
2146
2147
0
  WRITE_STRING_FIELD(fdwname);
2148
0
  WRITE_NODE_FIELD(func_options);
2149
0
  WRITE_NODE_FIELD(options);
2150
0
}
2151
2152
static void
2153
_outCreateForeignServerStmt(StringInfo str, const CreateForeignServerStmt *node)
2154
0
{
2155
0
  WRITE_NODE_TYPE("CREATEFOREIGNSERVERSTMT");
2156
2157
0
  WRITE_STRING_FIELD(servername);
2158
0
  WRITE_STRING_FIELD(servertype);
2159
0
  WRITE_STRING_FIELD(version);
2160
0
  WRITE_STRING_FIELD(fdwname);
2161
0
  WRITE_BOOL_FIELD(if_not_exists);
2162
0
  WRITE_NODE_FIELD(options);
2163
0
}
2164
2165
static void
2166
_outAlterForeignServerStmt(StringInfo str, const AlterForeignServerStmt *node)
2167
0
{
2168
0
  WRITE_NODE_TYPE("ALTERFOREIGNSERVERSTMT");
2169
2170
0
  WRITE_STRING_FIELD(servername);
2171
0
  WRITE_STRING_FIELD(version);
2172
0
  WRITE_NODE_FIELD(options);
2173
0
  WRITE_BOOL_FIELD(has_version);
2174
0
}
2175
2176
static void
2177
_outCreateForeignTableStmt(StringInfo str, const CreateForeignTableStmt *node)
2178
0
{
2179
0
  WRITE_NODE_TYPE("CREATEFOREIGNTABLESTMT");
2180
2181
0
  WRITE_NODE_FIELD(base.relation);
2182
0
  WRITE_NODE_FIELD(base.tableElts);
2183
0
  WRITE_NODE_FIELD(base.inhRelations);
2184
0
  WRITE_NODE_FIELD(base.partbound);
2185
0
  WRITE_NODE_FIELD(base.partspec);
2186
0
  WRITE_NODE_FIELD(base.ofTypename);
2187
0
  WRITE_NODE_FIELD(base.constraints);
2188
0
  WRITE_NODE_FIELD(base.nnconstraints);
2189
0
  WRITE_NODE_FIELD(base.options);
2190
0
  WRITE_ENUM_FIELD(base.oncommit, OnCommitAction);
2191
0
  WRITE_STRING_FIELD(base.tablespacename);
2192
0
  WRITE_STRING_FIELD(base.accessMethod);
2193
0
  WRITE_BOOL_FIELD(base.if_not_exists);
2194
0
  WRITE_STRING_FIELD(servername);
2195
0
  WRITE_NODE_FIELD(options);
2196
0
}
2197
2198
static void
2199
_outCreateUserMappingStmt(StringInfo str, const CreateUserMappingStmt *node)
2200
0
{
2201
0
  WRITE_NODE_TYPE("CREATEUSERMAPPINGSTMT");
2202
2203
0
  WRITE_NODE_FIELD(user);
2204
0
  WRITE_STRING_FIELD(servername);
2205
0
  WRITE_BOOL_FIELD(if_not_exists);
2206
0
  WRITE_NODE_FIELD(options);
2207
0
}
2208
2209
static void
2210
_outAlterUserMappingStmt(StringInfo str, const AlterUserMappingStmt *node)
2211
0
{
2212
0
  WRITE_NODE_TYPE("ALTERUSERMAPPINGSTMT");
2213
2214
0
  WRITE_NODE_FIELD(user);
2215
0
  WRITE_STRING_FIELD(servername);
2216
0
  WRITE_NODE_FIELD(options);
2217
0
}
2218
2219
static void
2220
_outDropUserMappingStmt(StringInfo str, const DropUserMappingStmt *node)
2221
0
{
2222
0
  WRITE_NODE_TYPE("DROPUSERMAPPINGSTMT");
2223
2224
0
  WRITE_NODE_FIELD(user);
2225
0
  WRITE_STRING_FIELD(servername);
2226
0
  WRITE_BOOL_FIELD(missing_ok);
2227
0
}
2228
2229
static void
2230
_outImportForeignSchemaStmt(StringInfo str, const ImportForeignSchemaStmt *node)
2231
0
{
2232
0
  WRITE_NODE_TYPE("IMPORTFOREIGNSCHEMASTMT");
2233
2234
0
  WRITE_STRING_FIELD(server_name);
2235
0
  WRITE_STRING_FIELD(remote_schema);
2236
0
  WRITE_STRING_FIELD(local_schema);
2237
0
  WRITE_ENUM_FIELD(list_type, ImportForeignSchemaType);
2238
0
  WRITE_NODE_FIELD(table_list);
2239
0
  WRITE_NODE_FIELD(options);
2240
0
}
2241
2242
static void
2243
_outCreatePolicyStmt(StringInfo str, const CreatePolicyStmt *node)
2244
0
{
2245
0
  WRITE_NODE_TYPE("CREATEPOLICYSTMT");
2246
2247
0
  WRITE_STRING_FIELD(policy_name);
2248
0
  WRITE_NODE_FIELD(table);
2249
0
  WRITE_STRING_FIELD(cmd_name);
2250
0
  WRITE_BOOL_FIELD(permissive);
2251
0
  WRITE_NODE_FIELD(roles);
2252
0
  WRITE_NODE_FIELD(qual);
2253
0
  WRITE_NODE_FIELD(with_check);
2254
0
}
2255
2256
static void
2257
_outAlterPolicyStmt(StringInfo str, const AlterPolicyStmt *node)
2258
0
{
2259
0
  WRITE_NODE_TYPE("ALTERPOLICYSTMT");
2260
2261
0
  WRITE_STRING_FIELD(policy_name);
2262
0
  WRITE_NODE_FIELD(table);
2263
0
  WRITE_NODE_FIELD(roles);
2264
0
  WRITE_NODE_FIELD(qual);
2265
0
  WRITE_NODE_FIELD(with_check);
2266
0
}
2267
2268
static void
2269
_outCreateAmStmt(StringInfo str, const CreateAmStmt *node)
2270
0
{
2271
0
  WRITE_NODE_TYPE("CREATEAMSTMT");
2272
2273
0
  WRITE_STRING_FIELD(amname);
2274
0
  WRITE_NODE_FIELD(handler_name);
2275
0
  WRITE_CHAR_FIELD(amtype);
2276
0
}
2277
2278
static void
2279
_outCreateTrigStmt(StringInfo str, const CreateTrigStmt *node)
2280
0
{
2281
0
  WRITE_NODE_TYPE("CREATETRIGSTMT");
2282
2283
0
  WRITE_BOOL_FIELD(replace);
2284
0
  WRITE_BOOL_FIELD(isconstraint);
2285
0
  WRITE_STRING_FIELD(trigname);
2286
0
  WRITE_NODE_FIELD(relation);
2287
0
  WRITE_NODE_FIELD(funcname);
2288
0
  WRITE_NODE_FIELD(args);
2289
0
  WRITE_BOOL_FIELD(row);
2290
0
  WRITE_INT_FIELD(timing);
2291
0
  WRITE_INT_FIELD(events);
2292
0
  WRITE_NODE_FIELD(columns);
2293
0
  WRITE_NODE_FIELD(whenClause);
2294
0
  WRITE_NODE_FIELD(transitionRels);
2295
0
  WRITE_BOOL_FIELD(deferrable);
2296
0
  WRITE_BOOL_FIELD(initdeferred);
2297
0
  WRITE_NODE_FIELD(constrrel);
2298
0
}
2299
2300
static void
2301
_outCreateEventTrigStmt(StringInfo str, const CreateEventTrigStmt *node)
2302
0
{
2303
0
  WRITE_NODE_TYPE("CREATEEVENTTRIGSTMT");
2304
2305
0
  WRITE_STRING_FIELD(trigname);
2306
0
  WRITE_STRING_FIELD(eventname);
2307
0
  WRITE_NODE_FIELD(whenclause);
2308
0
  WRITE_NODE_FIELD(funcname);
2309
0
}
2310
2311
static void
2312
_outAlterEventTrigStmt(StringInfo str, const AlterEventTrigStmt *node)
2313
0
{
2314
0
  WRITE_NODE_TYPE("ALTEREVENTTRIGSTMT");
2315
2316
0
  WRITE_STRING_FIELD(trigname);
2317
0
  WRITE_CHAR_FIELD(tgenabled);
2318
0
}
2319
2320
static void
2321
_outCreatePLangStmt(StringInfo str, const CreatePLangStmt *node)
2322
0
{
2323
0
  WRITE_NODE_TYPE("CREATEPLANGSTMT");
2324
2325
0
  WRITE_BOOL_FIELD(replace);
2326
0
  WRITE_STRING_FIELD(plname);
2327
0
  WRITE_NODE_FIELD(plhandler);
2328
0
  WRITE_NODE_FIELD(plinline);
2329
0
  WRITE_NODE_FIELD(plvalidator);
2330
0
  WRITE_BOOL_FIELD(pltrusted);
2331
0
}
2332
2333
static void
2334
_outCreateRoleStmt(StringInfo str, const CreateRoleStmt *node)
2335
0
{
2336
0
  WRITE_NODE_TYPE("CREATEROLESTMT");
2337
2338
0
  WRITE_ENUM_FIELD(stmt_type, RoleStmtType);
2339
0
  WRITE_STRING_FIELD(role);
2340
0
  WRITE_NODE_FIELD(options);
2341
0
}
2342
2343
static void
2344
_outAlterRoleStmt(StringInfo str, const AlterRoleStmt *node)
2345
0
{
2346
0
  WRITE_NODE_TYPE("ALTERROLESTMT");
2347
2348
0
  WRITE_NODE_FIELD(role);
2349
0
  WRITE_NODE_FIELD(options);
2350
0
  WRITE_INT_FIELD(action);
2351
0
}
2352
2353
static void
2354
_outAlterRoleSetStmt(StringInfo str, const AlterRoleSetStmt *node)
2355
0
{
2356
0
  WRITE_NODE_TYPE("ALTERROLESETSTMT");
2357
2358
0
  WRITE_NODE_FIELD(role);
2359
0
  WRITE_STRING_FIELD(database);
2360
0
  WRITE_NODE_FIELD(setstmt);
2361
0
}
2362
2363
static void
2364
_outDropRoleStmt(StringInfo str, const DropRoleStmt *node)
2365
0
{
2366
0
  WRITE_NODE_TYPE("DROPROLESTMT");
2367
2368
0
  WRITE_NODE_FIELD(roles);
2369
0
  WRITE_BOOL_FIELD(missing_ok);
2370
0
}
2371
2372
static void
2373
_outCreateSeqStmt(StringInfo str, const CreateSeqStmt *node)
2374
0
{
2375
0
  WRITE_NODE_TYPE("CREATESEQSTMT");
2376
2377
0
  WRITE_NODE_FIELD(sequence);
2378
0
  WRITE_NODE_FIELD(options);
2379
0
  WRITE_OID_FIELD(ownerId);
2380
0
  WRITE_BOOL_FIELD(for_identity);
2381
0
  WRITE_BOOL_FIELD(if_not_exists);
2382
0
}
2383
2384
static void
2385
_outAlterSeqStmt(StringInfo str, const AlterSeqStmt *node)
2386
0
{
2387
0
  WRITE_NODE_TYPE("ALTERSEQSTMT");
2388
2389
0
  WRITE_NODE_FIELD(sequence);
2390
0
  WRITE_NODE_FIELD(options);
2391
0
  WRITE_BOOL_FIELD(for_identity);
2392
0
  WRITE_BOOL_FIELD(missing_ok);
2393
0
}
2394
2395
static void
2396
_outDefineStmt(StringInfo str, const DefineStmt *node)
2397
0
{
2398
0
  WRITE_NODE_TYPE("DEFINESTMT");
2399
2400
0
  WRITE_ENUM_FIELD(kind, ObjectType);
2401
0
  WRITE_BOOL_FIELD(oldstyle);
2402
0
  WRITE_NODE_FIELD(defnames);
2403
0
  WRITE_NODE_FIELD(args);
2404
0
  WRITE_NODE_FIELD(definition);
2405
0
  WRITE_BOOL_FIELD(if_not_exists);
2406
0
  WRITE_BOOL_FIELD(replace);
2407
0
}
2408
2409
static void
2410
_outCreateDomainStmt(StringInfo str, const CreateDomainStmt *node)
2411
0
{
2412
0
  WRITE_NODE_TYPE("CREATEDOMAINSTMT");
2413
2414
0
  WRITE_NODE_FIELD(domainname);
2415
0
  WRITE_NODE_FIELD(typeName);
2416
0
  WRITE_NODE_FIELD(collClause);
2417
0
  WRITE_NODE_FIELD(constraints);
2418
0
}
2419
2420
static void
2421
_outCreateOpClassStmt(StringInfo str, const CreateOpClassStmt *node)
2422
0
{
2423
0
  WRITE_NODE_TYPE("CREATEOPCLASSSTMT");
2424
2425
0
  WRITE_NODE_FIELD(opclassname);
2426
0
  WRITE_NODE_FIELD(opfamilyname);
2427
0
  WRITE_STRING_FIELD(amname);
2428
0
  WRITE_NODE_FIELD(datatype);
2429
0
  WRITE_NODE_FIELD(items);
2430
0
  WRITE_BOOL_FIELD(isDefault);
2431
0
}
2432
2433
static void
2434
_outCreateOpClassItem(StringInfo str, const CreateOpClassItem *node)
2435
0
{
2436
0
  WRITE_NODE_TYPE("CREATEOPCLASSITEM");
2437
2438
0
  WRITE_INT_FIELD(itemtype);
2439
0
  WRITE_NODE_FIELD(name);
2440
0
  WRITE_INT_FIELD(number);
2441
0
  WRITE_NODE_FIELD(order_family);
2442
0
  WRITE_NODE_FIELD(class_args);
2443
0
  WRITE_NODE_FIELD(storedtype);
2444
0
}
2445
2446
static void
2447
_outCreateOpFamilyStmt(StringInfo str, const CreateOpFamilyStmt *node)
2448
0
{
2449
0
  WRITE_NODE_TYPE("CREATEOPFAMILYSTMT");
2450
2451
0
  WRITE_NODE_FIELD(opfamilyname);
2452
0
  WRITE_STRING_FIELD(amname);
2453
0
}
2454
2455
static void
2456
_outAlterOpFamilyStmt(StringInfo str, const AlterOpFamilyStmt *node)
2457
0
{
2458
0
  WRITE_NODE_TYPE("ALTEROPFAMILYSTMT");
2459
2460
0
  WRITE_NODE_FIELD(opfamilyname);
2461
0
  WRITE_STRING_FIELD(amname);
2462
0
  WRITE_BOOL_FIELD(isDrop);
2463
0
  WRITE_NODE_FIELD(items);
2464
0
}
2465
2466
static void
2467
_outDropStmt(StringInfo str, const DropStmt *node)
2468
0
{
2469
0
  WRITE_NODE_TYPE("DROPSTMT");
2470
2471
0
  WRITE_NODE_FIELD(objects);
2472
0
  WRITE_ENUM_FIELD(removeType, ObjectType);
2473
0
  WRITE_ENUM_FIELD(behavior, DropBehavior);
2474
0
  WRITE_BOOL_FIELD(missing_ok);
2475
0
  WRITE_BOOL_FIELD(concurrent);
2476
0
}
2477
2478
static void
2479
_outTruncateStmt(StringInfo str, const TruncateStmt *node)
2480
0
{
2481
0
  WRITE_NODE_TYPE("TRUNCATESTMT");
2482
2483
0
  WRITE_NODE_FIELD(relations);
2484
0
  WRITE_BOOL_FIELD(restart_seqs);
2485
0
  WRITE_ENUM_FIELD(behavior, DropBehavior);
2486
0
}
2487
2488
static void
2489
_outCommentStmt(StringInfo str, const CommentStmt *node)
2490
0
{
2491
0
  WRITE_NODE_TYPE("COMMENTSTMT");
2492
2493
0
  WRITE_ENUM_FIELD(objtype, ObjectType);
2494
0
  WRITE_NODE_FIELD(object);
2495
0
  WRITE_STRING_FIELD(comment);
2496
0
}
2497
2498
static void
2499
_outSecLabelStmt(StringInfo str, const SecLabelStmt *node)
2500
0
{
2501
0
  WRITE_NODE_TYPE("SECLABELSTMT");
2502
2503
0
  WRITE_ENUM_FIELD(objtype, ObjectType);
2504
0
  WRITE_NODE_FIELD(object);
2505
0
  WRITE_STRING_FIELD(provider);
2506
0
  WRITE_STRING_FIELD(label);
2507
0
}
2508
2509
static void
2510
_outDeclareCursorStmt(StringInfo str, const DeclareCursorStmt *node)
2511
0
{
2512
0
  WRITE_NODE_TYPE("DECLARECURSORSTMT");
2513
2514
0
  WRITE_STRING_FIELD(portalname);
2515
0
  WRITE_INT_FIELD(options);
2516
0
  WRITE_NODE_FIELD(query);
2517
0
}
2518
2519
static void
2520
_outClosePortalStmt(StringInfo str, const ClosePortalStmt *node)
2521
0
{
2522
0
  WRITE_NODE_TYPE("CLOSEPORTALSTMT");
2523
2524
0
  WRITE_STRING_FIELD(portalname);
2525
0
}
2526
2527
static void
2528
_outFetchStmt(StringInfo str, const FetchStmt *node)
2529
0
{
2530
0
  WRITE_NODE_TYPE("FETCHSTMT");
2531
2532
0
  WRITE_ENUM_FIELD(direction, FetchDirection);
2533
0
  WRITE_LONG_FIELD(howMany);
2534
0
  WRITE_STRING_FIELD(portalname);
2535
0
  WRITE_BOOL_FIELD(ismove);
2536
0
}
2537
2538
static void
2539
_outIndexStmt(StringInfo str, const IndexStmt *node)
2540
0
{
2541
0
  WRITE_NODE_TYPE("INDEXSTMT");
2542
2543
0
  WRITE_STRING_FIELD(idxname);
2544
0
  WRITE_NODE_FIELD(relation);
2545
0
  WRITE_STRING_FIELD(accessMethod);
2546
0
  WRITE_STRING_FIELD(tableSpace);
2547
0
  WRITE_NODE_FIELD(indexParams);
2548
0
  WRITE_NODE_FIELD(indexIncludingParams);
2549
0
  WRITE_NODE_FIELD(options);
2550
0
  WRITE_NODE_FIELD(whereClause);
2551
0
  WRITE_NODE_FIELD(excludeOpNames);
2552
0
  WRITE_STRING_FIELD(idxcomment);
2553
0
  WRITE_OID_FIELD(indexOid);
2554
0
  WRITE_OID_FIELD(oldNumber);
2555
0
  WRITE_UINT_FIELD(oldCreateSubid);
2556
0
  WRITE_UINT_FIELD(oldFirstRelfilelocatorSubid);
2557
0
  WRITE_BOOL_FIELD(unique);
2558
0
  WRITE_BOOL_FIELD(nulls_not_distinct);
2559
0
  WRITE_BOOL_FIELD(primary);
2560
0
  WRITE_BOOL_FIELD(isconstraint);
2561
0
  WRITE_BOOL_FIELD(iswithoutoverlaps);
2562
0
  WRITE_BOOL_FIELD(deferrable);
2563
0
  WRITE_BOOL_FIELD(initdeferred);
2564
0
  WRITE_BOOL_FIELD(transformed);
2565
0
  WRITE_BOOL_FIELD(concurrent);
2566
0
  WRITE_BOOL_FIELD(if_not_exists);
2567
0
  WRITE_BOOL_FIELD(reset_default_tblspc);
2568
0
}
2569
2570
static void
2571
_outCreateStatsStmt(StringInfo str, const CreateStatsStmt *node)
2572
0
{
2573
0
  WRITE_NODE_TYPE("CREATESTATSSTMT");
2574
2575
0
  WRITE_NODE_FIELD(defnames);
2576
0
  WRITE_NODE_FIELD(stat_types);
2577
0
  WRITE_NODE_FIELD(exprs);
2578
0
  WRITE_NODE_FIELD(relations);
2579
0
  WRITE_STRING_FIELD(stxcomment);
2580
0
  WRITE_BOOL_FIELD(transformed);
2581
0
  WRITE_BOOL_FIELD(if_not_exists);
2582
0
}
2583
2584
static void
2585
_outStatsElem(StringInfo str, const StatsElem *node)
2586
0
{
2587
0
  WRITE_NODE_TYPE("STATSELEM");
2588
2589
0
  WRITE_STRING_FIELD(name);
2590
0
  WRITE_NODE_FIELD(expr);
2591
0
}
2592
2593
static void
2594
_outAlterStatsStmt(StringInfo str, const AlterStatsStmt *node)
2595
0
{
2596
0
  WRITE_NODE_TYPE("ALTERSTATSSTMT");
2597
2598
0
  WRITE_NODE_FIELD(defnames);
2599
0
  WRITE_NODE_FIELD(stxstattarget);
2600
0
  WRITE_BOOL_FIELD(missing_ok);
2601
0
}
2602
2603
static void
2604
_outCreateFunctionStmt(StringInfo str, const CreateFunctionStmt *node)
2605
0
{
2606
0
  WRITE_NODE_TYPE("CREATEFUNCTIONSTMT");
2607
2608
0
  WRITE_BOOL_FIELD(is_procedure);
2609
0
  WRITE_BOOL_FIELD(replace);
2610
0
  WRITE_NODE_FIELD(funcname);
2611
0
  WRITE_NODE_FIELD(parameters);
2612
0
  WRITE_NODE_FIELD(returnType);
2613
0
  WRITE_NODE_FIELD(options);
2614
0
  WRITE_NODE_FIELD(sql_body);
2615
0
}
2616
2617
static void
2618
_outFunctionParameter(StringInfo str, const FunctionParameter *node)
2619
0
{
2620
0
  WRITE_NODE_TYPE("FUNCTIONPARAMETER");
2621
2622
0
  WRITE_STRING_FIELD(name);
2623
0
  WRITE_NODE_FIELD(argType);
2624
0
  WRITE_ENUM_FIELD(mode, FunctionParameterMode);
2625
0
  WRITE_NODE_FIELD(defexpr);
2626
0
  WRITE_LOCATION_FIELD(location);
2627
0
}
2628
2629
static void
2630
_outAlterFunctionStmt(StringInfo str, const AlterFunctionStmt *node)
2631
0
{
2632
0
  WRITE_NODE_TYPE("ALTERFUNCTIONSTMT");
2633
2634
0
  WRITE_ENUM_FIELD(objtype, ObjectType);
2635
0
  WRITE_NODE_FIELD(func);
2636
0
  WRITE_NODE_FIELD(actions);
2637
0
}
2638
2639
static void
2640
_outDoStmt(StringInfo str, const DoStmt *node)
2641
0
{
2642
0
  WRITE_NODE_TYPE("DOSTMT");
2643
2644
0
  WRITE_NODE_FIELD(args);
2645
0
}
2646
2647
static void
2648
_outCallStmt(StringInfo str, const CallStmt *node)
2649
0
{
2650
0
  WRITE_NODE_TYPE("CALLSTMT");
2651
2652
0
  WRITE_NODE_FIELD(funccall);
2653
0
  WRITE_NODE_FIELD(funcexpr);
2654
0
  WRITE_NODE_FIELD(outargs);
2655
0
}
2656
2657
static void
2658
_outRenameStmt(StringInfo str, const RenameStmt *node)
2659
0
{
2660
0
  WRITE_NODE_TYPE("RENAMESTMT");
2661
2662
0
  WRITE_ENUM_FIELD(renameType, ObjectType);
2663
0
  WRITE_ENUM_FIELD(relationType, ObjectType);
2664
0
  WRITE_NODE_FIELD(relation);
2665
0
  WRITE_NODE_FIELD(object);
2666
0
  WRITE_STRING_FIELD(subname);
2667
0
  WRITE_STRING_FIELD(newname);
2668
0
  WRITE_ENUM_FIELD(behavior, DropBehavior);
2669
0
  WRITE_BOOL_FIELD(missing_ok);
2670
0
}
2671
2672
static void
2673
_outAlterObjectDependsStmt(StringInfo str, const AlterObjectDependsStmt *node)
2674
0
{
2675
0
  WRITE_NODE_TYPE("ALTEROBJECTDEPENDSSTMT");
2676
2677
0
  WRITE_ENUM_FIELD(objectType, ObjectType);
2678
0
  WRITE_NODE_FIELD(relation);
2679
0
  WRITE_NODE_FIELD(object);
2680
0
  WRITE_NODE_FIELD(extname);
2681
0
  WRITE_BOOL_FIELD(remove);
2682
0
}
2683
2684
static void
2685
_outAlterObjectSchemaStmt(StringInfo str, const AlterObjectSchemaStmt *node)
2686
0
{
2687
0
  WRITE_NODE_TYPE("ALTEROBJECTSCHEMASTMT");
2688
2689
0
  WRITE_ENUM_FIELD(objectType, ObjectType);
2690
0
  WRITE_NODE_FIELD(relation);
2691
0
  WRITE_NODE_FIELD(object);
2692
0
  WRITE_STRING_FIELD(newschema);
2693
0
  WRITE_BOOL_FIELD(missing_ok);
2694
0
}
2695
2696
static void
2697
_outAlterOwnerStmt(StringInfo str, const AlterOwnerStmt *node)
2698
0
{
2699
0
  WRITE_NODE_TYPE("ALTEROWNERSTMT");
2700
2701
0
  WRITE_ENUM_FIELD(objectType, ObjectType);
2702
0
  WRITE_NODE_FIELD(relation);
2703
0
  WRITE_NODE_FIELD(object);
2704
0
  WRITE_NODE_FIELD(newowner);
2705
0
}
2706
2707
static void
2708
_outAlterOperatorStmt(StringInfo str, const AlterOperatorStmt *node)
2709
0
{
2710
0
  WRITE_NODE_TYPE("ALTEROPERATORSTMT");
2711
2712
0
  WRITE_NODE_FIELD(opername);
2713
0
  WRITE_NODE_FIELD(options);
2714
0
}
2715
2716
static void
2717
_outAlterTypeStmt(StringInfo str, const AlterTypeStmt *node)
2718
0
{
2719
0
  WRITE_NODE_TYPE("ALTERTYPESTMT");
2720
2721
0
  WRITE_NODE_FIELD(typeName);
2722
0
  WRITE_NODE_FIELD(options);
2723
0
}
2724
2725
static void
2726
_outRuleStmt(StringInfo str, const RuleStmt *node)
2727
0
{
2728
0
  WRITE_NODE_TYPE("RULESTMT");
2729
2730
0
  WRITE_NODE_FIELD(relation);
2731
0
  WRITE_STRING_FIELD(rulename);
2732
0
  WRITE_NODE_FIELD(whereClause);
2733
0
  WRITE_ENUM_FIELD(event, CmdType);
2734
0
  WRITE_BOOL_FIELD(instead);
2735
0
  WRITE_NODE_FIELD(actions);
2736
0
  WRITE_BOOL_FIELD(replace);
2737
0
}
2738
2739
static void
2740
_outNotifyStmt(StringInfo str, const NotifyStmt *node)
2741
0
{
2742
0
  WRITE_NODE_TYPE("NOTIFYSTMT");
2743
2744
0
  WRITE_STRING_FIELD(conditionname);
2745
0
  WRITE_STRING_FIELD(payload);
2746
0
}
2747
2748
static void
2749
_outListenStmt(StringInfo str, const ListenStmt *node)
2750
0
{
2751
0
  WRITE_NODE_TYPE("LISTENSTMT");
2752
2753
0
  WRITE_STRING_FIELD(conditionname);
2754
0
}
2755
2756
static void
2757
_outUnlistenStmt(StringInfo str, const UnlistenStmt *node)
2758
0
{
2759
0
  WRITE_NODE_TYPE("UNLISTENSTMT");
2760
2761
0
  WRITE_STRING_FIELD(conditionname);
2762
0
}
2763
2764
static void
2765
_outTransactionStmt(StringInfo str, const TransactionStmt *node)
2766
0
{
2767
0
  WRITE_NODE_TYPE("TRANSACTIONSTMT");
2768
2769
0
  WRITE_ENUM_FIELD(kind, TransactionStmtKind);
2770
0
  WRITE_NODE_FIELD(options);
2771
0
  WRITE_STRING_FIELD(savepoint_name);
2772
0
  WRITE_STRING_FIELD(gid);
2773
0
  WRITE_BOOL_FIELD(chain);
2774
0
  WRITE_LOCATION_FIELD(location);
2775
0
}
2776
2777
static void
2778
_outCompositeTypeStmt(StringInfo str, const CompositeTypeStmt *node)
2779
0
{
2780
0
  WRITE_NODE_TYPE("COMPOSITETYPESTMT");
2781
2782
0
  WRITE_NODE_FIELD(typevar);
2783
0
  WRITE_NODE_FIELD(coldeflist);
2784
0
}
2785
2786
static void
2787
_outCreateEnumStmt(StringInfo str, const CreateEnumStmt *node)
2788
0
{
2789
0
  WRITE_NODE_TYPE("CREATEENUMSTMT");
2790
2791
0
  WRITE_NODE_FIELD(typeName);
2792
0
  WRITE_NODE_FIELD(vals);
2793
0
}
2794
2795
static void
2796
_outCreateRangeStmt(StringInfo str, const CreateRangeStmt *node)
2797
0
{
2798
0
  WRITE_NODE_TYPE("CREATERANGESTMT");
2799
2800
0
  WRITE_NODE_FIELD(typeName);
2801
0
  WRITE_NODE_FIELD(params);
2802
0
}
2803
2804
static void
2805
_outAlterEnumStmt(StringInfo str, const AlterEnumStmt *node)
2806
0
{
2807
0
  WRITE_NODE_TYPE("ALTERENUMSTMT");
2808
2809
0
  WRITE_NODE_FIELD(typeName);
2810
0
  WRITE_STRING_FIELD(oldVal);
2811
0
  WRITE_STRING_FIELD(newVal);
2812
0
  WRITE_STRING_FIELD(newValNeighbor);
2813
0
  WRITE_BOOL_FIELD(newValIsAfter);
2814
0
  WRITE_BOOL_FIELD(skipIfNewValExists);
2815
0
}
2816
2817
static void
2818
_outViewStmt(StringInfo str, const ViewStmt *node)
2819
0
{
2820
0
  WRITE_NODE_TYPE("VIEWSTMT");
2821
2822
0
  WRITE_NODE_FIELD(view);
2823
0
  WRITE_NODE_FIELD(aliases);
2824
0
  WRITE_NODE_FIELD(query);
2825
0
  WRITE_BOOL_FIELD(replace);
2826
0
  WRITE_NODE_FIELD(options);
2827
0
  WRITE_ENUM_FIELD(withCheckOption, ViewCheckOption);
2828
0
}
2829
2830
static void
2831
_outLoadStmt(StringInfo str, const LoadStmt *node)
2832
0
{
2833
0
  WRITE_NODE_TYPE("LOADSTMT");
2834
2835
0
  WRITE_STRING_FIELD(filename);
2836
0
}
2837
2838
static void
2839
_outCreatedbStmt(StringInfo str, const CreatedbStmt *node)
2840
0
{
2841
0
  WRITE_NODE_TYPE("CREATEDBSTMT");
2842
2843
0
  WRITE_STRING_FIELD(dbname);
2844
0
  WRITE_NODE_FIELD(options);
2845
0
}
2846
2847
static void
2848
_outAlterDatabaseStmt(StringInfo str, const AlterDatabaseStmt *node)
2849
0
{
2850
0
  WRITE_NODE_TYPE("ALTERDATABASESTMT");
2851
2852
0
  WRITE_STRING_FIELD(dbname);
2853
0
  WRITE_NODE_FIELD(options);
2854
0
}
2855
2856
static void
2857
_outAlterDatabaseRefreshCollStmt(StringInfo str, const AlterDatabaseRefreshCollStmt *node)
2858
0
{
2859
0
  WRITE_NODE_TYPE("ALTERDATABASEREFRESHCOLLSTMT");
2860
2861
0
  WRITE_STRING_FIELD(dbname);
2862
0
}
2863
2864
static void
2865
_outAlterDatabaseSetStmt(StringInfo str, const AlterDatabaseSetStmt *node)
2866
0
{
2867
0
  WRITE_NODE_TYPE("ALTERDATABASESETSTMT");
2868
2869
0
  WRITE_STRING_FIELD(dbname);
2870
0
  WRITE_NODE_FIELD(setstmt);
2871
0
}
2872
2873
static void
2874
_outDropdbStmt(StringInfo str, const DropdbStmt *node)
2875
0
{
2876
0
  WRITE_NODE_TYPE("DROPDBSTMT");
2877
2878
0
  WRITE_STRING_FIELD(dbname);
2879
0
  WRITE_BOOL_FIELD(missing_ok);
2880
0
  WRITE_NODE_FIELD(options);
2881
0
}
2882
2883
static void
2884
_outAlterSystemStmt(StringInfo str, const AlterSystemStmt *node)
2885
0
{
2886
0
  WRITE_NODE_TYPE("ALTERSYSTEMSTMT");
2887
2888
0
  WRITE_NODE_FIELD(setstmt);
2889
0
}
2890
2891
static void
2892
_outClusterStmt(StringInfo str, const ClusterStmt *node)
2893
0
{
2894
0
  WRITE_NODE_TYPE("CLUSTERSTMT");
2895
2896
0
  WRITE_NODE_FIELD(relation);
2897
0
  WRITE_STRING_FIELD(indexname);
2898
0
  WRITE_NODE_FIELD(params);
2899
0
}
2900
2901
static void
2902
_outVacuumStmt(StringInfo str, const VacuumStmt *node)
2903
0
{
2904
0
  WRITE_NODE_TYPE("VACUUMSTMT");
2905
2906
0
  WRITE_NODE_FIELD(options);
2907
0
  WRITE_NODE_FIELD(rels);
2908
0
  WRITE_BOOL_FIELD(is_vacuumcmd);
2909
0
}
2910
2911
static void
2912
_outVacuumRelation(StringInfo str, const VacuumRelation *node)
2913
0
{
2914
0
  WRITE_NODE_TYPE("VACUUMRELATION");
2915
2916
0
  WRITE_NODE_FIELD(relation);
2917
0
  WRITE_OID_FIELD(oid);
2918
0
  WRITE_NODE_FIELD(va_cols);
2919
0
}
2920
2921
static void
2922
_outExplainStmt(StringInfo str, const ExplainStmt *node)
2923
0
{
2924
0
  WRITE_NODE_TYPE("EXPLAINSTMT");
2925
2926
0
  WRITE_NODE_FIELD(query);
2927
0
  WRITE_NODE_FIELD(options);
2928
0
}
2929
2930
static void
2931
_outCreateTableAsStmt(StringInfo str, const CreateTableAsStmt *node)
2932
0
{
2933
0
  WRITE_NODE_TYPE("CREATETABLEASSTMT");
2934
2935
0
  WRITE_NODE_FIELD(query);
2936
0
  WRITE_NODE_FIELD(into);
2937
0
  WRITE_ENUM_FIELD(objtype, ObjectType);
2938
0
  WRITE_BOOL_FIELD(is_select_into);
2939
0
  WRITE_BOOL_FIELD(if_not_exists);
2940
0
}
2941
2942
static void
2943
_outRefreshMatViewStmt(StringInfo str, const RefreshMatViewStmt *node)
2944
0
{
2945
0
  WRITE_NODE_TYPE("REFRESHMATVIEWSTMT");
2946
2947
0
  WRITE_BOOL_FIELD(concurrent);
2948
0
  WRITE_BOOL_FIELD(skipData);
2949
0
  WRITE_NODE_FIELD(relation);
2950
0
}
2951
2952
static void
2953
_outCheckPointStmt(StringInfo str, const CheckPointStmt *node)
2954
0
{
2955
0
  WRITE_NODE_TYPE("CHECKPOINTSTMT");
2956
2957
0
}
2958
2959
static void
2960
_outDiscardStmt(StringInfo str, const DiscardStmt *node)
2961
0
{
2962
0
  WRITE_NODE_TYPE("DISCARDSTMT");
2963
2964
0
  WRITE_ENUM_FIELD(target, DiscardMode);
2965
0
}
2966
2967
static void
2968
_outLockStmt(StringInfo str, const LockStmt *node)
2969
0
{
2970
0
  WRITE_NODE_TYPE("LOCKSTMT");
2971
2972
0
  WRITE_NODE_FIELD(relations);
2973
0
  WRITE_INT_FIELD(mode);
2974
0
  WRITE_BOOL_FIELD(nowait);
2975
0
}
2976
2977
static void
2978
_outConstraintsSetStmt(StringInfo str, const ConstraintsSetStmt *node)
2979
0
{
2980
0
  WRITE_NODE_TYPE("CONSTRAINTSSETSTMT");
2981
2982
0
  WRITE_NODE_FIELD(constraints);
2983
0
  WRITE_BOOL_FIELD(deferred);
2984
0
}
2985
2986
static void
2987
_outReindexStmt(StringInfo str, const ReindexStmt *node)
2988
0
{
2989
0
  WRITE_NODE_TYPE("REINDEXSTMT");
2990
2991
0
  WRITE_ENUM_FIELD(kind, ReindexObjectType);
2992
0
  WRITE_NODE_FIELD(relation);
2993
0
  WRITE_STRING_FIELD(name);
2994
0
  WRITE_NODE_FIELD(params);
2995
0
}
2996
2997
static void
2998
_outCreateConversionStmt(StringInfo str, const CreateConversionStmt *node)
2999
0
{
3000
0
  WRITE_NODE_TYPE("CREATECONVERSIONSTMT");
3001
3002
0
  WRITE_NODE_FIELD(conversion_name);
3003
0
  WRITE_STRING_FIELD(for_encoding_name);
3004
0
  WRITE_STRING_FIELD(to_encoding_name);
3005
0
  WRITE_NODE_FIELD(func_name);
3006
0
  WRITE_BOOL_FIELD(def);
3007
0
}
3008
3009
static void
3010
_outCreateCastStmt(StringInfo str, const CreateCastStmt *node)
3011
0
{
3012
0
  WRITE_NODE_TYPE("CREATECASTSTMT");
3013
3014
0
  WRITE_NODE_FIELD(sourcetype);
3015
0
  WRITE_NODE_FIELD(targettype);
3016
0
  WRITE_NODE_FIELD(func);
3017
0
  WRITE_ENUM_FIELD(context, CoercionContext);
3018
0
  WRITE_BOOL_FIELD(inout);
3019
0
}
3020
3021
static void
3022
_outCreateTransformStmt(StringInfo str, const CreateTransformStmt *node)
3023
0
{
3024
0
  WRITE_NODE_TYPE("CREATETRANSFORMSTMT");
3025
3026
0
  WRITE_BOOL_FIELD(replace);
3027
0
  WRITE_NODE_FIELD(type_name);
3028
0
  WRITE_STRING_FIELD(lang);
3029
0
  WRITE_NODE_FIELD(fromsql);
3030
0
  WRITE_NODE_FIELD(tosql);
3031
0
}
3032
3033
static void
3034
_outPrepareStmt(StringInfo str, const PrepareStmt *node)
3035
0
{
3036
0
  WRITE_NODE_TYPE("PREPARESTMT");
3037
3038
0
  WRITE_STRING_FIELD(name);
3039
0
  WRITE_NODE_FIELD(argtypes);
3040
0
  WRITE_NODE_FIELD(query);
3041
0
}
3042
3043
static void
3044
_outExecuteStmt(StringInfo str, const ExecuteStmt *node)
3045
0
{
3046
0
  WRITE_NODE_TYPE("EXECUTESTMT");
3047
3048
0
  WRITE_STRING_FIELD(name);
3049
0
  WRITE_NODE_FIELD(params);
3050
0
}
3051
3052
static void
3053
_outDeallocateStmt(StringInfo str, const DeallocateStmt *node)
3054
0
{
3055
0
  WRITE_NODE_TYPE("DEALLOCATESTMT");
3056
3057
0
  WRITE_STRING_FIELD(name);
3058
0
  WRITE_BOOL_FIELD(isall);
3059
0
  WRITE_LOCATION_FIELD(location);
3060
0
}
3061
3062
static void
3063
_outDropOwnedStmt(StringInfo str, const DropOwnedStmt *node)
3064
0
{
3065
0
  WRITE_NODE_TYPE("DROPOWNEDSTMT");
3066
3067
0
  WRITE_NODE_FIELD(roles);
3068
0
  WRITE_ENUM_FIELD(behavior, DropBehavior);
3069
0
}
3070
3071
static void
3072
_outReassignOwnedStmt(StringInfo str, const ReassignOwnedStmt *node)
3073
0
{
3074
0
  WRITE_NODE_TYPE("REASSIGNOWNEDSTMT");
3075
3076
0
  WRITE_NODE_FIELD(roles);
3077
0
  WRITE_NODE_FIELD(newrole);
3078
0
}
3079
3080
static void
3081
_outAlterTSDictionaryStmt(StringInfo str, const AlterTSDictionaryStmt *node)
3082
0
{
3083
0
  WRITE_NODE_TYPE("ALTERTSDICTIONARYSTMT");
3084
3085
0
  WRITE_NODE_FIELD(dictname);
3086
0
  WRITE_NODE_FIELD(options);
3087
0
}
3088
3089
static void
3090
_outAlterTSConfigurationStmt(StringInfo str, const AlterTSConfigurationStmt *node)
3091
0
{
3092
0
  WRITE_NODE_TYPE("ALTERTSCONFIGURATIONSTMT");
3093
3094
0
  WRITE_ENUM_FIELD(kind, AlterTSConfigType);
3095
0
  WRITE_NODE_FIELD(cfgname);
3096
0
  WRITE_NODE_FIELD(tokentype);
3097
0
  WRITE_NODE_FIELD(dicts);
3098
0
  WRITE_BOOL_FIELD(override);
3099
0
  WRITE_BOOL_FIELD(replace);
3100
0
  WRITE_BOOL_FIELD(missing_ok);
3101
0
}
3102
3103
static void
3104
_outPublicationTable(StringInfo str, const PublicationTable *node)
3105
0
{
3106
0
  WRITE_NODE_TYPE("PUBLICATIONTABLE");
3107
3108
0
  WRITE_NODE_FIELD(relation);
3109
0
  WRITE_NODE_FIELD(whereClause);
3110
0
  WRITE_NODE_FIELD(columns);
3111
0
}
3112
3113
static void
3114
_outPublicationObjSpec(StringInfo str, const PublicationObjSpec *node)
3115
0
{
3116
0
  WRITE_NODE_TYPE("PUBLICATIONOBJSPEC");
3117
3118
0
  WRITE_ENUM_FIELD(pubobjtype, PublicationObjSpecType);
3119
0
  WRITE_STRING_FIELD(name);
3120
0
  WRITE_NODE_FIELD(pubtable);
3121
0
  WRITE_LOCATION_FIELD(location);
3122
0
}
3123
3124
static void
3125
_outCreatePublicationStmt(StringInfo str, const CreatePublicationStmt *node)
3126
0
{
3127
0
  WRITE_NODE_TYPE("CREATEPUBLICATIONSTMT");
3128
3129
0
  WRITE_STRING_FIELD(pubname);
3130
0
  WRITE_NODE_FIELD(options);
3131
0
  WRITE_NODE_FIELD(pubobjects);
3132
0
  WRITE_BOOL_FIELD(for_all_tables);
3133
0
}
3134
3135
static void
3136
_outAlterPublicationStmt(StringInfo str, const AlterPublicationStmt *node)
3137
0
{
3138
0
  WRITE_NODE_TYPE("ALTERPUBLICATIONSTMT");
3139
3140
0
  WRITE_STRING_FIELD(pubname);
3141
0
  WRITE_NODE_FIELD(options);
3142
0
  WRITE_NODE_FIELD(pubobjects);
3143
0
  WRITE_BOOL_FIELD(for_all_tables);
3144
0
  WRITE_ENUM_FIELD(action, AlterPublicationAction);
3145
0
}
3146
3147
static void
3148
_outCreateSubscriptionStmt(StringInfo str, const CreateSubscriptionStmt *node)
3149
0
{
3150
0
  WRITE_NODE_TYPE("CREATESUBSCRIPTIONSTMT");
3151
3152
0
  WRITE_STRING_FIELD(subname);
3153
0
  WRITE_STRING_FIELD(conninfo);
3154
0
  WRITE_NODE_FIELD(publication);
3155
0
  WRITE_NODE_FIELD(options);
3156
0
}
3157
3158
static void
3159
_outAlterSubscriptionStmt(StringInfo str, const AlterSubscriptionStmt *node)
3160
0
{
3161
0
  WRITE_NODE_TYPE("ALTERSUBSCRIPTIONSTMT");
3162
3163
0
  WRITE_ENUM_FIELD(kind, AlterSubscriptionType);
3164
0
  WRITE_STRING_FIELD(subname);
3165
0
  WRITE_STRING_FIELD(conninfo);
3166
0
  WRITE_NODE_FIELD(publication);
3167
0
  WRITE_NODE_FIELD(options);
3168
0
}
3169
3170
static void
3171
_outDropSubscriptionStmt(StringInfo str, const DropSubscriptionStmt *node)
3172
0
{
3173
0
  WRITE_NODE_TYPE("DROPSUBSCRIPTIONSTMT");
3174
3175
0
  WRITE_STRING_FIELD(subname);
3176
0
  WRITE_BOOL_FIELD(missing_ok);
3177
0
  WRITE_ENUM_FIELD(behavior, DropBehavior);
3178
0
}
3179
3180
static void
3181
_outPlannerGlobal(StringInfo str, const PlannerGlobal *node)
3182
0
{
3183
0
  WRITE_NODE_TYPE("PLANNERGLOBAL");
3184
3185
0
  WRITE_NODE_FIELD(subplans);
3186
0
  WRITE_NODE_FIELD(subpaths);
3187
0
  WRITE_BITMAPSET_FIELD(rewindPlanIDs);
3188
0
  WRITE_NODE_FIELD(finalrtable);
3189
0
  WRITE_BITMAPSET_FIELD(allRelids);
3190
0
  WRITE_BITMAPSET_FIELD(prunableRelids);
3191
0
  WRITE_NODE_FIELD(finalrteperminfos);
3192
0
  WRITE_NODE_FIELD(finalrowmarks);
3193
0
  WRITE_NODE_FIELD(resultRelations);
3194
0
  WRITE_NODE_FIELD(appendRelations);
3195
0
  WRITE_NODE_FIELD(partPruneInfos);
3196
0
  WRITE_NODE_FIELD(relationOids);
3197
0
  WRITE_NODE_FIELD(invalItems);
3198
0
  WRITE_NODE_FIELD(paramExecTypes);
3199
0
  WRITE_UINT_FIELD(lastPHId);
3200
0
  WRITE_UINT_FIELD(lastRowMarkId);
3201
0
  WRITE_INT_FIELD(lastPlanNodeId);
3202
0
  WRITE_BOOL_FIELD(transientPlan);
3203
0
  WRITE_BOOL_FIELD(dependsOnRole);
3204
0
  WRITE_BOOL_FIELD(parallelModeOK);
3205
0
  WRITE_BOOL_FIELD(parallelModeNeeded);
3206
0
  WRITE_CHAR_FIELD(maxParallelHazard);
3207
0
}
3208
3209
static void
3210
_outPlannerInfo(StringInfo str, const PlannerInfo *node)
3211
0
{
3212
0
  WRITE_NODE_TYPE("PLANNERINFO");
3213
3214
0
  WRITE_NODE_FIELD(parse);
3215
0
  WRITE_NODE_FIELD(glob);
3216
0
  WRITE_UINT_FIELD(query_level);
3217
0
  WRITE_NODE_FIELD(plan_params);
3218
0
  WRITE_BITMAPSET_FIELD(outer_params);
3219
0
  WRITE_NODE_ARRAY(simple_rel_array, node->simple_rel_array_size);
3220
0
  WRITE_INT_FIELD(simple_rel_array_size);
3221
0
  WRITE_BITMAPSET_FIELD(all_baserels);
3222
0
  WRITE_BITMAPSET_FIELD(outer_join_rels);
3223
0
  WRITE_BITMAPSET_FIELD(all_query_rels);
3224
0
  WRITE_NODE_FIELD(join_rel_list);
3225
0
  WRITE_INT_FIELD(join_cur_level);
3226
0
  WRITE_NODE_FIELD(init_plans);
3227
0
  WRITE_NODE_FIELD(cte_plan_ids);
3228
0
  WRITE_NODE_FIELD(multiexpr_params);
3229
0
  WRITE_NODE_FIELD(join_domains);
3230
0
  WRITE_NODE_FIELD(eq_classes);
3231
0
  WRITE_BOOL_FIELD(ec_merging_done);
3232
0
  WRITE_NODE_FIELD(canon_pathkeys);
3233
0
  WRITE_NODE_FIELD(left_join_clauses);
3234
0
  WRITE_NODE_FIELD(right_join_clauses);
3235
0
  WRITE_NODE_FIELD(full_join_clauses);
3236
0
  WRITE_NODE_FIELD(join_info_list);
3237
0
  WRITE_INT_FIELD(last_rinfo_serial);
3238
0
  WRITE_BITMAPSET_FIELD(all_result_relids);
3239
0
  WRITE_BITMAPSET_FIELD(leaf_result_relids);
3240
0
  WRITE_NODE_FIELD(append_rel_list);
3241
0
  WRITE_NODE_FIELD(row_identity_vars);
3242
0
  WRITE_NODE_FIELD(rowMarks);
3243
0
  WRITE_NODE_FIELD(placeholder_list);
3244
0
  WRITE_NODE_FIELD(fkey_list);
3245
0
  WRITE_NODE_FIELD(query_pathkeys);
3246
0
  WRITE_NODE_FIELD(group_pathkeys);
3247
0
  WRITE_INT_FIELD(num_groupby_pathkeys);
3248
0
  WRITE_NODE_FIELD(window_pathkeys);
3249
0
  WRITE_NODE_FIELD(distinct_pathkeys);
3250
0
  WRITE_NODE_FIELD(sort_pathkeys);
3251
0
  WRITE_NODE_FIELD(setop_pathkeys);
3252
0
  WRITE_NODE_FIELD(processed_groupClause);
3253
0
  WRITE_NODE_FIELD(processed_distinctClause);
3254
0
  WRITE_NODE_FIELD(processed_tlist);
3255
0
  WRITE_NODE_FIELD(update_colnos);
3256
0
  WRITE_NODE_FIELD(minmax_aggs);
3257
0
  WRITE_FLOAT_FIELD(total_table_pages);
3258
0
  WRITE_FLOAT_FIELD(tuple_fraction);
3259
0
  WRITE_FLOAT_FIELD(limit_tuples);
3260
0
  WRITE_UINT_FIELD(qual_security_level);
3261
0
  WRITE_BOOL_FIELD(hasJoinRTEs);
3262
0
  WRITE_BOOL_FIELD(hasLateralRTEs);
3263
0
  WRITE_BOOL_FIELD(hasHavingQual);
3264
0
  WRITE_BOOL_FIELD(hasPseudoConstantQuals);
3265
0
  WRITE_BOOL_FIELD(hasAlternativeSubPlans);
3266
0
  WRITE_BOOL_FIELD(placeholdersFrozen);
3267
0
  WRITE_BOOL_FIELD(hasRecursion);
3268
0
  WRITE_INT_FIELD(group_rtindex);
3269
0
  WRITE_NODE_FIELD(agginfos);
3270
0
  WRITE_NODE_FIELD(aggtransinfos);
3271
0
  WRITE_INT_FIELD(numOrderedAggs);
3272
0
  WRITE_BOOL_FIELD(hasNonPartialAggs);
3273
0
  WRITE_BOOL_FIELD(hasNonSerialAggs);
3274
0
  WRITE_INT_FIELD(wt_param_id);
3275
0
  WRITE_NODE_FIELD(non_recursive_path);
3276
0
  WRITE_BITMAPSET_FIELD(curOuterRels);
3277
0
  WRITE_NODE_FIELD(curOuterParams);
3278
0
  WRITE_BOOL_FIELD(partColsUpdated);
3279
0
  WRITE_NODE_FIELD(partPruneInfos);
3280
0
}
3281
3282
static void
3283
_outRelOptInfo(StringInfo str, const RelOptInfo *node)
3284
0
{
3285
0
  WRITE_NODE_TYPE("RELOPTINFO");
3286
3287
0
  WRITE_ENUM_FIELD(reloptkind, RelOptKind);
3288
0
  WRITE_BITMAPSET_FIELD(relids);
3289
0
  WRITE_FLOAT_FIELD(rows);
3290
0
  WRITE_BOOL_FIELD(consider_startup);
3291
0
  WRITE_BOOL_FIELD(consider_param_startup);
3292
0
  WRITE_BOOL_FIELD(consider_parallel);
3293
0
  WRITE_NODE_FIELD(reltarget);
3294
0
  WRITE_NODE_FIELD(pathlist);
3295
0
  WRITE_NODE_FIELD(ppilist);
3296
0
  WRITE_NODE_FIELD(partial_pathlist);
3297
0
  WRITE_NODE_FIELD(cheapest_startup_path);
3298
0
  WRITE_NODE_FIELD(cheapest_total_path);
3299
0
  WRITE_NODE_FIELD(cheapest_unique_path);
3300
0
  WRITE_NODE_FIELD(cheapest_parameterized_paths);
3301
0
  WRITE_BITMAPSET_FIELD(direct_lateral_relids);
3302
0
  WRITE_BITMAPSET_FIELD(lateral_relids);
3303
0
  WRITE_UINT_FIELD(relid);
3304
0
  WRITE_OID_FIELD(reltablespace);
3305
0
  WRITE_ENUM_FIELD(rtekind, RTEKind);
3306
0
  WRITE_INT_FIELD(min_attr);
3307
0
  WRITE_INT_FIELD(max_attr);
3308
0
  WRITE_BITMAPSET_FIELD(notnullattnums);
3309
0
  WRITE_BITMAPSET_FIELD(nulling_relids);
3310
0
  WRITE_NODE_FIELD(lateral_vars);
3311
0
  WRITE_BITMAPSET_FIELD(lateral_referencers);
3312
0
  WRITE_NODE_FIELD(indexlist);
3313
0
  WRITE_NODE_FIELD(statlist);
3314
0
  WRITE_UINT_FIELD(pages);
3315
0
  WRITE_FLOAT_FIELD(tuples);
3316
0
  WRITE_FLOAT_FIELD(allvisfrac);
3317
0
  WRITE_BITMAPSET_FIELD(eclass_indexes);
3318
0
  WRITE_NODE_FIELD(subroot);
3319
0
  WRITE_NODE_FIELD(subplan_params);
3320
0
  WRITE_INT_FIELD(rel_parallel_workers);
3321
0
  WRITE_UINT_FIELD(amflags);
3322
0
  WRITE_OID_FIELD(serverid);
3323
0
  WRITE_OID_FIELD(userid);
3324
0
  WRITE_BOOL_FIELD(useridiscurrent);
3325
0
  WRITE_NODE_FIELD(unique_for_rels);
3326
0
  WRITE_NODE_FIELD(non_unique_for_rels);
3327
0
  WRITE_NODE_FIELD(baserestrictinfo);
3328
0
  WRITE_FLOAT_FIELD(baserestrictcost.startup);
3329
0
  WRITE_FLOAT_FIELD(baserestrictcost.per_tuple);
3330
0
  WRITE_UINT_FIELD(baserestrict_min_security);
3331
0
  WRITE_NODE_FIELD(joininfo);
3332
0
  WRITE_BOOL_FIELD(has_eclass_joins);
3333
0
  WRITE_BOOL_FIELD(consider_partitionwise_join);
3334
0
  WRITE_BITMAPSET_FIELD(top_parent_relids);
3335
0
  WRITE_INT_FIELD(nparts);
3336
0
  WRITE_BOOL_FIELD(partbounds_merged);
3337
0
  WRITE_NODE_FIELD(partition_qual);
3338
0
  WRITE_BITMAPSET_FIELD(live_parts);
3339
0
  WRITE_BITMAPSET_FIELD(all_partrels);
3340
0
}
3341
3342
static void
3343
_outIndexOptInfo(StringInfo str, const IndexOptInfo *node)
3344
0
{
3345
0
  WRITE_NODE_TYPE("INDEXOPTINFO");
3346
3347
0
  WRITE_OID_FIELD(indexoid);
3348
0
  WRITE_OID_FIELD(reltablespace);
3349
0
  WRITE_UINT_FIELD(pages);
3350
0
  WRITE_FLOAT_FIELD(tuples);
3351
0
  WRITE_INT_FIELD(tree_height);
3352
0
  WRITE_INT_FIELD(ncolumns);
3353
0
  WRITE_INT_FIELD(nkeycolumns);
3354
0
  WRITE_INT_ARRAY(indexkeys, node->ncolumns);
3355
0
  WRITE_OID_ARRAY(indexcollations, node->nkeycolumns);
3356
0
  WRITE_OID_ARRAY(opfamily, node->nkeycolumns);
3357
0
  WRITE_OID_ARRAY(opcintype, node->nkeycolumns);
3358
0
  WRITE_OID_ARRAY(sortopfamily, node->nkeycolumns);
3359
0
  WRITE_BOOL_ARRAY(reverse_sort, node->nkeycolumns);
3360
0
  WRITE_BOOL_ARRAY(nulls_first, node->nkeycolumns);
3361
0
  WRITE_BOOL_ARRAY(canreturn, node->ncolumns);
3362
0
  WRITE_OID_FIELD(relam);
3363
0
  WRITE_NODE_FIELD(indpred);
3364
0
  WRITE_NODE_FIELD(indextlist);
3365
0
  WRITE_NODE_FIELD(indrestrictinfo);
3366
0
  WRITE_BOOL_FIELD(predOK);
3367
0
  WRITE_BOOL_FIELD(unique);
3368
0
  WRITE_BOOL_FIELD(nullsnotdistinct);
3369
0
  WRITE_BOOL_FIELD(immediate);
3370
0
  WRITE_BOOL_FIELD(hypothetical);
3371
0
  WRITE_BOOL_FIELD(amcanorderbyop);
3372
0
  WRITE_BOOL_FIELD(amoptionalkey);
3373
0
  WRITE_BOOL_FIELD(amsearcharray);
3374
0
  WRITE_BOOL_FIELD(amsearchnulls);
3375
0
  WRITE_BOOL_FIELD(amhasgettuple);
3376
0
  WRITE_BOOL_FIELD(amhasgetbitmap);
3377
0
  WRITE_BOOL_FIELD(amcanparallel);
3378
0
  WRITE_BOOL_FIELD(amcanmarkpos);
3379
0
}
3380
3381
static void
3382
_outStatisticExtInfo(StringInfo str, const StatisticExtInfo *node)
3383
0
{
3384
0
  WRITE_NODE_TYPE("STATISTICEXTINFO");
3385
3386
0
  WRITE_OID_FIELD(statOid);
3387
0
  WRITE_BOOL_FIELD(inherit);
3388
0
  WRITE_CHAR_FIELD(kind);
3389
0
  WRITE_BITMAPSET_FIELD(keys);
3390
0
  WRITE_NODE_FIELD(exprs);
3391
0
}
3392
3393
static void
3394
_outJoinDomain(StringInfo str, const JoinDomain *node)
3395
0
{
3396
0
  WRITE_NODE_TYPE("JOINDOMAIN");
3397
3398
0
  WRITE_BITMAPSET_FIELD(jd_relids);
3399
0
}
3400
3401
static void
3402
_outEquivalenceMember(StringInfo str, const EquivalenceMember *node)
3403
0
{
3404
0
  WRITE_NODE_TYPE("EQUIVALENCEMEMBER");
3405
3406
0
  WRITE_NODE_FIELD(em_expr);
3407
0
  WRITE_BITMAPSET_FIELD(em_relids);
3408
0
  WRITE_BOOL_FIELD(em_is_const);
3409
0
  WRITE_BOOL_FIELD(em_is_child);
3410
0
  WRITE_OID_FIELD(em_datatype);
3411
0
  WRITE_NODE_FIELD(em_jdomain);
3412
0
}
3413
3414
static void
3415
_outPathKey(StringInfo str, const PathKey *node)
3416
0
{
3417
0
  WRITE_NODE_TYPE("PATHKEY");
3418
3419
0
  WRITE_NODE_FIELD(pk_eclass);
3420
0
  WRITE_OID_FIELD(pk_opfamily);
3421
0
  WRITE_ENUM_FIELD(pk_cmptype, CompareType);
3422
0
  WRITE_BOOL_FIELD(pk_nulls_first);
3423
0
}
3424
3425
static void
3426
_outGroupByOrdering(StringInfo str, const GroupByOrdering *node)
3427
0
{
3428
0
  WRITE_NODE_TYPE("GROUPBYORDERING");
3429
3430
0
  WRITE_NODE_FIELD(pathkeys);
3431
0
  WRITE_NODE_FIELD(clauses);
3432
0
}
3433
3434
static void
3435
_outPathTarget(StringInfo str, const PathTarget *node)
3436
0
{
3437
0
  WRITE_NODE_TYPE("PATHTARGET");
3438
3439
0
  WRITE_NODE_FIELD(exprs);
3440
0
  WRITE_INDEX_ARRAY(sortgrouprefs, list_length(node->exprs));
3441
0
  WRITE_FLOAT_FIELD(cost.startup);
3442
0
  WRITE_FLOAT_FIELD(cost.per_tuple);
3443
0
  WRITE_INT_FIELD(width);
3444
0
  WRITE_ENUM_FIELD(has_volatile_expr, VolatileFunctionStatus);
3445
0
}
3446
3447
static void
3448
_outParamPathInfo(StringInfo str, const ParamPathInfo *node)
3449
0
{
3450
0
  WRITE_NODE_TYPE("PARAMPATHINFO");
3451
3452
0
  WRITE_BITMAPSET_FIELD(ppi_req_outer);
3453
0
  WRITE_FLOAT_FIELD(ppi_rows);
3454
0
  WRITE_NODE_FIELD(ppi_clauses);
3455
0
  WRITE_BITMAPSET_FIELD(ppi_serials);
3456
0
}
3457
3458
static void
3459
_outPath(StringInfo str, const Path *node)
3460
0
{
3461
0
  WRITE_NODE_TYPE("PATH");
3462
3463
0
  WRITE_ENUM_FIELD(pathtype, NodeTag);
3464
0
  appendStringInfoString(str, " :parent_relids ");
3465
0
  outBitmapset(str, node->parent->relids);
3466
0
  if (node->pathtarget != node->parent->reltarget)
3467
0
    WRITE_NODE_FIELD(pathtarget);
3468
0
  appendStringInfoString(str, " :required_outer ");
3469
0
  if (node->param_info)
3470
0
    outBitmapset(str, node->param_info->ppi_req_outer);
3471
0
  else
3472
0
    outBitmapset(str, NULL);
3473
0
  WRITE_BOOL_FIELD(parallel_aware);
3474
0
  WRITE_BOOL_FIELD(parallel_safe);
3475
0
  WRITE_INT_FIELD(parallel_workers);
3476
0
  WRITE_FLOAT_FIELD(rows);
3477
0
  WRITE_INT_FIELD(disabled_nodes);
3478
0
  WRITE_FLOAT_FIELD(startup_cost);
3479
0
  WRITE_FLOAT_FIELD(total_cost);
3480
0
  WRITE_NODE_FIELD(pathkeys);
3481
0
}
3482
3483
static void
3484
_outIndexPath(StringInfo str, const IndexPath *node)
3485
0
{
3486
0
  WRITE_NODE_TYPE("INDEXPATH");
3487
3488
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3489
0
  appendStringInfoString(str, " :parent_relids ");
3490
0
  outBitmapset(str, node->path.parent->relids);
3491
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3492
0
    WRITE_NODE_FIELD(path.pathtarget);
3493
0
  appendStringInfoString(str, " :required_outer ");
3494
0
  if (node->path.param_info)
3495
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3496
0
  else
3497
0
    outBitmapset(str, NULL);
3498
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3499
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3500
0
  WRITE_INT_FIELD(path.parallel_workers);
3501
0
  WRITE_FLOAT_FIELD(path.rows);
3502
0
  WRITE_INT_FIELD(path.disabled_nodes);
3503
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3504
0
  WRITE_FLOAT_FIELD(path.total_cost);
3505
0
  WRITE_NODE_FIELD(path.pathkeys);
3506
0
  WRITE_NODE_FIELD(indexinfo);
3507
0
  WRITE_NODE_FIELD(indexclauses);
3508
0
  WRITE_NODE_FIELD(indexorderbys);
3509
0
  WRITE_NODE_FIELD(indexorderbycols);
3510
0
  WRITE_ENUM_FIELD(indexscandir, ScanDirection);
3511
0
  WRITE_FLOAT_FIELD(indextotalcost);
3512
0
  WRITE_FLOAT_FIELD(indexselectivity);
3513
0
}
3514
3515
static void
3516
_outIndexClause(StringInfo str, const IndexClause *node)
3517
0
{
3518
0
  WRITE_NODE_TYPE("INDEXCLAUSE");
3519
3520
0
  WRITE_NODE_FIELD(rinfo);
3521
0
  WRITE_NODE_FIELD(indexquals);
3522
0
  WRITE_BOOL_FIELD(lossy);
3523
0
  WRITE_INT_FIELD(indexcol);
3524
0
  WRITE_NODE_FIELD(indexcols);
3525
0
}
3526
3527
static void
3528
_outBitmapHeapPath(StringInfo str, const BitmapHeapPath *node)
3529
0
{
3530
0
  WRITE_NODE_TYPE("BITMAPHEAPPATH");
3531
3532
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3533
0
  appendStringInfoString(str, " :parent_relids ");
3534
0
  outBitmapset(str, node->path.parent->relids);
3535
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3536
0
    WRITE_NODE_FIELD(path.pathtarget);
3537
0
  appendStringInfoString(str, " :required_outer ");
3538
0
  if (node->path.param_info)
3539
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3540
0
  else
3541
0
    outBitmapset(str, NULL);
3542
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3543
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3544
0
  WRITE_INT_FIELD(path.parallel_workers);
3545
0
  WRITE_FLOAT_FIELD(path.rows);
3546
0
  WRITE_INT_FIELD(path.disabled_nodes);
3547
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3548
0
  WRITE_FLOAT_FIELD(path.total_cost);
3549
0
  WRITE_NODE_FIELD(path.pathkeys);
3550
0
  WRITE_NODE_FIELD(bitmapqual);
3551
0
}
3552
3553
static void
3554
_outBitmapAndPath(StringInfo str, const BitmapAndPath *node)
3555
0
{
3556
0
  WRITE_NODE_TYPE("BITMAPANDPATH");
3557
3558
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3559
0
  appendStringInfoString(str, " :parent_relids ");
3560
0
  outBitmapset(str, node->path.parent->relids);
3561
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3562
0
    WRITE_NODE_FIELD(path.pathtarget);
3563
0
  appendStringInfoString(str, " :required_outer ");
3564
0
  if (node->path.param_info)
3565
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3566
0
  else
3567
0
    outBitmapset(str, NULL);
3568
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3569
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3570
0
  WRITE_INT_FIELD(path.parallel_workers);
3571
0
  WRITE_FLOAT_FIELD(path.rows);
3572
0
  WRITE_INT_FIELD(path.disabled_nodes);
3573
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3574
0
  WRITE_FLOAT_FIELD(path.total_cost);
3575
0
  WRITE_NODE_FIELD(path.pathkeys);
3576
0
  WRITE_NODE_FIELD(bitmapquals);
3577
0
  WRITE_FLOAT_FIELD(bitmapselectivity);
3578
0
}
3579
3580
static void
3581
_outBitmapOrPath(StringInfo str, const BitmapOrPath *node)
3582
0
{
3583
0
  WRITE_NODE_TYPE("BITMAPORPATH");
3584
3585
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3586
0
  appendStringInfoString(str, " :parent_relids ");
3587
0
  outBitmapset(str, node->path.parent->relids);
3588
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3589
0
    WRITE_NODE_FIELD(path.pathtarget);
3590
0
  appendStringInfoString(str, " :required_outer ");
3591
0
  if (node->path.param_info)
3592
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3593
0
  else
3594
0
    outBitmapset(str, NULL);
3595
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3596
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3597
0
  WRITE_INT_FIELD(path.parallel_workers);
3598
0
  WRITE_FLOAT_FIELD(path.rows);
3599
0
  WRITE_INT_FIELD(path.disabled_nodes);
3600
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3601
0
  WRITE_FLOAT_FIELD(path.total_cost);
3602
0
  WRITE_NODE_FIELD(path.pathkeys);
3603
0
  WRITE_NODE_FIELD(bitmapquals);
3604
0
  WRITE_FLOAT_FIELD(bitmapselectivity);
3605
0
}
3606
3607
static void
3608
_outTidPath(StringInfo str, const TidPath *node)
3609
0
{
3610
0
  WRITE_NODE_TYPE("TIDPATH");
3611
3612
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3613
0
  appendStringInfoString(str, " :parent_relids ");
3614
0
  outBitmapset(str, node->path.parent->relids);
3615
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3616
0
    WRITE_NODE_FIELD(path.pathtarget);
3617
0
  appendStringInfoString(str, " :required_outer ");
3618
0
  if (node->path.param_info)
3619
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3620
0
  else
3621
0
    outBitmapset(str, NULL);
3622
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3623
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3624
0
  WRITE_INT_FIELD(path.parallel_workers);
3625
0
  WRITE_FLOAT_FIELD(path.rows);
3626
0
  WRITE_INT_FIELD(path.disabled_nodes);
3627
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3628
0
  WRITE_FLOAT_FIELD(path.total_cost);
3629
0
  WRITE_NODE_FIELD(path.pathkeys);
3630
0
  WRITE_NODE_FIELD(tidquals);
3631
0
}
3632
3633
static void
3634
_outTidRangePath(StringInfo str, const TidRangePath *node)
3635
0
{
3636
0
  WRITE_NODE_TYPE("TIDRANGEPATH");
3637
3638
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3639
0
  appendStringInfoString(str, " :parent_relids ");
3640
0
  outBitmapset(str, node->path.parent->relids);
3641
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3642
0
    WRITE_NODE_FIELD(path.pathtarget);
3643
0
  appendStringInfoString(str, " :required_outer ");
3644
0
  if (node->path.param_info)
3645
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3646
0
  else
3647
0
    outBitmapset(str, NULL);
3648
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3649
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3650
0
  WRITE_INT_FIELD(path.parallel_workers);
3651
0
  WRITE_FLOAT_FIELD(path.rows);
3652
0
  WRITE_INT_FIELD(path.disabled_nodes);
3653
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3654
0
  WRITE_FLOAT_FIELD(path.total_cost);
3655
0
  WRITE_NODE_FIELD(path.pathkeys);
3656
0
  WRITE_NODE_FIELD(tidrangequals);
3657
0
}
3658
3659
static void
3660
_outSubqueryScanPath(StringInfo str, const SubqueryScanPath *node)
3661
0
{
3662
0
  WRITE_NODE_TYPE("SUBQUERYSCANPATH");
3663
3664
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3665
0
  appendStringInfoString(str, " :parent_relids ");
3666
0
  outBitmapset(str, node->path.parent->relids);
3667
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3668
0
    WRITE_NODE_FIELD(path.pathtarget);
3669
0
  appendStringInfoString(str, " :required_outer ");
3670
0
  if (node->path.param_info)
3671
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3672
0
  else
3673
0
    outBitmapset(str, NULL);
3674
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3675
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3676
0
  WRITE_INT_FIELD(path.parallel_workers);
3677
0
  WRITE_FLOAT_FIELD(path.rows);
3678
0
  WRITE_INT_FIELD(path.disabled_nodes);
3679
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3680
0
  WRITE_FLOAT_FIELD(path.total_cost);
3681
0
  WRITE_NODE_FIELD(path.pathkeys);
3682
0
  WRITE_NODE_FIELD(subpath);
3683
0
}
3684
3685
static void
3686
_outForeignPath(StringInfo str, const ForeignPath *node)
3687
0
{
3688
0
  WRITE_NODE_TYPE("FOREIGNPATH");
3689
3690
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3691
0
  appendStringInfoString(str, " :parent_relids ");
3692
0
  outBitmapset(str, node->path.parent->relids);
3693
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3694
0
    WRITE_NODE_FIELD(path.pathtarget);
3695
0
  appendStringInfoString(str, " :required_outer ");
3696
0
  if (node->path.param_info)
3697
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3698
0
  else
3699
0
    outBitmapset(str, NULL);
3700
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3701
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3702
0
  WRITE_INT_FIELD(path.parallel_workers);
3703
0
  WRITE_FLOAT_FIELD(path.rows);
3704
0
  WRITE_INT_FIELD(path.disabled_nodes);
3705
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3706
0
  WRITE_FLOAT_FIELD(path.total_cost);
3707
0
  WRITE_NODE_FIELD(path.pathkeys);
3708
0
  WRITE_NODE_FIELD(fdw_outerpath);
3709
0
  WRITE_NODE_FIELD(fdw_restrictinfo);
3710
0
  WRITE_NODE_FIELD(fdw_private);
3711
0
}
3712
3713
static void
3714
_outCustomPath(StringInfo str, const CustomPath *node)
3715
0
{
3716
0
  WRITE_NODE_TYPE("CUSTOMPATH");
3717
3718
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3719
0
  appendStringInfoString(str, " :parent_relids ");
3720
0
  outBitmapset(str, node->path.parent->relids);
3721
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3722
0
    WRITE_NODE_FIELD(path.pathtarget);
3723
0
  appendStringInfoString(str, " :required_outer ");
3724
0
  if (node->path.param_info)
3725
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3726
0
  else
3727
0
    outBitmapset(str, NULL);
3728
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3729
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3730
0
  WRITE_INT_FIELD(path.parallel_workers);
3731
0
  WRITE_FLOAT_FIELD(path.rows);
3732
0
  WRITE_INT_FIELD(path.disabled_nodes);
3733
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3734
0
  WRITE_FLOAT_FIELD(path.total_cost);
3735
0
  WRITE_NODE_FIELD(path.pathkeys);
3736
0
  WRITE_UINT_FIELD(flags);
3737
0
  WRITE_NODE_FIELD(custom_paths);
3738
0
  WRITE_NODE_FIELD(custom_restrictinfo);
3739
0
  WRITE_NODE_FIELD(custom_private);
3740
3741
  /* CustomName is a key to lookup CustomScanMethods */
3742
0
  appendStringInfoString(str, " :methods ");
3743
0
  outToken(str, node->methods->CustomName);
3744
0
}
3745
3746
static void
3747
_outAppendPath(StringInfo str, const AppendPath *node)
3748
0
{
3749
0
  WRITE_NODE_TYPE("APPENDPATH");
3750
3751
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3752
0
  appendStringInfoString(str, " :parent_relids ");
3753
0
  outBitmapset(str, node->path.parent->relids);
3754
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3755
0
    WRITE_NODE_FIELD(path.pathtarget);
3756
0
  appendStringInfoString(str, " :required_outer ");
3757
0
  if (node->path.param_info)
3758
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3759
0
  else
3760
0
    outBitmapset(str, NULL);
3761
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3762
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3763
0
  WRITE_INT_FIELD(path.parallel_workers);
3764
0
  WRITE_FLOAT_FIELD(path.rows);
3765
0
  WRITE_INT_FIELD(path.disabled_nodes);
3766
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3767
0
  WRITE_FLOAT_FIELD(path.total_cost);
3768
0
  WRITE_NODE_FIELD(path.pathkeys);
3769
0
  WRITE_NODE_FIELD(subpaths);
3770
0
  WRITE_INT_FIELD(first_partial_path);
3771
0
  WRITE_FLOAT_FIELD(limit_tuples);
3772
0
}
3773
3774
static void
3775
_outMergeAppendPath(StringInfo str, const MergeAppendPath *node)
3776
0
{
3777
0
  WRITE_NODE_TYPE("MERGEAPPENDPATH");
3778
3779
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3780
0
  appendStringInfoString(str, " :parent_relids ");
3781
0
  outBitmapset(str, node->path.parent->relids);
3782
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3783
0
    WRITE_NODE_FIELD(path.pathtarget);
3784
0
  appendStringInfoString(str, " :required_outer ");
3785
0
  if (node->path.param_info)
3786
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3787
0
  else
3788
0
    outBitmapset(str, NULL);
3789
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3790
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3791
0
  WRITE_INT_FIELD(path.parallel_workers);
3792
0
  WRITE_FLOAT_FIELD(path.rows);
3793
0
  WRITE_INT_FIELD(path.disabled_nodes);
3794
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3795
0
  WRITE_FLOAT_FIELD(path.total_cost);
3796
0
  WRITE_NODE_FIELD(path.pathkeys);
3797
0
  WRITE_NODE_FIELD(subpaths);
3798
0
  WRITE_FLOAT_FIELD(limit_tuples);
3799
0
}
3800
3801
static void
3802
_outGroupResultPath(StringInfo str, const GroupResultPath *node)
3803
0
{
3804
0
  WRITE_NODE_TYPE("GROUPRESULTPATH");
3805
3806
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3807
0
  appendStringInfoString(str, " :parent_relids ");
3808
0
  outBitmapset(str, node->path.parent->relids);
3809
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3810
0
    WRITE_NODE_FIELD(path.pathtarget);
3811
0
  appendStringInfoString(str, " :required_outer ");
3812
0
  if (node->path.param_info)
3813
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3814
0
  else
3815
0
    outBitmapset(str, NULL);
3816
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3817
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3818
0
  WRITE_INT_FIELD(path.parallel_workers);
3819
0
  WRITE_FLOAT_FIELD(path.rows);
3820
0
  WRITE_INT_FIELD(path.disabled_nodes);
3821
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3822
0
  WRITE_FLOAT_FIELD(path.total_cost);
3823
0
  WRITE_NODE_FIELD(path.pathkeys);
3824
0
  WRITE_NODE_FIELD(quals);
3825
0
}
3826
3827
static void
3828
_outMaterialPath(StringInfo str, const MaterialPath *node)
3829
0
{
3830
0
  WRITE_NODE_TYPE("MATERIALPATH");
3831
3832
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3833
0
  appendStringInfoString(str, " :parent_relids ");
3834
0
  outBitmapset(str, node->path.parent->relids);
3835
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3836
0
    WRITE_NODE_FIELD(path.pathtarget);
3837
0
  appendStringInfoString(str, " :required_outer ");
3838
0
  if (node->path.param_info)
3839
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3840
0
  else
3841
0
    outBitmapset(str, NULL);
3842
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3843
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3844
0
  WRITE_INT_FIELD(path.parallel_workers);
3845
0
  WRITE_FLOAT_FIELD(path.rows);
3846
0
  WRITE_INT_FIELD(path.disabled_nodes);
3847
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3848
0
  WRITE_FLOAT_FIELD(path.total_cost);
3849
0
  WRITE_NODE_FIELD(path.pathkeys);
3850
0
  WRITE_NODE_FIELD(subpath);
3851
0
}
3852
3853
static void
3854
_outMemoizePath(StringInfo str, const MemoizePath *node)
3855
0
{
3856
0
  WRITE_NODE_TYPE("MEMOIZEPATH");
3857
3858
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3859
0
  appendStringInfoString(str, " :parent_relids ");
3860
0
  outBitmapset(str, node->path.parent->relids);
3861
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3862
0
    WRITE_NODE_FIELD(path.pathtarget);
3863
0
  appendStringInfoString(str, " :required_outer ");
3864
0
  if (node->path.param_info)
3865
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3866
0
  else
3867
0
    outBitmapset(str, NULL);
3868
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3869
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3870
0
  WRITE_INT_FIELD(path.parallel_workers);
3871
0
  WRITE_FLOAT_FIELD(path.rows);
3872
0
  WRITE_INT_FIELD(path.disabled_nodes);
3873
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3874
0
  WRITE_FLOAT_FIELD(path.total_cost);
3875
0
  WRITE_NODE_FIELD(path.pathkeys);
3876
0
  WRITE_NODE_FIELD(subpath);
3877
0
  WRITE_NODE_FIELD(hash_operators);
3878
0
  WRITE_NODE_FIELD(param_exprs);
3879
0
  WRITE_BOOL_FIELD(singlerow);
3880
0
  WRITE_BOOL_FIELD(binary_mode);
3881
0
  WRITE_FLOAT_FIELD(calls);
3882
0
  WRITE_UINT_FIELD(est_entries);
3883
0
}
3884
3885
static void
3886
_outUniquePath(StringInfo str, const UniquePath *node)
3887
0
{
3888
0
  WRITE_NODE_TYPE("UNIQUEPATH");
3889
3890
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3891
0
  appendStringInfoString(str, " :parent_relids ");
3892
0
  outBitmapset(str, node->path.parent->relids);
3893
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3894
0
    WRITE_NODE_FIELD(path.pathtarget);
3895
0
  appendStringInfoString(str, " :required_outer ");
3896
0
  if (node->path.param_info)
3897
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3898
0
  else
3899
0
    outBitmapset(str, NULL);
3900
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3901
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3902
0
  WRITE_INT_FIELD(path.parallel_workers);
3903
0
  WRITE_FLOAT_FIELD(path.rows);
3904
0
  WRITE_INT_FIELD(path.disabled_nodes);
3905
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3906
0
  WRITE_FLOAT_FIELD(path.total_cost);
3907
0
  WRITE_NODE_FIELD(path.pathkeys);
3908
0
  WRITE_NODE_FIELD(subpath);
3909
0
  WRITE_ENUM_FIELD(umethod, UniquePathMethod);
3910
0
  WRITE_NODE_FIELD(in_operators);
3911
0
  WRITE_NODE_FIELD(uniq_exprs);
3912
0
}
3913
3914
static void
3915
_outGatherPath(StringInfo str, const GatherPath *node)
3916
0
{
3917
0
  WRITE_NODE_TYPE("GATHERPATH");
3918
3919
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3920
0
  appendStringInfoString(str, " :parent_relids ");
3921
0
  outBitmapset(str, node->path.parent->relids);
3922
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3923
0
    WRITE_NODE_FIELD(path.pathtarget);
3924
0
  appendStringInfoString(str, " :required_outer ");
3925
0
  if (node->path.param_info)
3926
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3927
0
  else
3928
0
    outBitmapset(str, NULL);
3929
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3930
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3931
0
  WRITE_INT_FIELD(path.parallel_workers);
3932
0
  WRITE_FLOAT_FIELD(path.rows);
3933
0
  WRITE_INT_FIELD(path.disabled_nodes);
3934
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3935
0
  WRITE_FLOAT_FIELD(path.total_cost);
3936
0
  WRITE_NODE_FIELD(path.pathkeys);
3937
0
  WRITE_NODE_FIELD(subpath);
3938
0
  WRITE_BOOL_FIELD(single_copy);
3939
0
  WRITE_INT_FIELD(num_workers);
3940
0
}
3941
3942
static void
3943
_outGatherMergePath(StringInfo str, const GatherMergePath *node)
3944
0
{
3945
0
  WRITE_NODE_TYPE("GATHERMERGEPATH");
3946
3947
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
3948
0
  appendStringInfoString(str, " :parent_relids ");
3949
0
  outBitmapset(str, node->path.parent->relids);
3950
0
  if (node->path.pathtarget != node->path.parent->reltarget)
3951
0
    WRITE_NODE_FIELD(path.pathtarget);
3952
0
  appendStringInfoString(str, " :required_outer ");
3953
0
  if (node->path.param_info)
3954
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
3955
0
  else
3956
0
    outBitmapset(str, NULL);
3957
0
  WRITE_BOOL_FIELD(path.parallel_aware);
3958
0
  WRITE_BOOL_FIELD(path.parallel_safe);
3959
0
  WRITE_INT_FIELD(path.parallel_workers);
3960
0
  WRITE_FLOAT_FIELD(path.rows);
3961
0
  WRITE_INT_FIELD(path.disabled_nodes);
3962
0
  WRITE_FLOAT_FIELD(path.startup_cost);
3963
0
  WRITE_FLOAT_FIELD(path.total_cost);
3964
0
  WRITE_NODE_FIELD(path.pathkeys);
3965
0
  WRITE_NODE_FIELD(subpath);
3966
0
  WRITE_INT_FIELD(num_workers);
3967
0
}
3968
3969
static void
3970
_outNestPath(StringInfo str, const NestPath *node)
3971
0
{
3972
0
  WRITE_NODE_TYPE("NESTPATH");
3973
3974
0
  WRITE_ENUM_FIELD(jpath.path.pathtype, NodeTag);
3975
0
  appendStringInfoString(str, " :parent_relids ");
3976
0
  outBitmapset(str, node->jpath.path.parent->relids);
3977
0
  if (node->jpath.path.pathtarget != node->jpath.path.parent->reltarget)
3978
0
    WRITE_NODE_FIELD(jpath.path.pathtarget);
3979
0
  appendStringInfoString(str, " :required_outer ");
3980
0
  if (node->jpath.path.param_info)
3981
0
    outBitmapset(str, node->jpath.path.param_info->ppi_req_outer);
3982
0
  else
3983
0
    outBitmapset(str, NULL);
3984
0
  WRITE_BOOL_FIELD(jpath.path.parallel_aware);
3985
0
  WRITE_BOOL_FIELD(jpath.path.parallel_safe);
3986
0
  WRITE_INT_FIELD(jpath.path.parallel_workers);
3987
0
  WRITE_FLOAT_FIELD(jpath.path.rows);
3988
0
  WRITE_INT_FIELD(jpath.path.disabled_nodes);
3989
0
  WRITE_FLOAT_FIELD(jpath.path.startup_cost);
3990
0
  WRITE_FLOAT_FIELD(jpath.path.total_cost);
3991
0
  WRITE_NODE_FIELD(jpath.path.pathkeys);
3992
0
  WRITE_ENUM_FIELD(jpath.jointype, JoinType);
3993
0
  WRITE_BOOL_FIELD(jpath.inner_unique);
3994
0
  WRITE_NODE_FIELD(jpath.outerjoinpath);
3995
0
  WRITE_NODE_FIELD(jpath.innerjoinpath);
3996
0
  WRITE_NODE_FIELD(jpath.joinrestrictinfo);
3997
0
}
3998
3999
static void
4000
_outMergePath(StringInfo str, const MergePath *node)
4001
0
{
4002
0
  WRITE_NODE_TYPE("MERGEPATH");
4003
4004
0
  WRITE_ENUM_FIELD(jpath.path.pathtype, NodeTag);
4005
0
  appendStringInfoString(str, " :parent_relids ");
4006
0
  outBitmapset(str, node->jpath.path.parent->relids);
4007
0
  if (node->jpath.path.pathtarget != node->jpath.path.parent->reltarget)
4008
0
    WRITE_NODE_FIELD(jpath.path.pathtarget);
4009
0
  appendStringInfoString(str, " :required_outer ");
4010
0
  if (node->jpath.path.param_info)
4011
0
    outBitmapset(str, node->jpath.path.param_info->ppi_req_outer);
4012
0
  else
4013
0
    outBitmapset(str, NULL);
4014
0
  WRITE_BOOL_FIELD(jpath.path.parallel_aware);
4015
0
  WRITE_BOOL_FIELD(jpath.path.parallel_safe);
4016
0
  WRITE_INT_FIELD(jpath.path.parallel_workers);
4017
0
  WRITE_FLOAT_FIELD(jpath.path.rows);
4018
0
  WRITE_INT_FIELD(jpath.path.disabled_nodes);
4019
0
  WRITE_FLOAT_FIELD(jpath.path.startup_cost);
4020
0
  WRITE_FLOAT_FIELD(jpath.path.total_cost);
4021
0
  WRITE_NODE_FIELD(jpath.path.pathkeys);
4022
0
  WRITE_ENUM_FIELD(jpath.jointype, JoinType);
4023
0
  WRITE_BOOL_FIELD(jpath.inner_unique);
4024
0
  WRITE_NODE_FIELD(jpath.outerjoinpath);
4025
0
  WRITE_NODE_FIELD(jpath.innerjoinpath);
4026
0
  WRITE_NODE_FIELD(jpath.joinrestrictinfo);
4027
0
  WRITE_NODE_FIELD(path_mergeclauses);
4028
0
  WRITE_NODE_FIELD(outersortkeys);
4029
0
  WRITE_NODE_FIELD(innersortkeys);
4030
0
  WRITE_INT_FIELD(outer_presorted_keys);
4031
0
  WRITE_BOOL_FIELD(skip_mark_restore);
4032
0
  WRITE_BOOL_FIELD(materialize_inner);
4033
0
}
4034
4035
static void
4036
_outHashPath(StringInfo str, const HashPath *node)
4037
0
{
4038
0
  WRITE_NODE_TYPE("HASHPATH");
4039
4040
0
  WRITE_ENUM_FIELD(jpath.path.pathtype, NodeTag);
4041
0
  appendStringInfoString(str, " :parent_relids ");
4042
0
  outBitmapset(str, node->jpath.path.parent->relids);
4043
0
  if (node->jpath.path.pathtarget != node->jpath.path.parent->reltarget)
4044
0
    WRITE_NODE_FIELD(jpath.path.pathtarget);
4045
0
  appendStringInfoString(str, " :required_outer ");
4046
0
  if (node->jpath.path.param_info)
4047
0
    outBitmapset(str, node->jpath.path.param_info->ppi_req_outer);
4048
0
  else
4049
0
    outBitmapset(str, NULL);
4050
0
  WRITE_BOOL_FIELD(jpath.path.parallel_aware);
4051
0
  WRITE_BOOL_FIELD(jpath.path.parallel_safe);
4052
0
  WRITE_INT_FIELD(jpath.path.parallel_workers);
4053
0
  WRITE_FLOAT_FIELD(jpath.path.rows);
4054
0
  WRITE_INT_FIELD(jpath.path.disabled_nodes);
4055
0
  WRITE_FLOAT_FIELD(jpath.path.startup_cost);
4056
0
  WRITE_FLOAT_FIELD(jpath.path.total_cost);
4057
0
  WRITE_NODE_FIELD(jpath.path.pathkeys);
4058
0
  WRITE_ENUM_FIELD(jpath.jointype, JoinType);
4059
0
  WRITE_BOOL_FIELD(jpath.inner_unique);
4060
0
  WRITE_NODE_FIELD(jpath.outerjoinpath);
4061
0
  WRITE_NODE_FIELD(jpath.innerjoinpath);
4062
0
  WRITE_NODE_FIELD(jpath.joinrestrictinfo);
4063
0
  WRITE_NODE_FIELD(path_hashclauses);
4064
0
  WRITE_INT_FIELD(num_batches);
4065
0
  WRITE_FLOAT_FIELD(inner_rows_total);
4066
0
}
4067
4068
static void
4069
_outProjectionPath(StringInfo str, const ProjectionPath *node)
4070
0
{
4071
0
  WRITE_NODE_TYPE("PROJECTIONPATH");
4072
4073
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
4074
0
  appendStringInfoString(str, " :parent_relids ");
4075
0
  outBitmapset(str, node->path.parent->relids);
4076
0
  if (node->path.pathtarget != node->path.parent->reltarget)
4077
0
    WRITE_NODE_FIELD(path.pathtarget);
4078
0
  appendStringInfoString(str, " :required_outer ");
4079
0
  if (node->path.param_info)
4080
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
4081
0
  else
4082
0
    outBitmapset(str, NULL);
4083
0
  WRITE_BOOL_FIELD(path.parallel_aware);
4084
0
  WRITE_BOOL_FIELD(path.parallel_safe);
4085
0
  WRITE_INT_FIELD(path.parallel_workers);
4086
0
  WRITE_FLOAT_FIELD(path.rows);
4087
0
  WRITE_INT_FIELD(path.disabled_nodes);
4088
0
  WRITE_FLOAT_FIELD(path.startup_cost);
4089
0
  WRITE_FLOAT_FIELD(path.total_cost);
4090
0
  WRITE_NODE_FIELD(path.pathkeys);
4091
0
  WRITE_NODE_FIELD(subpath);
4092
0
  WRITE_BOOL_FIELD(dummypp);
4093
0
}
4094
4095
static void
4096
_outProjectSetPath(StringInfo str, const ProjectSetPath *node)
4097
0
{
4098
0
  WRITE_NODE_TYPE("PROJECTSETPATH");
4099
4100
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
4101
0
  appendStringInfoString(str, " :parent_relids ");
4102
0
  outBitmapset(str, node->path.parent->relids);
4103
0
  if (node->path.pathtarget != node->path.parent->reltarget)
4104
0
    WRITE_NODE_FIELD(path.pathtarget);
4105
0
  appendStringInfoString(str, " :required_outer ");
4106
0
  if (node->path.param_info)
4107
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
4108
0
  else
4109
0
    outBitmapset(str, NULL);
4110
0
  WRITE_BOOL_FIELD(path.parallel_aware);
4111
0
  WRITE_BOOL_FIELD(path.parallel_safe);
4112
0
  WRITE_INT_FIELD(path.parallel_workers);
4113
0
  WRITE_FLOAT_FIELD(path.rows);
4114
0
  WRITE_INT_FIELD(path.disabled_nodes);
4115
0
  WRITE_FLOAT_FIELD(path.startup_cost);
4116
0
  WRITE_FLOAT_FIELD(path.total_cost);
4117
0
  WRITE_NODE_FIELD(path.pathkeys);
4118
0
  WRITE_NODE_FIELD(subpath);
4119
0
}
4120
4121
static void
4122
_outSortPath(StringInfo str, const SortPath *node)
4123
0
{
4124
0
  WRITE_NODE_TYPE("SORTPATH");
4125
4126
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
4127
0
  appendStringInfoString(str, " :parent_relids ");
4128
0
  outBitmapset(str, node->path.parent->relids);
4129
0
  if (node->path.pathtarget != node->path.parent->reltarget)
4130
0
    WRITE_NODE_FIELD(path.pathtarget);
4131
0
  appendStringInfoString(str, " :required_outer ");
4132
0
  if (node->path.param_info)
4133
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
4134
0
  else
4135
0
    outBitmapset(str, NULL);
4136
0
  WRITE_BOOL_FIELD(path.parallel_aware);
4137
0
  WRITE_BOOL_FIELD(path.parallel_safe);
4138
0
  WRITE_INT_FIELD(path.parallel_workers);
4139
0
  WRITE_FLOAT_FIELD(path.rows);
4140
0
  WRITE_INT_FIELD(path.disabled_nodes);
4141
0
  WRITE_FLOAT_FIELD(path.startup_cost);
4142
0
  WRITE_FLOAT_FIELD(path.total_cost);
4143
0
  WRITE_NODE_FIELD(path.pathkeys);
4144
0
  WRITE_NODE_FIELD(subpath);
4145
0
}
4146
4147
static void
4148
_outIncrementalSortPath(StringInfo str, const IncrementalSortPath *node)
4149
0
{
4150
0
  WRITE_NODE_TYPE("INCREMENTALSORTPATH");
4151
4152
0
  WRITE_ENUM_FIELD(spath.path.pathtype, NodeTag);
4153
0
  appendStringInfoString(str, " :parent_relids ");
4154
0
  outBitmapset(str, node->spath.path.parent->relids);
4155
0
  if (node->spath.path.pathtarget != node->spath.path.parent->reltarget)
4156
0
    WRITE_NODE_FIELD(spath.path.pathtarget);
4157
0
  appendStringInfoString(str, " :required_outer ");
4158
0
  if (node->spath.path.param_info)
4159
0
    outBitmapset(str, node->spath.path.param_info->ppi_req_outer);
4160
0
  else
4161
0
    outBitmapset(str, NULL);
4162
0
  WRITE_BOOL_FIELD(spath.path.parallel_aware);
4163
0
  WRITE_BOOL_FIELD(spath.path.parallel_safe);
4164
0
  WRITE_INT_FIELD(spath.path.parallel_workers);
4165
0
  WRITE_FLOAT_FIELD(spath.path.rows);
4166
0
  WRITE_INT_FIELD(spath.path.disabled_nodes);
4167
0
  WRITE_FLOAT_FIELD(spath.path.startup_cost);
4168
0
  WRITE_FLOAT_FIELD(spath.path.total_cost);
4169
0
  WRITE_NODE_FIELD(spath.path.pathkeys);
4170
0
  WRITE_NODE_FIELD(spath.subpath);
4171
0
  WRITE_INT_FIELD(nPresortedCols);
4172
0
}
4173
4174
static void
4175
_outGroupPath(StringInfo str, const GroupPath *node)
4176
0
{
4177
0
  WRITE_NODE_TYPE("GROUPPATH");
4178
4179
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
4180
0
  appendStringInfoString(str, " :parent_relids ");
4181
0
  outBitmapset(str, node->path.parent->relids);
4182
0
  if (node->path.pathtarget != node->path.parent->reltarget)
4183
0
    WRITE_NODE_FIELD(path.pathtarget);
4184
0
  appendStringInfoString(str, " :required_outer ");
4185
0
  if (node->path.param_info)
4186
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
4187
0
  else
4188
0
    outBitmapset(str, NULL);
4189
0
  WRITE_BOOL_FIELD(path.parallel_aware);
4190
0
  WRITE_BOOL_FIELD(path.parallel_safe);
4191
0
  WRITE_INT_FIELD(path.parallel_workers);
4192
0
  WRITE_FLOAT_FIELD(path.rows);
4193
0
  WRITE_INT_FIELD(path.disabled_nodes);
4194
0
  WRITE_FLOAT_FIELD(path.startup_cost);
4195
0
  WRITE_FLOAT_FIELD(path.total_cost);
4196
0
  WRITE_NODE_FIELD(path.pathkeys);
4197
0
  WRITE_NODE_FIELD(subpath);
4198
0
  WRITE_NODE_FIELD(groupClause);
4199
0
  WRITE_NODE_FIELD(qual);
4200
0
}
4201
4202
static void
4203
_outUpperUniquePath(StringInfo str, const UpperUniquePath *node)
4204
0
{
4205
0
  WRITE_NODE_TYPE("UPPERUNIQUEPATH");
4206
4207
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
4208
0
  appendStringInfoString(str, " :parent_relids ");
4209
0
  outBitmapset(str, node->path.parent->relids);
4210
0
  if (node->path.pathtarget != node->path.parent->reltarget)
4211
0
    WRITE_NODE_FIELD(path.pathtarget);
4212
0
  appendStringInfoString(str, " :required_outer ");
4213
0
  if (node->path.param_info)
4214
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
4215
0
  else
4216
0
    outBitmapset(str, NULL);
4217
0
  WRITE_BOOL_FIELD(path.parallel_aware);
4218
0
  WRITE_BOOL_FIELD(path.parallel_safe);
4219
0
  WRITE_INT_FIELD(path.parallel_workers);
4220
0
  WRITE_FLOAT_FIELD(path.rows);
4221
0
  WRITE_INT_FIELD(path.disabled_nodes);
4222
0
  WRITE_FLOAT_FIELD(path.startup_cost);
4223
0
  WRITE_FLOAT_FIELD(path.total_cost);
4224
0
  WRITE_NODE_FIELD(path.pathkeys);
4225
0
  WRITE_NODE_FIELD(subpath);
4226
0
  WRITE_INT_FIELD(numkeys);
4227
0
}
4228
4229
static void
4230
_outAggPath(StringInfo str, const AggPath *node)
4231
0
{
4232
0
  WRITE_NODE_TYPE("AGGPATH");
4233
4234
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
4235
0
  appendStringInfoString(str, " :parent_relids ");
4236
0
  outBitmapset(str, node->path.parent->relids);
4237
0
  if (node->path.pathtarget != node->path.parent->reltarget)
4238
0
    WRITE_NODE_FIELD(path.pathtarget);
4239
0
  appendStringInfoString(str, " :required_outer ");
4240
0
  if (node->path.param_info)
4241
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
4242
0
  else
4243
0
    outBitmapset(str, NULL);
4244
0
  WRITE_BOOL_FIELD(path.parallel_aware);
4245
0
  WRITE_BOOL_FIELD(path.parallel_safe);
4246
0
  WRITE_INT_FIELD(path.parallel_workers);
4247
0
  WRITE_FLOAT_FIELD(path.rows);
4248
0
  WRITE_INT_FIELD(path.disabled_nodes);
4249
0
  WRITE_FLOAT_FIELD(path.startup_cost);
4250
0
  WRITE_FLOAT_FIELD(path.total_cost);
4251
0
  WRITE_NODE_FIELD(path.pathkeys);
4252
0
  WRITE_NODE_FIELD(subpath);
4253
0
  WRITE_ENUM_FIELD(aggstrategy, AggStrategy);
4254
0
  WRITE_ENUM_FIELD(aggsplit, AggSplit);
4255
0
  WRITE_FLOAT_FIELD(numGroups);
4256
0
  WRITE_UINT64_FIELD(transitionSpace);
4257
0
  WRITE_NODE_FIELD(groupClause);
4258
0
  WRITE_NODE_FIELD(qual);
4259
0
}
4260
4261
static void
4262
_outGroupingSetData(StringInfo str, const GroupingSetData *node)
4263
0
{
4264
0
  WRITE_NODE_TYPE("GROUPINGSETDATA");
4265
4266
0
  WRITE_NODE_FIELD(set);
4267
0
  WRITE_FLOAT_FIELD(numGroups);
4268
0
}
4269
4270
static void
4271
_outRollupData(StringInfo str, const RollupData *node)
4272
0
{
4273
0
  WRITE_NODE_TYPE("ROLLUPDATA");
4274
4275
0
  WRITE_NODE_FIELD(groupClause);
4276
0
  WRITE_NODE_FIELD(gsets);
4277
0
  WRITE_NODE_FIELD(gsets_data);
4278
0
  WRITE_FLOAT_FIELD(numGroups);
4279
0
  WRITE_BOOL_FIELD(hashable);
4280
0
  WRITE_BOOL_FIELD(is_hashed);
4281
0
}
4282
4283
static void
4284
_outGroupingSetsPath(StringInfo str, const GroupingSetsPath *node)
4285
0
{
4286
0
  WRITE_NODE_TYPE("GROUPINGSETSPATH");
4287
4288
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
4289
0
  appendStringInfoString(str, " :parent_relids ");
4290
0
  outBitmapset(str, node->path.parent->relids);
4291
0
  if (node->path.pathtarget != node->path.parent->reltarget)
4292
0
    WRITE_NODE_FIELD(path.pathtarget);
4293
0
  appendStringInfoString(str, " :required_outer ");
4294
0
  if (node->path.param_info)
4295
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
4296
0
  else
4297
0
    outBitmapset(str, NULL);
4298
0
  WRITE_BOOL_FIELD(path.parallel_aware);
4299
0
  WRITE_BOOL_FIELD(path.parallel_safe);
4300
0
  WRITE_INT_FIELD(path.parallel_workers);
4301
0
  WRITE_FLOAT_FIELD(path.rows);
4302
0
  WRITE_INT_FIELD(path.disabled_nodes);
4303
0
  WRITE_FLOAT_FIELD(path.startup_cost);
4304
0
  WRITE_FLOAT_FIELD(path.total_cost);
4305
0
  WRITE_NODE_FIELD(path.pathkeys);
4306
0
  WRITE_NODE_FIELD(subpath);
4307
0
  WRITE_ENUM_FIELD(aggstrategy, AggStrategy);
4308
0
  WRITE_NODE_FIELD(rollups);
4309
0
  WRITE_NODE_FIELD(qual);
4310
0
  WRITE_UINT64_FIELD(transitionSpace);
4311
0
}
4312
4313
static void
4314
_outMinMaxAggPath(StringInfo str, const MinMaxAggPath *node)
4315
0
{
4316
0
  WRITE_NODE_TYPE("MINMAXAGGPATH");
4317
4318
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
4319
0
  appendStringInfoString(str, " :parent_relids ");
4320
0
  outBitmapset(str, node->path.parent->relids);
4321
0
  if (node->path.pathtarget != node->path.parent->reltarget)
4322
0
    WRITE_NODE_FIELD(path.pathtarget);
4323
0
  appendStringInfoString(str, " :required_outer ");
4324
0
  if (node->path.param_info)
4325
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
4326
0
  else
4327
0
    outBitmapset(str, NULL);
4328
0
  WRITE_BOOL_FIELD(path.parallel_aware);
4329
0
  WRITE_BOOL_FIELD(path.parallel_safe);
4330
0
  WRITE_INT_FIELD(path.parallel_workers);
4331
0
  WRITE_FLOAT_FIELD(path.rows);
4332
0
  WRITE_INT_FIELD(path.disabled_nodes);
4333
0
  WRITE_FLOAT_FIELD(path.startup_cost);
4334
0
  WRITE_FLOAT_FIELD(path.total_cost);
4335
0
  WRITE_NODE_FIELD(path.pathkeys);
4336
0
  WRITE_NODE_FIELD(mmaggregates);
4337
0
  WRITE_NODE_FIELD(quals);
4338
0
}
4339
4340
static void
4341
_outWindowAggPath(StringInfo str, const WindowAggPath *node)
4342
0
{
4343
0
  WRITE_NODE_TYPE("WINDOWAGGPATH");
4344
4345
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
4346
0
  appendStringInfoString(str, " :parent_relids ");
4347
0
  outBitmapset(str, node->path.parent->relids);
4348
0
  if (node->path.pathtarget != node->path.parent->reltarget)
4349
0
    WRITE_NODE_FIELD(path.pathtarget);
4350
0
  appendStringInfoString(str, " :required_outer ");
4351
0
  if (node->path.param_info)
4352
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
4353
0
  else
4354
0
    outBitmapset(str, NULL);
4355
0
  WRITE_BOOL_FIELD(path.parallel_aware);
4356
0
  WRITE_BOOL_FIELD(path.parallel_safe);
4357
0
  WRITE_INT_FIELD(path.parallel_workers);
4358
0
  WRITE_FLOAT_FIELD(path.rows);
4359
0
  WRITE_INT_FIELD(path.disabled_nodes);
4360
0
  WRITE_FLOAT_FIELD(path.startup_cost);
4361
0
  WRITE_FLOAT_FIELD(path.total_cost);
4362
0
  WRITE_NODE_FIELD(path.pathkeys);
4363
0
  WRITE_NODE_FIELD(subpath);
4364
0
  WRITE_NODE_FIELD(winclause);
4365
0
  WRITE_NODE_FIELD(qual);
4366
0
  WRITE_NODE_FIELD(runCondition);
4367
0
  WRITE_BOOL_FIELD(topwindow);
4368
0
}
4369
4370
static void
4371
_outSetOpPath(StringInfo str, const SetOpPath *node)
4372
0
{
4373
0
  WRITE_NODE_TYPE("SETOPPATH");
4374
4375
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
4376
0
  appendStringInfoString(str, " :parent_relids ");
4377
0
  outBitmapset(str, node->path.parent->relids);
4378
0
  if (node->path.pathtarget != node->path.parent->reltarget)
4379
0
    WRITE_NODE_FIELD(path.pathtarget);
4380
0
  appendStringInfoString(str, " :required_outer ");
4381
0
  if (node->path.param_info)
4382
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
4383
0
  else
4384
0
    outBitmapset(str, NULL);
4385
0
  WRITE_BOOL_FIELD(path.parallel_aware);
4386
0
  WRITE_BOOL_FIELD(path.parallel_safe);
4387
0
  WRITE_INT_FIELD(path.parallel_workers);
4388
0
  WRITE_FLOAT_FIELD(path.rows);
4389
0
  WRITE_INT_FIELD(path.disabled_nodes);
4390
0
  WRITE_FLOAT_FIELD(path.startup_cost);
4391
0
  WRITE_FLOAT_FIELD(path.total_cost);
4392
0
  WRITE_NODE_FIELD(path.pathkeys);
4393
0
  WRITE_NODE_FIELD(leftpath);
4394
0
  WRITE_NODE_FIELD(rightpath);
4395
0
  WRITE_ENUM_FIELD(cmd, SetOpCmd);
4396
0
  WRITE_ENUM_FIELD(strategy, SetOpStrategy);
4397
0
  WRITE_NODE_FIELD(groupList);
4398
0
  WRITE_FLOAT_FIELD(numGroups);
4399
0
}
4400
4401
static void
4402
_outRecursiveUnionPath(StringInfo str, const RecursiveUnionPath *node)
4403
0
{
4404
0
  WRITE_NODE_TYPE("RECURSIVEUNIONPATH");
4405
4406
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
4407
0
  appendStringInfoString(str, " :parent_relids ");
4408
0
  outBitmapset(str, node->path.parent->relids);
4409
0
  if (node->path.pathtarget != node->path.parent->reltarget)
4410
0
    WRITE_NODE_FIELD(path.pathtarget);
4411
0
  appendStringInfoString(str, " :required_outer ");
4412
0
  if (node->path.param_info)
4413
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
4414
0
  else
4415
0
    outBitmapset(str, NULL);
4416
0
  WRITE_BOOL_FIELD(path.parallel_aware);
4417
0
  WRITE_BOOL_FIELD(path.parallel_safe);
4418
0
  WRITE_INT_FIELD(path.parallel_workers);
4419
0
  WRITE_FLOAT_FIELD(path.rows);
4420
0
  WRITE_INT_FIELD(path.disabled_nodes);
4421
0
  WRITE_FLOAT_FIELD(path.startup_cost);
4422
0
  WRITE_FLOAT_FIELD(path.total_cost);
4423
0
  WRITE_NODE_FIELD(path.pathkeys);
4424
0
  WRITE_NODE_FIELD(leftpath);
4425
0
  WRITE_NODE_FIELD(rightpath);
4426
0
  WRITE_NODE_FIELD(distinctList);
4427
0
  WRITE_INT_FIELD(wtParam);
4428
0
  WRITE_FLOAT_FIELD(numGroups);
4429
0
}
4430
4431
static void
4432
_outLockRowsPath(StringInfo str, const LockRowsPath *node)
4433
0
{
4434
0
  WRITE_NODE_TYPE("LOCKROWSPATH");
4435
4436
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
4437
0
  appendStringInfoString(str, " :parent_relids ");
4438
0
  outBitmapset(str, node->path.parent->relids);
4439
0
  if (node->path.pathtarget != node->path.parent->reltarget)
4440
0
    WRITE_NODE_FIELD(path.pathtarget);
4441
0
  appendStringInfoString(str, " :required_outer ");
4442
0
  if (node->path.param_info)
4443
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
4444
0
  else
4445
0
    outBitmapset(str, NULL);
4446
0
  WRITE_BOOL_FIELD(path.parallel_aware);
4447
0
  WRITE_BOOL_FIELD(path.parallel_safe);
4448
0
  WRITE_INT_FIELD(path.parallel_workers);
4449
0
  WRITE_FLOAT_FIELD(path.rows);
4450
0
  WRITE_INT_FIELD(path.disabled_nodes);
4451
0
  WRITE_FLOAT_FIELD(path.startup_cost);
4452
0
  WRITE_FLOAT_FIELD(path.total_cost);
4453
0
  WRITE_NODE_FIELD(path.pathkeys);
4454
0
  WRITE_NODE_FIELD(subpath);
4455
0
  WRITE_NODE_FIELD(rowMarks);
4456
0
  WRITE_INT_FIELD(epqParam);
4457
0
}
4458
4459
static void
4460
_outModifyTablePath(StringInfo str, const ModifyTablePath *node)
4461
0
{
4462
0
  WRITE_NODE_TYPE("MODIFYTABLEPATH");
4463
4464
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
4465
0
  appendStringInfoString(str, " :parent_relids ");
4466
0
  outBitmapset(str, node->path.parent->relids);
4467
0
  if (node->path.pathtarget != node->path.parent->reltarget)
4468
0
    WRITE_NODE_FIELD(path.pathtarget);
4469
0
  appendStringInfoString(str, " :required_outer ");
4470
0
  if (node->path.param_info)
4471
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
4472
0
  else
4473
0
    outBitmapset(str, NULL);
4474
0
  WRITE_BOOL_FIELD(path.parallel_aware);
4475
0
  WRITE_BOOL_FIELD(path.parallel_safe);
4476
0
  WRITE_INT_FIELD(path.parallel_workers);
4477
0
  WRITE_FLOAT_FIELD(path.rows);
4478
0
  WRITE_INT_FIELD(path.disabled_nodes);
4479
0
  WRITE_FLOAT_FIELD(path.startup_cost);
4480
0
  WRITE_FLOAT_FIELD(path.total_cost);
4481
0
  WRITE_NODE_FIELD(path.pathkeys);
4482
0
  WRITE_NODE_FIELD(subpath);
4483
0
  WRITE_ENUM_FIELD(operation, CmdType);
4484
0
  WRITE_BOOL_FIELD(canSetTag);
4485
0
  WRITE_UINT_FIELD(nominalRelation);
4486
0
  WRITE_UINT_FIELD(rootRelation);
4487
0
  WRITE_BOOL_FIELD(partColsUpdated);
4488
0
  WRITE_NODE_FIELD(resultRelations);
4489
0
  WRITE_NODE_FIELD(updateColnosLists);
4490
0
  WRITE_NODE_FIELD(withCheckOptionLists);
4491
0
  WRITE_NODE_FIELD(returningLists);
4492
0
  WRITE_NODE_FIELD(rowMarks);
4493
0
  WRITE_NODE_FIELD(onconflict);
4494
0
  WRITE_INT_FIELD(epqParam);
4495
0
  WRITE_NODE_FIELD(mergeActionLists);
4496
0
  WRITE_NODE_FIELD(mergeJoinConditions);
4497
0
}
4498
4499
static void
4500
_outLimitPath(StringInfo str, const LimitPath *node)
4501
0
{
4502
0
  WRITE_NODE_TYPE("LIMITPATH");
4503
4504
0
  WRITE_ENUM_FIELD(path.pathtype, NodeTag);
4505
0
  appendStringInfoString(str, " :parent_relids ");
4506
0
  outBitmapset(str, node->path.parent->relids);
4507
0
  if (node->path.pathtarget != node->path.parent->reltarget)
4508
0
    WRITE_NODE_FIELD(path.pathtarget);
4509
0
  appendStringInfoString(str, " :required_outer ");
4510
0
  if (node->path.param_info)
4511
0
    outBitmapset(str, node->path.param_info->ppi_req_outer);
4512
0
  else
4513
0
    outBitmapset(str, NULL);
4514
0
  WRITE_BOOL_FIELD(path.parallel_aware);
4515
0
  WRITE_BOOL_FIELD(path.parallel_safe);
4516
0
  WRITE_INT_FIELD(path.parallel_workers);
4517
0
  WRITE_FLOAT_FIELD(path.rows);
4518
0
  WRITE_INT_FIELD(path.disabled_nodes);
4519
0
  WRITE_FLOAT_FIELD(path.startup_cost);
4520
0
  WRITE_FLOAT_FIELD(path.total_cost);
4521
0
  WRITE_NODE_FIELD(path.pathkeys);
4522
0
  WRITE_NODE_FIELD(subpath);
4523
0
  WRITE_NODE_FIELD(limitOffset);
4524
0
  WRITE_NODE_FIELD(limitCount);
4525
0
  WRITE_ENUM_FIELD(limitOption, LimitOption);
4526
0
}
4527
4528
static void
4529
_outRestrictInfo(StringInfo str, const RestrictInfo *node)
4530
0
{
4531
0
  WRITE_NODE_TYPE("RESTRICTINFO");
4532
4533
0
  WRITE_NODE_FIELD(clause);
4534
0
  WRITE_BOOL_FIELD(is_pushed_down);
4535
0
  WRITE_BOOL_FIELD(can_join);
4536
0
  WRITE_BOOL_FIELD(pseudoconstant);
4537
0
  WRITE_BOOL_FIELD(has_clone);
4538
0
  WRITE_BOOL_FIELD(is_clone);
4539
0
  WRITE_BOOL_FIELD(leakproof);
4540
0
  WRITE_ENUM_FIELD(has_volatile, VolatileFunctionStatus);
4541
0
  WRITE_UINT_FIELD(security_level);
4542
0
  WRITE_INT_FIELD(num_base_rels);
4543
0
  WRITE_BITMAPSET_FIELD(clause_relids);
4544
0
  WRITE_BITMAPSET_FIELD(required_relids);
4545
0
  WRITE_BITMAPSET_FIELD(incompatible_relids);
4546
0
  WRITE_BITMAPSET_FIELD(outer_relids);
4547
0
  WRITE_BITMAPSET_FIELD(left_relids);
4548
0
  WRITE_BITMAPSET_FIELD(right_relids);
4549
0
  WRITE_NODE_FIELD(orclause);
4550
0
  WRITE_INT_FIELD(rinfo_serial);
4551
0
  WRITE_FLOAT_FIELD(eval_cost.startup);
4552
0
  WRITE_FLOAT_FIELD(eval_cost.per_tuple);
4553
0
  WRITE_FLOAT_FIELD(norm_selec);
4554
0
  WRITE_FLOAT_FIELD(outer_selec);
4555
0
  WRITE_NODE_FIELD(mergeopfamilies);
4556
0
  WRITE_NODE_FIELD(left_em);
4557
0
  WRITE_NODE_FIELD(right_em);
4558
0
  WRITE_BOOL_FIELD(outer_is_left);
4559
0
  WRITE_OID_FIELD(hashjoinoperator);
4560
0
  WRITE_FLOAT_FIELD(left_bucketsize);
4561
0
  WRITE_FLOAT_FIELD(right_bucketsize);
4562
0
  WRITE_FLOAT_FIELD(left_mcvfreq);
4563
0
  WRITE_FLOAT_FIELD(right_mcvfreq);
4564
0
  WRITE_OID_FIELD(left_hasheqoperator);
4565
0
  WRITE_OID_FIELD(right_hasheqoperator);
4566
0
}
4567
4568
static void
4569
_outPlaceHolderVar(StringInfo str, const PlaceHolderVar *node)
4570
0
{
4571
0
  WRITE_NODE_TYPE("PLACEHOLDERVAR");
4572
4573
0
  WRITE_NODE_FIELD(phexpr);
4574
0
  WRITE_BITMAPSET_FIELD(phrels);
4575
0
  WRITE_BITMAPSET_FIELD(phnullingrels);
4576
0
  WRITE_UINT_FIELD(phid);
4577
0
  WRITE_UINT_FIELD(phlevelsup);
4578
0
}
4579
4580
static void
4581
_outSpecialJoinInfo(StringInfo str, const SpecialJoinInfo *node)
4582
0
{
4583
0
  WRITE_NODE_TYPE("SPECIALJOININFO");
4584
4585
0
  WRITE_BITMAPSET_FIELD(min_lefthand);
4586
0
  WRITE_BITMAPSET_FIELD(min_righthand);
4587
0
  WRITE_BITMAPSET_FIELD(syn_lefthand);
4588
0
  WRITE_BITMAPSET_FIELD(syn_righthand);
4589
0
  WRITE_ENUM_FIELD(jointype, JoinType);
4590
0
  WRITE_UINT_FIELD(ojrelid);
4591
0
  WRITE_BITMAPSET_FIELD(commute_above_l);
4592
0
  WRITE_BITMAPSET_FIELD(commute_above_r);
4593
0
  WRITE_BITMAPSET_FIELD(commute_below_l);
4594
0
  WRITE_BITMAPSET_FIELD(commute_below_r);
4595
0
  WRITE_BOOL_FIELD(lhs_strict);
4596
0
  WRITE_BOOL_FIELD(semi_can_btree);
4597
0
  WRITE_BOOL_FIELD(semi_can_hash);
4598
0
  WRITE_NODE_FIELD(semi_operators);
4599
0
  WRITE_NODE_FIELD(semi_rhs_exprs);
4600
0
}
4601
4602
static void
4603
_outOuterJoinClauseInfo(StringInfo str, const OuterJoinClauseInfo *node)
4604
0
{
4605
0
  WRITE_NODE_TYPE("OUTERJOINCLAUSEINFO");
4606
4607
0
  WRITE_NODE_FIELD(rinfo);
4608
0
  WRITE_NODE_FIELD(sjinfo);
4609
0
}
4610
4611
static void
4612
_outAppendRelInfo(StringInfo str, const AppendRelInfo *node)
4613
0
{
4614
0
  WRITE_NODE_TYPE("APPENDRELINFO");
4615
4616
0
  WRITE_UINT_FIELD(parent_relid);
4617
0
  WRITE_UINT_FIELD(child_relid);
4618
0
  WRITE_OID_FIELD(parent_reltype);
4619
0
  WRITE_OID_FIELD(child_reltype);
4620
0
  WRITE_NODE_FIELD(translated_vars);
4621
0
  WRITE_INT_FIELD(num_child_cols);
4622
0
  WRITE_ATTRNUMBER_ARRAY(parent_colnos, node->num_child_cols);
4623
0
  WRITE_OID_FIELD(parent_reloid);
4624
0
}
4625
4626
static void
4627
_outRowIdentityVarInfo(StringInfo str, const RowIdentityVarInfo *node)
4628
0
{
4629
0
  WRITE_NODE_TYPE("ROWIDENTITYVARINFO");
4630
4631
0
  WRITE_NODE_FIELD(rowidvar);
4632
0
  WRITE_INT_FIELD(rowidwidth);
4633
0
  WRITE_STRING_FIELD(rowidname);
4634
0
  WRITE_BITMAPSET_FIELD(rowidrels);
4635
0
}
4636
4637
static void
4638
_outPlaceHolderInfo(StringInfo str, const PlaceHolderInfo *node)
4639
0
{
4640
0
  WRITE_NODE_TYPE("PLACEHOLDERINFO");
4641
4642
0
  WRITE_UINT_FIELD(phid);
4643
0
  WRITE_NODE_FIELD(ph_var);
4644
0
  WRITE_BITMAPSET_FIELD(ph_eval_at);
4645
0
  WRITE_BITMAPSET_FIELD(ph_lateral);
4646
0
  WRITE_BITMAPSET_FIELD(ph_needed);
4647
0
  WRITE_INT_FIELD(ph_width);
4648
0
}
4649
4650
static void
4651
_outMinMaxAggInfo(StringInfo str, const MinMaxAggInfo *node)
4652
0
{
4653
0
  WRITE_NODE_TYPE("MINMAXAGGINFO");
4654
4655
0
  WRITE_OID_FIELD(aggfnoid);
4656
0
  WRITE_OID_FIELD(aggsortop);
4657
0
  WRITE_NODE_FIELD(target);
4658
0
  WRITE_NODE_FIELD(path);
4659
0
  WRITE_FLOAT_FIELD(pathcost);
4660
0
  WRITE_NODE_FIELD(param);
4661
0
}
4662
4663
static void
4664
_outPlannerParamItem(StringInfo str, const PlannerParamItem *node)
4665
0
{
4666
0
  WRITE_NODE_TYPE("PLANNERPARAMITEM");
4667
4668
0
  WRITE_NODE_FIELD(item);
4669
0
  WRITE_INT_FIELD(paramId);
4670
0
}
4671
4672
static void
4673
_outAggInfo(StringInfo str, const AggInfo *node)
4674
0
{
4675
0
  WRITE_NODE_TYPE("AGGINFO");
4676
4677
0
  WRITE_NODE_FIELD(aggrefs);
4678
0
  WRITE_INT_FIELD(transno);
4679
0
  WRITE_BOOL_FIELD(shareable);
4680
0
  WRITE_OID_FIELD(finalfn_oid);
4681
0
}
4682
4683
static void
4684
_outAggTransInfo(StringInfo str, const AggTransInfo *node)
4685
0
{
4686
0
  WRITE_NODE_TYPE("AGGTRANSINFO");
4687
4688
0
  WRITE_NODE_FIELD(args);
4689
0
  WRITE_NODE_FIELD(aggfilter);
4690
0
  WRITE_OID_FIELD(transfn_oid);
4691
0
  WRITE_OID_FIELD(serialfn_oid);
4692
0
  WRITE_OID_FIELD(deserialfn_oid);
4693
0
  WRITE_OID_FIELD(combinefn_oid);
4694
0
  WRITE_OID_FIELD(aggtranstype);
4695
0
  WRITE_INT_FIELD(aggtranstypmod);
4696
0
  WRITE_INT_FIELD(transtypeLen);
4697
0
  WRITE_BOOL_FIELD(transtypeByVal);
4698
0
  WRITE_INT_FIELD(aggtransspace);
4699
0
  WRITE_BOOL_FIELD(initValueIsNull);
4700
0
}
4701
4702
static void
4703
_outUniqueRelInfo(StringInfo str, const UniqueRelInfo *node)
4704
0
{
4705
0
  WRITE_NODE_TYPE("UNIQUERELINFO");
4706
4707
0
  WRITE_BITMAPSET_FIELD(outerrelids);
4708
0
  WRITE_BOOL_FIELD(self_join);
4709
0
  WRITE_NODE_FIELD(extra_clauses);
4710
0
}
4711
4712
static void
4713
_outPlannedStmt(StringInfo str, const PlannedStmt *node)
4714
0
{
4715
0
  WRITE_NODE_TYPE("PLANNEDSTMT");
4716
4717
0
  WRITE_ENUM_FIELD(commandType, CmdType);
4718
0
  WRITE_INT64_FIELD(queryId);
4719
0
  WRITE_INT64_FIELD(planId);
4720
0
  WRITE_BOOL_FIELD(hasReturning);
4721
0
  WRITE_BOOL_FIELD(hasModifyingCTE);
4722
0
  WRITE_BOOL_FIELD(canSetTag);
4723
0
  WRITE_BOOL_FIELD(transientPlan);
4724
0
  WRITE_BOOL_FIELD(dependsOnRole);
4725
0
  WRITE_BOOL_FIELD(parallelModeNeeded);
4726
0
  WRITE_INT_FIELD(jitFlags);
4727
0
  WRITE_NODE_FIELD(planTree);
4728
0
  WRITE_NODE_FIELD(partPruneInfos);
4729
0
  WRITE_NODE_FIELD(rtable);
4730
0
  WRITE_BITMAPSET_FIELD(unprunableRelids);
4731
0
  WRITE_NODE_FIELD(permInfos);
4732
0
  WRITE_NODE_FIELD(resultRelations);
4733
0
  WRITE_NODE_FIELD(appendRelations);
4734
0
  WRITE_NODE_FIELD(subplans);
4735
0
  WRITE_BITMAPSET_FIELD(rewindPlanIDs);
4736
0
  WRITE_NODE_FIELD(rowMarks);
4737
0
  WRITE_NODE_FIELD(relationOids);
4738
0
  WRITE_NODE_FIELD(invalItems);
4739
0
  WRITE_NODE_FIELD(paramExecTypes);
4740
0
  WRITE_NODE_FIELD(utilityStmt);
4741
0
  WRITE_LOCATION_FIELD(stmt_location);
4742
0
  WRITE_LOCATION_FIELD(stmt_len);
4743
0
}
4744
4745
static void
4746
_outResult(StringInfo str, const Result *node)
4747
0
{
4748
0
  WRITE_NODE_TYPE("RESULT");
4749
4750
0
  WRITE_INT_FIELD(plan.disabled_nodes);
4751
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
4752
0
  WRITE_FLOAT_FIELD(plan.total_cost);
4753
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
4754
0
  WRITE_INT_FIELD(plan.plan_width);
4755
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
4756
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
4757
0
  WRITE_BOOL_FIELD(plan.async_capable);
4758
0
  WRITE_INT_FIELD(plan.plan_node_id);
4759
0
  WRITE_NODE_FIELD(plan.targetlist);
4760
0
  WRITE_NODE_FIELD(plan.qual);
4761
0
  WRITE_NODE_FIELD(plan.lefttree);
4762
0
  WRITE_NODE_FIELD(plan.righttree);
4763
0
  WRITE_NODE_FIELD(plan.initPlan);
4764
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
4765
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
4766
0
  WRITE_NODE_FIELD(resconstantqual);
4767
0
}
4768
4769
static void
4770
_outProjectSet(StringInfo str, const ProjectSet *node)
4771
0
{
4772
0
  WRITE_NODE_TYPE("PROJECTSET");
4773
4774
0
  WRITE_INT_FIELD(plan.disabled_nodes);
4775
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
4776
0
  WRITE_FLOAT_FIELD(plan.total_cost);
4777
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
4778
0
  WRITE_INT_FIELD(plan.plan_width);
4779
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
4780
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
4781
0
  WRITE_BOOL_FIELD(plan.async_capable);
4782
0
  WRITE_INT_FIELD(plan.plan_node_id);
4783
0
  WRITE_NODE_FIELD(plan.targetlist);
4784
0
  WRITE_NODE_FIELD(plan.qual);
4785
0
  WRITE_NODE_FIELD(plan.lefttree);
4786
0
  WRITE_NODE_FIELD(plan.righttree);
4787
0
  WRITE_NODE_FIELD(plan.initPlan);
4788
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
4789
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
4790
0
}
4791
4792
static void
4793
_outModifyTable(StringInfo str, const ModifyTable *node)
4794
0
{
4795
0
  WRITE_NODE_TYPE("MODIFYTABLE");
4796
4797
0
  WRITE_INT_FIELD(plan.disabled_nodes);
4798
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
4799
0
  WRITE_FLOAT_FIELD(plan.total_cost);
4800
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
4801
0
  WRITE_INT_FIELD(plan.plan_width);
4802
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
4803
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
4804
0
  WRITE_BOOL_FIELD(plan.async_capable);
4805
0
  WRITE_INT_FIELD(plan.plan_node_id);
4806
0
  WRITE_NODE_FIELD(plan.targetlist);
4807
0
  WRITE_NODE_FIELD(plan.qual);
4808
0
  WRITE_NODE_FIELD(plan.lefttree);
4809
0
  WRITE_NODE_FIELD(plan.righttree);
4810
0
  WRITE_NODE_FIELD(plan.initPlan);
4811
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
4812
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
4813
0
  WRITE_ENUM_FIELD(operation, CmdType);
4814
0
  WRITE_BOOL_FIELD(canSetTag);
4815
0
  WRITE_UINT_FIELD(nominalRelation);
4816
0
  WRITE_UINT_FIELD(rootRelation);
4817
0
  WRITE_BOOL_FIELD(partColsUpdated);
4818
0
  WRITE_NODE_FIELD(resultRelations);
4819
0
  WRITE_NODE_FIELD(updateColnosLists);
4820
0
  WRITE_NODE_FIELD(withCheckOptionLists);
4821
0
  WRITE_STRING_FIELD(returningOldAlias);
4822
0
  WRITE_STRING_FIELD(returningNewAlias);
4823
0
  WRITE_NODE_FIELD(returningLists);
4824
0
  WRITE_NODE_FIELD(fdwPrivLists);
4825
0
  WRITE_BITMAPSET_FIELD(fdwDirectModifyPlans);
4826
0
  WRITE_NODE_FIELD(rowMarks);
4827
0
  WRITE_INT_FIELD(epqParam);
4828
0
  WRITE_ENUM_FIELD(onConflictAction, OnConflictAction);
4829
0
  WRITE_NODE_FIELD(arbiterIndexes);
4830
0
  WRITE_NODE_FIELD(onConflictSet);
4831
0
  WRITE_NODE_FIELD(onConflictCols);
4832
0
  WRITE_NODE_FIELD(onConflictWhere);
4833
0
  WRITE_UINT_FIELD(exclRelRTI);
4834
0
  WRITE_NODE_FIELD(exclRelTlist);
4835
0
  WRITE_NODE_FIELD(mergeActionLists);
4836
0
  WRITE_NODE_FIELD(mergeJoinConditions);
4837
0
}
4838
4839
static void
4840
_outAppend(StringInfo str, const Append *node)
4841
0
{
4842
0
  WRITE_NODE_TYPE("APPEND");
4843
4844
0
  WRITE_INT_FIELD(plan.disabled_nodes);
4845
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
4846
0
  WRITE_FLOAT_FIELD(plan.total_cost);
4847
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
4848
0
  WRITE_INT_FIELD(plan.plan_width);
4849
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
4850
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
4851
0
  WRITE_BOOL_FIELD(plan.async_capable);
4852
0
  WRITE_INT_FIELD(plan.plan_node_id);
4853
0
  WRITE_NODE_FIELD(plan.targetlist);
4854
0
  WRITE_NODE_FIELD(plan.qual);
4855
0
  WRITE_NODE_FIELD(plan.lefttree);
4856
0
  WRITE_NODE_FIELD(plan.righttree);
4857
0
  WRITE_NODE_FIELD(plan.initPlan);
4858
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
4859
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
4860
0
  WRITE_BITMAPSET_FIELD(apprelids);
4861
0
  WRITE_NODE_FIELD(appendplans);
4862
0
  WRITE_INT_FIELD(nasyncplans);
4863
0
  WRITE_INT_FIELD(first_partial_plan);
4864
0
  WRITE_INT_FIELD(part_prune_index);
4865
0
}
4866
4867
static void
4868
_outMergeAppend(StringInfo str, const MergeAppend *node)
4869
0
{
4870
0
  WRITE_NODE_TYPE("MERGEAPPEND");
4871
4872
0
  WRITE_INT_FIELD(plan.disabled_nodes);
4873
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
4874
0
  WRITE_FLOAT_FIELD(plan.total_cost);
4875
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
4876
0
  WRITE_INT_FIELD(plan.plan_width);
4877
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
4878
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
4879
0
  WRITE_BOOL_FIELD(plan.async_capable);
4880
0
  WRITE_INT_FIELD(plan.plan_node_id);
4881
0
  WRITE_NODE_FIELD(plan.targetlist);
4882
0
  WRITE_NODE_FIELD(plan.qual);
4883
0
  WRITE_NODE_FIELD(plan.lefttree);
4884
0
  WRITE_NODE_FIELD(plan.righttree);
4885
0
  WRITE_NODE_FIELD(plan.initPlan);
4886
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
4887
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
4888
0
  WRITE_BITMAPSET_FIELD(apprelids);
4889
0
  WRITE_NODE_FIELD(mergeplans);
4890
0
  WRITE_INT_FIELD(numCols);
4891
0
  WRITE_ATTRNUMBER_ARRAY(sortColIdx, node->numCols);
4892
0
  WRITE_OID_ARRAY(sortOperators, node->numCols);
4893
0
  WRITE_OID_ARRAY(collations, node->numCols);
4894
0
  WRITE_BOOL_ARRAY(nullsFirst, node->numCols);
4895
0
  WRITE_INT_FIELD(part_prune_index);
4896
0
}
4897
4898
static void
4899
_outRecursiveUnion(StringInfo str, const RecursiveUnion *node)
4900
0
{
4901
0
  WRITE_NODE_TYPE("RECURSIVEUNION");
4902
4903
0
  WRITE_INT_FIELD(plan.disabled_nodes);
4904
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
4905
0
  WRITE_FLOAT_FIELD(plan.total_cost);
4906
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
4907
0
  WRITE_INT_FIELD(plan.plan_width);
4908
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
4909
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
4910
0
  WRITE_BOOL_FIELD(plan.async_capable);
4911
0
  WRITE_INT_FIELD(plan.plan_node_id);
4912
0
  WRITE_NODE_FIELD(plan.targetlist);
4913
0
  WRITE_NODE_FIELD(plan.qual);
4914
0
  WRITE_NODE_FIELD(plan.lefttree);
4915
0
  WRITE_NODE_FIELD(plan.righttree);
4916
0
  WRITE_NODE_FIELD(plan.initPlan);
4917
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
4918
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
4919
0
  WRITE_INT_FIELD(wtParam);
4920
0
  WRITE_INT_FIELD(numCols);
4921
0
  WRITE_ATTRNUMBER_ARRAY(dupColIdx, node->numCols);
4922
0
  WRITE_OID_ARRAY(dupOperators, node->numCols);
4923
0
  WRITE_OID_ARRAY(dupCollations, node->numCols);
4924
0
  WRITE_LONG_FIELD(numGroups);
4925
0
}
4926
4927
static void
4928
_outBitmapAnd(StringInfo str, const BitmapAnd *node)
4929
0
{
4930
0
  WRITE_NODE_TYPE("BITMAPAND");
4931
4932
0
  WRITE_INT_FIELD(plan.disabled_nodes);
4933
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
4934
0
  WRITE_FLOAT_FIELD(plan.total_cost);
4935
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
4936
0
  WRITE_INT_FIELD(plan.plan_width);
4937
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
4938
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
4939
0
  WRITE_BOOL_FIELD(plan.async_capable);
4940
0
  WRITE_INT_FIELD(plan.plan_node_id);
4941
0
  WRITE_NODE_FIELD(plan.targetlist);
4942
0
  WRITE_NODE_FIELD(plan.qual);
4943
0
  WRITE_NODE_FIELD(plan.lefttree);
4944
0
  WRITE_NODE_FIELD(plan.righttree);
4945
0
  WRITE_NODE_FIELD(plan.initPlan);
4946
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
4947
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
4948
0
  WRITE_NODE_FIELD(bitmapplans);
4949
0
}
4950
4951
static void
4952
_outBitmapOr(StringInfo str, const BitmapOr *node)
4953
0
{
4954
0
  WRITE_NODE_TYPE("BITMAPOR");
4955
4956
0
  WRITE_INT_FIELD(plan.disabled_nodes);
4957
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
4958
0
  WRITE_FLOAT_FIELD(plan.total_cost);
4959
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
4960
0
  WRITE_INT_FIELD(plan.plan_width);
4961
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
4962
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
4963
0
  WRITE_BOOL_FIELD(plan.async_capable);
4964
0
  WRITE_INT_FIELD(plan.plan_node_id);
4965
0
  WRITE_NODE_FIELD(plan.targetlist);
4966
0
  WRITE_NODE_FIELD(plan.qual);
4967
0
  WRITE_NODE_FIELD(plan.lefttree);
4968
0
  WRITE_NODE_FIELD(plan.righttree);
4969
0
  WRITE_NODE_FIELD(plan.initPlan);
4970
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
4971
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
4972
0
  WRITE_BOOL_FIELD(isshared);
4973
0
  WRITE_NODE_FIELD(bitmapplans);
4974
0
}
4975
4976
static void
4977
_outSeqScan(StringInfo str, const SeqScan *node)
4978
0
{
4979
0
  WRITE_NODE_TYPE("SEQSCAN");
4980
4981
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
4982
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
4983
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
4984
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
4985
0
  WRITE_INT_FIELD(scan.plan.plan_width);
4986
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
4987
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
4988
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
4989
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
4990
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
4991
0
  WRITE_NODE_FIELD(scan.plan.qual);
4992
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
4993
0
  WRITE_NODE_FIELD(scan.plan.righttree);
4994
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
4995
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
4996
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
4997
0
  WRITE_UINT_FIELD(scan.scanrelid);
4998
0
}
4999
5000
static void
5001
_outSampleScan(StringInfo str, const SampleScan *node)
5002
0
{
5003
0
  WRITE_NODE_TYPE("SAMPLESCAN");
5004
5005
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5006
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5007
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5008
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5009
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5010
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5011
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5012
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5013
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5014
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5015
0
  WRITE_NODE_FIELD(scan.plan.qual);
5016
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5017
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5018
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5019
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5020
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5021
0
  WRITE_UINT_FIELD(scan.scanrelid);
5022
0
  WRITE_NODE_FIELD(tablesample);
5023
0
}
5024
5025
static void
5026
_outIndexScan(StringInfo str, const IndexScan *node)
5027
0
{
5028
0
  WRITE_NODE_TYPE("INDEXSCAN");
5029
5030
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5031
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5032
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5033
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5034
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5035
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5036
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5037
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5038
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5039
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5040
0
  WRITE_NODE_FIELD(scan.plan.qual);
5041
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5042
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5043
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5044
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5045
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5046
0
  WRITE_UINT_FIELD(scan.scanrelid);
5047
0
  WRITE_OID_FIELD(indexid);
5048
0
  WRITE_NODE_FIELD(indexqual);
5049
0
  WRITE_NODE_FIELD(indexqualorig);
5050
0
  WRITE_NODE_FIELD(indexorderby);
5051
0
  WRITE_NODE_FIELD(indexorderbyorig);
5052
0
  WRITE_NODE_FIELD(indexorderbyops);
5053
0
  WRITE_ENUM_FIELD(indexorderdir, ScanDirection);
5054
0
}
5055
5056
static void
5057
_outIndexOnlyScan(StringInfo str, const IndexOnlyScan *node)
5058
0
{
5059
0
  WRITE_NODE_TYPE("INDEXONLYSCAN");
5060
5061
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5062
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5063
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5064
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5065
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5066
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5067
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5068
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5069
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5070
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5071
0
  WRITE_NODE_FIELD(scan.plan.qual);
5072
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5073
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5074
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5075
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5076
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5077
0
  WRITE_UINT_FIELD(scan.scanrelid);
5078
0
  WRITE_OID_FIELD(indexid);
5079
0
  WRITE_NODE_FIELD(indexqual);
5080
0
  WRITE_NODE_FIELD(recheckqual);
5081
0
  WRITE_NODE_FIELD(indexorderby);
5082
0
  WRITE_NODE_FIELD(indextlist);
5083
0
  WRITE_ENUM_FIELD(indexorderdir, ScanDirection);
5084
0
}
5085
5086
static void
5087
_outBitmapIndexScan(StringInfo str, const BitmapIndexScan *node)
5088
0
{
5089
0
  WRITE_NODE_TYPE("BITMAPINDEXSCAN");
5090
5091
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5092
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5093
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5094
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5095
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5096
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5097
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5098
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5099
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5100
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5101
0
  WRITE_NODE_FIELD(scan.plan.qual);
5102
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5103
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5104
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5105
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5106
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5107
0
  WRITE_UINT_FIELD(scan.scanrelid);
5108
0
  WRITE_OID_FIELD(indexid);
5109
0
  WRITE_BOOL_FIELD(isshared);
5110
0
  WRITE_NODE_FIELD(indexqual);
5111
0
  WRITE_NODE_FIELD(indexqualorig);
5112
0
}
5113
5114
static void
5115
_outBitmapHeapScan(StringInfo str, const BitmapHeapScan *node)
5116
0
{
5117
0
  WRITE_NODE_TYPE("BITMAPHEAPSCAN");
5118
5119
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5120
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5121
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5122
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5123
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5124
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5125
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5126
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5127
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5128
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5129
0
  WRITE_NODE_FIELD(scan.plan.qual);
5130
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5131
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5132
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5133
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5134
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5135
0
  WRITE_UINT_FIELD(scan.scanrelid);
5136
0
  WRITE_NODE_FIELD(bitmapqualorig);
5137
0
}
5138
5139
static void
5140
_outTidScan(StringInfo str, const TidScan *node)
5141
0
{
5142
0
  WRITE_NODE_TYPE("TIDSCAN");
5143
5144
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5145
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5146
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5147
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5148
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5149
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5150
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5151
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5152
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5153
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5154
0
  WRITE_NODE_FIELD(scan.plan.qual);
5155
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5156
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5157
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5158
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5159
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5160
0
  WRITE_UINT_FIELD(scan.scanrelid);
5161
0
  WRITE_NODE_FIELD(tidquals);
5162
0
}
5163
5164
static void
5165
_outTidRangeScan(StringInfo str, const TidRangeScan *node)
5166
0
{
5167
0
  WRITE_NODE_TYPE("TIDRANGESCAN");
5168
5169
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5170
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5171
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5172
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5173
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5174
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5175
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5176
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5177
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5178
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5179
0
  WRITE_NODE_FIELD(scan.plan.qual);
5180
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5181
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5182
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5183
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5184
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5185
0
  WRITE_UINT_FIELD(scan.scanrelid);
5186
0
  WRITE_NODE_FIELD(tidrangequals);
5187
0
}
5188
5189
static void
5190
_outSubqueryScan(StringInfo str, const SubqueryScan *node)
5191
0
{
5192
0
  WRITE_NODE_TYPE("SUBQUERYSCAN");
5193
5194
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5195
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5196
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5197
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5198
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5199
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5200
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5201
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5202
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5203
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5204
0
  WRITE_NODE_FIELD(scan.plan.qual);
5205
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5206
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5207
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5208
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5209
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5210
0
  WRITE_UINT_FIELD(scan.scanrelid);
5211
0
  WRITE_NODE_FIELD(subplan);
5212
0
  WRITE_ENUM_FIELD(scanstatus, SubqueryScanStatus);
5213
0
}
5214
5215
static void
5216
_outFunctionScan(StringInfo str, const FunctionScan *node)
5217
0
{
5218
0
  WRITE_NODE_TYPE("FUNCTIONSCAN");
5219
5220
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5221
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5222
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5223
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5224
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5225
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5226
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5227
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5228
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5229
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5230
0
  WRITE_NODE_FIELD(scan.plan.qual);
5231
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5232
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5233
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5234
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5235
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5236
0
  WRITE_UINT_FIELD(scan.scanrelid);
5237
0
  WRITE_NODE_FIELD(functions);
5238
0
  WRITE_BOOL_FIELD(funcordinality);
5239
0
}
5240
5241
static void
5242
_outValuesScan(StringInfo str, const ValuesScan *node)
5243
0
{
5244
0
  WRITE_NODE_TYPE("VALUESSCAN");
5245
5246
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5247
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5248
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5249
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5250
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5251
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5252
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5253
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5254
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5255
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5256
0
  WRITE_NODE_FIELD(scan.plan.qual);
5257
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5258
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5259
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5260
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5261
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5262
0
  WRITE_UINT_FIELD(scan.scanrelid);
5263
0
  WRITE_NODE_FIELD(values_lists);
5264
0
}
5265
5266
static void
5267
_outTableFuncScan(StringInfo str, const TableFuncScan *node)
5268
0
{
5269
0
  WRITE_NODE_TYPE("TABLEFUNCSCAN");
5270
5271
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5272
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5273
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5274
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5275
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5276
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5277
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5278
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5279
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5280
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5281
0
  WRITE_NODE_FIELD(scan.plan.qual);
5282
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5283
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5284
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5285
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5286
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5287
0
  WRITE_UINT_FIELD(scan.scanrelid);
5288
0
  WRITE_NODE_FIELD(tablefunc);
5289
0
}
5290
5291
static void
5292
_outCteScan(StringInfo str, const CteScan *node)
5293
0
{
5294
0
  WRITE_NODE_TYPE("CTESCAN");
5295
5296
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5297
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5298
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5299
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5300
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5301
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5302
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5303
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5304
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5305
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5306
0
  WRITE_NODE_FIELD(scan.plan.qual);
5307
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5308
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5309
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5310
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5311
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5312
0
  WRITE_UINT_FIELD(scan.scanrelid);
5313
0
  WRITE_INT_FIELD(ctePlanId);
5314
0
  WRITE_INT_FIELD(cteParam);
5315
0
}
5316
5317
static void
5318
_outNamedTuplestoreScan(StringInfo str, const NamedTuplestoreScan *node)
5319
0
{
5320
0
  WRITE_NODE_TYPE("NAMEDTUPLESTORESCAN");
5321
5322
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5323
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5324
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5325
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5326
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5327
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5328
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5329
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5330
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5331
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5332
0
  WRITE_NODE_FIELD(scan.plan.qual);
5333
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5334
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5335
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5336
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5337
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5338
0
  WRITE_UINT_FIELD(scan.scanrelid);
5339
0
  WRITE_STRING_FIELD(enrname);
5340
0
}
5341
5342
static void
5343
_outWorkTableScan(StringInfo str, const WorkTableScan *node)
5344
0
{
5345
0
  WRITE_NODE_TYPE("WORKTABLESCAN");
5346
5347
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5348
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5349
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5350
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5351
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5352
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5353
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5354
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5355
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5356
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5357
0
  WRITE_NODE_FIELD(scan.plan.qual);
5358
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5359
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5360
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5361
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5362
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5363
0
  WRITE_UINT_FIELD(scan.scanrelid);
5364
0
  WRITE_INT_FIELD(wtParam);
5365
0
}
5366
5367
static void
5368
_outForeignScan(StringInfo str, const ForeignScan *node)
5369
0
{
5370
0
  WRITE_NODE_TYPE("FOREIGNSCAN");
5371
5372
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5373
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5374
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5375
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5376
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5377
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5378
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5379
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5380
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5381
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5382
0
  WRITE_NODE_FIELD(scan.plan.qual);
5383
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5384
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5385
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5386
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5387
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5388
0
  WRITE_UINT_FIELD(scan.scanrelid);
5389
0
  WRITE_ENUM_FIELD(operation, CmdType);
5390
0
  WRITE_UINT_FIELD(resultRelation);
5391
0
  WRITE_OID_FIELD(checkAsUser);
5392
0
  WRITE_OID_FIELD(fs_server);
5393
0
  WRITE_NODE_FIELD(fdw_exprs);
5394
0
  WRITE_NODE_FIELD(fdw_private);
5395
0
  WRITE_NODE_FIELD(fdw_scan_tlist);
5396
0
  WRITE_NODE_FIELD(fdw_recheck_quals);
5397
0
  WRITE_BITMAPSET_FIELD(fs_relids);
5398
0
  WRITE_BITMAPSET_FIELD(fs_base_relids);
5399
0
  WRITE_BOOL_FIELD(fsSystemCol);
5400
0
}
5401
5402
static void
5403
_outCustomScan(StringInfo str, const CustomScan *node)
5404
0
{
5405
0
  WRITE_NODE_TYPE("CUSTOMSCAN");
5406
5407
0
  WRITE_INT_FIELD(scan.plan.disabled_nodes);
5408
0
  WRITE_FLOAT_FIELD(scan.plan.startup_cost);
5409
0
  WRITE_FLOAT_FIELD(scan.plan.total_cost);
5410
0
  WRITE_FLOAT_FIELD(scan.plan.plan_rows);
5411
0
  WRITE_INT_FIELD(scan.plan.plan_width);
5412
0
  WRITE_BOOL_FIELD(scan.plan.parallel_aware);
5413
0
  WRITE_BOOL_FIELD(scan.plan.parallel_safe);
5414
0
  WRITE_BOOL_FIELD(scan.plan.async_capable);
5415
0
  WRITE_INT_FIELD(scan.plan.plan_node_id);
5416
0
  WRITE_NODE_FIELD(scan.plan.targetlist);
5417
0
  WRITE_NODE_FIELD(scan.plan.qual);
5418
0
  WRITE_NODE_FIELD(scan.plan.lefttree);
5419
0
  WRITE_NODE_FIELD(scan.plan.righttree);
5420
0
  WRITE_NODE_FIELD(scan.plan.initPlan);
5421
0
  WRITE_BITMAPSET_FIELD(scan.plan.extParam);
5422
0
  WRITE_BITMAPSET_FIELD(scan.plan.allParam);
5423
0
  WRITE_UINT_FIELD(scan.scanrelid);
5424
0
  WRITE_UINT_FIELD(flags);
5425
0
  WRITE_NODE_FIELD(custom_plans);
5426
0
  WRITE_NODE_FIELD(custom_exprs);
5427
0
  WRITE_NODE_FIELD(custom_private);
5428
0
  WRITE_NODE_FIELD(custom_scan_tlist);
5429
0
  WRITE_BITMAPSET_FIELD(custom_relids);
5430
5431
  /* CustomName is a key to lookup CustomScanMethods */
5432
0
  appendStringInfoString(str, " :methods ");
5433
0
  outToken(str, node->methods->CustomName);
5434
0
}
5435
5436
static void
5437
_outNestLoop(StringInfo str, const NestLoop *node)
5438
0
{
5439
0
  WRITE_NODE_TYPE("NESTLOOP");
5440
5441
0
  WRITE_INT_FIELD(join.plan.disabled_nodes);
5442
0
  WRITE_FLOAT_FIELD(join.plan.startup_cost);
5443
0
  WRITE_FLOAT_FIELD(join.plan.total_cost);
5444
0
  WRITE_FLOAT_FIELD(join.plan.plan_rows);
5445
0
  WRITE_INT_FIELD(join.plan.plan_width);
5446
0
  WRITE_BOOL_FIELD(join.plan.parallel_aware);
5447
0
  WRITE_BOOL_FIELD(join.plan.parallel_safe);
5448
0
  WRITE_BOOL_FIELD(join.plan.async_capable);
5449
0
  WRITE_INT_FIELD(join.plan.plan_node_id);
5450
0
  WRITE_NODE_FIELD(join.plan.targetlist);
5451
0
  WRITE_NODE_FIELD(join.plan.qual);
5452
0
  WRITE_NODE_FIELD(join.plan.lefttree);
5453
0
  WRITE_NODE_FIELD(join.plan.righttree);
5454
0
  WRITE_NODE_FIELD(join.plan.initPlan);
5455
0
  WRITE_BITMAPSET_FIELD(join.plan.extParam);
5456
0
  WRITE_BITMAPSET_FIELD(join.plan.allParam);
5457
0
  WRITE_ENUM_FIELD(join.jointype, JoinType);
5458
0
  WRITE_BOOL_FIELD(join.inner_unique);
5459
0
  WRITE_NODE_FIELD(join.joinqual);
5460
0
  WRITE_NODE_FIELD(nestParams);
5461
0
}
5462
5463
static void
5464
_outNestLoopParam(StringInfo str, const NestLoopParam *node)
5465
0
{
5466
0
  WRITE_NODE_TYPE("NESTLOOPPARAM");
5467
5468
0
  WRITE_INT_FIELD(paramno);
5469
0
  WRITE_NODE_FIELD(paramval);
5470
0
}
5471
5472
static void
5473
_outMergeJoin(StringInfo str, const MergeJoin *node)
5474
0
{
5475
0
  WRITE_NODE_TYPE("MERGEJOIN");
5476
5477
0
  WRITE_INT_FIELD(join.plan.disabled_nodes);
5478
0
  WRITE_FLOAT_FIELD(join.plan.startup_cost);
5479
0
  WRITE_FLOAT_FIELD(join.plan.total_cost);
5480
0
  WRITE_FLOAT_FIELD(join.plan.plan_rows);
5481
0
  WRITE_INT_FIELD(join.plan.plan_width);
5482
0
  WRITE_BOOL_FIELD(join.plan.parallel_aware);
5483
0
  WRITE_BOOL_FIELD(join.plan.parallel_safe);
5484
0
  WRITE_BOOL_FIELD(join.plan.async_capable);
5485
0
  WRITE_INT_FIELD(join.plan.plan_node_id);
5486
0
  WRITE_NODE_FIELD(join.plan.targetlist);
5487
0
  WRITE_NODE_FIELD(join.plan.qual);
5488
0
  WRITE_NODE_FIELD(join.plan.lefttree);
5489
0
  WRITE_NODE_FIELD(join.plan.righttree);
5490
0
  WRITE_NODE_FIELD(join.plan.initPlan);
5491
0
  WRITE_BITMAPSET_FIELD(join.plan.extParam);
5492
0
  WRITE_BITMAPSET_FIELD(join.plan.allParam);
5493
0
  WRITE_ENUM_FIELD(join.jointype, JoinType);
5494
0
  WRITE_BOOL_FIELD(join.inner_unique);
5495
0
  WRITE_NODE_FIELD(join.joinqual);
5496
0
  WRITE_BOOL_FIELD(skip_mark_restore);
5497
0
  WRITE_NODE_FIELD(mergeclauses);
5498
0
  WRITE_OID_ARRAY(mergeFamilies, list_length(node->mergeclauses));
5499
0
  WRITE_OID_ARRAY(mergeCollations, list_length(node->mergeclauses));
5500
0
  WRITE_BOOL_ARRAY(mergeReversals, list_length(node->mergeclauses));
5501
0
  WRITE_BOOL_ARRAY(mergeNullsFirst, list_length(node->mergeclauses));
5502
0
}
5503
5504
static void
5505
_outHashJoin(StringInfo str, const HashJoin *node)
5506
0
{
5507
0
  WRITE_NODE_TYPE("HASHJOIN");
5508
5509
0
  WRITE_INT_FIELD(join.plan.disabled_nodes);
5510
0
  WRITE_FLOAT_FIELD(join.plan.startup_cost);
5511
0
  WRITE_FLOAT_FIELD(join.plan.total_cost);
5512
0
  WRITE_FLOAT_FIELD(join.plan.plan_rows);
5513
0
  WRITE_INT_FIELD(join.plan.plan_width);
5514
0
  WRITE_BOOL_FIELD(join.plan.parallel_aware);
5515
0
  WRITE_BOOL_FIELD(join.plan.parallel_safe);
5516
0
  WRITE_BOOL_FIELD(join.plan.async_capable);
5517
0
  WRITE_INT_FIELD(join.plan.plan_node_id);
5518
0
  WRITE_NODE_FIELD(join.plan.targetlist);
5519
0
  WRITE_NODE_FIELD(join.plan.qual);
5520
0
  WRITE_NODE_FIELD(join.plan.lefttree);
5521
0
  WRITE_NODE_FIELD(join.plan.righttree);
5522
0
  WRITE_NODE_FIELD(join.plan.initPlan);
5523
0
  WRITE_BITMAPSET_FIELD(join.plan.extParam);
5524
0
  WRITE_BITMAPSET_FIELD(join.plan.allParam);
5525
0
  WRITE_ENUM_FIELD(join.jointype, JoinType);
5526
0
  WRITE_BOOL_FIELD(join.inner_unique);
5527
0
  WRITE_NODE_FIELD(join.joinqual);
5528
0
  WRITE_NODE_FIELD(hashclauses);
5529
0
  WRITE_NODE_FIELD(hashoperators);
5530
0
  WRITE_NODE_FIELD(hashcollations);
5531
0
  WRITE_NODE_FIELD(hashkeys);
5532
0
}
5533
5534
static void
5535
_outMaterial(StringInfo str, const Material *node)
5536
0
{
5537
0
  WRITE_NODE_TYPE("MATERIAL");
5538
5539
0
  WRITE_INT_FIELD(plan.disabled_nodes);
5540
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
5541
0
  WRITE_FLOAT_FIELD(plan.total_cost);
5542
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
5543
0
  WRITE_INT_FIELD(plan.plan_width);
5544
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
5545
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
5546
0
  WRITE_BOOL_FIELD(plan.async_capable);
5547
0
  WRITE_INT_FIELD(plan.plan_node_id);
5548
0
  WRITE_NODE_FIELD(plan.targetlist);
5549
0
  WRITE_NODE_FIELD(plan.qual);
5550
0
  WRITE_NODE_FIELD(plan.lefttree);
5551
0
  WRITE_NODE_FIELD(plan.righttree);
5552
0
  WRITE_NODE_FIELD(plan.initPlan);
5553
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
5554
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
5555
0
}
5556
5557
static void
5558
_outMemoize(StringInfo str, const Memoize *node)
5559
0
{
5560
0
  WRITE_NODE_TYPE("MEMOIZE");
5561
5562
0
  WRITE_INT_FIELD(plan.disabled_nodes);
5563
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
5564
0
  WRITE_FLOAT_FIELD(plan.total_cost);
5565
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
5566
0
  WRITE_INT_FIELD(plan.plan_width);
5567
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
5568
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
5569
0
  WRITE_BOOL_FIELD(plan.async_capable);
5570
0
  WRITE_INT_FIELD(plan.plan_node_id);
5571
0
  WRITE_NODE_FIELD(plan.targetlist);
5572
0
  WRITE_NODE_FIELD(plan.qual);
5573
0
  WRITE_NODE_FIELD(plan.lefttree);
5574
0
  WRITE_NODE_FIELD(plan.righttree);
5575
0
  WRITE_NODE_FIELD(plan.initPlan);
5576
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
5577
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
5578
0
  WRITE_INT_FIELD(numKeys);
5579
0
  WRITE_OID_ARRAY(hashOperators, node->numKeys);
5580
0
  WRITE_OID_ARRAY(collations, node->numKeys);
5581
0
  WRITE_NODE_FIELD(param_exprs);
5582
0
  WRITE_BOOL_FIELD(singlerow);
5583
0
  WRITE_BOOL_FIELD(binary_mode);
5584
0
  WRITE_UINT_FIELD(est_entries);
5585
0
  WRITE_BITMAPSET_FIELD(keyparamids);
5586
0
}
5587
5588
static void
5589
_outSort(StringInfo str, const Sort *node)
5590
0
{
5591
0
  WRITE_NODE_TYPE("SORT");
5592
5593
0
  WRITE_INT_FIELD(plan.disabled_nodes);
5594
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
5595
0
  WRITE_FLOAT_FIELD(plan.total_cost);
5596
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
5597
0
  WRITE_INT_FIELD(plan.plan_width);
5598
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
5599
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
5600
0
  WRITE_BOOL_FIELD(plan.async_capable);
5601
0
  WRITE_INT_FIELD(plan.plan_node_id);
5602
0
  WRITE_NODE_FIELD(plan.targetlist);
5603
0
  WRITE_NODE_FIELD(plan.qual);
5604
0
  WRITE_NODE_FIELD(plan.lefttree);
5605
0
  WRITE_NODE_FIELD(plan.righttree);
5606
0
  WRITE_NODE_FIELD(plan.initPlan);
5607
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
5608
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
5609
0
  WRITE_INT_FIELD(numCols);
5610
0
  WRITE_ATTRNUMBER_ARRAY(sortColIdx, node->numCols);
5611
0
  WRITE_OID_ARRAY(sortOperators, node->numCols);
5612
0
  WRITE_OID_ARRAY(collations, node->numCols);
5613
0
  WRITE_BOOL_ARRAY(nullsFirst, node->numCols);
5614
0
}
5615
5616
static void
5617
_outIncrementalSort(StringInfo str, const IncrementalSort *node)
5618
0
{
5619
0
  WRITE_NODE_TYPE("INCREMENTALSORT");
5620
5621
0
  WRITE_INT_FIELD(sort.plan.disabled_nodes);
5622
0
  WRITE_FLOAT_FIELD(sort.plan.startup_cost);
5623
0
  WRITE_FLOAT_FIELD(sort.plan.total_cost);
5624
0
  WRITE_FLOAT_FIELD(sort.plan.plan_rows);
5625
0
  WRITE_INT_FIELD(sort.plan.plan_width);
5626
0
  WRITE_BOOL_FIELD(sort.plan.parallel_aware);
5627
0
  WRITE_BOOL_FIELD(sort.plan.parallel_safe);
5628
0
  WRITE_BOOL_FIELD(sort.plan.async_capable);
5629
0
  WRITE_INT_FIELD(sort.plan.plan_node_id);
5630
0
  WRITE_NODE_FIELD(sort.plan.targetlist);
5631
0
  WRITE_NODE_FIELD(sort.plan.qual);
5632
0
  WRITE_NODE_FIELD(sort.plan.lefttree);
5633
0
  WRITE_NODE_FIELD(sort.plan.righttree);
5634
0
  WRITE_NODE_FIELD(sort.plan.initPlan);
5635
0
  WRITE_BITMAPSET_FIELD(sort.plan.extParam);
5636
0
  WRITE_BITMAPSET_FIELD(sort.plan.allParam);
5637
0
  WRITE_INT_FIELD(sort.numCols);
5638
0
  WRITE_ATTRNUMBER_ARRAY(sort.sortColIdx, node->sort.numCols);
5639
0
  WRITE_OID_ARRAY(sort.sortOperators, node->sort.numCols);
5640
0
  WRITE_OID_ARRAY(sort.collations, node->sort.numCols);
5641
0
  WRITE_BOOL_ARRAY(sort.nullsFirst, node->sort.numCols);
5642
0
  WRITE_INT_FIELD(nPresortedCols);
5643
0
}
5644
5645
static void
5646
_outGroup(StringInfo str, const Group *node)
5647
0
{
5648
0
  WRITE_NODE_TYPE("GROUP");
5649
5650
0
  WRITE_INT_FIELD(plan.disabled_nodes);
5651
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
5652
0
  WRITE_FLOAT_FIELD(plan.total_cost);
5653
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
5654
0
  WRITE_INT_FIELD(plan.plan_width);
5655
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
5656
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
5657
0
  WRITE_BOOL_FIELD(plan.async_capable);
5658
0
  WRITE_INT_FIELD(plan.plan_node_id);
5659
0
  WRITE_NODE_FIELD(plan.targetlist);
5660
0
  WRITE_NODE_FIELD(plan.qual);
5661
0
  WRITE_NODE_FIELD(plan.lefttree);
5662
0
  WRITE_NODE_FIELD(plan.righttree);
5663
0
  WRITE_NODE_FIELD(plan.initPlan);
5664
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
5665
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
5666
0
  WRITE_INT_FIELD(numCols);
5667
0
  WRITE_ATTRNUMBER_ARRAY(grpColIdx, node->numCols);
5668
0
  WRITE_OID_ARRAY(grpOperators, node->numCols);
5669
0
  WRITE_OID_ARRAY(grpCollations, node->numCols);
5670
0
}
5671
5672
static void
5673
_outAgg(StringInfo str, const Agg *node)
5674
0
{
5675
0
  WRITE_NODE_TYPE("AGG");
5676
5677
0
  WRITE_INT_FIELD(plan.disabled_nodes);
5678
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
5679
0
  WRITE_FLOAT_FIELD(plan.total_cost);
5680
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
5681
0
  WRITE_INT_FIELD(plan.plan_width);
5682
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
5683
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
5684
0
  WRITE_BOOL_FIELD(plan.async_capable);
5685
0
  WRITE_INT_FIELD(plan.plan_node_id);
5686
0
  WRITE_NODE_FIELD(plan.targetlist);
5687
0
  WRITE_NODE_FIELD(plan.qual);
5688
0
  WRITE_NODE_FIELD(plan.lefttree);
5689
0
  WRITE_NODE_FIELD(plan.righttree);
5690
0
  WRITE_NODE_FIELD(plan.initPlan);
5691
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
5692
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
5693
0
  WRITE_ENUM_FIELD(aggstrategy, AggStrategy);
5694
0
  WRITE_ENUM_FIELD(aggsplit, AggSplit);
5695
0
  WRITE_INT_FIELD(numCols);
5696
0
  WRITE_ATTRNUMBER_ARRAY(grpColIdx, node->numCols);
5697
0
  WRITE_OID_ARRAY(grpOperators, node->numCols);
5698
0
  WRITE_OID_ARRAY(grpCollations, node->numCols);
5699
0
  WRITE_LONG_FIELD(numGroups);
5700
0
  WRITE_UINT64_FIELD(transitionSpace);
5701
0
  WRITE_BITMAPSET_FIELD(aggParams);
5702
0
  WRITE_NODE_FIELD(groupingSets);
5703
0
  WRITE_NODE_FIELD(chain);
5704
0
}
5705
5706
static void
5707
_outWindowAgg(StringInfo str, const WindowAgg *node)
5708
0
{
5709
0
  WRITE_NODE_TYPE("WINDOWAGG");
5710
5711
0
  WRITE_INT_FIELD(plan.disabled_nodes);
5712
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
5713
0
  WRITE_FLOAT_FIELD(plan.total_cost);
5714
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
5715
0
  WRITE_INT_FIELD(plan.plan_width);
5716
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
5717
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
5718
0
  WRITE_BOOL_FIELD(plan.async_capable);
5719
0
  WRITE_INT_FIELD(plan.plan_node_id);
5720
0
  WRITE_NODE_FIELD(plan.targetlist);
5721
0
  WRITE_NODE_FIELD(plan.qual);
5722
0
  WRITE_NODE_FIELD(plan.lefttree);
5723
0
  WRITE_NODE_FIELD(plan.righttree);
5724
0
  WRITE_NODE_FIELD(plan.initPlan);
5725
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
5726
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
5727
0
  WRITE_STRING_FIELD(winname);
5728
0
  WRITE_UINT_FIELD(winref);
5729
0
  WRITE_INT_FIELD(partNumCols);
5730
0
  WRITE_ATTRNUMBER_ARRAY(partColIdx, node->partNumCols);
5731
0
  WRITE_OID_ARRAY(partOperators, node->partNumCols);
5732
0
  WRITE_OID_ARRAY(partCollations, node->partNumCols);
5733
0
  WRITE_INT_FIELD(ordNumCols);
5734
0
  WRITE_ATTRNUMBER_ARRAY(ordColIdx, node->ordNumCols);
5735
0
  WRITE_OID_ARRAY(ordOperators, node->ordNumCols);
5736
0
  WRITE_OID_ARRAY(ordCollations, node->ordNumCols);
5737
0
  WRITE_INT_FIELD(frameOptions);
5738
0
  WRITE_NODE_FIELD(startOffset);
5739
0
  WRITE_NODE_FIELD(endOffset);
5740
0
  WRITE_NODE_FIELD(runCondition);
5741
0
  WRITE_NODE_FIELD(runConditionOrig);
5742
0
  WRITE_OID_FIELD(startInRangeFunc);
5743
0
  WRITE_OID_FIELD(endInRangeFunc);
5744
0
  WRITE_OID_FIELD(inRangeColl);
5745
0
  WRITE_BOOL_FIELD(inRangeAsc);
5746
0
  WRITE_BOOL_FIELD(inRangeNullsFirst);
5747
0
  WRITE_BOOL_FIELD(topWindow);
5748
0
}
5749
5750
static void
5751
_outUnique(StringInfo str, const Unique *node)
5752
0
{
5753
0
  WRITE_NODE_TYPE("UNIQUE");
5754
5755
0
  WRITE_INT_FIELD(plan.disabled_nodes);
5756
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
5757
0
  WRITE_FLOAT_FIELD(plan.total_cost);
5758
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
5759
0
  WRITE_INT_FIELD(plan.plan_width);
5760
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
5761
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
5762
0
  WRITE_BOOL_FIELD(plan.async_capable);
5763
0
  WRITE_INT_FIELD(plan.plan_node_id);
5764
0
  WRITE_NODE_FIELD(plan.targetlist);
5765
0
  WRITE_NODE_FIELD(plan.qual);
5766
0
  WRITE_NODE_FIELD(plan.lefttree);
5767
0
  WRITE_NODE_FIELD(plan.righttree);
5768
0
  WRITE_NODE_FIELD(plan.initPlan);
5769
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
5770
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
5771
0
  WRITE_INT_FIELD(numCols);
5772
0
  WRITE_ATTRNUMBER_ARRAY(uniqColIdx, node->numCols);
5773
0
  WRITE_OID_ARRAY(uniqOperators, node->numCols);
5774
0
  WRITE_OID_ARRAY(uniqCollations, node->numCols);
5775
0
}
5776
5777
static void
5778
_outGather(StringInfo str, const Gather *node)
5779
0
{
5780
0
  WRITE_NODE_TYPE("GATHER");
5781
5782
0
  WRITE_INT_FIELD(plan.disabled_nodes);
5783
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
5784
0
  WRITE_FLOAT_FIELD(plan.total_cost);
5785
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
5786
0
  WRITE_INT_FIELD(plan.plan_width);
5787
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
5788
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
5789
0
  WRITE_BOOL_FIELD(plan.async_capable);
5790
0
  WRITE_INT_FIELD(plan.plan_node_id);
5791
0
  WRITE_NODE_FIELD(plan.targetlist);
5792
0
  WRITE_NODE_FIELD(plan.qual);
5793
0
  WRITE_NODE_FIELD(plan.lefttree);
5794
0
  WRITE_NODE_FIELD(plan.righttree);
5795
0
  WRITE_NODE_FIELD(plan.initPlan);
5796
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
5797
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
5798
0
  WRITE_INT_FIELD(num_workers);
5799
0
  WRITE_INT_FIELD(rescan_param);
5800
0
  WRITE_BOOL_FIELD(single_copy);
5801
0
  WRITE_BOOL_FIELD(invisible);
5802
0
  WRITE_BITMAPSET_FIELD(initParam);
5803
0
}
5804
5805
static void
5806
_outGatherMerge(StringInfo str, const GatherMerge *node)
5807
0
{
5808
0
  WRITE_NODE_TYPE("GATHERMERGE");
5809
5810
0
  WRITE_INT_FIELD(plan.disabled_nodes);
5811
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
5812
0
  WRITE_FLOAT_FIELD(plan.total_cost);
5813
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
5814
0
  WRITE_INT_FIELD(plan.plan_width);
5815
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
5816
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
5817
0
  WRITE_BOOL_FIELD(plan.async_capable);
5818
0
  WRITE_INT_FIELD(plan.plan_node_id);
5819
0
  WRITE_NODE_FIELD(plan.targetlist);
5820
0
  WRITE_NODE_FIELD(plan.qual);
5821
0
  WRITE_NODE_FIELD(plan.lefttree);
5822
0
  WRITE_NODE_FIELD(plan.righttree);
5823
0
  WRITE_NODE_FIELD(plan.initPlan);
5824
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
5825
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
5826
0
  WRITE_INT_FIELD(num_workers);
5827
0
  WRITE_INT_FIELD(rescan_param);
5828
0
  WRITE_INT_FIELD(numCols);
5829
0
  WRITE_ATTRNUMBER_ARRAY(sortColIdx, node->numCols);
5830
0
  WRITE_OID_ARRAY(sortOperators, node->numCols);
5831
0
  WRITE_OID_ARRAY(collations, node->numCols);
5832
0
  WRITE_BOOL_ARRAY(nullsFirst, node->numCols);
5833
0
  WRITE_BITMAPSET_FIELD(initParam);
5834
0
}
5835
5836
static void
5837
_outHash(StringInfo str, const Hash *node)
5838
0
{
5839
0
  WRITE_NODE_TYPE("HASH");
5840
5841
0
  WRITE_INT_FIELD(plan.disabled_nodes);
5842
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
5843
0
  WRITE_FLOAT_FIELD(plan.total_cost);
5844
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
5845
0
  WRITE_INT_FIELD(plan.plan_width);
5846
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
5847
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
5848
0
  WRITE_BOOL_FIELD(plan.async_capable);
5849
0
  WRITE_INT_FIELD(plan.plan_node_id);
5850
0
  WRITE_NODE_FIELD(plan.targetlist);
5851
0
  WRITE_NODE_FIELD(plan.qual);
5852
0
  WRITE_NODE_FIELD(plan.lefttree);
5853
0
  WRITE_NODE_FIELD(plan.righttree);
5854
0
  WRITE_NODE_FIELD(plan.initPlan);
5855
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
5856
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
5857
0
  WRITE_NODE_FIELD(hashkeys);
5858
0
  WRITE_OID_FIELD(skewTable);
5859
0
  WRITE_INT_FIELD(skewColumn);
5860
0
  WRITE_BOOL_FIELD(skewInherit);
5861
0
  WRITE_FLOAT_FIELD(rows_total);
5862
0
}
5863
5864
static void
5865
_outSetOp(StringInfo str, const SetOp *node)
5866
0
{
5867
0
  WRITE_NODE_TYPE("SETOP");
5868
5869
0
  WRITE_INT_FIELD(plan.disabled_nodes);
5870
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
5871
0
  WRITE_FLOAT_FIELD(plan.total_cost);
5872
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
5873
0
  WRITE_INT_FIELD(plan.plan_width);
5874
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
5875
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
5876
0
  WRITE_BOOL_FIELD(plan.async_capable);
5877
0
  WRITE_INT_FIELD(plan.plan_node_id);
5878
0
  WRITE_NODE_FIELD(plan.targetlist);
5879
0
  WRITE_NODE_FIELD(plan.qual);
5880
0
  WRITE_NODE_FIELD(plan.lefttree);
5881
0
  WRITE_NODE_FIELD(plan.righttree);
5882
0
  WRITE_NODE_FIELD(plan.initPlan);
5883
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
5884
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
5885
0
  WRITE_ENUM_FIELD(cmd, SetOpCmd);
5886
0
  WRITE_ENUM_FIELD(strategy, SetOpStrategy);
5887
0
  WRITE_INT_FIELD(numCols);
5888
0
  WRITE_ATTRNUMBER_ARRAY(cmpColIdx, node->numCols);
5889
0
  WRITE_OID_ARRAY(cmpOperators, node->numCols);
5890
0
  WRITE_OID_ARRAY(cmpCollations, node->numCols);
5891
0
  WRITE_BOOL_ARRAY(cmpNullsFirst, node->numCols);
5892
0
  WRITE_LONG_FIELD(numGroups);
5893
0
}
5894
5895
static void
5896
_outLockRows(StringInfo str, const LockRows *node)
5897
0
{
5898
0
  WRITE_NODE_TYPE("LOCKROWS");
5899
5900
0
  WRITE_INT_FIELD(plan.disabled_nodes);
5901
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
5902
0
  WRITE_FLOAT_FIELD(plan.total_cost);
5903
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
5904
0
  WRITE_INT_FIELD(plan.plan_width);
5905
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
5906
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
5907
0
  WRITE_BOOL_FIELD(plan.async_capable);
5908
0
  WRITE_INT_FIELD(plan.plan_node_id);
5909
0
  WRITE_NODE_FIELD(plan.targetlist);
5910
0
  WRITE_NODE_FIELD(plan.qual);
5911
0
  WRITE_NODE_FIELD(plan.lefttree);
5912
0
  WRITE_NODE_FIELD(plan.righttree);
5913
0
  WRITE_NODE_FIELD(plan.initPlan);
5914
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
5915
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
5916
0
  WRITE_NODE_FIELD(rowMarks);
5917
0
  WRITE_INT_FIELD(epqParam);
5918
0
}
5919
5920
static void
5921
_outLimit(StringInfo str, const Limit *node)
5922
0
{
5923
0
  WRITE_NODE_TYPE("LIMIT");
5924
5925
0
  WRITE_INT_FIELD(plan.disabled_nodes);
5926
0
  WRITE_FLOAT_FIELD(plan.startup_cost);
5927
0
  WRITE_FLOAT_FIELD(plan.total_cost);
5928
0
  WRITE_FLOAT_FIELD(plan.plan_rows);
5929
0
  WRITE_INT_FIELD(plan.plan_width);
5930
0
  WRITE_BOOL_FIELD(plan.parallel_aware);
5931
0
  WRITE_BOOL_FIELD(plan.parallel_safe);
5932
0
  WRITE_BOOL_FIELD(plan.async_capable);
5933
0
  WRITE_INT_FIELD(plan.plan_node_id);
5934
0
  WRITE_NODE_FIELD(plan.targetlist);
5935
0
  WRITE_NODE_FIELD(plan.qual);
5936
0
  WRITE_NODE_FIELD(plan.lefttree);
5937
0
  WRITE_NODE_FIELD(plan.righttree);
5938
0
  WRITE_NODE_FIELD(plan.initPlan);
5939
0
  WRITE_BITMAPSET_FIELD(plan.extParam);
5940
0
  WRITE_BITMAPSET_FIELD(plan.allParam);
5941
0
  WRITE_NODE_FIELD(limitOffset);
5942
0
  WRITE_NODE_FIELD(limitCount);
5943
0
  WRITE_ENUM_FIELD(limitOption, LimitOption);
5944
0
  WRITE_INT_FIELD(uniqNumCols);
5945
0
  WRITE_ATTRNUMBER_ARRAY(uniqColIdx, node->uniqNumCols);
5946
0
  WRITE_OID_ARRAY(uniqOperators, node->uniqNumCols);
5947
0
  WRITE_OID_ARRAY(uniqCollations, node->uniqNumCols);
5948
0
}
5949
5950
static void
5951
_outPlanRowMark(StringInfo str, const PlanRowMark *node)
5952
0
{
5953
0
  WRITE_NODE_TYPE("PLANROWMARK");
5954
5955
0
  WRITE_UINT_FIELD(rti);
5956
0
  WRITE_UINT_FIELD(prti);
5957
0
  WRITE_UINT_FIELD(rowmarkId);
5958
0
  WRITE_ENUM_FIELD(markType, RowMarkType);
5959
0
  WRITE_INT_FIELD(allMarkTypes);
5960
0
  WRITE_ENUM_FIELD(strength, LockClauseStrength);
5961
0
  WRITE_ENUM_FIELD(waitPolicy, LockWaitPolicy);
5962
0
  WRITE_BOOL_FIELD(isParent);
5963
0
}
5964
5965
static void
5966
_outPartitionPruneInfo(StringInfo str, const PartitionPruneInfo *node)
5967
0
{
5968
0
  WRITE_NODE_TYPE("PARTITIONPRUNEINFO");
5969
5970
0
  WRITE_BITMAPSET_FIELD(relids);
5971
0
  WRITE_NODE_FIELD(prune_infos);
5972
0
  WRITE_BITMAPSET_FIELD(other_subplans);
5973
0
}
5974
5975
static void
5976
_outPartitionedRelPruneInfo(StringInfo str, const PartitionedRelPruneInfo *node)
5977
0
{
5978
0
  WRITE_NODE_TYPE("PARTITIONEDRELPRUNEINFO");
5979
5980
0
  WRITE_UINT_FIELD(rtindex);
5981
0
  WRITE_BITMAPSET_FIELD(present_parts);
5982
0
  WRITE_INT_FIELD(nparts);
5983
0
  WRITE_INT_ARRAY(subplan_map, node->nparts);
5984
0
  WRITE_INT_ARRAY(subpart_map, node->nparts);
5985
0
  WRITE_INT_ARRAY(leafpart_rti_map, node->nparts);
5986
0
  WRITE_OID_ARRAY(relid_map, node->nparts);
5987
0
  WRITE_NODE_FIELD(initial_pruning_steps);
5988
0
  WRITE_NODE_FIELD(exec_pruning_steps);
5989
0
  WRITE_BITMAPSET_FIELD(execparamids);
5990
0
}
5991
5992
static void
5993
_outPartitionPruneStepOp(StringInfo str, const PartitionPruneStepOp *node)
5994
0
{
5995
0
  WRITE_NODE_TYPE("PARTITIONPRUNESTEPOP");
5996
5997
0
  WRITE_INT_FIELD(step.step_id);
5998
0
  WRITE_INT_FIELD(opstrategy);
5999
0
  WRITE_NODE_FIELD(exprs);
6000
0
  WRITE_NODE_FIELD(cmpfns);
6001
0
  WRITE_BITMAPSET_FIELD(nullkeys);
6002
0
}
6003
6004
static void
6005
_outPartitionPruneStepCombine(StringInfo str, const PartitionPruneStepCombine *node)
6006
0
{
6007
0
  WRITE_NODE_TYPE("PARTITIONPRUNESTEPCOMBINE");
6008
6009
0
  WRITE_INT_FIELD(step.step_id);
6010
0
  WRITE_ENUM_FIELD(combineOp, PartitionPruneCombineOp);
6011
0
  WRITE_NODE_FIELD(source_stepids);
6012
0
}
6013
6014
static void
6015
_outPlanInvalItem(StringInfo str, const PlanInvalItem *node)
6016
0
{
6017
0
  WRITE_NODE_TYPE("PLANINVALITEM");
6018
6019
0
  WRITE_INT_FIELD(cacheId);
6020
0
  WRITE_UINT_FIELD(hashValue);
6021
0
}
6022
6023
static void
6024
_outForeignKeyCacheInfo(StringInfo str, const ForeignKeyCacheInfo *node)
6025
0
{
6026
0
  WRITE_NODE_TYPE("FOREIGNKEYCACHEINFO");
6027
6028
0
  WRITE_OID_FIELD(conoid);
6029
0
  WRITE_OID_FIELD(conrelid);
6030
0
  WRITE_OID_FIELD(confrelid);
6031
0
  WRITE_INT_FIELD(nkeys);
6032
0
  WRITE_BOOL_FIELD(conenforced);
6033
0
  WRITE_ATTRNUMBER_ARRAY(conkey, node->nkeys);
6034
0
  WRITE_ATTRNUMBER_ARRAY(confkey, node->nkeys);
6035
0
  WRITE_OID_ARRAY(conpfeqop, node->nkeys);
6036
0
}