pg_query 2.2.1 → 4.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (466) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -1
  3. data/README.md +29 -33
  4. data/Rakefile +2 -2
  5. data/ext/pg_query/include/access/amapi.h +45 -1
  6. data/ext/pg_query/include/access/attmap.h +1 -1
  7. data/ext/pg_query/include/access/attnum.h +2 -2
  8. data/ext/pg_query/include/access/clog.h +4 -2
  9. data/ext/pg_query/include/access/commit_ts.h +6 -9
  10. data/ext/pg_query/include/access/detoast.h +1 -11
  11. data/ext/pg_query/include/access/genam.h +15 -12
  12. data/ext/pg_query/include/access/gin.h +2 -2
  13. data/ext/pg_query/include/access/htup.h +1 -1
  14. data/ext/pg_query/include/access/htup_details.h +75 -87
  15. data/ext/pg_query/include/access/itup.h +7 -1
  16. data/ext/pg_query/include/access/parallel.h +2 -2
  17. data/ext/pg_query/include/access/printtup.h +1 -1
  18. data/ext/pg_query/include/access/relation.h +1 -1
  19. data/ext/pg_query/include/access/relscan.h +17 -2
  20. data/ext/pg_query/include/access/rmgr.h +30 -3
  21. data/ext/pg_query/include/access/rmgrlist.h +23 -23
  22. data/ext/pg_query/include/access/sdir.h +1 -1
  23. data/ext/pg_query/include/access/skey.h +1 -1
  24. data/ext/pg_query/include/access/stratnum.h +4 -2
  25. data/ext/pg_query/include/access/sysattr.h +1 -1
  26. data/ext/pg_query/include/access/table.h +2 -1
  27. data/ext/pg_query/include/access/tableam.h +272 -20
  28. data/ext/pg_query/include/access/toast_compression.h +73 -0
  29. data/ext/pg_query/include/access/transam.h +123 -13
  30. data/ext/pg_query/include/access/tupconvert.h +1 -1
  31. data/ext/pg_query/include/access/tupdesc.h +1 -1
  32. data/ext/pg_query/include/access/tupmacs.h +3 -3
  33. data/ext/pg_query/include/access/twophase.h +3 -1
  34. data/ext/pg_query/include/access/xact.h +73 -19
  35. data/ext/pg_query/include/access/xlog.h +60 -155
  36. data/ext/pg_query/include/access/xlog_internal.h +40 -13
  37. data/ext/pg_query/include/access/xlogdefs.h +8 -16
  38. data/ext/pg_query/include/access/xlogprefetcher.h +55 -0
  39. data/ext/pg_query/include/access/xlogreader.h +145 -39
  40. data/ext/pg_query/include/access/xlogrecord.h +18 -9
  41. data/ext/pg_query/include/access/xlogrecovery.h +157 -0
  42. data/ext/pg_query/include/c.h +101 -44
  43. data/ext/pg_query/include/catalog/catalog.h +3 -1
  44. data/ext/pg_query/include/catalog/catversion.h +2 -2
  45. data/ext/pg_query/include/catalog/dependency.h +8 -16
  46. data/ext/pg_query/include/catalog/genbki.h +83 -5
  47. data/ext/pg_query/include/catalog/index.h +18 -3
  48. data/ext/pg_query/include/catalog/indexing.h +12 -324
  49. data/ext/pg_query/include/catalog/namespace.h +4 -2
  50. data/ext/pg_query/include/catalog/objectaccess.h +70 -2
  51. data/ext/pg_query/include/catalog/objectaddress.h +11 -6
  52. data/ext/pg_query/include/catalog/pg_aggregate.h +14 -10
  53. data/ext/pg_query/include/catalog/pg_aggregate_d.h +2 -1
  54. data/ext/pg_query/include/catalog/pg_am.h +4 -1
  55. data/ext/pg_query/include/catalog/pg_am_d.h +3 -1
  56. data/ext/pg_query/include/catalog/pg_attribute.h +27 -10
  57. data/ext/pg_query/include/catalog/pg_attribute_d.h +21 -18
  58. data/ext/pg_query/include/catalog/pg_authid.h +7 -2
  59. data/ext/pg_query/include/catalog/pg_authid_d.h +17 -9
  60. data/ext/pg_query/include/catalog/pg_class.h +44 -14
  61. data/ext/pg_query/include/catalog/pg_class_d.h +30 -1
  62. data/ext/pg_query/include/catalog/pg_collation.h +33 -8
  63. data/ext/pg_query/include/catalog/pg_collation_d.h +20 -3
  64. data/ext/pg_query/include/catalog/pg_constraint.h +38 -12
  65. data/ext/pg_query/include/catalog/pg_constraint_d.h +10 -4
  66. data/ext/pg_query/include/catalog/pg_control.h +3 -5
  67. data/ext/pg_query/include/catalog/pg_conversion.h +7 -4
  68. data/ext/pg_query/include/catalog/pg_conversion_d.h +4 -1
  69. data/ext/pg_query/include/catalog/pg_depend.h +11 -7
  70. data/ext/pg_query/include/catalog/pg_depend_d.h +3 -1
  71. data/ext/pg_query/include/catalog/pg_event_trigger.h +9 -3
  72. data/ext/pg_query/include/catalog/pg_event_trigger_d.h +3 -1
  73. data/ext/pg_query/include/catalog/pg_index.h +17 -7
  74. data/ext/pg_query/include/catalog/pg_index_d.h +20 -17
  75. data/ext/pg_query/include/catalog/pg_language.h +10 -5
  76. data/ext/pg_query/include/catalog/pg_language_d.h +3 -1
  77. data/ext/pg_query/include/catalog/pg_namespace.h +7 -2
  78. data/ext/pg_query/include/catalog/pg_namespace_d.h +3 -1
  79. data/ext/pg_query/include/catalog/pg_opclass.h +8 -5
  80. data/ext/pg_query/include/catalog/pg_opclass_d.h +3 -1
  81. data/ext/pg_query/include/catalog/pg_operator.h +18 -15
  82. data/ext/pg_query/include/catalog/pg_operator_d.h +37 -1
  83. data/ext/pg_query/include/catalog/pg_opfamily.h +6 -3
  84. data/ext/pg_query/include/catalog/pg_opfamily_d.h +3 -1
  85. data/ext/pg_query/include/catalog/pg_parameter_acl.h +60 -0
  86. data/ext/pg_query/include/catalog/pg_parameter_acl_d.h +34 -0
  87. data/ext/pg_query/include/catalog/pg_partitioned_table.h +20 -9
  88. data/ext/pg_query/include/catalog/pg_partitioned_table_d.h +2 -1
  89. data/ext/pg_query/include/catalog/pg_proc.h +20 -11
  90. data/ext/pg_query/include/catalog/pg_proc_d.h +10 -8
  91. data/ext/pg_query/include/catalog/pg_publication.h +50 -7
  92. data/ext/pg_query/include/catalog/pg_publication_d.h +3 -1
  93. data/ext/pg_query/include/catalog/pg_replication_origin.h +6 -1
  94. data/ext/pg_query/include/catalog/pg_replication_origin_d.h +5 -1
  95. data/ext/pg_query/include/catalog/pg_statistic.h +19 -12
  96. data/ext/pg_query/include/catalog/pg_statistic_d.h +2 -1
  97. data/ext/pg_query/include/catalog/pg_statistic_ext.h +19 -5
  98. data/ext/pg_query/include/catalog/pg_statistic_ext_d.h +7 -2
  99. data/ext/pg_query/include/catalog/pg_transform.h +8 -5
  100. data/ext/pg_query/include/catalog/pg_transform_d.h +3 -1
  101. data/ext/pg_query/include/catalog/pg_trigger.h +24 -8
  102. data/ext/pg_query/include/catalog/pg_trigger_d.h +4 -1
  103. data/ext/pg_query/include/catalog/pg_ts_config.h +6 -3
  104. data/ext/pg_query/include/catalog/pg_ts_config_d.h +3 -1
  105. data/ext/pg_query/include/catalog/pg_ts_dict.h +8 -3
  106. data/ext/pg_query/include/catalog/pg_ts_dict_d.h +3 -1
  107. data/ext/pg_query/include/catalog/pg_ts_parser.h +6 -3
  108. data/ext/pg_query/include/catalog/pg_ts_parser_d.h +3 -1
  109. data/ext/pg_query/include/catalog/pg_ts_template.h +6 -3
  110. data/ext/pg_query/include/catalog/pg_ts_template_d.h +3 -1
  111. data/ext/pg_query/include/catalog/pg_type.h +55 -24
  112. data/ext/pg_query/include/catalog/pg_type_d.h +70 -31
  113. data/ext/pg_query/include/catalog/storage.h +5 -3
  114. data/ext/pg_query/include/commands/async.h +3 -4
  115. data/ext/pg_query/include/commands/dbcommands.h +2 -1
  116. data/ext/pg_query/include/commands/defrem.h +11 -24
  117. data/ext/pg_query/include/commands/event_trigger.h +2 -2
  118. data/ext/pg_query/include/commands/explain.h +1 -1
  119. data/ext/pg_query/include/commands/prepare.h +1 -1
  120. data/ext/pg_query/include/commands/tablespace.h +2 -2
  121. data/ext/pg_query/include/commands/trigger.h +18 -16
  122. data/ext/pg_query/include/commands/user.h +2 -2
  123. data/ext/pg_query/include/commands/vacuum.h +88 -41
  124. data/ext/pg_query/include/commands/variable.h +1 -1
  125. data/ext/pg_query/include/common/file_perm.h +4 -4
  126. data/ext/pg_query/include/common/hashfn.h +1 -1
  127. data/ext/pg_query/include/common/ip.h +1 -7
  128. data/ext/pg_query/include/common/keywords.h +2 -6
  129. data/ext/pg_query/include/common/kwlookup.h +1 -1
  130. data/ext/pg_query/include/common/pg_prng.h +60 -0
  131. data/ext/pg_query/include/common/relpath.h +2 -2
  132. data/ext/pg_query/include/common/string.h +24 -1
  133. data/ext/pg_query/include/common/unicode_combining_table.h +114 -2
  134. data/ext/pg_query/include/common/unicode_east_asian_fw_table.h +125 -0
  135. data/ext/pg_query/include/datatype/timestamp.h +40 -1
  136. data/ext/pg_query/include/executor/execdesc.h +1 -1
  137. data/ext/pg_query/include/executor/executor.h +65 -22
  138. data/ext/pg_query/include/executor/functions.h +17 -3
  139. data/ext/pg_query/include/executor/instrument.h +33 -16
  140. data/ext/pg_query/include/executor/spi.h +41 -3
  141. data/ext/pg_query/include/executor/tablefunc.h +1 -1
  142. data/ext/pg_query/include/executor/tuptable.h +1 -1
  143. data/ext/pg_query/include/fmgr.h +13 -7
  144. data/ext/pg_query/include/funcapi.h +16 -4
  145. data/ext/pg_query/include/getaddrinfo.h +1 -1
  146. data/ext/pg_query/include/jit/jit.h +11 -11
  147. data/ext/pg_query/include/kwlist_d.h +517 -494
  148. data/ext/pg_query/include/lib/dshash.h +112 -0
  149. data/ext/pg_query/include/lib/ilist.h +20 -1
  150. data/ext/pg_query/include/lib/pairingheap.h +1 -1
  151. data/ext/pg_query/include/lib/simplehash.h +140 -15
  152. data/ext/pg_query/include/lib/sort_template.h +432 -0
  153. data/ext/pg_query/include/lib/stringinfo.h +1 -1
  154. data/ext/pg_query/include/libpq/auth.h +6 -4
  155. data/ext/pg_query/include/libpq/crypt.h +5 -4
  156. data/ext/pg_query/include/libpq/hba.h +43 -4
  157. data/ext/pg_query/include/libpq/libpq-be.h +23 -6
  158. data/ext/pg_query/include/libpq/libpq.h +30 -20
  159. data/ext/pg_query/include/libpq/pqcomm.h +17 -31
  160. data/ext/pg_query/include/libpq/pqformat.h +1 -1
  161. data/ext/pg_query/include/libpq/pqsignal.h +4 -4
  162. data/ext/pg_query/include/mb/pg_wchar.h +105 -23
  163. data/ext/pg_query/include/mb/stringinfo_mb.h +1 -1
  164. data/ext/pg_query/include/miscadmin.h +47 -41
  165. data/ext/pg_query/include/nodes/bitmapset.h +1 -1
  166. data/ext/pg_query/include/nodes/execnodes.h +270 -78
  167. data/ext/pg_query/include/nodes/extensible.h +4 -2
  168. data/ext/pg_query/include/nodes/lockoptions.h +1 -1
  169. data/ext/pg_query/include/nodes/makefuncs.h +7 -6
  170. data/ext/pg_query/include/nodes/memnodes.h +5 -3
  171. data/ext/pg_query/include/nodes/nodeFuncs.h +1 -1
  172. data/ext/pg_query/include/nodes/nodes.h +30 -11
  173. data/ext/pg_query/include/nodes/params.h +1 -1
  174. data/ext/pg_query/include/nodes/parsenodes.h +322 -90
  175. data/ext/pg_query/include/nodes/pathnodes.h +243 -66
  176. data/ext/pg_query/include/nodes/pg_list.h +75 -69
  177. data/ext/pg_query/include/nodes/plannodes.h +111 -28
  178. data/ext/pg_query/include/nodes/primnodes.h +99 -47
  179. data/ext/pg_query/include/nodes/print.h +1 -1
  180. data/ext/pg_query/include/nodes/tidbitmap.h +1 -1
  181. data/ext/pg_query/include/nodes/value.h +58 -39
  182. data/ext/pg_query/include/optimizer/cost.h +9 -2
  183. data/ext/pg_query/include/optimizer/geqo.h +9 -7
  184. data/ext/pg_query/include/optimizer/geqo_gene.h +1 -1
  185. data/ext/pg_query/include/optimizer/optimizer.h +25 -17
  186. data/ext/pg_query/include/optimizer/paths.h +6 -6
  187. data/ext/pg_query/include/optimizer/planmain.h +15 -14
  188. data/ext/pg_query/include/parser/analyze.h +19 -5
  189. data/ext/pg_query/include/parser/gram.h +947 -913
  190. data/ext/pg_query/include/parser/gramparse.h +1 -1
  191. data/ext/pg_query/include/parser/kwlist.h +463 -453
  192. data/ext/pg_query/include/parser/parse_agg.h +2 -7
  193. data/ext/pg_query/include/parser/parse_coerce.h +3 -1
  194. data/ext/pg_query/include/parser/parse_expr.h +2 -3
  195. data/ext/pg_query/include/parser/parse_func.h +2 -1
  196. data/ext/pg_query/include/parser/parse_node.h +21 -9
  197. data/ext/pg_query/include/parser/parse_oper.h +1 -3
  198. data/ext/pg_query/include/parser/parse_relation.h +5 -4
  199. data/ext/pg_query/include/parser/parse_type.h +1 -1
  200. data/ext/pg_query/include/parser/parser.h +31 -4
  201. data/ext/pg_query/include/parser/parsetree.h +1 -1
  202. data/ext/pg_query/include/parser/scanner.h +1 -1
  203. data/ext/pg_query/include/parser/scansup.h +2 -5
  204. data/ext/pg_query/include/partitioning/partdefs.h +1 -1
  205. data/ext/pg_query/include/pg_config.h +83 -41
  206. data/ext/pg_query/include/pg_config_manual.h +74 -21
  207. data/ext/pg_query/include/pg_getopt.h +6 -6
  208. data/ext/pg_query/include/pg_query.h +5 -4
  209. data/ext/pg_query/include/pg_query_enum_defs.c +358 -241
  210. data/ext/pg_query/include/pg_query_fingerprint_conds.c +44 -7
  211. data/ext/pg_query/include/pg_query_fingerprint_defs.c +939 -113
  212. data/ext/pg_query/include/pg_query_outfuncs_conds.c +43 -13
  213. data/ext/pg_query/include/pg_query_outfuncs_defs.c +151 -26
  214. data/ext/pg_query/include/pg_query_readfuncs_conds.c +11 -2
  215. data/ext/pg_query/include/pg_query_readfuncs_defs.c +173 -30
  216. data/ext/pg_query/include/pg_trace.h +1 -1
  217. data/ext/pg_query/include/pgstat.h +449 -1238
  218. data/ext/pg_query/include/pgtime.h +14 -4
  219. data/ext/pg_query/include/pl_gram.h +126 -128
  220. data/ext/pg_query/include/pl_reserved_kwlist.h +1 -1
  221. data/ext/pg_query/include/pl_reserved_kwlist_d.h +10 -10
  222. data/ext/pg_query/include/pl_unreserved_kwlist.h +2 -3
  223. data/ext/pg_query/include/pl_unreserved_kwlist_d.h +54 -56
  224. data/ext/pg_query/include/plerrcodes.h +9 -1
  225. data/ext/pg_query/include/plpgsql.h +52 -54
  226. data/ext/pg_query/include/port/atomics/arch-arm.h +7 -1
  227. data/ext/pg_query/include/port/atomics/arch-ppc.h +1 -1
  228. data/ext/pg_query/include/port/atomics/arch-x86.h +1 -1
  229. data/ext/pg_query/include/port/atomics/fallback.h +1 -1
  230. data/ext/pg_query/include/port/atomics/generic-gcc.h +3 -3
  231. data/ext/pg_query/include/port/atomics/generic.h +1 -1
  232. data/ext/pg_query/include/port/atomics.h +1 -1
  233. data/ext/pg_query/include/port/pg_bitutils.h +40 -10
  234. data/ext/pg_query/include/port/pg_bswap.h +1 -1
  235. data/ext/pg_query/include/port/pg_crc32c.h +1 -1
  236. data/ext/pg_query/include/port.h +71 -46
  237. data/ext/pg_query/include/portability/instr_time.h +1 -1
  238. data/ext/pg_query/include/postgres.h +60 -16
  239. data/ext/pg_query/include/postmaster/autovacuum.h +17 -17
  240. data/ext/pg_query/include/postmaster/auxprocess.h +20 -0
  241. data/ext/pg_query/include/postmaster/bgworker.h +2 -1
  242. data/ext/pg_query/include/postmaster/bgworker_internals.h +2 -2
  243. data/ext/pg_query/include/postmaster/bgwriter.h +5 -5
  244. data/ext/pg_query/include/postmaster/fork_process.h +1 -1
  245. data/ext/pg_query/include/postmaster/interrupt.h +1 -1
  246. data/ext/pg_query/include/postmaster/pgarch.h +42 -8
  247. data/ext/pg_query/include/postmaster/postmaster.h +18 -17
  248. data/ext/pg_query/include/postmaster/startup.h +39 -0
  249. data/ext/pg_query/include/postmaster/syslogger.h +15 -10
  250. data/ext/pg_query/include/postmaster/walwriter.h +3 -3
  251. data/ext/pg_query/include/protobuf/pg_query.pb-c.h +1419 -914
  252. data/ext/pg_query/include/protobuf/pg_query.pb.h +43678 -32769
  253. data/ext/pg_query/include/regex/regex.h +18 -16
  254. data/ext/pg_query/include/replication/logicallauncher.h +3 -5
  255. data/ext/pg_query/include/replication/logicalproto.h +161 -17
  256. data/ext/pg_query/include/replication/logicalworker.h +1 -1
  257. data/ext/pg_query/include/replication/origin.h +7 -7
  258. data/ext/pg_query/include/replication/reorderbuffer.h +259 -42
  259. data/ext/pg_query/include/replication/slot.h +22 -11
  260. data/ext/pg_query/include/replication/syncrep.h +5 -5
  261. data/ext/pg_query/include/replication/walreceiver.h +145 -13
  262. data/ext/pg_query/include/replication/walsender.h +8 -8
  263. data/ext/pg_query/include/rewrite/prs2lock.h +1 -1
  264. data/ext/pg_query/include/rewrite/rewriteHandler.h +1 -3
  265. data/ext/pg_query/include/rewrite/rewriteManip.h +1 -1
  266. data/ext/pg_query/include/rewrite/rewriteSupport.h +1 -1
  267. data/ext/pg_query/include/storage/backendid.h +3 -3
  268. data/ext/pg_query/include/storage/block.h +4 -10
  269. data/ext/pg_query/include/storage/buf.h +1 -1
  270. data/ext/pg_query/include/storage/bufmgr.h +19 -14
  271. data/ext/pg_query/include/storage/bufpage.h +6 -8
  272. data/ext/pg_query/include/storage/condition_variable.h +13 -2
  273. data/ext/pg_query/include/storage/dsm.h +4 -1
  274. data/ext/pg_query/include/storage/dsm_impl.h +3 -2
  275. data/ext/pg_query/include/storage/fd.h +33 -3
  276. data/ext/pg_query/include/storage/fileset.h +40 -0
  277. data/ext/pg_query/include/storage/ipc.h +4 -1
  278. data/ext/pg_query/include/storage/item.h +1 -1
  279. data/ext/pg_query/include/storage/itemid.h +1 -1
  280. data/ext/pg_query/include/storage/itemptr.h +3 -1
  281. data/ext/pg_query/include/storage/large_object.h +2 -2
  282. data/ext/pg_query/include/storage/latch.h +9 -13
  283. data/ext/pg_query/include/storage/lmgr.h +2 -1
  284. data/ext/pg_query/include/storage/lock.h +11 -8
  285. data/ext/pg_query/include/storage/lockdefs.h +2 -2
  286. data/ext/pg_query/include/storage/lwlock.h +5 -32
  287. data/ext/pg_query/include/storage/lwlocknames.h +0 -1
  288. data/ext/pg_query/include/storage/off.h +1 -1
  289. data/ext/pg_query/include/storage/pg_sema.h +1 -1
  290. data/ext/pg_query/include/storage/pg_shmem.h +9 -7
  291. data/ext/pg_query/include/storage/pmsignal.h +15 -4
  292. data/ext/pg_query/include/storage/predicate.h +4 -4
  293. data/ext/pg_query/include/storage/proc.h +173 -59
  294. data/ext/pg_query/include/storage/procarray.h +98 -0
  295. data/ext/pg_query/include/storage/proclist_types.h +1 -1
  296. data/ext/pg_query/include/storage/procsignal.h +3 -7
  297. data/ext/pg_query/include/storage/relfilenode.h +1 -1
  298. data/ext/pg_query/include/storage/s_lock.h +60 -21
  299. data/ext/pg_query/include/storage/sharedfileset.h +3 -11
  300. data/ext/pg_query/include/storage/shm_mq.h +5 -4
  301. data/ext/pg_query/include/storage/shm_toc.h +1 -1
  302. data/ext/pg_query/include/storage/shmem.h +1 -1
  303. data/ext/pg_query/include/storage/sinval.h +3 -3
  304. data/ext/pg_query/include/storage/sinvaladt.h +1 -1
  305. data/ext/pg_query/include/storage/smgr.h +10 -8
  306. data/ext/pg_query/include/storage/spin.h +2 -2
  307. data/ext/pg_query/include/storage/standby.h +13 -6
  308. data/ext/pg_query/include/storage/standbydefs.h +2 -2
  309. data/ext/pg_query/include/storage/sync.h +7 -3
  310. data/ext/pg_query/include/tcop/cmdtag.h +1 -1
  311. data/ext/pg_query/include/tcop/cmdtaglist.h +3 -2
  312. data/ext/pg_query/include/tcop/deparse_utility.h +1 -1
  313. data/ext/pg_query/include/tcop/dest.h +1 -1
  314. data/ext/pg_query/include/tcop/fastpath.h +1 -2
  315. data/ext/pg_query/include/tcop/pquery.h +1 -1
  316. data/ext/pg_query/include/tcop/tcopprot.h +19 -11
  317. data/ext/pg_query/include/tcop/utility.h +7 -3
  318. data/ext/pg_query/include/tsearch/ts_cache.h +2 -2
  319. data/ext/pg_query/include/utils/acl.h +24 -3
  320. data/ext/pg_query/include/utils/aclchk_internal.h +1 -1
  321. data/ext/pg_query/include/utils/array.h +7 -2
  322. data/ext/pg_query/include/utils/backend_progress.h +44 -0
  323. data/ext/pg_query/include/utils/backend_status.h +321 -0
  324. data/ext/pg_query/include/utils/builtins.h +10 -11
  325. data/ext/pg_query/include/utils/bytea.h +3 -2
  326. data/ext/pg_query/include/utils/catcache.h +1 -1
  327. data/ext/pg_query/include/utils/date.h +1 -1
  328. data/ext/pg_query/include/utils/datetime.h +8 -7
  329. data/ext/pg_query/include/utils/datum.h +9 -1
  330. data/ext/pg_query/include/utils/dsa.h +1 -1
  331. data/ext/pg_query/include/utils/dynahash.h +4 -3
  332. data/ext/pg_query/include/utils/elog.h +52 -21
  333. data/ext/pg_query/include/utils/errcodes.h +2 -0
  334. data/ext/pg_query/include/utils/expandeddatum.h +1 -1
  335. data/ext/pg_query/include/utils/expandedrecord.h +1 -1
  336. data/ext/pg_query/include/utils/float.h +7 -7
  337. data/ext/pg_query/include/utils/fmgroids.h +1300 -696
  338. data/ext/pg_query/include/utils/fmgrprotos.h +199 -16
  339. data/ext/pg_query/include/utils/fmgrtab.h +6 -5
  340. data/ext/pg_query/include/utils/guc.h +69 -43
  341. data/ext/pg_query/include/utils/guc_tables.h +23 -19
  342. data/ext/pg_query/include/utils/hsearch.h +15 -11
  343. data/ext/pg_query/include/utils/inval.h +4 -1
  344. data/ext/pg_query/include/utils/lsyscache.h +11 -1
  345. data/ext/pg_query/include/utils/memdebug.h +1 -1
  346. data/ext/pg_query/include/utils/memutils.h +8 -3
  347. data/ext/pg_query/include/utils/numeric.h +19 -5
  348. data/ext/pg_query/include/utils/palloc.h +25 -3
  349. data/ext/pg_query/include/utils/partcache.h +1 -1
  350. data/ext/pg_query/include/utils/pg_locale.h +17 -9
  351. data/ext/pg_query/include/utils/pg_lsn.h +1 -1
  352. data/ext/pg_query/include/utils/pgstat_internal.h +784 -0
  353. data/ext/pg_query/include/utils/pidfile.h +1 -1
  354. data/ext/pg_query/include/utils/plancache.h +6 -5
  355. data/ext/pg_query/include/utils/portal.h +10 -12
  356. data/ext/pg_query/include/utils/ps_status.h +1 -1
  357. data/ext/pg_query/include/utils/queryenvironment.h +1 -1
  358. data/ext/pg_query/include/utils/queryjumble.h +88 -0
  359. data/ext/pg_query/include/utils/regproc.h +14 -3
  360. data/ext/pg_query/include/utils/rel.h +71 -19
  361. data/ext/pg_query/include/utils/relcache.h +8 -5
  362. data/ext/pg_query/include/utils/reltrigger.h +1 -1
  363. data/ext/pg_query/include/utils/resowner.h +1 -1
  364. data/ext/pg_query/include/utils/rls.h +2 -2
  365. data/ext/pg_query/include/utils/ruleutils.h +4 -1
  366. data/ext/pg_query/include/utils/sharedtuplestore.h +1 -1
  367. data/ext/pg_query/include/utils/snapmgr.h +34 -14
  368. data/ext/pg_query/include/utils/snapshot.h +14 -1
  369. data/ext/pg_query/include/utils/sortsupport.h +117 -2
  370. data/ext/pg_query/include/utils/syscache.h +6 -1
  371. data/ext/pg_query/include/utils/timeout.h +11 -4
  372. data/ext/pg_query/include/utils/timestamp.h +6 -5
  373. data/ext/pg_query/include/utils/tuplesort.h +25 -11
  374. data/ext/pg_query/include/utils/tuplestore.h +2 -2
  375. data/ext/pg_query/include/utils/typcache.h +24 -17
  376. data/ext/pg_query/include/utils/tzparser.h +1 -1
  377. data/ext/pg_query/include/utils/varlena.h +5 -3
  378. data/ext/pg_query/include/utils/wait_event.h +289 -0
  379. data/ext/pg_query/include/utils/xml.h +4 -4
  380. data/ext/pg_query/pg_query.pb-c.c +4302 -2304
  381. data/ext/pg_query/pg_query_deparse.c +1106 -373
  382. data/ext/pg_query/pg_query_fingerprint.c +30 -10
  383. data/ext/pg_query/pg_query_json_plpgsql.c +0 -25
  384. data/ext/pg_query/pg_query_normalize.c +1 -1
  385. data/ext/pg_query/pg_query_outfuncs_json.c +54 -16
  386. data/ext/pg_query/pg_query_outfuncs_protobuf.c +70 -10
  387. data/ext/pg_query/pg_query_parse.c +1 -1
  388. data/ext/pg_query/pg_query_readfuncs_protobuf.c +42 -8
  389. data/ext/pg_query/pg_query_scan.c +2 -1
  390. data/ext/pg_query/pg_query_split.c +3 -2
  391. data/ext/pg_query/src_backend_catalog_namespace.c +20 -9
  392. data/ext/pg_query/src_backend_catalog_pg_proc.c +4 -1
  393. data/ext/pg_query/src_backend_commands_define.c +11 -1
  394. data/ext/pg_query/src_backend_nodes_bitmapset.c +3 -1
  395. data/ext/pg_query/src_backend_nodes_copyfuncs.c +401 -76
  396. data/ext/pg_query/src_backend_nodes_equalfuncs.c +290 -46
  397. data/ext/pg_query/src_backend_nodes_extensible.c +1 -1
  398. data/ext/pg_query/src_backend_nodes_list.c +74 -11
  399. data/ext/pg_query/src_backend_nodes_makefuncs.c +5 -4
  400. data/ext/pg_query/src_backend_nodes_nodeFuncs.c +55 -12
  401. data/ext/pg_query/src_backend_nodes_value.c +28 -19
  402. data/ext/pg_query/src_backend_parser_gram.c +33874 -31261
  403. data/ext/pg_query/src_backend_parser_parser.c +26 -7
  404. data/ext/pg_query/src_backend_parser_scan.c +172 -209
  405. data/ext/pg_query/src_backend_parser_scansup.c +4 -28
  406. data/ext/pg_query/src_backend_postmaster_postmaster.c +77 -106
  407. data/ext/pg_query/src_backend_storage_ipc_ipc.c +13 -4
  408. data/ext/pg_query/src_backend_storage_lmgr_s_lock.c +5 -4
  409. data/ext/pg_query/src_backend_tcop_postgres.c +62 -23
  410. data/ext/pg_query/src_backend_utils_activity_pgstat_database.c +140 -0
  411. data/ext/pg_query/src_backend_utils_adt_datum.c +13 -1
  412. data/ext/pg_query/src_backend_utils_adt_expandeddatum.c +1 -1
  413. data/ext/pg_query/src_backend_utils_adt_format_type.c +6 -2
  414. data/ext/pg_query/src_backend_utils_adt_ruleutils.c +71 -5
  415. data/ext/pg_query/src_backend_utils_error_assert.c +16 -14
  416. data/ext/pg_query/src_backend_utils_error_elog.c +172 -99
  417. data/ext/pg_query/src_backend_utils_fmgr_fmgr.c +12 -17
  418. data/ext/pg_query/src_backend_utils_hash_dynahash.c +40 -10
  419. data/ext/pg_query/src_backend_utils_init_globals.c +5 -5
  420. data/ext/pg_query/src_backend_utils_mb_mbutils.c +55 -66
  421. data/ext/pg_query/src_backend_utils_misc_guc.c +206 -45
  422. data/ext/pg_query/src_backend_utils_mmgr_aset.c +7 -5
  423. data/ext/pg_query/src_backend_utils_mmgr_mcxt.c +123 -35
  424. data/ext/pg_query/src_common_encnames.c +1 -1
  425. data/ext/pg_query/src_common_hashfn.c +3 -3
  426. data/ext/pg_query/src_common_keywords.c +15 -2
  427. data/ext/pg_query/src_common_kwlist_d.h +517 -494
  428. data/ext/pg_query/src_common_kwlookup.c +1 -1
  429. data/ext/pg_query/src_common_pg_prng.c +152 -0
  430. data/ext/pg_query/src_common_psprintf.c +1 -1
  431. data/ext/pg_query/src_common_string.c +7 -1
  432. data/ext/pg_query/src_common_stringinfo.c +1 -1
  433. data/ext/pg_query/src_common_wchar.c +701 -109
  434. data/ext/pg_query/src_pl_plpgsql_src_pl_comp.c +45 -20
  435. data/ext/pg_query/src_pl_plpgsql_src_pl_funcs.c +1 -18
  436. data/ext/pg_query/src_pl_plpgsql_src_pl_gram.c +1233 -1259
  437. data/ext/pg_query/src_pl_plpgsql_src_pl_handler.c +1 -1
  438. data/ext/pg_query/src_pl_plpgsql_src_pl_reserved_kwlist_d.h +10 -10
  439. data/ext/pg_query/src_pl_plpgsql_src_pl_scanner.c +2 -2
  440. data/ext/pg_query/src_pl_plpgsql_src_pl_unreserved_kwlist_d.h +54 -56
  441. data/ext/pg_query/src_port_pg_bitutils.c +41 -31
  442. data/ext/pg_query/src_port_pgsleep.c +1 -1
  443. data/ext/pg_query/src_port_pgstrcasecmp.c +1 -1
  444. data/ext/pg_query/src_port_qsort.c +12 -224
  445. data/ext/pg_query/src_port_snprintf.c +37 -13
  446. data/ext/pg_query/src_port_strerror.c +9 -19
  447. data/ext/pg_query/src_port_strnlen.c +1 -1
  448. data/lib/pg_query/filter_columns.rb +1 -1
  449. data/lib/pg_query/fingerprint.rb +5 -1
  450. data/lib/pg_query/node.rb +2 -2
  451. data/lib/pg_query/param_refs.rb +1 -1
  452. data/lib/pg_query/parse.rb +18 -8
  453. data/lib/pg_query/pg_query_pb.rb +1108 -942
  454. data/lib/pg_query/truncate.rb +1 -1
  455. data/lib/pg_query/version.rb +1 -1
  456. metadata +28 -18
  457. data/ext/pg_query/include/access/xloginsert.h +0 -64
  458. data/ext/pg_query/include/bootstrap/bootstrap.h +0 -62
  459. data/ext/pg_query/include/parser/parse_clause.h +0 -54
  460. data/ext/pg_query/include/parser/parse_collate.h +0 -27
  461. data/ext/pg_query/include/parser/parse_target.h +0 -46
  462. data/ext/pg_query/pg_query_ruby_freebsd.sym +0 -2
  463. data/ext/pg_query/src_backend_libpq_pqcomm.c +0 -659
  464. data/ext/pg_query/src_backend_parser_parse_expr.c +0 -313
  465. data/ext/pg_query/src_port_erand48.c +0 -127
  466. data/ext/pg_query/src_port_random.c +0 -31
@@ -1,19 +1,19 @@
1
1
  // This file is autogenerated by ./scripts/generate_protobuf_and_funcs.rb
2
2
 
3
3
  case T_Integer:
4
- OUT_NODE(Integer, Integer, integer, INTEGER, Value, integer);
4
+ OUT_NODE(Integer, Integer, integer, INTEGER, Integer, integer);
5
+ break;
6
+ case T_Boolean:
7
+ OUT_NODE(Boolean, Boolean, boolean, BOOLEAN, Boolean, boolean);
5
8
  break;
6
9
  case T_Float:
7
- OUT_NODE(Float, Float, float, FLOAT, Value, float_);
10
+ OUT_NODE(Float, Float, float, FLOAT, Float, float_);
8
11
  break;
9
12
  case T_String:
10
- OUT_NODE(String, String, string, STRING, Value, string);
13
+ OUT_NODE(String, String, string, STRING, String, string);
11
14
  break;
12
15
  case T_BitString:
13
- OUT_NODE(BitString, BitString, bit_string, BIT_STRING, Value, bit_string);
14
- break;
15
- case T_Null:
16
- OUT_NODE(Null, Null, null, NULL, Value, null);
16
+ OUT_NODE(BitString, BitString, bit_string, BIT_STRING, BitString, bit_string);
17
17
  break;
18
18
  case T_List:
19
19
  OUT_NODE(List, List, list, LIST, List, list);
@@ -24,6 +24,9 @@ case T_IntList:
24
24
  case T_OidList:
25
25
  OUT_NODE(OidList, OidList, oid_list, OID_LIST, List, oid_list);
26
26
  break;
27
+ case T_A_Const:
28
+ OUT_NODE(A_Const, AConst, a__const, A_CONST, A_Const, a_const);
29
+ break;
27
30
  case T_Alias:
28
31
  OUT_NODE(Alias, Alias, alias, ALIAS, Alias, alias);
29
32
  break;
@@ -33,9 +36,6 @@ case T_RangeVar:
33
36
  case T_TableFunc:
34
37
  OUT_NODE(TableFunc, TableFunc, table_func, TABLE_FUNC, TableFunc, table_func);
35
38
  break;
36
- case T_Expr:
37
- OUT_NODE(Expr, Expr, expr, EXPR, Expr, expr);
38
- break;
39
39
  case T_Var:
40
40
  OUT_NODE(Var, Var, var, VAR, Var, var);
41
41
  break;
@@ -177,6 +177,9 @@ case T_OnConflictExpr:
177
177
  case T_IntoClause:
178
178
  OUT_NODE(IntoClause, IntoClause, into_clause, INTO_CLAUSE, IntoClause, into_clause);
179
179
  break;
180
+ case T_MergeAction:
181
+ OUT_NODE(MergeAction, MergeAction, merge_action, MERGE_ACTION, MergeAction, merge_action);
182
+ break;
180
183
  case T_RawStmt:
181
184
  OUT_NODE(RawStmt, RawStmt, raw_stmt, RAW_STMT, RawStmt, raw_stmt);
182
185
  break;
@@ -192,9 +195,18 @@ case T_DeleteStmt:
192
195
  case T_UpdateStmt:
193
196
  OUT_NODE(UpdateStmt, UpdateStmt, update_stmt, UPDATE_STMT, UpdateStmt, update_stmt);
194
197
  break;
198
+ case T_MergeStmt:
199
+ OUT_NODE(MergeStmt, MergeStmt, merge_stmt, MERGE_STMT, MergeStmt, merge_stmt);
200
+ break;
195
201
  case T_SelectStmt:
196
202
  OUT_NODE(SelectStmt, SelectStmt, select_stmt, SELECT_STMT, SelectStmt, select_stmt);
197
203
  break;
204
+ case T_ReturnStmt:
205
+ OUT_NODE(ReturnStmt, ReturnStmt, return_stmt, RETURN_STMT, ReturnStmt, return_stmt);
206
+ break;
207
+ case T_PLAssignStmt:
208
+ OUT_NODE(PLAssignStmt, PLAssignStmt, plassign_stmt, PLASSIGN_STMT, PLAssignStmt, plassign_stmt);
209
+ break;
198
210
  case T_AlterTableStmt:
199
211
  OUT_NODE(AlterTableStmt, AlterTableStmt, alter_table_stmt, ALTER_TABLE_STMT, AlterTableStmt, alter_table_stmt);
200
212
  break;
@@ -345,6 +357,9 @@ case T_CreateSchemaStmt:
345
357
  case T_AlterDatabaseStmt:
346
358
  OUT_NODE(AlterDatabaseStmt, AlterDatabaseStmt, alter_database_stmt, ALTER_DATABASE_STMT, AlterDatabaseStmt, alter_database_stmt);
347
359
  break;
360
+ case T_AlterDatabaseRefreshCollStmt:
361
+ OUT_NODE(AlterDatabaseRefreshCollStmt, AlterDatabaseRefreshCollStmt, alter_database_refresh_coll_stmt, ALTER_DATABASE_REFRESH_COLL_STMT, AlterDatabaseRefreshCollStmt, alter_database_refresh_coll_stmt);
362
+ break;
348
363
  case T_AlterDatabaseSetStmt:
349
364
  OUT_NODE(AlterDatabaseSetStmt, AlterDatabaseSetStmt, alter_database_set_stmt, ALTER_DATABASE_SET_STMT, AlterDatabaseSetStmt, alter_database_set_stmt);
350
365
  break;
@@ -531,9 +546,6 @@ case T_ColumnRef:
531
546
  case T_ParamRef:
532
547
  OUT_NODE(ParamRef, ParamRef, param_ref, PARAM_REF, ParamRef, param_ref);
533
548
  break;
534
- case T_A_Const:
535
- OUT_NODE(A_Const, AConst, a__const, A_CONST, A_Const, a_const);
536
- break;
537
549
  case T_FuncCall:
538
550
  OUT_NODE(FuncCall, FuncCall, func_call, FUNC_CALL, FuncCall, func_call);
539
551
  break;
@@ -591,6 +603,9 @@ case T_ColumnDef:
591
603
  case T_IndexElem:
592
604
  OUT_NODE(IndexElem, IndexElem, index_elem, INDEX_ELEM, IndexElem, index_elem);
593
605
  break;
606
+ case T_StatsElem:
607
+ OUT_NODE(StatsElem, StatsElem, stats_elem, STATS_ELEM, StatsElem, stats_elem);
608
+ break;
594
609
  case T_Constraint:
595
610
  OUT_NODE(Constraint, Constraint, constraint, CONSTRAINT, Constraint, constraint);
596
611
  break;
@@ -651,9 +666,18 @@ case T_InferClause:
651
666
  case T_OnConflictClause:
652
667
  OUT_NODE(OnConflictClause, OnConflictClause, on_conflict_clause, ON_CONFLICT_CLAUSE, OnConflictClause, on_conflict_clause);
653
668
  break;
669
+ case T_CTESearchClause:
670
+ OUT_NODE(CTESearchClause, CTESearchClause, ctesearch_clause, CTESEARCH_CLAUSE, CTESearchClause, ctesearch_clause);
671
+ break;
672
+ case T_CTECycleClause:
673
+ OUT_NODE(CTECycleClause, CTECycleClause, ctecycle_clause, CTECYCLE_CLAUSE, CTECycleClause, ctecycle_clause);
674
+ break;
654
675
  case T_CommonTableExpr:
655
676
  OUT_NODE(CommonTableExpr, CommonTableExpr, common_table_expr, COMMON_TABLE_EXPR, CommonTableExpr, common_table_expr);
656
677
  break;
678
+ case T_MergeWhenClause:
679
+ OUT_NODE(MergeWhenClause, MergeWhenClause, merge_when_clause, MERGE_WHEN_CLAUSE, MergeWhenClause, merge_when_clause);
680
+ break;
657
681
  case T_RoleSpec:
658
682
  OUT_NODE(RoleSpec, RoleSpec, role_spec, ROLE_SPEC, RoleSpec, role_spec);
659
683
  break;
@@ -678,6 +702,12 @@ case T_PartitionCmd:
678
702
  case T_VacuumRelation:
679
703
  OUT_NODE(VacuumRelation, VacuumRelation, vacuum_relation, VACUUM_RELATION, VacuumRelation, vacuum_relation);
680
704
  break;
705
+ case T_PublicationObjSpec:
706
+ OUT_NODE(PublicationObjSpec, PublicationObjSpec, publication_obj_spec, PUBLICATION_OBJ_SPEC, PublicationObjSpec, publication_obj_spec);
707
+ break;
708
+ case T_PublicationTable:
709
+ OUT_NODE(PublicationTable, PublicationTable, publication_table, PUBLICATION_TABLE, PublicationTable, publication_table);
710
+ break;
681
711
  case T_InlineCodeBlock:
682
712
  OUT_NODE(InlineCodeBlock, InlineCodeBlock, inline_code_block, INLINE_CODE_BLOCK, InlineCodeBlock, inline_code_block);
683
713
  break;
@@ -3,7 +3,6 @@
3
3
  static void _outAlias(OUT_TYPE(Alias, Alias) out_node, const Alias *node);
4
4
  static void _outRangeVar(OUT_TYPE(RangeVar, RangeVar) out_node, const RangeVar *node);
5
5
  static void _outTableFunc(OUT_TYPE(TableFunc, TableFunc) out_node, const TableFunc *node);
6
- static void _outExpr(OUT_TYPE(Expr, Expr) out_node, const Expr *node);
7
6
  static void _outVar(OUT_TYPE(Var, Var) out_node, const Var *node);
8
7
  static void _outParam(OUT_TYPE(Param, Param) out_node, const Param *node);
9
8
  static void _outAggref(OUT_TYPE(Aggref, Aggref) out_node, const Aggref *node);
@@ -51,12 +50,16 @@ static void _outJoinExpr(OUT_TYPE(JoinExpr, JoinExpr) out_node, const JoinExpr *
51
50
  static void _outFromExpr(OUT_TYPE(FromExpr, FromExpr) out_node, const FromExpr *node);
52
51
  static void _outOnConflictExpr(OUT_TYPE(OnConflictExpr, OnConflictExpr) out_node, const OnConflictExpr *node);
53
52
  static void _outIntoClause(OUT_TYPE(IntoClause, IntoClause) out_node, const IntoClause *node);
53
+ static void _outMergeAction(OUT_TYPE(MergeAction, MergeAction) out_node, const MergeAction *node);
54
54
  static void _outRawStmt(OUT_TYPE(RawStmt, RawStmt) out_node, const RawStmt *node);
55
55
  static void _outQuery(OUT_TYPE(Query, Query) out_node, const Query *node);
56
56
  static void _outInsertStmt(OUT_TYPE(InsertStmt, InsertStmt) out_node, const InsertStmt *node);
57
57
  static void _outDeleteStmt(OUT_TYPE(DeleteStmt, DeleteStmt) out_node, const DeleteStmt *node);
58
58
  static void _outUpdateStmt(OUT_TYPE(UpdateStmt, UpdateStmt) out_node, const UpdateStmt *node);
59
+ static void _outMergeStmt(OUT_TYPE(MergeStmt, MergeStmt) out_node, const MergeStmt *node);
59
60
  static void _outSelectStmt(OUT_TYPE(SelectStmt, SelectStmt) out_node, const SelectStmt *node);
61
+ static void _outReturnStmt(OUT_TYPE(ReturnStmt, ReturnStmt) out_node, const ReturnStmt *node);
62
+ static void _outPLAssignStmt(OUT_TYPE(PLAssignStmt, PLAssignStmt) out_node, const PLAssignStmt *node);
60
63
  static void _outAlterTableStmt(OUT_TYPE(AlterTableStmt, AlterTableStmt) out_node, const AlterTableStmt *node);
61
64
  static void _outAlterTableCmd(OUT_TYPE(AlterTableCmd, AlterTableCmd) out_node, const AlterTableCmd *node);
62
65
  static void _outAlterDomainStmt(OUT_TYPE(AlterDomainStmt, AlterDomainStmt) out_node, const AlterDomainStmt *node);
@@ -107,6 +110,7 @@ static void _outReindexStmt(OUT_TYPE(ReindexStmt, ReindexStmt) out_node, const R
107
110
  static void _outCheckPointStmt(OUT_TYPE(CheckPointStmt, CheckPointStmt) out_node, const CheckPointStmt *node);
108
111
  static void _outCreateSchemaStmt(OUT_TYPE(CreateSchemaStmt, CreateSchemaStmt) out_node, const CreateSchemaStmt *node);
109
112
  static void _outAlterDatabaseStmt(OUT_TYPE(AlterDatabaseStmt, AlterDatabaseStmt) out_node, const AlterDatabaseStmt *node);
113
+ static void _outAlterDatabaseRefreshCollStmt(OUT_TYPE(AlterDatabaseRefreshCollStmt, AlterDatabaseRefreshCollStmt) out_node, const AlterDatabaseRefreshCollStmt *node);
110
114
  static void _outAlterDatabaseSetStmt(OUT_TYPE(AlterDatabaseSetStmt, AlterDatabaseSetStmt) out_node, const AlterDatabaseSetStmt *node);
111
115
  static void _outAlterRoleSetStmt(OUT_TYPE(AlterRoleSetStmt, AlterRoleSetStmt) out_node, const AlterRoleSetStmt *node);
112
116
  static void _outCreateConversionStmt(OUT_TYPE(CreateConversionStmt, CreateConversionStmt) out_node, const CreateConversionStmt *node);
@@ -169,7 +173,6 @@ static void _outAlterStatsStmt(OUT_TYPE(AlterStatsStmt, AlterStatsStmt) out_node
169
173
  static void _outAExpr(OUT_TYPE(A_Expr, AExpr) out_node, const A_Expr *node);
170
174
  static void _outColumnRef(OUT_TYPE(ColumnRef, ColumnRef) out_node, const ColumnRef *node);
171
175
  static void _outParamRef(OUT_TYPE(ParamRef, ParamRef) out_node, const ParamRef *node);
172
- static void _outAConst(OUT_TYPE(A_Const, AConst) out_node, const A_Const *node);
173
176
  static void _outFuncCall(OUT_TYPE(FuncCall, FuncCall) out_node, const FuncCall *node);
174
177
  static void _outAStar(OUT_TYPE(A_Star, AStar) out_node, const A_Star *node);
175
178
  static void _outAIndices(OUT_TYPE(A_Indices, AIndices) out_node, const A_Indices *node);
@@ -189,6 +192,7 @@ static void _outRangeTableFuncCol(OUT_TYPE(RangeTableFuncCol, RangeTableFuncCol)
189
192
  static void _outTypeName(OUT_TYPE(TypeName, TypeName) out_node, const TypeName *node);
190
193
  static void _outColumnDef(OUT_TYPE(ColumnDef, ColumnDef) out_node, const ColumnDef *node);
191
194
  static void _outIndexElem(OUT_TYPE(IndexElem, IndexElem) out_node, const IndexElem *node);
195
+ static void _outStatsElem(OUT_TYPE(StatsElem, StatsElem) out_node, const StatsElem *node);
192
196
  static void _outConstraint(OUT_TYPE(Constraint, Constraint) out_node, const Constraint *node);
193
197
  static void _outDefElem(OUT_TYPE(DefElem, DefElem) out_node, const DefElem *node);
194
198
  static void _outRangeTblEntry(OUT_TYPE(RangeTblEntry, RangeTblEntry) out_node, const RangeTblEntry *node);
@@ -209,7 +213,10 @@ static void _outXmlSerialize(OUT_TYPE(XmlSerialize, XmlSerialize) out_node, cons
209
213
  static void _outWithClause(OUT_TYPE(WithClause, WithClause) out_node, const WithClause *node);
210
214
  static void _outInferClause(OUT_TYPE(InferClause, InferClause) out_node, const InferClause *node);
211
215
  static void _outOnConflictClause(OUT_TYPE(OnConflictClause, OnConflictClause) out_node, const OnConflictClause *node);
216
+ static void _outCTESearchClause(OUT_TYPE(CTESearchClause, CTESearchClause) out_node, const CTESearchClause *node);
217
+ static void _outCTECycleClause(OUT_TYPE(CTECycleClause, CTECycleClause) out_node, const CTECycleClause *node);
212
218
  static void _outCommonTableExpr(OUT_TYPE(CommonTableExpr, CommonTableExpr) out_node, const CommonTableExpr *node);
219
+ static void _outMergeWhenClause(OUT_TYPE(MergeWhenClause, MergeWhenClause) out_node, const MergeWhenClause *node);
213
220
  static void _outRoleSpec(OUT_TYPE(RoleSpec, RoleSpec) out_node, const RoleSpec *node);
214
221
  static void _outTriggerTransition(OUT_TYPE(TriggerTransition, TriggerTransition) out_node, const TriggerTransition *node);
215
222
  static void _outPartitionElem(OUT_TYPE(PartitionElem, PartitionElem) out_node, const PartitionElem *node);
@@ -218,6 +225,8 @@ static void _outPartitionBoundSpec(OUT_TYPE(PartitionBoundSpec, PartitionBoundSp
218
225
  static void _outPartitionRangeDatum(OUT_TYPE(PartitionRangeDatum, PartitionRangeDatum) out_node, const PartitionRangeDatum *node);
219
226
  static void _outPartitionCmd(OUT_TYPE(PartitionCmd, PartitionCmd) out_node, const PartitionCmd *node);
220
227
  static void _outVacuumRelation(OUT_TYPE(VacuumRelation, VacuumRelation) out_node, const VacuumRelation *node);
228
+ static void _outPublicationObjSpec(OUT_TYPE(PublicationObjSpec, PublicationObjSpec) out_node, const PublicationObjSpec *node);
229
+ static void _outPublicationTable(OUT_TYPE(PublicationTable, PublicationTable) out_node, const PublicationTable *node);
221
230
  static void _outInlineCodeBlock(OUT_TYPE(InlineCodeBlock, InlineCodeBlock) out_node, const InlineCodeBlock *node);
222
231
  static void _outCallContext(OUT_TYPE(CallContext, CallContext) out_node, const CallContext *node);
223
232
 
@@ -259,15 +268,10 @@ _outTableFunc(OUT_TYPE(TableFunc, TableFunc) out, const TableFunc *node)
259
268
  WRITE_INT_FIELD(location, location, location);
260
269
  }
261
270
 
262
- static void
263
- _outExpr(OUT_TYPE(Expr, Expr) out, const Expr *node)
264
- {
265
- }
266
-
267
271
  static void
268
272
  _outVar(OUT_TYPE(Var, Var) out, const Var *node)
269
273
  {
270
- WRITE_UINT_FIELD(varno, varno, varno);
274
+ WRITE_INT_FIELD(varno, varno, varno);
271
275
  WRITE_INT_FIELD(varattno, varattno, varattno);
272
276
  WRITE_UINT_FIELD(vartype, vartype, vartype);
273
277
  WRITE_INT_FIELD(vartypmod, vartypmod, vartypmod);
@@ -308,6 +312,8 @@ _outAggref(OUT_TYPE(Aggref, Aggref) out, const Aggref *node)
308
312
  WRITE_CHAR_FIELD(aggkind, aggkind, aggkind);
309
313
  WRITE_UINT_FIELD(agglevelsup, agglevelsup, agglevelsup);
310
314
  WRITE_ENUM_FIELD(AggSplit, aggsplit, aggsplit, aggsplit);
315
+ WRITE_INT_FIELD(aggno, aggno, aggno);
316
+ WRITE_INT_FIELD(aggtransno, aggtransno, aggtransno);
311
317
  WRITE_INT_FIELD(location, location, location);
312
318
  }
313
319
 
@@ -341,6 +347,7 @@ _outSubscriptingRef(OUT_TYPE(SubscriptingRef, SubscriptingRef) out, const Subscr
341
347
  {
342
348
  WRITE_UINT_FIELD(refcontainertype, refcontainertype, refcontainertype);
343
349
  WRITE_UINT_FIELD(refelemtype, refelemtype, refelemtype);
350
+ WRITE_UINT_FIELD(refrestype, refrestype, refrestype);
344
351
  WRITE_INT_FIELD(reftypmod, reftypmod, reftypmod);
345
352
  WRITE_UINT_FIELD(refcollid, refcollid, refcollid);
346
353
  WRITE_LIST_FIELD(refupperindexpr, refupperindexpr, refupperindexpr);
@@ -416,6 +423,8 @@ _outScalarArrayOpExpr(OUT_TYPE(ScalarArrayOpExpr, ScalarArrayOpExpr) out, const
416
423
  {
417
424
  WRITE_UINT_FIELD(opno, opno, opno);
418
425
  WRITE_UINT_FIELD(opfuncid, opfuncid, opfuncid);
426
+ WRITE_UINT_FIELD(hashfuncid, hashfuncid, hashfuncid);
427
+ WRITE_UINT_FIELD(negfuncid, negfuncid, negfuncid);
419
428
  WRITE_BOOL_FIELD(use_or, useOr, useOr);
420
429
  WRITE_UINT_FIELD(inputcollid, inputcollid, inputcollid);
421
430
  WRITE_LIST_FIELD(args, args, args);
@@ -734,6 +743,7 @@ _outJoinExpr(OUT_TYPE(JoinExpr, JoinExpr) out, const JoinExpr *node)
734
743
  WRITE_NODE_PTR_FIELD(larg, larg, larg);
735
744
  WRITE_NODE_PTR_FIELD(rarg, rarg, rarg);
736
745
  WRITE_LIST_FIELD(using_clause, usingClause, usingClause);
746
+ WRITE_SPECIFIC_NODE_PTR_FIELD(Alias, alias, join_using_alias, join_using_alias, join_using_alias);
737
747
  WRITE_NODE_PTR_FIELD(quals, quals, quals);
738
748
  WRITE_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias);
739
749
  WRITE_INT_FIELD(rtindex, rtindex, rtindex);
@@ -772,6 +782,17 @@ _outIntoClause(OUT_TYPE(IntoClause, IntoClause) out, const IntoClause *node)
772
782
  WRITE_BOOL_FIELD(skip_data, skipData, skipData);
773
783
  }
774
784
 
785
+ static void
786
+ _outMergeAction(OUT_TYPE(MergeAction, MergeAction) out, const MergeAction *node)
787
+ {
788
+ WRITE_BOOL_FIELD(matched, matched, matched);
789
+ WRITE_ENUM_FIELD(CmdType, command_type, commandType, commandType);
790
+ WRITE_ENUM_FIELD(OverridingKind, override, override, override);
791
+ WRITE_NODE_PTR_FIELD(qual, qual, qual);
792
+ WRITE_LIST_FIELD(target_list, targetList, targetList);
793
+ WRITE_LIST_FIELD(update_colnos, updateColnos, updateColnos);
794
+ }
795
+
775
796
  static void
776
797
  _outRawStmt(OUT_TYPE(RawStmt, RawStmt) out, const RawStmt *node)
777
798
  {
@@ -797,14 +818,18 @@ _outQuery(OUT_TYPE(Query, Query) out, const Query *node)
797
818
  WRITE_BOOL_FIELD(has_modifying_cte, hasModifyingCTE, hasModifyingCTE);
798
819
  WRITE_BOOL_FIELD(has_for_update, hasForUpdate, hasForUpdate);
799
820
  WRITE_BOOL_FIELD(has_row_security, hasRowSecurity, hasRowSecurity);
821
+ WRITE_BOOL_FIELD(is_return, isReturn, isReturn);
800
822
  WRITE_LIST_FIELD(cte_list, cteList, cteList);
801
823
  WRITE_LIST_FIELD(rtable, rtable, rtable);
802
824
  WRITE_SPECIFIC_NODE_PTR_FIELD(FromExpr, from_expr, jointree, jointree, jointree);
825
+ WRITE_LIST_FIELD(merge_action_list, mergeActionList, mergeActionList);
826
+ WRITE_BOOL_FIELD(merge_use_outer_join, mergeUseOuterJoin, mergeUseOuterJoin);
803
827
  WRITE_LIST_FIELD(target_list, targetList, targetList);
804
828
  WRITE_ENUM_FIELD(OverridingKind, override, override, override);
805
829
  WRITE_SPECIFIC_NODE_PTR_FIELD(OnConflictExpr, on_conflict_expr, on_conflict, onConflict, onConflict);
806
830
  WRITE_LIST_FIELD(returning_list, returningList, returningList);
807
831
  WRITE_LIST_FIELD(group_clause, groupClause, groupClause);
832
+ WRITE_BOOL_FIELD(group_distinct, groupDistinct, groupDistinct);
808
833
  WRITE_LIST_FIELD(grouping_sets, groupingSets, groupingSets);
809
834
  WRITE_NODE_PTR_FIELD(having_qual, havingQual, havingQual);
810
835
  WRITE_LIST_FIELD(window_clause, windowClause, windowClause);
@@ -854,6 +879,16 @@ _outUpdateStmt(OUT_TYPE(UpdateStmt, UpdateStmt) out, const UpdateStmt *node)
854
879
  WRITE_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause);
855
880
  }
856
881
 
882
+ static void
883
+ _outMergeStmt(OUT_TYPE(MergeStmt, MergeStmt) out, const MergeStmt *node)
884
+ {
885
+ WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation);
886
+ WRITE_NODE_PTR_FIELD(source_relation, sourceRelation, sourceRelation);
887
+ WRITE_NODE_PTR_FIELD(join_condition, joinCondition, joinCondition);
888
+ WRITE_LIST_FIELD(merge_when_clauses, mergeWhenClauses, mergeWhenClauses);
889
+ WRITE_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause);
890
+ }
891
+
857
892
  static void
858
893
  _outSelectStmt(OUT_TYPE(SelectStmt, SelectStmt) out, const SelectStmt *node)
859
894
  {
@@ -863,6 +898,7 @@ _outSelectStmt(OUT_TYPE(SelectStmt, SelectStmt) out, const SelectStmt *node)
863
898
  WRITE_LIST_FIELD(from_clause, fromClause, fromClause);
864
899
  WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause);
865
900
  WRITE_LIST_FIELD(group_clause, groupClause, groupClause);
901
+ WRITE_BOOL_FIELD(group_distinct, groupDistinct, groupDistinct);
866
902
  WRITE_NODE_PTR_FIELD(having_clause, havingClause, havingClause);
867
903
  WRITE_LIST_FIELD(window_clause, windowClause, windowClause);
868
904
  WRITE_LIST_FIELD(values_lists, valuesLists, valuesLists);
@@ -878,12 +914,28 @@ _outSelectStmt(OUT_TYPE(SelectStmt, SelectStmt) out, const SelectStmt *node)
878
914
  WRITE_SPECIFIC_NODE_PTR_FIELD(SelectStmt, select_stmt, rarg, rarg, rarg);
879
915
  }
880
916
 
917
+ static void
918
+ _outReturnStmt(OUT_TYPE(ReturnStmt, ReturnStmt) out, const ReturnStmt *node)
919
+ {
920
+ WRITE_NODE_PTR_FIELD(returnval, returnval, returnval);
921
+ }
922
+
923
+ static void
924
+ _outPLAssignStmt(OUT_TYPE(PLAssignStmt, PLAssignStmt) out, const PLAssignStmt *node)
925
+ {
926
+ WRITE_STRING_FIELD(name, name, name);
927
+ WRITE_LIST_FIELD(indirection, indirection, indirection);
928
+ WRITE_INT_FIELD(nnames, nnames, nnames);
929
+ WRITE_SPECIFIC_NODE_PTR_FIELD(SelectStmt, select_stmt, val, val, val);
930
+ WRITE_INT_FIELD(location, location, location);
931
+ }
932
+
881
933
  static void
882
934
  _outAlterTableStmt(OUT_TYPE(AlterTableStmt, AlterTableStmt) out, const AlterTableStmt *node)
883
935
  {
884
936
  WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation);
885
937
  WRITE_LIST_FIELD(cmds, cmds, cmds);
886
- WRITE_ENUM_FIELD(ObjectType, relkind, relkind, relkind);
938
+ WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype);
887
939
  WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok);
888
940
  }
889
941
 
@@ -934,6 +986,7 @@ _outGrantStmt(OUT_TYPE(GrantStmt, GrantStmt) out, const GrantStmt *node)
934
986
  WRITE_LIST_FIELD(privileges, privileges, privileges);
935
987
  WRITE_LIST_FIELD(grantees, grantees, grantees);
936
988
  WRITE_BOOL_FIELD(grant_option, grant_option, grant_option);
989
+ WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, grantor, grantor, grantor);
937
990
  WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior);
938
991
  }
939
992
 
@@ -966,7 +1019,7 @@ _outClusterStmt(OUT_TYPE(ClusterStmt, ClusterStmt) out, const ClusterStmt *node)
966
1019
  {
967
1020
  WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation);
968
1021
  WRITE_STRING_FIELD(indexname, indexname, indexname);
969
- WRITE_INT_FIELD(options, options, options);
1022
+ WRITE_LIST_FIELD(params, params, params);
970
1023
  }
971
1024
 
972
1025
  static void
@@ -1064,6 +1117,7 @@ _outIndexStmt(OUT_TYPE(IndexStmt, IndexStmt) out, const IndexStmt *node)
1064
1117
  WRITE_UINT_FIELD(old_create_subid, oldCreateSubid, oldCreateSubid);
1065
1118
  WRITE_UINT_FIELD(old_first_relfilenode_subid, oldFirstRelfilenodeSubid, oldFirstRelfilenodeSubid);
1066
1119
  WRITE_BOOL_FIELD(unique, unique, unique);
1120
+ WRITE_BOOL_FIELD(nulls_not_distinct, nulls_not_distinct, nulls_not_distinct);
1067
1121
  WRITE_BOOL_FIELD(primary, primary, primary);
1068
1122
  WRITE_BOOL_FIELD(isconstraint, isconstraint, isconstraint);
1069
1123
  WRITE_BOOL_FIELD(deferrable, deferrable, deferrable);
@@ -1083,6 +1137,7 @@ _outCreateFunctionStmt(OUT_TYPE(CreateFunctionStmt, CreateFunctionStmt) out, con
1083
1137
  WRITE_LIST_FIELD(parameters, parameters, parameters);
1084
1138
  WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, return_type, returnType, returnType);
1085
1139
  WRITE_LIST_FIELD(options, options, options);
1140
+ WRITE_NODE_PTR_FIELD(sql_body, sql_body, sql_body);
1086
1141
  }
1087
1142
 
1088
1143
  static void
@@ -1214,7 +1269,7 @@ _outCreateTableAsStmt(OUT_TYPE(CreateTableAsStmt, CreateTableAsStmt) out, const
1214
1269
  {
1215
1270
  WRITE_NODE_PTR_FIELD(query, query, query);
1216
1271
  WRITE_SPECIFIC_NODE_PTR_FIELD(IntoClause, into_clause, into, into, into);
1217
- WRITE_ENUM_FIELD(ObjectType, relkind, relkind, relkind);
1272
+ WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype);
1218
1273
  WRITE_BOOL_FIELD(is_select_into, is_select_into, is_select_into);
1219
1274
  WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists);
1220
1275
  }
@@ -1262,6 +1317,8 @@ _outDiscardStmt(OUT_TYPE(DiscardStmt, DiscardStmt) out, const DiscardStmt *node)
1262
1317
  static void
1263
1318
  _outCreateTrigStmt(OUT_TYPE(CreateTrigStmt, CreateTrigStmt) out, const CreateTrigStmt *node)
1264
1319
  {
1320
+ WRITE_BOOL_FIELD(replace, replace, replace);
1321
+ WRITE_BOOL_FIELD(isconstraint, isconstraint, isconstraint);
1265
1322
  WRITE_STRING_FIELD(trigname, trigname, trigname);
1266
1323
  WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation);
1267
1324
  WRITE_LIST_FIELD(funcname, funcname, funcname);
@@ -1271,7 +1328,6 @@ _outCreateTrigStmt(OUT_TYPE(CreateTrigStmt, CreateTrigStmt) out, const CreateTri
1271
1328
  WRITE_INT_FIELD(events, events, events);
1272
1329
  WRITE_LIST_FIELD(columns, columns, columns);
1273
1330
  WRITE_NODE_PTR_FIELD(when_clause, whenClause, whenClause);
1274
- WRITE_BOOL_FIELD(isconstraint, isconstraint, isconstraint);
1275
1331
  WRITE_LIST_FIELD(transition_rels, transitionRels, transitionRels);
1276
1332
  WRITE_BOOL_FIELD(deferrable, deferrable, deferrable);
1277
1333
  WRITE_BOOL_FIELD(initdeferred, initdeferred, initdeferred);
@@ -1333,8 +1389,7 @@ _outReindexStmt(OUT_TYPE(ReindexStmt, ReindexStmt) out, const ReindexStmt *node)
1333
1389
  WRITE_ENUM_FIELD(ReindexObjectType, kind, kind, kind);
1334
1390
  WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation);
1335
1391
  WRITE_STRING_FIELD(name, name, name);
1336
- WRITE_INT_FIELD(options, options, options);
1337
- WRITE_BOOL_FIELD(concurrent, concurrent, concurrent);
1392
+ WRITE_LIST_FIELD(params, params, params);
1338
1393
  }
1339
1394
 
1340
1395
  static void
@@ -1358,6 +1413,12 @@ _outAlterDatabaseStmt(OUT_TYPE(AlterDatabaseStmt, AlterDatabaseStmt) out, const
1358
1413
  WRITE_LIST_FIELD(options, options, options);
1359
1414
  }
1360
1415
 
1416
+ static void
1417
+ _outAlterDatabaseRefreshCollStmt(OUT_TYPE(AlterDatabaseRefreshCollStmt, AlterDatabaseRefreshCollStmt) out, const AlterDatabaseRefreshCollStmt *node)
1418
+ {
1419
+ WRITE_STRING_FIELD(dbname, dbname, dbname);
1420
+ }
1421
+
1361
1422
  static void
1362
1423
  _outAlterDatabaseSetStmt(OUT_TYPE(AlterDatabaseSetStmt, AlterDatabaseSetStmt) out, const AlterDatabaseSetStmt *node)
1363
1424
  {
@@ -1471,7 +1532,7 @@ _outAlterObjectDependsStmt(OUT_TYPE(AlterObjectDependsStmt, AlterObjectDependsSt
1471
1532
  WRITE_ENUM_FIELD(ObjectType, object_type, objectType, objectType);
1472
1533
  WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation);
1473
1534
  WRITE_NODE_PTR_FIELD(object, object, object);
1474
- WRITE_NODE_PTR_FIELD(extname, extname, extname);
1535
+ WRITE_SPECIFIC_NODE_PTR_FIELD(String, string, extname, extname, extname);
1475
1536
  WRITE_BOOL_FIELD(remove, remove, remove);
1476
1537
  }
1477
1538
 
@@ -1786,7 +1847,7 @@ _outCreatePublicationStmt(OUT_TYPE(CreatePublicationStmt, CreatePublicationStmt)
1786
1847
  {
1787
1848
  WRITE_STRING_FIELD(pubname, pubname, pubname);
1788
1849
  WRITE_LIST_FIELD(options, options, options);
1789
- WRITE_LIST_FIELD(tables, tables, tables);
1850
+ WRITE_LIST_FIELD(pubobjects, pubobjects, pubobjects);
1790
1851
  WRITE_BOOL_FIELD(for_all_tables, for_all_tables, for_all_tables);
1791
1852
  }
1792
1853
 
@@ -1795,9 +1856,9 @@ _outAlterPublicationStmt(OUT_TYPE(AlterPublicationStmt, AlterPublicationStmt) ou
1795
1856
  {
1796
1857
  WRITE_STRING_FIELD(pubname, pubname, pubname);
1797
1858
  WRITE_LIST_FIELD(options, options, options);
1798
- WRITE_LIST_FIELD(tables, tables, tables);
1859
+ WRITE_LIST_FIELD(pubobjects, pubobjects, pubobjects);
1799
1860
  WRITE_BOOL_FIELD(for_all_tables, for_all_tables, for_all_tables);
1800
- WRITE_ENUM_FIELD(DefElemAction, table_action, tableAction, tableAction);
1861
+ WRITE_ENUM_FIELD(AlterPublicationAction, action, action, action);
1801
1862
  }
1802
1863
 
1803
1864
  static void
@@ -1835,6 +1896,7 @@ _outCreateStatsStmt(OUT_TYPE(CreateStatsStmt, CreateStatsStmt) out, const Create
1835
1896
  WRITE_LIST_FIELD(exprs, exprs, exprs);
1836
1897
  WRITE_LIST_FIELD(relations, relations, relations);
1837
1898
  WRITE_STRING_FIELD(stxcomment, stxcomment, stxcomment);
1899
+ WRITE_BOOL_FIELD(transformed, transformed, transformed);
1838
1900
  WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists);
1839
1901
  }
1840
1902
 
@@ -1849,6 +1911,7 @@ _outCallStmt(OUT_TYPE(CallStmt, CallStmt) out, const CallStmt *node)
1849
1911
  {
1850
1912
  WRITE_SPECIFIC_NODE_PTR_FIELD(FuncCall, func_call, funccall, funccall, funccall);
1851
1913
  WRITE_SPECIFIC_NODE_PTR_FIELD(FuncExpr, func_expr, funcexpr, funcexpr, funcexpr);
1914
+ WRITE_LIST_FIELD(outargs, outargs, outargs);
1852
1915
  }
1853
1916
 
1854
1917
  static void
@@ -1883,13 +1946,6 @@ _outParamRef(OUT_TYPE(ParamRef, ParamRef) out, const ParamRef *node)
1883
1946
  WRITE_INT_FIELD(location, location, location);
1884
1947
  }
1885
1948
 
1886
- static void
1887
- _outAConst(OUT_TYPE(A_Const, AConst) out, const A_Const *node)
1888
- {
1889
- WRITE_NODE_FIELD(val, val, val);
1890
- WRITE_INT_FIELD(location, location, location);
1891
- }
1892
-
1893
1949
  static void
1894
1950
  _outFuncCall(OUT_TYPE(FuncCall, FuncCall) out, const FuncCall *node)
1895
1951
  {
@@ -1897,11 +1953,12 @@ _outFuncCall(OUT_TYPE(FuncCall, FuncCall) out, const FuncCall *node)
1897
1953
  WRITE_LIST_FIELD(args, args, args);
1898
1954
  WRITE_LIST_FIELD(agg_order, agg_order, agg_order);
1899
1955
  WRITE_NODE_PTR_FIELD(agg_filter, agg_filter, agg_filter);
1956
+ WRITE_SPECIFIC_NODE_PTR_FIELD(WindowDef, window_def, over, over, over);
1900
1957
  WRITE_BOOL_FIELD(agg_within_group, agg_within_group, agg_within_group);
1901
1958
  WRITE_BOOL_FIELD(agg_star, agg_star, agg_star);
1902
1959
  WRITE_BOOL_FIELD(agg_distinct, agg_distinct, agg_distinct);
1903
1960
  WRITE_BOOL_FIELD(func_variadic, func_variadic, func_variadic);
1904
- WRITE_SPECIFIC_NODE_PTR_FIELD(WindowDef, window_def, over, over, over);
1961
+ WRITE_ENUM_FIELD(CoercionForm, funcformat, funcformat, funcformat);
1905
1962
  WRITE_INT_FIELD(location, location, location);
1906
1963
  }
1907
1964
 
@@ -2059,6 +2116,7 @@ _outColumnDef(OUT_TYPE(ColumnDef, ColumnDef) out, const ColumnDef *node)
2059
2116
  {
2060
2117
  WRITE_STRING_FIELD(colname, colname, colname);
2061
2118
  WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName);
2119
+ WRITE_STRING_FIELD(compression, compression, compression);
2062
2120
  WRITE_INT_FIELD(inhcount, inhcount, inhcount);
2063
2121
  WRITE_BOOL_FIELD(is_local, is_local, is_local);
2064
2122
  WRITE_BOOL_FIELD(is_not_null, is_not_null, is_not_null);
@@ -2089,6 +2147,13 @@ _outIndexElem(OUT_TYPE(IndexElem, IndexElem) out, const IndexElem *node)
2089
2147
  WRITE_ENUM_FIELD(SortByNulls, nulls_ordering, nulls_ordering, nulls_ordering);
2090
2148
  }
2091
2149
 
2150
+ static void
2151
+ _outStatsElem(OUT_TYPE(StatsElem, StatsElem) out, const StatsElem *node)
2152
+ {
2153
+ WRITE_STRING_FIELD(name, name, name);
2154
+ WRITE_NODE_PTR_FIELD(expr, expr, expr);
2155
+ }
2156
+
2092
2157
  static void
2093
2158
  _outConstraint(OUT_TYPE(Constraint, Constraint) out, const Constraint *node)
2094
2159
  {
@@ -2101,6 +2166,7 @@ _outConstraint(OUT_TYPE(Constraint, Constraint) out, const Constraint *node)
2101
2166
  WRITE_NODE_PTR_FIELD(raw_expr, raw_expr, raw_expr);
2102
2167
  WRITE_STRING_FIELD(cooked_expr, cooked_expr, cooked_expr);
2103
2168
  WRITE_CHAR_FIELD(generated_when, generated_when, generated_when);
2169
+ WRITE_BOOL_FIELD(nulls_not_distinct, nulls_not_distinct, nulls_not_distinct);
2104
2170
  WRITE_LIST_FIELD(keys, keys, keys);
2105
2171
  WRITE_LIST_FIELD(including, including, including);
2106
2172
  WRITE_LIST_FIELD(exclusions, exclusions, exclusions);
@@ -2116,6 +2182,7 @@ _outConstraint(OUT_TYPE(Constraint, Constraint) out, const Constraint *node)
2116
2182
  WRITE_CHAR_FIELD(fk_matchtype, fk_matchtype, fk_matchtype);
2117
2183
  WRITE_CHAR_FIELD(fk_upd_action, fk_upd_action, fk_upd_action);
2118
2184
  WRITE_CHAR_FIELD(fk_del_action, fk_del_action, fk_del_action);
2185
+ WRITE_LIST_FIELD(fk_del_set_cols, fk_del_set_cols, fk_del_set_cols);
2119
2186
  WRITE_LIST_FIELD(old_conpfeqop, old_conpfeqop, old_conpfeqop);
2120
2187
  WRITE_UINT_FIELD(old_pktable_oid, old_pktable_oid, old_pktable_oid);
2121
2188
  WRITE_BOOL_FIELD(skip_validation, skip_validation, skip_validation);
@@ -2147,6 +2214,7 @@ _outRangeTblEntry(OUT_TYPE(RangeTblEntry, RangeTblEntry) out, const RangeTblEntr
2147
2214
  WRITE_LIST_FIELD(joinaliasvars, joinaliasvars, joinaliasvars);
2148
2215
  WRITE_LIST_FIELD(joinleftcols, joinleftcols, joinleftcols);
2149
2216
  WRITE_LIST_FIELD(joinrightcols, joinrightcols, joinrightcols);
2217
+ WRITE_SPECIFIC_NODE_PTR_FIELD(Alias, alias, join_using_alias, join_using_alias, join_using_alias);
2150
2218
  WRITE_LIST_FIELD(functions, functions, functions);
2151
2219
  WRITE_BOOL_FIELD(funcordinality, funcordinality, funcordinality);
2152
2220
  WRITE_SPECIFIC_NODE_PTR_FIELD(TableFunc, table_func, tablefunc, tablefunc, tablefunc);
@@ -2231,6 +2299,7 @@ _outWindowClause(OUT_TYPE(WindowClause, WindowClause) out, const WindowClause *n
2231
2299
  WRITE_INT_FIELD(frame_options, frameOptions, frameOptions);
2232
2300
  WRITE_NODE_PTR_FIELD(start_offset, startOffset, startOffset);
2233
2301
  WRITE_NODE_PTR_FIELD(end_offset, endOffset, endOffset);
2302
+ WRITE_LIST_FIELD(run_condition, runCondition, runCondition);
2234
2303
  WRITE_UINT_FIELD(start_in_range_func, startInRangeFunc, startInRangeFunc);
2235
2304
  WRITE_UINT_FIELD(end_in_range_func, endInRangeFunc, endInRangeFunc);
2236
2305
  WRITE_UINT_FIELD(in_range_coll, inRangeColl, inRangeColl);
@@ -2245,6 +2314,7 @@ _outObjectWithArgs(OUT_TYPE(ObjectWithArgs, ObjectWithArgs) out, const ObjectWit
2245
2314
  {
2246
2315
  WRITE_LIST_FIELD(objname, objname, objname);
2247
2316
  WRITE_LIST_FIELD(objargs, objargs, objargs);
2317
+ WRITE_LIST_FIELD(objfuncargs, objfuncargs, objfuncargs);
2248
2318
  WRITE_BOOL_FIELD(args_unspecified, args_unspecified, args_unspecified);
2249
2319
  }
2250
2320
 
@@ -2336,6 +2406,30 @@ _outOnConflictClause(OUT_TYPE(OnConflictClause, OnConflictClause) out, const OnC
2336
2406
  WRITE_INT_FIELD(location, location, location);
2337
2407
  }
2338
2408
 
2409
+ static void
2410
+ _outCTESearchClause(OUT_TYPE(CTESearchClause, CTESearchClause) out, const CTESearchClause *node)
2411
+ {
2412
+ WRITE_LIST_FIELD(search_col_list, search_col_list, search_col_list);
2413
+ WRITE_BOOL_FIELD(search_breadth_first, search_breadth_first, search_breadth_first);
2414
+ WRITE_STRING_FIELD(search_seq_column, search_seq_column, search_seq_column);
2415
+ WRITE_INT_FIELD(location, location, location);
2416
+ }
2417
+
2418
+ static void
2419
+ _outCTECycleClause(OUT_TYPE(CTECycleClause, CTECycleClause) out, const CTECycleClause *node)
2420
+ {
2421
+ WRITE_LIST_FIELD(cycle_col_list, cycle_col_list, cycle_col_list);
2422
+ WRITE_STRING_FIELD(cycle_mark_column, cycle_mark_column, cycle_mark_column);
2423
+ WRITE_NODE_PTR_FIELD(cycle_mark_value, cycle_mark_value, cycle_mark_value);
2424
+ WRITE_NODE_PTR_FIELD(cycle_mark_default, cycle_mark_default, cycle_mark_default);
2425
+ WRITE_STRING_FIELD(cycle_path_column, cycle_path_column, cycle_path_column);
2426
+ WRITE_INT_FIELD(location, location, location);
2427
+ WRITE_UINT_FIELD(cycle_mark_type, cycle_mark_type, cycle_mark_type);
2428
+ WRITE_INT_FIELD(cycle_mark_typmod, cycle_mark_typmod, cycle_mark_typmod);
2429
+ WRITE_UINT_FIELD(cycle_mark_collation, cycle_mark_collation, cycle_mark_collation);
2430
+ WRITE_UINT_FIELD(cycle_mark_neop, cycle_mark_neop, cycle_mark_neop);
2431
+ }
2432
+
2339
2433
  static void
2340
2434
  _outCommonTableExpr(OUT_TYPE(CommonTableExpr, CommonTableExpr) out, const CommonTableExpr *node)
2341
2435
  {
@@ -2343,6 +2437,8 @@ _outCommonTableExpr(OUT_TYPE(CommonTableExpr, CommonTableExpr) out, const Common
2343
2437
  WRITE_LIST_FIELD(aliascolnames, aliascolnames, aliascolnames);
2344
2438
  WRITE_ENUM_FIELD(CTEMaterialize, ctematerialized, ctematerialized, ctematerialized);
2345
2439
  WRITE_NODE_PTR_FIELD(ctequery, ctequery, ctequery);
2440
+ WRITE_SPECIFIC_NODE_PTR_FIELD(CTESearchClause, ctesearch_clause, search_clause, search_clause, search_clause);
2441
+ WRITE_SPECIFIC_NODE_PTR_FIELD(CTECycleClause, ctecycle_clause, cycle_clause, cycle_clause, cycle_clause);
2346
2442
  WRITE_INT_FIELD(location, location, location);
2347
2443
  WRITE_BOOL_FIELD(cterecursive, cterecursive, cterecursive);
2348
2444
  WRITE_INT_FIELD(cterefcount, cterefcount, cterefcount);
@@ -2352,6 +2448,17 @@ _outCommonTableExpr(OUT_TYPE(CommonTableExpr, CommonTableExpr) out, const Common
2352
2448
  WRITE_LIST_FIELD(ctecolcollations, ctecolcollations, ctecolcollations);
2353
2449
  }
2354
2450
 
2451
+ static void
2452
+ _outMergeWhenClause(OUT_TYPE(MergeWhenClause, MergeWhenClause) out, const MergeWhenClause *node)
2453
+ {
2454
+ WRITE_BOOL_FIELD(matched, matched, matched);
2455
+ WRITE_ENUM_FIELD(CmdType, command_type, commandType, commandType);
2456
+ WRITE_ENUM_FIELD(OverridingKind, override, override, override);
2457
+ WRITE_NODE_PTR_FIELD(condition, condition, condition);
2458
+ WRITE_LIST_FIELD(target_list, targetList, targetList);
2459
+ WRITE_LIST_FIELD(values, values, values);
2460
+ }
2461
+
2355
2462
  static void
2356
2463
  _outRoleSpec(OUT_TYPE(RoleSpec, RoleSpec) out, const RoleSpec *node)
2357
2464
  {
@@ -2412,6 +2519,7 @@ _outPartitionCmd(OUT_TYPE(PartitionCmd, PartitionCmd) out, const PartitionCmd *n
2412
2519
  {
2413
2520
  WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, name, name, name);
2414
2521
  WRITE_SPECIFIC_NODE_PTR_FIELD(PartitionBoundSpec, partition_bound_spec, bound, bound, bound);
2522
+ WRITE_BOOL_FIELD(concurrent, concurrent, concurrent);
2415
2523
  }
2416
2524
 
2417
2525
  static void
@@ -2422,6 +2530,23 @@ _outVacuumRelation(OUT_TYPE(VacuumRelation, VacuumRelation) out, const VacuumRel
2422
2530
  WRITE_LIST_FIELD(va_cols, va_cols, va_cols);
2423
2531
  }
2424
2532
 
2533
+ static void
2534
+ _outPublicationObjSpec(OUT_TYPE(PublicationObjSpec, PublicationObjSpec) out, const PublicationObjSpec *node)
2535
+ {
2536
+ WRITE_ENUM_FIELD(PublicationObjSpecType, pubobjtype, pubobjtype, pubobjtype);
2537
+ WRITE_STRING_FIELD(name, name, name);
2538
+ WRITE_SPECIFIC_NODE_PTR_FIELD(PublicationTable, publication_table, pubtable, pubtable, pubtable);
2539
+ WRITE_INT_FIELD(location, location, location);
2540
+ }
2541
+
2542
+ static void
2543
+ _outPublicationTable(OUT_TYPE(PublicationTable, PublicationTable) out, const PublicationTable *node)
2544
+ {
2545
+ WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation);
2546
+ WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause);
2547
+ WRITE_LIST_FIELD(columns, columns, columns);
2548
+ }
2549
+
2425
2550
  static void
2426
2551
  _outInlineCodeBlock(OUT_TYPE(InlineCodeBlock, InlineCodeBlock) out, const InlineCodeBlock *node)
2427
2552
  {