pg_query 4.2.3 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (486) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/README.md +6 -8
  4. data/Rakefile +3 -3
  5. data/ext/pg_query/extconf.rb +1 -3
  6. data/ext/pg_query/include/access/amapi.h +3 -1
  7. data/ext/pg_query/include/access/attmap.h +5 -3
  8. data/ext/pg_query/include/access/attnum.h +1 -1
  9. data/ext/pg_query/include/access/clog.h +1 -1
  10. data/ext/pg_query/include/access/commit_ts.h +1 -1
  11. data/ext/pg_query/include/access/detoast.h +1 -1
  12. data/ext/pg_query/include/access/genam.h +7 -5
  13. data/ext/pg_query/include/access/gin.h +16 -3
  14. data/ext/pg_query/include/access/htup.h +1 -1
  15. data/ext/pg_query/include/access/htup_details.h +6 -2
  16. data/ext/pg_query/include/access/itup.h +61 -58
  17. data/ext/pg_query/include/access/parallel.h +2 -2
  18. data/ext/pg_query/include/access/printtup.h +1 -1
  19. data/ext/pg_query/include/access/relation.h +1 -1
  20. data/ext/pg_query/include/access/relscan.h +1 -1
  21. data/ext/pg_query/include/access/rmgrlist.h +2 -2
  22. data/ext/pg_query/include/access/sdir.h +12 -3
  23. data/ext/pg_query/include/access/skey.h +1 -1
  24. data/ext/pg_query/include/access/stratnum.h +1 -1
  25. data/ext/pg_query/include/access/sysattr.h +1 -1
  26. data/ext/pg_query/include/access/table.h +1 -1
  27. data/ext/pg_query/include/access/tableam.h +68 -45
  28. data/ext/pg_query/include/access/toast_compression.h +1 -1
  29. data/ext/pg_query/include/access/transam.h +1 -1
  30. data/ext/pg_query/include/access/tsmapi.h +82 -0
  31. data/ext/pg_query/include/access/tupconvert.h +5 -2
  32. data/ext/pg_query/include/access/tupdesc.h +2 -2
  33. data/ext/pg_query/include/access/tupmacs.h +58 -98
  34. data/ext/pg_query/include/access/twophase.h +2 -2
  35. data/ext/pg_query/include/access/xact.h +25 -18
  36. data/ext/pg_query/include/access/xlog.h +15 -16
  37. data/ext/pg_query/include/access/xlog_internal.h +100 -62
  38. data/ext/pg_query/include/access/xlogbackup.h +41 -0
  39. data/ext/pg_query/include/access/xlogdefs.h +6 -25
  40. data/ext/pg_query/include/access/xlogprefetcher.h +1 -1
  41. data/ext/pg_query/include/access/xlogreader.h +7 -6
  42. data/ext/pg_query/include/access/xlogrecord.h +17 -5
  43. data/ext/pg_query/include/access/xlogrecovery.h +4 -3
  44. data/ext/pg_query/include/archive/archive_module.h +59 -0
  45. data/ext/pg_query/include/c.h +144 -156
  46. data/ext/pg_query/include/catalog/catalog.h +4 -3
  47. data/ext/pg_query/include/catalog/catversion.h +6 -2
  48. data/ext/pg_query/include/catalog/dependency.h +5 -4
  49. data/ext/pg_query/include/catalog/genbki.h +7 -6
  50. data/ext/pg_query/include/catalog/index.h +4 -4
  51. data/ext/pg_query/include/catalog/indexing.h +1 -1
  52. data/ext/pg_query/include/catalog/namespace.h +2 -2
  53. data/ext/pg_query/include/catalog/objectaccess.h +10 -8
  54. data/ext/pg_query/include/catalog/objectaddress.h +3 -3
  55. data/ext/pg_query/include/catalog/pg_aggregate.h +1 -1
  56. data/ext/pg_query/include/catalog/pg_aggregate_d.h +1 -1
  57. data/ext/pg_query/include/catalog/pg_am.h +1 -1
  58. data/ext/pg_query/include/catalog/pg_am_d.h +1 -1
  59. data/ext/pg_query/include/catalog/pg_attribute.h +19 -17
  60. data/ext/pg_query/include/catalog/pg_attribute_d.h +19 -19
  61. data/ext/pg_query/include/catalog/pg_authid.h +1 -1
  62. data/ext/pg_query/include/catalog/pg_authid_d.h +3 -1
  63. data/ext/pg_query/include/catalog/pg_class.h +1 -1
  64. data/ext/pg_query/include/catalog/pg_class_d.h +1 -1
  65. data/ext/pg_query/include/catalog/pg_collation.h +3 -1
  66. data/ext/pg_query/include/catalog/pg_collation_d.h +4 -3
  67. data/ext/pg_query/include/catalog/pg_constraint.h +2 -2
  68. data/ext/pg_query/include/catalog/pg_constraint_d.h +1 -1
  69. data/ext/pg_query/include/catalog/pg_control.h +9 -1
  70. data/ext/pg_query/include/catalog/pg_conversion.h +2 -2
  71. data/ext/pg_query/include/catalog/pg_conversion_d.h +1 -1
  72. data/ext/pg_query/include/catalog/pg_database.h +124 -0
  73. data/ext/pg_query/include/catalog/pg_database_d.h +52 -0
  74. data/ext/pg_query/include/catalog/pg_depend.h +1 -1
  75. data/ext/pg_query/include/catalog/pg_depend_d.h +1 -1
  76. data/ext/pg_query/include/catalog/pg_event_trigger.h +1 -1
  77. data/ext/pg_query/include/catalog/pg_event_trigger_d.h +1 -1
  78. data/ext/pg_query/include/catalog/pg_index.h +1 -1
  79. data/ext/pg_query/include/catalog/pg_index_d.h +1 -1
  80. data/ext/pg_query/include/catalog/pg_language.h +1 -1
  81. data/ext/pg_query/include/catalog/pg_language_d.h +1 -1
  82. data/ext/pg_query/include/catalog/pg_namespace.h +1 -1
  83. data/ext/pg_query/include/catalog/pg_namespace_d.h +1 -1
  84. data/ext/pg_query/include/catalog/pg_opclass.h +1 -1
  85. data/ext/pg_query/include/catalog/pg_opclass_d.h +1 -1
  86. data/ext/pg_query/include/catalog/pg_operator.h +1 -1
  87. data/ext/pg_query/include/catalog/pg_operator_d.h +1 -1
  88. data/ext/pg_query/include/catalog/pg_opfamily.h +3 -2
  89. data/ext/pg_query/include/catalog/pg_opfamily_d.h +4 -2
  90. data/ext/pg_query/include/catalog/pg_partitioned_table.h +1 -1
  91. data/ext/pg_query/include/catalog/pg_partitioned_table_d.h +1 -1
  92. data/ext/pg_query/include/catalog/pg_proc.h +1 -1
  93. data/ext/pg_query/include/catalog/pg_proc_d.h +1 -1
  94. data/ext/pg_query/include/catalog/pg_publication.h +2 -5
  95. data/ext/pg_query/include/catalog/pg_publication_d.h +1 -1
  96. data/ext/pg_query/include/catalog/pg_replication_origin.h +1 -1
  97. data/ext/pg_query/include/catalog/pg_replication_origin_d.h +1 -1
  98. data/ext/pg_query/include/catalog/pg_statistic.h +1 -1
  99. data/ext/pg_query/include/catalog/pg_statistic_d.h +1 -1
  100. data/ext/pg_query/include/catalog/pg_statistic_ext.h +1 -1
  101. data/ext/pg_query/include/catalog/pg_statistic_ext_d.h +1 -1
  102. data/ext/pg_query/include/catalog/pg_transform.h +1 -1
  103. data/ext/pg_query/include/catalog/pg_transform_d.h +1 -1
  104. data/ext/pg_query/include/catalog/pg_trigger.h +1 -1
  105. data/ext/pg_query/include/catalog/pg_trigger_d.h +1 -1
  106. data/ext/pg_query/include/catalog/pg_ts_config.h +1 -1
  107. data/ext/pg_query/include/catalog/pg_ts_config_d.h +1 -1
  108. data/ext/pg_query/include/catalog/pg_ts_dict.h +1 -1
  109. data/ext/pg_query/include/catalog/pg_ts_dict_d.h +1 -1
  110. data/ext/pg_query/include/catalog/pg_ts_parser.h +1 -1
  111. data/ext/pg_query/include/catalog/pg_ts_parser_d.h +1 -1
  112. data/ext/pg_query/include/catalog/pg_ts_template.h +1 -1
  113. data/ext/pg_query/include/catalog/pg_ts_template_d.h +1 -1
  114. data/ext/pg_query/include/catalog/pg_type.h +1 -1
  115. data/ext/pg_query/include/catalog/pg_type_d.h +1 -1
  116. data/ext/pg_query/include/catalog/storage.h +6 -6
  117. data/ext/pg_query/include/commands/async.h +1 -1
  118. data/ext/pg_query/include/commands/dbcommands.h +2 -1
  119. data/ext/pg_query/include/commands/defrem.h +2 -1
  120. data/ext/pg_query/include/commands/event_trigger.h +1 -1
  121. data/ext/pg_query/include/commands/explain.h +3 -1
  122. data/ext/pg_query/include/commands/prepare.h +1 -1
  123. data/ext/pg_query/include/commands/tablespace.h +4 -4
  124. data/ext/pg_query/include/commands/trigger.h +15 -14
  125. data/ext/pg_query/include/commands/user.h +9 -3
  126. data/ext/pg_query/include/commands/vacuum.h +60 -14
  127. data/ext/pg_query/include/common/cryptohash.h +39 -0
  128. data/ext/pg_query/include/common/file_perm.h +1 -1
  129. data/ext/pg_query/include/common/hashfn.h +1 -1
  130. data/ext/pg_query/include/common/int.h +437 -0
  131. data/ext/pg_query/include/common/ip.h +4 -2
  132. data/ext/pg_query/include/common/keywords.h +1 -1
  133. data/ext/pg_query/include/common/kwlookup.h +2 -2
  134. data/ext/pg_query/include/common/pg_prng.h +3 -2
  135. data/ext/pg_query/include/common/relpath.h +20 -13
  136. data/ext/pg_query/include/common/scram-common.h +70 -0
  137. data/ext/pg_query/include/common/sha2.h +32 -0
  138. data/ext/pg_query/include/common/string.h +5 -3
  139. data/ext/pg_query/include/common/unicode_east_asian_fw_table.h +10 -10
  140. data/ext/pg_query/include/common/{unicode_combining_table.h → unicode_nonspacing_table.h} +31 -13
  141. data/ext/pg_query/include/copyfuncs.funcs.c +5013 -0
  142. data/ext/pg_query/include/copyfuncs.switch.c +938 -0
  143. data/ext/pg_query/include/datatype/timestamp.h +11 -4
  144. data/ext/pg_query/include/equalfuncs.funcs.c +3097 -0
  145. data/ext/pg_query/include/equalfuncs.switch.c +785 -0
  146. data/ext/pg_query/include/executor/execdesc.h +1 -1
  147. data/ext/pg_query/include/executor/executor.h +34 -17
  148. data/ext/pg_query/include/executor/functions.h +1 -1
  149. data/ext/pg_query/include/executor/instrument.h +1 -1
  150. data/ext/pg_query/include/executor/spi.h +2 -2
  151. data/ext/pg_query/include/executor/tablefunc.h +1 -1
  152. data/ext/pg_query/include/executor/tuptable.h +18 -11
  153. data/ext/pg_query/include/fmgr.h +21 -2
  154. data/ext/pg_query/include/foreign/fdwapi.h +294 -0
  155. data/ext/pg_query/include/funcapi.h +12 -12
  156. data/ext/pg_query/include/gram.h +1127 -0
  157. data/ext/pg_query/include/{parser/gramparse.h → gramparse.h} +4 -4
  158. data/ext/pg_query/include/jit/jit.h +2 -2
  159. data/ext/pg_query/include/kwlist_d.h +534 -510
  160. data/ext/pg_query/include/lib/dshash.h +4 -1
  161. data/ext/pg_query/include/lib/ilist.h +435 -22
  162. data/ext/pg_query/include/lib/pairingheap.h +1 -1
  163. data/ext/pg_query/include/lib/simplehash.h +9 -9
  164. data/ext/pg_query/include/lib/sort_template.h +1 -1
  165. data/ext/pg_query/include/lib/stringinfo.h +3 -3
  166. data/ext/pg_query/include/libpq/auth.h +8 -2
  167. data/ext/pg_query/include/libpq/crypt.h +1 -1
  168. data/ext/pg_query/include/libpq/hba.h +24 -17
  169. data/ext/pg_query/include/libpq/libpq-be.h +36 -25
  170. data/ext/pg_query/include/libpq/libpq.h +1 -1
  171. data/ext/pg_query/include/libpq/pqcomm.h +10 -41
  172. data/ext/pg_query/include/libpq/pqformat.h +2 -2
  173. data/ext/pg_query/include/libpq/pqsignal.h +22 -10
  174. data/ext/pg_query/include/libpq/sasl.h +136 -0
  175. data/ext/pg_query/include/libpq/scram.h +37 -0
  176. data/ext/pg_query/include/mb/pg_wchar.h +35 -18
  177. data/ext/pg_query/include/mb/stringinfo_mb.h +1 -1
  178. data/ext/pg_query/include/miscadmin.h +26 -14
  179. data/ext/pg_query/include/nodes/bitmapset.h +11 -7
  180. data/ext/pg_query/include/nodes/execnodes.h +83 -30
  181. data/ext/pg_query/include/nodes/extensible.h +5 -3
  182. data/ext/pg_query/include/nodes/lockoptions.h +1 -1
  183. data/ext/pg_query/include/nodes/makefuncs.h +14 -2
  184. data/ext/pg_query/include/nodes/memnodes.h +7 -4
  185. data/ext/pg_query/include/nodes/miscnodes.h +56 -0
  186. data/ext/pg_query/include/nodes/nodeFuncs.h +89 -29
  187. data/ext/pg_query/include/nodes/nodes.h +95 -510
  188. data/ext/pg_query/include/nodes/nodetags.h +471 -0
  189. data/ext/pg_query/include/nodes/params.h +3 -3
  190. data/ext/pg_query/include/nodes/parsenodes.h +377 -139
  191. data/ext/pg_query/include/nodes/pathnodes.h +1090 -440
  192. data/ext/pg_query/include/nodes/pg_list.h +30 -7
  193. data/ext/pg_query/include/nodes/plannodes.h +367 -124
  194. data/ext/pg_query/include/nodes/primnodes.h +670 -222
  195. data/ext/pg_query/include/nodes/print.h +1 -1
  196. data/ext/pg_query/include/{utils → nodes}/queryjumble.h +5 -7
  197. data/ext/pg_query/include/nodes/replnodes.h +111 -0
  198. data/ext/pg_query/include/nodes/supportnodes.h +346 -0
  199. data/ext/pg_query/include/nodes/tidbitmap.h +1 -1
  200. data/ext/pg_query/include/nodes/value.h +12 -2
  201. data/ext/pg_query/include/optimizer/cost.h +6 -4
  202. data/ext/pg_query/include/optimizer/geqo.h +1 -1
  203. data/ext/pg_query/include/optimizer/geqo_gene.h +1 -1
  204. data/ext/pg_query/include/optimizer/optimizer.h +8 -8
  205. data/ext/pg_query/include/optimizer/paths.h +16 -7
  206. data/ext/pg_query/include/optimizer/planmain.h +3 -6
  207. data/ext/pg_query/include/parser/analyze.h +4 -3
  208. data/ext/pg_query/include/parser/kwlist.h +12 -1
  209. data/ext/pg_query/include/parser/parse_agg.h +4 -2
  210. data/ext/pg_query/include/parser/parse_coerce.h +3 -1
  211. data/ext/pg_query/include/parser/parse_expr.h +1 -1
  212. data/ext/pg_query/include/parser/parse_func.h +1 -1
  213. data/ext/pg_query/include/parser/parse_node.h +22 -4
  214. data/ext/pg_query/include/parser/parse_oper.h +3 -3
  215. data/ext/pg_query/include/parser/parse_relation.h +8 -3
  216. data/ext/pg_query/include/parser/parse_type.h +4 -3
  217. data/ext/pg_query/include/parser/parser.h +1 -1
  218. data/ext/pg_query/include/parser/parsetree.h +1 -1
  219. data/ext/pg_query/include/parser/scanner.h +2 -2
  220. data/ext/pg_query/include/parser/scansup.h +1 -1
  221. data/ext/pg_query/include/partitioning/partdefs.h +1 -1
  222. data/ext/pg_query/include/pg_config.h +21 -216
  223. data/ext/pg_query/include/pg_config_manual.h +8 -46
  224. data/ext/pg_query/include/pg_getopt.h +1 -1
  225. data/ext/pg_query/include/pg_query.h +27 -3
  226. data/ext/pg_query/include/pg_query_enum_defs.c +311 -149
  227. data/ext/pg_query/include/pg_query_fingerprint_conds.c +545 -489
  228. data/ext/pg_query/include/pg_query_fingerprint_defs.c +5092 -4432
  229. data/ext/pg_query/include/pg_query_outfuncs_conds.c +385 -343
  230. data/ext/pg_query/include/pg_query_outfuncs_defs.c +1294 -1161
  231. data/ext/pg_query/include/pg_query_readfuncs_conds.c +137 -123
  232. data/ext/pg_query/include/pg_query_readfuncs_defs.c +1657 -1496
  233. data/ext/pg_query/include/pg_trace.h +1 -1
  234. data/ext/pg_query/include/pgstat.h +172 -93
  235. data/ext/pg_query/include/pgtime.h +3 -3
  236. data/ext/pg_query/include/pl_gram.h +64 -62
  237. data/ext/pg_query/include/pl_reserved_kwlist.h +1 -1
  238. data/ext/pg_query/include/pl_reserved_kwlist_d.h +1 -1
  239. data/ext/pg_query/include/pl_unreserved_kwlist.h +2 -1
  240. data/ext/pg_query/include/pl_unreserved_kwlist_d.h +48 -46
  241. data/ext/pg_query/include/plpgsql.h +17 -22
  242. data/ext/pg_query/include/port/atomics/arch-arm.h +3 -3
  243. data/ext/pg_query/include/port/atomics/arch-ppc.h +21 -21
  244. data/ext/pg_query/include/port/atomics/arch-x86.h +2 -2
  245. data/ext/pg_query/include/port/atomics/fallback.h +3 -3
  246. data/ext/pg_query/include/port/atomics/generic-gcc.h +1 -1
  247. data/ext/pg_query/include/port/atomics/generic.h +1 -1
  248. data/ext/pg_query/include/port/atomics.h +2 -7
  249. data/ext/pg_query/include/port/pg_bitutils.h +62 -25
  250. data/ext/pg_query/include/port/pg_bswap.h +1 -1
  251. data/ext/pg_query/include/port/pg_crc32c.h +1 -1
  252. data/ext/pg_query/include/port/simd.h +375 -0
  253. data/ext/pg_query/include/port.h +42 -75
  254. data/ext/pg_query/include/portability/instr_time.h +81 -140
  255. data/ext/pg_query/include/postgres.h +205 -434
  256. data/ext/pg_query/include/postgres_ext.h +0 -1
  257. data/ext/pg_query/include/postmaster/autovacuum.h +1 -4
  258. data/ext/pg_query/include/postmaster/auxprocess.h +1 -1
  259. data/ext/pg_query/include/postmaster/bgworker.h +2 -2
  260. data/ext/pg_query/include/postmaster/bgworker_internals.h +1 -1
  261. data/ext/pg_query/include/postmaster/bgwriter.h +2 -2
  262. data/ext/pg_query/include/postmaster/fork_process.h +1 -1
  263. data/ext/pg_query/include/postmaster/interrupt.h +1 -1
  264. data/ext/pg_query/include/postmaster/pgarch.h +1 -38
  265. data/ext/pg_query/include/postmaster/postmaster.h +5 -2
  266. data/ext/pg_query/include/postmaster/startup.h +3 -1
  267. data/ext/pg_query/include/postmaster/syslogger.h +2 -2
  268. data/ext/pg_query/include/postmaster/walwriter.h +3 -1
  269. data/ext/pg_query/include/protobuf/pg_query.pb-c.h +6186 -5585
  270. data/ext/pg_query/include/protobuf/pg_query.pb.h +112443 -91222
  271. data/ext/pg_query/include/regex/regex.h +9 -6
  272. data/ext/pg_query/include/replication/logicallauncher.h +6 -1
  273. data/ext/pg_query/include/replication/logicalproto.h +30 -10
  274. data/ext/pg_query/include/replication/logicalworker.h +14 -1
  275. data/ext/pg_query/include/replication/origin.h +4 -4
  276. data/ext/pg_query/include/replication/reorderbuffer.h +113 -45
  277. data/ext/pg_query/include/replication/slot.h +25 -6
  278. data/ext/pg_query/include/replication/syncrep.h +2 -8
  279. data/ext/pg_query/include/replication/walreceiver.h +15 -9
  280. data/ext/pg_query/include/replication/walsender.h +13 -13
  281. data/ext/pg_query/include/rewrite/prs2lock.h +1 -1
  282. data/ext/pg_query/include/rewrite/rewriteHandler.h +1 -4
  283. data/ext/pg_query/include/rewrite/rewriteManip.h +11 -2
  284. data/ext/pg_query/include/rewrite/rewriteSupport.h +1 -1
  285. data/ext/pg_query/include/src_backend_nodes_copyfuncs.funcs.c +5321 -0
  286. data/ext/pg_query/include/src_backend_nodes_equalfuncs.funcs.c +3354 -0
  287. data/ext/pg_query/include/storage/backendid.h +1 -1
  288. data/ext/pg_query/include/storage/block.h +24 -31
  289. data/ext/pg_query/include/storage/buf.h +1 -1
  290. data/ext/pg_query/include/storage/bufmgr.h +183 -87
  291. data/ext/pg_query/include/storage/bufpage.h +146 -93
  292. data/ext/pg_query/include/storage/condition_variable.h +2 -2
  293. data/ext/pg_query/include/storage/dsm.h +3 -6
  294. data/ext/pg_query/include/storage/dsm_impl.h +4 -1
  295. data/ext/pg_query/include/storage/fd.h +24 -20
  296. data/ext/pg_query/include/storage/fileset.h +1 -1
  297. data/ext/pg_query/include/storage/ipc.h +1 -1
  298. data/ext/pg_query/include/storage/item.h +1 -1
  299. data/ext/pg_query/include/storage/itemid.h +1 -1
  300. data/ext/pg_query/include/storage/itemptr.h +94 -57
  301. data/ext/pg_query/include/storage/large_object.h +1 -1
  302. data/ext/pg_query/include/storage/latch.h +9 -1
  303. data/ext/pg_query/include/storage/lmgr.h +6 -1
  304. data/ext/pg_query/include/storage/lock.h +21 -13
  305. data/ext/pg_query/include/storage/lockdefs.h +3 -3
  306. data/ext/pg_query/include/storage/lwlock.h +16 -2
  307. data/ext/pg_query/include/storage/off.h +1 -1
  308. data/ext/pg_query/include/storage/pg_sema.h +1 -1
  309. data/ext/pg_query/include/storage/pg_shmem.h +1 -1
  310. data/ext/pg_query/include/storage/pmsignal.h +1 -1
  311. data/ext/pg_query/include/storage/predicate.h +2 -2
  312. data/ext/pg_query/include/storage/proc.h +22 -17
  313. data/ext/pg_query/include/storage/procarray.h +3 -2
  314. data/ext/pg_query/include/storage/proclist_types.h +1 -1
  315. data/ext/pg_query/include/storage/procsignal.h +3 -1
  316. data/ext/pg_query/include/storage/relfilelocator.h +99 -0
  317. data/ext/pg_query/include/storage/s_lock.h +66 -309
  318. data/ext/pg_query/include/storage/sharedfileset.h +1 -1
  319. data/ext/pg_query/include/storage/shm_mq.h +1 -1
  320. data/ext/pg_query/include/storage/shm_toc.h +1 -1
  321. data/ext/pg_query/include/storage/shmem.h +1 -23
  322. data/ext/pg_query/include/storage/sinval.h +3 -3
  323. data/ext/pg_query/include/storage/sinvaladt.h +4 -2
  324. data/ext/pg_query/include/storage/smgr.h +12 -10
  325. data/ext/pg_query/include/storage/spin.h +1 -1
  326. data/ext/pg_query/include/storage/standby.h +9 -8
  327. data/ext/pg_query/include/storage/standbydefs.h +1 -1
  328. data/ext/pg_query/include/storage/sync.h +3 -3
  329. data/ext/pg_query/include/tcop/cmdtag.h +7 -2
  330. data/ext/pg_query/include/tcop/cmdtaglist.h +1 -1
  331. data/ext/pg_query/include/tcop/deparse_utility.h +1 -1
  332. data/ext/pg_query/include/tcop/dest.h +1 -3
  333. data/ext/pg_query/include/tcop/fastpath.h +1 -1
  334. data/ext/pg_query/include/tcop/pquery.h +1 -1
  335. data/ext/pg_query/include/tcop/tcopprot.h +1 -4
  336. data/ext/pg_query/include/tcop/utility.h +1 -1
  337. data/ext/pg_query/include/tsearch/ts_cache.h +2 -4
  338. data/ext/pg_query/include/utils/acl.h +26 -81
  339. data/ext/pg_query/include/utils/aclchk_internal.h +1 -1
  340. data/ext/pg_query/include/utils/array.h +19 -1
  341. data/ext/pg_query/include/utils/backend_progress.h +2 -1
  342. data/ext/pg_query/include/utils/backend_status.h +24 -3
  343. data/ext/pg_query/include/utils/builtins.h +14 -5
  344. data/ext/pg_query/include/utils/bytea.h +1 -1
  345. data/ext/pg_query/include/utils/catcache.h +1 -1
  346. data/ext/pg_query/include/utils/date.h +37 -9
  347. data/ext/pg_query/include/utils/datetime.h +41 -21
  348. data/ext/pg_query/include/utils/datum.h +1 -1
  349. data/ext/pg_query/include/utils/dsa.h +5 -1
  350. data/ext/pg_query/include/utils/elog.h +101 -26
  351. data/ext/pg_query/include/utils/expandeddatum.h +14 -3
  352. data/ext/pg_query/include/utils/expandedrecord.h +14 -4
  353. data/ext/pg_query/include/utils/float.h +7 -6
  354. data/ext/pg_query/include/utils/fmgroids.h +54 -1
  355. data/ext/pg_query/include/utils/fmgrprotos.h +45 -3
  356. data/ext/pg_query/include/utils/fmgrtab.h +1 -1
  357. data/ext/pg_query/include/utils/guc.h +55 -82
  358. data/ext/pg_query/include/utils/guc_hooks.h +163 -0
  359. data/ext/pg_query/include/utils/guc_tables.h +49 -3
  360. data/ext/pg_query/include/utils/hsearch.h +1 -1
  361. data/ext/pg_query/include/utils/inval.h +3 -3
  362. data/ext/pg_query/include/utils/logtape.h +77 -0
  363. data/ext/pg_query/include/utils/lsyscache.h +5 -1
  364. data/ext/pg_query/include/utils/memdebug.h +1 -1
  365. data/ext/pg_query/include/utils/memutils.h +5 -49
  366. data/ext/pg_query/include/utils/memutils_internal.h +136 -0
  367. data/ext/pg_query/include/utils/memutils_memorychunk.h +237 -0
  368. data/ext/pg_query/include/utils/numeric.h +20 -5
  369. data/ext/pg_query/include/utils/palloc.h +8 -1
  370. data/ext/pg_query/include/utils/partcache.h +3 -2
  371. data/ext/pg_query/include/utils/pg_locale.h +22 -14
  372. data/ext/pg_query/include/utils/pgstat_internal.h +37 -7
  373. data/ext/pg_query/include/utils/pidfile.h +1 -1
  374. data/ext/pg_query/include/utils/plancache.h +1 -1
  375. data/ext/pg_query/include/utils/portal.h +1 -1
  376. data/ext/pg_query/include/utils/probes.h +6 -6
  377. data/ext/pg_query/include/utils/ps_status.h +23 -1
  378. data/ext/pg_query/include/utils/queryenvironment.h +1 -1
  379. data/ext/pg_query/include/utils/regproc.h +3 -3
  380. data/ext/pg_query/include/utils/rel.h +60 -43
  381. data/ext/pg_query/include/utils/relcache.h +13 -8
  382. data/ext/pg_query/include/utils/reltrigger.h +1 -1
  383. data/ext/pg_query/include/utils/resowner.h +1 -1
  384. data/ext/pg_query/include/utils/ruleutils.h +6 -1
  385. data/ext/pg_query/include/utils/sharedtuplestore.h +1 -1
  386. data/ext/pg_query/include/utils/snapmgr.h +4 -2
  387. data/ext/pg_query/include/utils/snapshot.h +1 -1
  388. data/ext/pg_query/include/utils/sortsupport.h +2 -2
  389. data/ext/pg_query/include/utils/syscache.h +4 -1
  390. data/ext/pg_query/include/utils/timeout.h +1 -1
  391. data/ext/pg_query/include/utils/timestamp.h +41 -11
  392. data/ext/pg_query/include/utils/tuplesort.h +189 -35
  393. data/ext/pg_query/include/utils/tuplestore.h +1 -1
  394. data/ext/pg_query/include/utils/typcache.h +1 -1
  395. data/ext/pg_query/include/utils/varlena.h +13 -1
  396. data/ext/pg_query/include/utils/wait_event.h +9 -4
  397. data/ext/pg_query/include/utils/xml.h +15 -5
  398. data/ext/pg_query/include/varatt.h +358 -0
  399. data/ext/pg_query/pg_query.c +1 -1
  400. data/ext/pg_query/pg_query.pb-c.c +19755 -17757
  401. data/ext/pg_query/pg_query_fingerprint.c +8 -3
  402. data/ext/pg_query/pg_query_fingerprint.h +1 -1
  403. data/ext/pg_query/pg_query_internal.h +1 -1
  404. data/ext/pg_query/pg_query_json_plpgsql.c +1 -0
  405. data/ext/pg_query/pg_query_normalize.c +1 -1
  406. data/ext/pg_query/pg_query_outfuncs_protobuf.c +2 -2
  407. data/ext/pg_query/pg_query_parse.c +46 -4
  408. data/ext/pg_query/pg_query_parse_plpgsql.c +1 -1
  409. data/ext/pg_query/pg_query_scan.c +1 -1
  410. data/ext/pg_query/pg_query_split.c +2 -2
  411. data/ext/pg_query/postgres_deparse.c +503 -105
  412. data/ext/pg_query/src_backend_catalog_namespace.c +7 -2
  413. data/ext/pg_query/src_backend_catalog_pg_proc.c +1 -1
  414. data/ext/pg_query/src_backend_commands_define.c +1 -1
  415. data/ext/pg_query/src_backend_nodes_bitmapset.c +11 -70
  416. data/ext/pg_query/src_backend_nodes_copyfuncs.c +96 -6202
  417. data/ext/pg_query/src_backend_nodes_equalfuncs.c +95 -4068
  418. data/ext/pg_query/src_backend_nodes_extensible.c +6 -29
  419. data/ext/pg_query/src_backend_nodes_list.c +14 -2
  420. data/ext/pg_query/src_backend_nodes_makefuncs.c +95 -1
  421. data/ext/pg_query/src_backend_nodes_nodeFuncs.c +283 -132
  422. data/ext/pg_query/src_backend_nodes_value.c +1 -1
  423. data/ext/pg_query/src_backend_parser_gram.c +33208 -31806
  424. data/ext/pg_query/src_backend_parser_parser.c +28 -2
  425. data/ext/pg_query/src_backend_parser_scan.c +4318 -3329
  426. data/ext/pg_query/src_backend_parser_scansup.c +1 -1
  427. data/ext/pg_query/src_backend_postmaster_postmaster.c +129 -110
  428. data/ext/pg_query/src_backend_storage_ipc_ipc.c +1 -1
  429. data/ext/pg_query/src_backend_tcop_postgres.c +66 -87
  430. data/ext/pg_query/src_backend_utils_activity_pgstat_database.c +1 -1
  431. data/ext/pg_query/src_backend_utils_adt_datum.c +5 -7
  432. data/ext/pg_query/src_backend_utils_adt_expandeddatum.c +1 -1
  433. data/ext/pg_query/src_backend_utils_adt_format_type.c +1 -1
  434. data/ext/pg_query/src_backend_utils_adt_numutils.c +489 -0
  435. data/ext/pg_query/src_backend_utils_adt_ruleutils.c +79 -5
  436. data/ext/pg_query/src_backend_utils_error_assert.c +4 -7
  437. data/ext/pg_query/src_backend_utils_error_elog.c +354 -97
  438. data/ext/pg_query/src_backend_utils_fmgr_fmgr.c +33 -1
  439. data/ext/pg_query/src_backend_utils_init_globals.c +5 -2
  440. data/ext/pg_query/src_backend_utils_mb_mbutils.c +13 -4
  441. data/ext/pg_query/src_backend_utils_misc_guc_tables.c +494 -0
  442. data/ext/pg_query/src_backend_utils_mmgr_alignedalloc.c +163 -0
  443. data/ext/pg_query/src_backend_utils_mmgr_aset.c +449 -312
  444. data/ext/pg_query/src_backend_utils_mmgr_generation.c +1039 -0
  445. data/ext/pg_query/src_backend_utils_mmgr_mcxt.c +398 -49
  446. data/ext/pg_query/src_backend_utils_mmgr_slab.c +1021 -0
  447. data/ext/pg_query/src_common_encnames.c +4 -1
  448. data/ext/pg_query/src_common_hashfn.c +1 -1
  449. data/ext/pg_query/src_common_keywords.c +1 -1
  450. data/ext/pg_query/src_common_kwlist_d.h +534 -510
  451. data/ext/pg_query/src_common_kwlookup.c +1 -1
  452. data/ext/pg_query/src_common_psprintf.c +1 -1
  453. data/ext/pg_query/src_common_stringinfo.c +4 -4
  454. data/ext/pg_query/src_common_wchar.c +9 -8
  455. data/ext/pg_query/src_pl_plpgsql_src_pl_comp.c +1 -1
  456. data/ext/pg_query/src_pl_plpgsql_src_pl_funcs.c +3 -1
  457. data/ext/pg_query/src_pl_plpgsql_src_pl_gram.c +661 -694
  458. data/ext/pg_query/src_pl_plpgsql_src_pl_handler.c +1 -1
  459. data/ext/pg_query/src_pl_plpgsql_src_pl_reserved_kwlist_d.h +1 -1
  460. data/ext/pg_query/src_pl_plpgsql_src_pl_scanner.c +1 -1
  461. data/ext/pg_query/src_pl_plpgsql_src_pl_unreserved_kwlist_d.h +48 -46
  462. data/ext/pg_query/src_port_pg_bitutils.c +1 -1
  463. data/ext/pg_query/src_port_pgstrcasecmp.c +29 -1
  464. data/ext/pg_query/src_port_snprintf.c +3 -7
  465. data/ext/pg_query/src_port_strerror.c +1 -1
  466. data/ext/pg_query/src_port_strnlen.c +1 -1
  467. data/lib/pg_query/pg_query_pb.rb +166 -3191
  468. data/lib/pg_query/treewalker.rb +7 -2
  469. data/lib/pg_query/version.rb +1 -1
  470. metadata +43 -24
  471. data/ext/pg_query/include/catalog/pg_parameter_acl.h +0 -60
  472. data/ext/pg_query/include/catalog/pg_parameter_acl_d.h +0 -34
  473. data/ext/pg_query/include/commands/variable.h +0 -38
  474. data/ext/pg_query/include/getaddrinfo.h +0 -162
  475. data/ext/pg_query/include/parser/gram.h +0 -1101
  476. data/ext/pg_query/include/storage/relfilenode.h +0 -99
  477. data/ext/pg_query/include/utils/dynahash.h +0 -20
  478. data/ext/pg_query/include/utils/pg_lsn.h +0 -29
  479. data/ext/pg_query/include/utils/rls.h +0 -50
  480. data/ext/pg_query/include/utils/tzparser.h +0 -39
  481. data/ext/pg_query/src_backend_storage_lmgr_s_lock.c +0 -371
  482. data/ext/pg_query/src_backend_utils_hash_dynahash.c +0 -1116
  483. data/ext/pg_query/src_backend_utils_misc_guc.c +0 -1993
  484. data/ext/pg_query/src_common_pg_prng.c +0 -152
  485. data/ext/pg_query/src_common_string.c +0 -92
  486. data/ext/pg_query/src_port_pgsleep.c +0 -69
@@ -0,0 +1,3097 @@
1
+ /*-------------------------------------------------------------------------
2
+ *
3
+ * equalfuncs.funcs.c
4
+ * Generated node infrastructure code
5
+ *
6
+ * Portions Copyright (c) 1996-2023, 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/sdir.h"
20
+ #include "access/tableam.h"
21
+ #include "access/tsmapi.h"
22
+ #include "commands/event_trigger.h"
23
+ #include "commands/trigger.h"
24
+ #include "executor/tuptable.h"
25
+ #include "foreign/fdwapi.h"
26
+ #include "nodes/bitmapset.h"
27
+ #include "nodes/execnodes.h"
28
+ #include "nodes/extensible.h"
29
+ #include "nodes/lockoptions.h"
30
+ #include "nodes/miscnodes.h"
31
+ #include "nodes/nodes.h"
32
+ #include "nodes/parsenodes.h"
33
+ #include "nodes/pathnodes.h"
34
+ #include "nodes/plannodes.h"
35
+ #include "nodes/primnodes.h"
36
+ #include "nodes/replnodes.h"
37
+ #include "nodes/supportnodes.h"
38
+ #include "nodes/value.h"
39
+ #include "utils/rel.h"
40
+
41
+ static bool
42
+ _equalAlias(const Alias *a, const Alias *b)
43
+ {
44
+ COMPARE_STRING_FIELD(aliasname);
45
+ COMPARE_NODE_FIELD(colnames);
46
+
47
+ return true;
48
+ }
49
+
50
+ static bool
51
+ _equalRangeVar(const RangeVar *a, const RangeVar *b)
52
+ {
53
+ COMPARE_STRING_FIELD(catalogname);
54
+ COMPARE_STRING_FIELD(schemaname);
55
+ COMPARE_STRING_FIELD(relname);
56
+ COMPARE_SCALAR_FIELD(inh);
57
+ COMPARE_SCALAR_FIELD(relpersistence);
58
+ COMPARE_NODE_FIELD(alias);
59
+ COMPARE_LOCATION_FIELD(location);
60
+
61
+ return true;
62
+ }
63
+
64
+ static bool
65
+ _equalTableFunc(const TableFunc *a, const TableFunc *b)
66
+ {
67
+ COMPARE_NODE_FIELD(ns_uris);
68
+ COMPARE_NODE_FIELD(ns_names);
69
+ COMPARE_NODE_FIELD(docexpr);
70
+ COMPARE_NODE_FIELD(rowexpr);
71
+ COMPARE_NODE_FIELD(colnames);
72
+ COMPARE_NODE_FIELD(coltypes);
73
+ COMPARE_NODE_FIELD(coltypmods);
74
+ COMPARE_NODE_FIELD(colcollations);
75
+ COMPARE_NODE_FIELD(colexprs);
76
+ COMPARE_NODE_FIELD(coldefexprs);
77
+ COMPARE_BITMAPSET_FIELD(notnulls);
78
+ COMPARE_SCALAR_FIELD(ordinalitycol);
79
+ COMPARE_LOCATION_FIELD(location);
80
+
81
+ return true;
82
+ }
83
+
84
+ static bool
85
+ _equalIntoClause(const IntoClause *a, const IntoClause *b)
86
+ {
87
+ COMPARE_NODE_FIELD(rel);
88
+ COMPARE_NODE_FIELD(colNames);
89
+ COMPARE_STRING_FIELD(accessMethod);
90
+ COMPARE_NODE_FIELD(options);
91
+ COMPARE_SCALAR_FIELD(onCommit);
92
+ COMPARE_STRING_FIELD(tableSpaceName);
93
+ COMPARE_NODE_FIELD(viewQuery);
94
+ COMPARE_SCALAR_FIELD(skipData);
95
+
96
+ return true;
97
+ }
98
+
99
+ static bool
100
+ _equalVar(const Var *a, const Var *b)
101
+ {
102
+ COMPARE_SCALAR_FIELD(varno);
103
+ COMPARE_SCALAR_FIELD(varattno);
104
+ COMPARE_SCALAR_FIELD(vartype);
105
+ COMPARE_SCALAR_FIELD(vartypmod);
106
+ COMPARE_SCALAR_FIELD(varcollid);
107
+ COMPARE_BITMAPSET_FIELD(varnullingrels);
108
+ COMPARE_SCALAR_FIELD(varlevelsup);
109
+ COMPARE_LOCATION_FIELD(location);
110
+
111
+ return true;
112
+ }
113
+
114
+ static bool
115
+ _equalParam(const Param *a, const Param *b)
116
+ {
117
+ COMPARE_SCALAR_FIELD(paramkind);
118
+ COMPARE_SCALAR_FIELD(paramid);
119
+ COMPARE_SCALAR_FIELD(paramtype);
120
+ COMPARE_SCALAR_FIELD(paramtypmod);
121
+ COMPARE_SCALAR_FIELD(paramcollid);
122
+ COMPARE_LOCATION_FIELD(location);
123
+
124
+ return true;
125
+ }
126
+
127
+ static bool
128
+ _equalAggref(const Aggref *a, const Aggref *b)
129
+ {
130
+ COMPARE_SCALAR_FIELD(aggfnoid);
131
+ COMPARE_SCALAR_FIELD(aggtype);
132
+ COMPARE_SCALAR_FIELD(aggcollid);
133
+ COMPARE_SCALAR_FIELD(inputcollid);
134
+ COMPARE_NODE_FIELD(aggargtypes);
135
+ COMPARE_NODE_FIELD(aggdirectargs);
136
+ COMPARE_NODE_FIELD(args);
137
+ COMPARE_NODE_FIELD(aggorder);
138
+ COMPARE_NODE_FIELD(aggdistinct);
139
+ COMPARE_NODE_FIELD(aggfilter);
140
+ COMPARE_SCALAR_FIELD(aggstar);
141
+ COMPARE_SCALAR_FIELD(aggvariadic);
142
+ COMPARE_SCALAR_FIELD(aggkind);
143
+ COMPARE_SCALAR_FIELD(agglevelsup);
144
+ COMPARE_SCALAR_FIELD(aggsplit);
145
+ COMPARE_SCALAR_FIELD(aggno);
146
+ COMPARE_SCALAR_FIELD(aggtransno);
147
+ COMPARE_LOCATION_FIELD(location);
148
+
149
+ return true;
150
+ }
151
+
152
+ static bool
153
+ _equalGroupingFunc(const GroupingFunc *a, const GroupingFunc *b)
154
+ {
155
+ COMPARE_NODE_FIELD(args);
156
+ COMPARE_SCALAR_FIELD(agglevelsup);
157
+ COMPARE_LOCATION_FIELD(location);
158
+
159
+ return true;
160
+ }
161
+
162
+ static bool
163
+ _equalWindowFunc(const WindowFunc *a, const WindowFunc *b)
164
+ {
165
+ COMPARE_SCALAR_FIELD(winfnoid);
166
+ COMPARE_SCALAR_FIELD(wintype);
167
+ COMPARE_SCALAR_FIELD(wincollid);
168
+ COMPARE_SCALAR_FIELD(inputcollid);
169
+ COMPARE_NODE_FIELD(args);
170
+ COMPARE_NODE_FIELD(aggfilter);
171
+ COMPARE_SCALAR_FIELD(winref);
172
+ COMPARE_SCALAR_FIELD(winstar);
173
+ COMPARE_SCALAR_FIELD(winagg);
174
+ COMPARE_LOCATION_FIELD(location);
175
+
176
+ return true;
177
+ }
178
+
179
+ static bool
180
+ _equalSubscriptingRef(const SubscriptingRef *a, const SubscriptingRef *b)
181
+ {
182
+ COMPARE_SCALAR_FIELD(refcontainertype);
183
+ COMPARE_SCALAR_FIELD(refelemtype);
184
+ COMPARE_SCALAR_FIELD(refrestype);
185
+ COMPARE_SCALAR_FIELD(reftypmod);
186
+ COMPARE_SCALAR_FIELD(refcollid);
187
+ COMPARE_NODE_FIELD(refupperindexpr);
188
+ COMPARE_NODE_FIELD(reflowerindexpr);
189
+ COMPARE_NODE_FIELD(refexpr);
190
+ COMPARE_NODE_FIELD(refassgnexpr);
191
+
192
+ return true;
193
+ }
194
+
195
+ static bool
196
+ _equalFuncExpr(const FuncExpr *a, const FuncExpr *b)
197
+ {
198
+ COMPARE_SCALAR_FIELD(funcid);
199
+ COMPARE_SCALAR_FIELD(funcresulttype);
200
+ COMPARE_SCALAR_FIELD(funcretset);
201
+ COMPARE_SCALAR_FIELD(funcvariadic);
202
+ COMPARE_SCALAR_FIELD(funccollid);
203
+ COMPARE_SCALAR_FIELD(inputcollid);
204
+ COMPARE_NODE_FIELD(args);
205
+ COMPARE_LOCATION_FIELD(location);
206
+
207
+ return true;
208
+ }
209
+
210
+ static bool
211
+ _equalNamedArgExpr(const NamedArgExpr *a, const NamedArgExpr *b)
212
+ {
213
+ COMPARE_NODE_FIELD(arg);
214
+ COMPARE_STRING_FIELD(name);
215
+ COMPARE_SCALAR_FIELD(argnumber);
216
+ COMPARE_LOCATION_FIELD(location);
217
+
218
+ return true;
219
+ }
220
+
221
+ static bool
222
+ _equalOpExpr(const OpExpr *a, const OpExpr *b)
223
+ {
224
+ COMPARE_SCALAR_FIELD(opno);
225
+ if (a->opfuncid != b->opfuncid && a->opfuncid != 0 && b->opfuncid != 0)
226
+ return false;
227
+ COMPARE_SCALAR_FIELD(opresulttype);
228
+ COMPARE_SCALAR_FIELD(opretset);
229
+ COMPARE_SCALAR_FIELD(opcollid);
230
+ COMPARE_SCALAR_FIELD(inputcollid);
231
+ COMPARE_NODE_FIELD(args);
232
+ COMPARE_LOCATION_FIELD(location);
233
+
234
+ return true;
235
+ }
236
+
237
+ static bool
238
+ _equalDistinctExpr(const DistinctExpr *a, const DistinctExpr *b)
239
+ {
240
+ COMPARE_SCALAR_FIELD(opno);
241
+ if (a->opfuncid != b->opfuncid && a->opfuncid != 0 && b->opfuncid != 0)
242
+ return false;
243
+ COMPARE_SCALAR_FIELD(opresulttype);
244
+ COMPARE_SCALAR_FIELD(opretset);
245
+ COMPARE_SCALAR_FIELD(opcollid);
246
+ COMPARE_SCALAR_FIELD(inputcollid);
247
+ COMPARE_NODE_FIELD(args);
248
+ COMPARE_LOCATION_FIELD(location);
249
+
250
+ return true;
251
+ }
252
+
253
+ static bool
254
+ _equalNullIfExpr(const NullIfExpr *a, const NullIfExpr *b)
255
+ {
256
+ COMPARE_SCALAR_FIELD(opno);
257
+ if (a->opfuncid != b->opfuncid && a->opfuncid != 0 && b->opfuncid != 0)
258
+ return false;
259
+ COMPARE_SCALAR_FIELD(opresulttype);
260
+ COMPARE_SCALAR_FIELD(opretset);
261
+ COMPARE_SCALAR_FIELD(opcollid);
262
+ COMPARE_SCALAR_FIELD(inputcollid);
263
+ COMPARE_NODE_FIELD(args);
264
+ COMPARE_LOCATION_FIELD(location);
265
+
266
+ return true;
267
+ }
268
+
269
+ static bool
270
+ _equalScalarArrayOpExpr(const ScalarArrayOpExpr *a, const ScalarArrayOpExpr *b)
271
+ {
272
+ COMPARE_SCALAR_FIELD(opno);
273
+ if (a->opfuncid != b->opfuncid && a->opfuncid != 0 && b->opfuncid != 0)
274
+ return false;
275
+ if (a->hashfuncid != b->hashfuncid && a->hashfuncid != 0 && b->hashfuncid != 0)
276
+ return false;
277
+ if (a->negfuncid != b->negfuncid && a->negfuncid != 0 && b->negfuncid != 0)
278
+ return false;
279
+ COMPARE_SCALAR_FIELD(useOr);
280
+ COMPARE_SCALAR_FIELD(inputcollid);
281
+ COMPARE_NODE_FIELD(args);
282
+ COMPARE_LOCATION_FIELD(location);
283
+
284
+ return true;
285
+ }
286
+
287
+ static bool
288
+ _equalBoolExpr(const BoolExpr *a, const BoolExpr *b)
289
+ {
290
+ COMPARE_SCALAR_FIELD(boolop);
291
+ COMPARE_NODE_FIELD(args);
292
+ COMPARE_LOCATION_FIELD(location);
293
+
294
+ return true;
295
+ }
296
+
297
+ static bool
298
+ _equalSubLink(const SubLink *a, const SubLink *b)
299
+ {
300
+ COMPARE_SCALAR_FIELD(subLinkType);
301
+ COMPARE_SCALAR_FIELD(subLinkId);
302
+ COMPARE_NODE_FIELD(testexpr);
303
+ COMPARE_NODE_FIELD(operName);
304
+ COMPARE_NODE_FIELD(subselect);
305
+ COMPARE_LOCATION_FIELD(location);
306
+
307
+ return true;
308
+ }
309
+
310
+ static bool
311
+ _equalSubPlan(const SubPlan *a, const SubPlan *b)
312
+ {
313
+ COMPARE_SCALAR_FIELD(subLinkType);
314
+ COMPARE_NODE_FIELD(testexpr);
315
+ COMPARE_NODE_FIELD(paramIds);
316
+ COMPARE_SCALAR_FIELD(plan_id);
317
+ COMPARE_STRING_FIELD(plan_name);
318
+ COMPARE_SCALAR_FIELD(firstColType);
319
+ COMPARE_SCALAR_FIELD(firstColTypmod);
320
+ COMPARE_SCALAR_FIELD(firstColCollation);
321
+ COMPARE_SCALAR_FIELD(useHashTable);
322
+ COMPARE_SCALAR_FIELD(unknownEqFalse);
323
+ COMPARE_SCALAR_FIELD(parallel_safe);
324
+ COMPARE_NODE_FIELD(setParam);
325
+ COMPARE_NODE_FIELD(parParam);
326
+ COMPARE_NODE_FIELD(args);
327
+ COMPARE_SCALAR_FIELD(startup_cost);
328
+ COMPARE_SCALAR_FIELD(per_call_cost);
329
+
330
+ return true;
331
+ }
332
+
333
+ static bool
334
+ _equalAlternativeSubPlan(const AlternativeSubPlan *a, const AlternativeSubPlan *b)
335
+ {
336
+ COMPARE_NODE_FIELD(subplans);
337
+
338
+ return true;
339
+ }
340
+
341
+ static bool
342
+ _equalFieldSelect(const FieldSelect *a, const FieldSelect *b)
343
+ {
344
+ COMPARE_NODE_FIELD(arg);
345
+ COMPARE_SCALAR_FIELD(fieldnum);
346
+ COMPARE_SCALAR_FIELD(resulttype);
347
+ COMPARE_SCALAR_FIELD(resulttypmod);
348
+ COMPARE_SCALAR_FIELD(resultcollid);
349
+
350
+ return true;
351
+ }
352
+
353
+ static bool
354
+ _equalFieldStore(const FieldStore *a, const FieldStore *b)
355
+ {
356
+ COMPARE_NODE_FIELD(arg);
357
+ COMPARE_NODE_FIELD(newvals);
358
+ COMPARE_NODE_FIELD(fieldnums);
359
+ COMPARE_SCALAR_FIELD(resulttype);
360
+
361
+ return true;
362
+ }
363
+
364
+ static bool
365
+ _equalRelabelType(const RelabelType *a, const RelabelType *b)
366
+ {
367
+ COMPARE_NODE_FIELD(arg);
368
+ COMPARE_SCALAR_FIELD(resulttype);
369
+ COMPARE_SCALAR_FIELD(resulttypmod);
370
+ COMPARE_SCALAR_FIELD(resultcollid);
371
+ COMPARE_LOCATION_FIELD(location);
372
+
373
+ return true;
374
+ }
375
+
376
+ static bool
377
+ _equalCoerceViaIO(const CoerceViaIO *a, const CoerceViaIO *b)
378
+ {
379
+ COMPARE_NODE_FIELD(arg);
380
+ COMPARE_SCALAR_FIELD(resulttype);
381
+ COMPARE_SCALAR_FIELD(resultcollid);
382
+ COMPARE_LOCATION_FIELD(location);
383
+
384
+ return true;
385
+ }
386
+
387
+ static bool
388
+ _equalArrayCoerceExpr(const ArrayCoerceExpr *a, const ArrayCoerceExpr *b)
389
+ {
390
+ COMPARE_NODE_FIELD(arg);
391
+ COMPARE_NODE_FIELD(elemexpr);
392
+ COMPARE_SCALAR_FIELD(resulttype);
393
+ COMPARE_SCALAR_FIELD(resulttypmod);
394
+ COMPARE_SCALAR_FIELD(resultcollid);
395
+ COMPARE_LOCATION_FIELD(location);
396
+
397
+ return true;
398
+ }
399
+
400
+ static bool
401
+ _equalConvertRowtypeExpr(const ConvertRowtypeExpr *a, const ConvertRowtypeExpr *b)
402
+ {
403
+ COMPARE_NODE_FIELD(arg);
404
+ COMPARE_SCALAR_FIELD(resulttype);
405
+ COMPARE_LOCATION_FIELD(location);
406
+
407
+ return true;
408
+ }
409
+
410
+ static bool
411
+ _equalCollateExpr(const CollateExpr *a, const CollateExpr *b)
412
+ {
413
+ COMPARE_NODE_FIELD(arg);
414
+ COMPARE_SCALAR_FIELD(collOid);
415
+ COMPARE_LOCATION_FIELD(location);
416
+
417
+ return true;
418
+ }
419
+
420
+ static bool
421
+ _equalCaseExpr(const CaseExpr *a, const CaseExpr *b)
422
+ {
423
+ COMPARE_SCALAR_FIELD(casetype);
424
+ COMPARE_SCALAR_FIELD(casecollid);
425
+ COMPARE_NODE_FIELD(arg);
426
+ COMPARE_NODE_FIELD(args);
427
+ COMPARE_NODE_FIELD(defresult);
428
+ COMPARE_LOCATION_FIELD(location);
429
+
430
+ return true;
431
+ }
432
+
433
+ static bool
434
+ _equalCaseWhen(const CaseWhen *a, const CaseWhen *b)
435
+ {
436
+ COMPARE_NODE_FIELD(expr);
437
+ COMPARE_NODE_FIELD(result);
438
+ COMPARE_LOCATION_FIELD(location);
439
+
440
+ return true;
441
+ }
442
+
443
+ static bool
444
+ _equalCaseTestExpr(const CaseTestExpr *a, const CaseTestExpr *b)
445
+ {
446
+ COMPARE_SCALAR_FIELD(typeId);
447
+ COMPARE_SCALAR_FIELD(typeMod);
448
+ COMPARE_SCALAR_FIELD(collation);
449
+
450
+ return true;
451
+ }
452
+
453
+ static bool
454
+ _equalArrayExpr(const ArrayExpr *a, const ArrayExpr *b)
455
+ {
456
+ COMPARE_SCALAR_FIELD(array_typeid);
457
+ COMPARE_SCALAR_FIELD(array_collid);
458
+ COMPARE_SCALAR_FIELD(element_typeid);
459
+ COMPARE_NODE_FIELD(elements);
460
+ COMPARE_SCALAR_FIELD(multidims);
461
+ COMPARE_LOCATION_FIELD(location);
462
+
463
+ return true;
464
+ }
465
+
466
+ static bool
467
+ _equalRowExpr(const RowExpr *a, const RowExpr *b)
468
+ {
469
+ COMPARE_NODE_FIELD(args);
470
+ COMPARE_SCALAR_FIELD(row_typeid);
471
+ COMPARE_NODE_FIELD(colnames);
472
+ COMPARE_LOCATION_FIELD(location);
473
+
474
+ return true;
475
+ }
476
+
477
+ static bool
478
+ _equalRowCompareExpr(const RowCompareExpr *a, const RowCompareExpr *b)
479
+ {
480
+ COMPARE_SCALAR_FIELD(rctype);
481
+ COMPARE_NODE_FIELD(opnos);
482
+ COMPARE_NODE_FIELD(opfamilies);
483
+ COMPARE_NODE_FIELD(inputcollids);
484
+ COMPARE_NODE_FIELD(largs);
485
+ COMPARE_NODE_FIELD(rargs);
486
+
487
+ return true;
488
+ }
489
+
490
+ static bool
491
+ _equalCoalesceExpr(const CoalesceExpr *a, const CoalesceExpr *b)
492
+ {
493
+ COMPARE_SCALAR_FIELD(coalescetype);
494
+ COMPARE_SCALAR_FIELD(coalescecollid);
495
+ COMPARE_NODE_FIELD(args);
496
+ COMPARE_LOCATION_FIELD(location);
497
+
498
+ return true;
499
+ }
500
+
501
+ static bool
502
+ _equalMinMaxExpr(const MinMaxExpr *a, const MinMaxExpr *b)
503
+ {
504
+ COMPARE_SCALAR_FIELD(minmaxtype);
505
+ COMPARE_SCALAR_FIELD(minmaxcollid);
506
+ COMPARE_SCALAR_FIELD(inputcollid);
507
+ COMPARE_SCALAR_FIELD(op);
508
+ COMPARE_NODE_FIELD(args);
509
+ COMPARE_LOCATION_FIELD(location);
510
+
511
+ return true;
512
+ }
513
+
514
+ static bool
515
+ _equalSQLValueFunction(const SQLValueFunction *a, const SQLValueFunction *b)
516
+ {
517
+ COMPARE_SCALAR_FIELD(op);
518
+ COMPARE_SCALAR_FIELD(type);
519
+ COMPARE_SCALAR_FIELD(typmod);
520
+ COMPARE_LOCATION_FIELD(location);
521
+
522
+ return true;
523
+ }
524
+
525
+ static bool
526
+ _equalXmlExpr(const XmlExpr *a, const XmlExpr *b)
527
+ {
528
+ COMPARE_SCALAR_FIELD(op);
529
+ COMPARE_STRING_FIELD(name);
530
+ COMPARE_NODE_FIELD(named_args);
531
+ COMPARE_NODE_FIELD(arg_names);
532
+ COMPARE_NODE_FIELD(args);
533
+ COMPARE_SCALAR_FIELD(xmloption);
534
+ COMPARE_SCALAR_FIELD(indent);
535
+ COMPARE_SCALAR_FIELD(type);
536
+ COMPARE_SCALAR_FIELD(typmod);
537
+ COMPARE_LOCATION_FIELD(location);
538
+
539
+ return true;
540
+ }
541
+
542
+ static bool
543
+ _equalJsonFormat(const JsonFormat *a, const JsonFormat *b)
544
+ {
545
+ COMPARE_SCALAR_FIELD(format_type);
546
+ COMPARE_SCALAR_FIELD(encoding);
547
+ COMPARE_LOCATION_FIELD(location);
548
+
549
+ return true;
550
+ }
551
+
552
+ static bool
553
+ _equalJsonReturning(const JsonReturning *a, const JsonReturning *b)
554
+ {
555
+ COMPARE_NODE_FIELD(format);
556
+ COMPARE_SCALAR_FIELD(typid);
557
+ COMPARE_SCALAR_FIELD(typmod);
558
+
559
+ return true;
560
+ }
561
+
562
+ static bool
563
+ _equalJsonValueExpr(const JsonValueExpr *a, const JsonValueExpr *b)
564
+ {
565
+ COMPARE_NODE_FIELD(raw_expr);
566
+ COMPARE_NODE_FIELD(formatted_expr);
567
+ COMPARE_NODE_FIELD(format);
568
+
569
+ return true;
570
+ }
571
+
572
+ static bool
573
+ _equalJsonConstructorExpr(const JsonConstructorExpr *a, const JsonConstructorExpr *b)
574
+ {
575
+ COMPARE_SCALAR_FIELD(type);
576
+ COMPARE_NODE_FIELD(args);
577
+ COMPARE_NODE_FIELD(func);
578
+ COMPARE_NODE_FIELD(coercion);
579
+ COMPARE_NODE_FIELD(returning);
580
+ COMPARE_SCALAR_FIELD(absent_on_null);
581
+ COMPARE_SCALAR_FIELD(unique);
582
+ COMPARE_LOCATION_FIELD(location);
583
+
584
+ return true;
585
+ }
586
+
587
+ static bool
588
+ _equalJsonIsPredicate(const JsonIsPredicate *a, const JsonIsPredicate *b)
589
+ {
590
+ COMPARE_NODE_FIELD(expr);
591
+ COMPARE_NODE_FIELD(format);
592
+ COMPARE_SCALAR_FIELD(item_type);
593
+ COMPARE_SCALAR_FIELD(unique_keys);
594
+ COMPARE_LOCATION_FIELD(location);
595
+
596
+ return true;
597
+ }
598
+
599
+ static bool
600
+ _equalNullTest(const NullTest *a, const NullTest *b)
601
+ {
602
+ COMPARE_NODE_FIELD(arg);
603
+ COMPARE_SCALAR_FIELD(nulltesttype);
604
+ COMPARE_SCALAR_FIELD(argisrow);
605
+ COMPARE_LOCATION_FIELD(location);
606
+
607
+ return true;
608
+ }
609
+
610
+ static bool
611
+ _equalBooleanTest(const BooleanTest *a, const BooleanTest *b)
612
+ {
613
+ COMPARE_NODE_FIELD(arg);
614
+ COMPARE_SCALAR_FIELD(booltesttype);
615
+ COMPARE_LOCATION_FIELD(location);
616
+
617
+ return true;
618
+ }
619
+
620
+ static bool
621
+ _equalCoerceToDomain(const CoerceToDomain *a, const CoerceToDomain *b)
622
+ {
623
+ COMPARE_NODE_FIELD(arg);
624
+ COMPARE_SCALAR_FIELD(resulttype);
625
+ COMPARE_SCALAR_FIELD(resulttypmod);
626
+ COMPARE_SCALAR_FIELD(resultcollid);
627
+ COMPARE_LOCATION_FIELD(location);
628
+
629
+ return true;
630
+ }
631
+
632
+ static bool
633
+ _equalCoerceToDomainValue(const CoerceToDomainValue *a, const CoerceToDomainValue *b)
634
+ {
635
+ COMPARE_SCALAR_FIELD(typeId);
636
+ COMPARE_SCALAR_FIELD(typeMod);
637
+ COMPARE_SCALAR_FIELD(collation);
638
+ COMPARE_LOCATION_FIELD(location);
639
+
640
+ return true;
641
+ }
642
+
643
+ static bool
644
+ _equalSetToDefault(const SetToDefault *a, const SetToDefault *b)
645
+ {
646
+ COMPARE_SCALAR_FIELD(typeId);
647
+ COMPARE_SCALAR_FIELD(typeMod);
648
+ COMPARE_SCALAR_FIELD(collation);
649
+ COMPARE_LOCATION_FIELD(location);
650
+
651
+ return true;
652
+ }
653
+
654
+ static bool
655
+ _equalCurrentOfExpr(const CurrentOfExpr *a, const CurrentOfExpr *b)
656
+ {
657
+ COMPARE_SCALAR_FIELD(cvarno);
658
+ COMPARE_STRING_FIELD(cursor_name);
659
+ COMPARE_SCALAR_FIELD(cursor_param);
660
+
661
+ return true;
662
+ }
663
+
664
+ static bool
665
+ _equalNextValueExpr(const NextValueExpr *a, const NextValueExpr *b)
666
+ {
667
+ COMPARE_SCALAR_FIELD(seqid);
668
+ COMPARE_SCALAR_FIELD(typeId);
669
+
670
+ return true;
671
+ }
672
+
673
+ static bool
674
+ _equalInferenceElem(const InferenceElem *a, const InferenceElem *b)
675
+ {
676
+ COMPARE_NODE_FIELD(expr);
677
+ COMPARE_SCALAR_FIELD(infercollid);
678
+ COMPARE_SCALAR_FIELD(inferopclass);
679
+
680
+ return true;
681
+ }
682
+
683
+ static bool
684
+ _equalTargetEntry(const TargetEntry *a, const TargetEntry *b)
685
+ {
686
+ COMPARE_NODE_FIELD(expr);
687
+ COMPARE_SCALAR_FIELD(resno);
688
+ COMPARE_STRING_FIELD(resname);
689
+ COMPARE_SCALAR_FIELD(ressortgroupref);
690
+ COMPARE_SCALAR_FIELD(resorigtbl);
691
+ COMPARE_SCALAR_FIELD(resorigcol);
692
+ COMPARE_SCALAR_FIELD(resjunk);
693
+
694
+ return true;
695
+ }
696
+
697
+ static bool
698
+ _equalRangeTblRef(const RangeTblRef *a, const RangeTblRef *b)
699
+ {
700
+ COMPARE_SCALAR_FIELD(rtindex);
701
+
702
+ return true;
703
+ }
704
+
705
+ static bool
706
+ _equalJoinExpr(const JoinExpr *a, const JoinExpr *b)
707
+ {
708
+ COMPARE_SCALAR_FIELD(jointype);
709
+ COMPARE_SCALAR_FIELD(isNatural);
710
+ COMPARE_NODE_FIELD(larg);
711
+ COMPARE_NODE_FIELD(rarg);
712
+ COMPARE_NODE_FIELD(usingClause);
713
+ COMPARE_NODE_FIELD(join_using_alias);
714
+ COMPARE_NODE_FIELD(quals);
715
+ COMPARE_NODE_FIELD(alias);
716
+ COMPARE_SCALAR_FIELD(rtindex);
717
+
718
+ return true;
719
+ }
720
+
721
+ static bool
722
+ _equalFromExpr(const FromExpr *a, const FromExpr *b)
723
+ {
724
+ COMPARE_NODE_FIELD(fromlist);
725
+ COMPARE_NODE_FIELD(quals);
726
+
727
+ return true;
728
+ }
729
+
730
+ static bool
731
+ _equalOnConflictExpr(const OnConflictExpr *a, const OnConflictExpr *b)
732
+ {
733
+ COMPARE_SCALAR_FIELD(action);
734
+ COMPARE_NODE_FIELD(arbiterElems);
735
+ COMPARE_NODE_FIELD(arbiterWhere);
736
+ COMPARE_SCALAR_FIELD(constraint);
737
+ COMPARE_NODE_FIELD(onConflictSet);
738
+ COMPARE_NODE_FIELD(onConflictWhere);
739
+ COMPARE_SCALAR_FIELD(exclRelIndex);
740
+ COMPARE_NODE_FIELD(exclRelTlist);
741
+
742
+ return true;
743
+ }
744
+
745
+ static bool
746
+ _equalQuery(const Query *a, const Query *b)
747
+ {
748
+ COMPARE_SCALAR_FIELD(commandType);
749
+ COMPARE_SCALAR_FIELD(querySource);
750
+ COMPARE_SCALAR_FIELD(canSetTag);
751
+ COMPARE_NODE_FIELD(utilityStmt);
752
+ COMPARE_SCALAR_FIELD(resultRelation);
753
+ COMPARE_SCALAR_FIELD(hasAggs);
754
+ COMPARE_SCALAR_FIELD(hasWindowFuncs);
755
+ COMPARE_SCALAR_FIELD(hasTargetSRFs);
756
+ COMPARE_SCALAR_FIELD(hasSubLinks);
757
+ COMPARE_SCALAR_FIELD(hasDistinctOn);
758
+ COMPARE_SCALAR_FIELD(hasRecursive);
759
+ COMPARE_SCALAR_FIELD(hasModifyingCTE);
760
+ COMPARE_SCALAR_FIELD(hasForUpdate);
761
+ COMPARE_SCALAR_FIELD(hasRowSecurity);
762
+ COMPARE_SCALAR_FIELD(isReturn);
763
+ COMPARE_NODE_FIELD(cteList);
764
+ COMPARE_NODE_FIELD(rtable);
765
+ COMPARE_NODE_FIELD(rteperminfos);
766
+ COMPARE_NODE_FIELD(jointree);
767
+ COMPARE_NODE_FIELD(mergeActionList);
768
+ COMPARE_SCALAR_FIELD(mergeUseOuterJoin);
769
+ COMPARE_NODE_FIELD(targetList);
770
+ COMPARE_SCALAR_FIELD(override);
771
+ COMPARE_NODE_FIELD(onConflict);
772
+ COMPARE_NODE_FIELD(returningList);
773
+ COMPARE_NODE_FIELD(groupClause);
774
+ COMPARE_SCALAR_FIELD(groupDistinct);
775
+ COMPARE_NODE_FIELD(groupingSets);
776
+ COMPARE_NODE_FIELD(havingQual);
777
+ COMPARE_NODE_FIELD(windowClause);
778
+ COMPARE_NODE_FIELD(distinctClause);
779
+ COMPARE_NODE_FIELD(sortClause);
780
+ COMPARE_NODE_FIELD(limitOffset);
781
+ COMPARE_NODE_FIELD(limitCount);
782
+ COMPARE_SCALAR_FIELD(limitOption);
783
+ COMPARE_NODE_FIELD(rowMarks);
784
+ COMPARE_NODE_FIELD(setOperations);
785
+ COMPARE_NODE_FIELD(constraintDeps);
786
+ COMPARE_NODE_FIELD(withCheckOptions);
787
+ COMPARE_LOCATION_FIELD(stmt_location);
788
+ COMPARE_SCALAR_FIELD(stmt_len);
789
+
790
+ return true;
791
+ }
792
+
793
+ static bool
794
+ _equalTypeName(const TypeName *a, const TypeName *b)
795
+ {
796
+ COMPARE_NODE_FIELD(names);
797
+ COMPARE_SCALAR_FIELD(typeOid);
798
+ COMPARE_SCALAR_FIELD(setof);
799
+ COMPARE_SCALAR_FIELD(pct_type);
800
+ COMPARE_NODE_FIELD(typmods);
801
+ COMPARE_SCALAR_FIELD(typemod);
802
+ COMPARE_NODE_FIELD(arrayBounds);
803
+ COMPARE_LOCATION_FIELD(location);
804
+
805
+ return true;
806
+ }
807
+
808
+ static bool
809
+ _equalColumnRef(const ColumnRef *a, const ColumnRef *b)
810
+ {
811
+ COMPARE_NODE_FIELD(fields);
812
+ COMPARE_LOCATION_FIELD(location);
813
+
814
+ return true;
815
+ }
816
+
817
+ static bool
818
+ _equalParamRef(const ParamRef *a, const ParamRef *b)
819
+ {
820
+ COMPARE_SCALAR_FIELD(number);
821
+ COMPARE_LOCATION_FIELD(location);
822
+
823
+ return true;
824
+ }
825
+
826
+ static bool
827
+ _equalA_Expr(const A_Expr *a, const A_Expr *b)
828
+ {
829
+ COMPARE_SCALAR_FIELD(kind);
830
+ COMPARE_NODE_FIELD(name);
831
+ COMPARE_NODE_FIELD(lexpr);
832
+ COMPARE_NODE_FIELD(rexpr);
833
+ COMPARE_LOCATION_FIELD(location);
834
+
835
+ return true;
836
+ }
837
+
838
+ static bool
839
+ _equalTypeCast(const TypeCast *a, const TypeCast *b)
840
+ {
841
+ COMPARE_NODE_FIELD(arg);
842
+ COMPARE_NODE_FIELD(typeName);
843
+ COMPARE_LOCATION_FIELD(location);
844
+
845
+ return true;
846
+ }
847
+
848
+ static bool
849
+ _equalCollateClause(const CollateClause *a, const CollateClause *b)
850
+ {
851
+ COMPARE_NODE_FIELD(arg);
852
+ COMPARE_NODE_FIELD(collname);
853
+ COMPARE_LOCATION_FIELD(location);
854
+
855
+ return true;
856
+ }
857
+
858
+ static bool
859
+ _equalRoleSpec(const RoleSpec *a, const RoleSpec *b)
860
+ {
861
+ COMPARE_SCALAR_FIELD(roletype);
862
+ COMPARE_STRING_FIELD(rolename);
863
+ COMPARE_LOCATION_FIELD(location);
864
+
865
+ return true;
866
+ }
867
+
868
+ static bool
869
+ _equalFuncCall(const FuncCall *a, const FuncCall *b)
870
+ {
871
+ COMPARE_NODE_FIELD(funcname);
872
+ COMPARE_NODE_FIELD(args);
873
+ COMPARE_NODE_FIELD(agg_order);
874
+ COMPARE_NODE_FIELD(agg_filter);
875
+ COMPARE_NODE_FIELD(over);
876
+ COMPARE_SCALAR_FIELD(agg_within_group);
877
+ COMPARE_SCALAR_FIELD(agg_star);
878
+ COMPARE_SCALAR_FIELD(agg_distinct);
879
+ COMPARE_SCALAR_FIELD(func_variadic);
880
+ COMPARE_LOCATION_FIELD(location);
881
+
882
+ return true;
883
+ }
884
+
885
+ static bool
886
+ _equalA_Star(const A_Star *a, const A_Star *b)
887
+ {
888
+
889
+ return true;
890
+ }
891
+
892
+ static bool
893
+ _equalA_Indices(const A_Indices *a, const A_Indices *b)
894
+ {
895
+ COMPARE_SCALAR_FIELD(is_slice);
896
+ COMPARE_NODE_FIELD(lidx);
897
+ COMPARE_NODE_FIELD(uidx);
898
+
899
+ return true;
900
+ }
901
+
902
+ static bool
903
+ _equalA_Indirection(const A_Indirection *a, const A_Indirection *b)
904
+ {
905
+ COMPARE_NODE_FIELD(arg);
906
+ COMPARE_NODE_FIELD(indirection);
907
+
908
+ return true;
909
+ }
910
+
911
+ static bool
912
+ _equalA_ArrayExpr(const A_ArrayExpr *a, const A_ArrayExpr *b)
913
+ {
914
+ COMPARE_NODE_FIELD(elements);
915
+ COMPARE_LOCATION_FIELD(location);
916
+
917
+ return true;
918
+ }
919
+
920
+ static bool
921
+ _equalResTarget(const ResTarget *a, const ResTarget *b)
922
+ {
923
+ COMPARE_STRING_FIELD(name);
924
+ COMPARE_NODE_FIELD(indirection);
925
+ COMPARE_NODE_FIELD(val);
926
+ COMPARE_LOCATION_FIELD(location);
927
+
928
+ return true;
929
+ }
930
+
931
+ static bool
932
+ _equalMultiAssignRef(const MultiAssignRef *a, const MultiAssignRef *b)
933
+ {
934
+ COMPARE_NODE_FIELD(source);
935
+ COMPARE_SCALAR_FIELD(colno);
936
+ COMPARE_SCALAR_FIELD(ncolumns);
937
+
938
+ return true;
939
+ }
940
+
941
+ static bool
942
+ _equalSortBy(const SortBy *a, const SortBy *b)
943
+ {
944
+ COMPARE_NODE_FIELD(node);
945
+ COMPARE_SCALAR_FIELD(sortby_dir);
946
+ COMPARE_SCALAR_FIELD(sortby_nulls);
947
+ COMPARE_NODE_FIELD(useOp);
948
+ COMPARE_LOCATION_FIELD(location);
949
+
950
+ return true;
951
+ }
952
+
953
+ static bool
954
+ _equalWindowDef(const WindowDef *a, const WindowDef *b)
955
+ {
956
+ COMPARE_STRING_FIELD(name);
957
+ COMPARE_STRING_FIELD(refname);
958
+ COMPARE_NODE_FIELD(partitionClause);
959
+ COMPARE_NODE_FIELD(orderClause);
960
+ COMPARE_SCALAR_FIELD(frameOptions);
961
+ COMPARE_NODE_FIELD(startOffset);
962
+ COMPARE_NODE_FIELD(endOffset);
963
+ COMPARE_LOCATION_FIELD(location);
964
+
965
+ return true;
966
+ }
967
+
968
+ static bool
969
+ _equalRangeSubselect(const RangeSubselect *a, const RangeSubselect *b)
970
+ {
971
+ COMPARE_SCALAR_FIELD(lateral);
972
+ COMPARE_NODE_FIELD(subquery);
973
+ COMPARE_NODE_FIELD(alias);
974
+
975
+ return true;
976
+ }
977
+
978
+ static bool
979
+ _equalRangeFunction(const RangeFunction *a, const RangeFunction *b)
980
+ {
981
+ COMPARE_SCALAR_FIELD(lateral);
982
+ COMPARE_SCALAR_FIELD(ordinality);
983
+ COMPARE_SCALAR_FIELD(is_rowsfrom);
984
+ COMPARE_NODE_FIELD(functions);
985
+ COMPARE_NODE_FIELD(alias);
986
+ COMPARE_NODE_FIELD(coldeflist);
987
+
988
+ return true;
989
+ }
990
+
991
+ static bool
992
+ _equalRangeTableFunc(const RangeTableFunc *a, const RangeTableFunc *b)
993
+ {
994
+ COMPARE_SCALAR_FIELD(lateral);
995
+ COMPARE_NODE_FIELD(docexpr);
996
+ COMPARE_NODE_FIELD(rowexpr);
997
+ COMPARE_NODE_FIELD(namespaces);
998
+ COMPARE_NODE_FIELD(columns);
999
+ COMPARE_NODE_FIELD(alias);
1000
+ COMPARE_LOCATION_FIELD(location);
1001
+
1002
+ return true;
1003
+ }
1004
+
1005
+ static bool
1006
+ _equalRangeTableFuncCol(const RangeTableFuncCol *a, const RangeTableFuncCol *b)
1007
+ {
1008
+ COMPARE_STRING_FIELD(colname);
1009
+ COMPARE_NODE_FIELD(typeName);
1010
+ COMPARE_SCALAR_FIELD(for_ordinality);
1011
+ COMPARE_SCALAR_FIELD(is_not_null);
1012
+ COMPARE_NODE_FIELD(colexpr);
1013
+ COMPARE_NODE_FIELD(coldefexpr);
1014
+ COMPARE_LOCATION_FIELD(location);
1015
+
1016
+ return true;
1017
+ }
1018
+
1019
+ static bool
1020
+ _equalRangeTableSample(const RangeTableSample *a, const RangeTableSample *b)
1021
+ {
1022
+ COMPARE_NODE_FIELD(relation);
1023
+ COMPARE_NODE_FIELD(method);
1024
+ COMPARE_NODE_FIELD(args);
1025
+ COMPARE_NODE_FIELD(repeatable);
1026
+ COMPARE_LOCATION_FIELD(location);
1027
+
1028
+ return true;
1029
+ }
1030
+
1031
+ static bool
1032
+ _equalColumnDef(const ColumnDef *a, const ColumnDef *b)
1033
+ {
1034
+ COMPARE_STRING_FIELD(colname);
1035
+ COMPARE_NODE_FIELD(typeName);
1036
+ COMPARE_STRING_FIELD(compression);
1037
+ COMPARE_SCALAR_FIELD(inhcount);
1038
+ COMPARE_SCALAR_FIELD(is_local);
1039
+ COMPARE_SCALAR_FIELD(is_not_null);
1040
+ COMPARE_SCALAR_FIELD(is_from_type);
1041
+ COMPARE_SCALAR_FIELD(storage);
1042
+ COMPARE_STRING_FIELD(storage_name);
1043
+ COMPARE_NODE_FIELD(raw_default);
1044
+ COMPARE_NODE_FIELD(cooked_default);
1045
+ COMPARE_SCALAR_FIELD(identity);
1046
+ COMPARE_NODE_FIELD(identitySequence);
1047
+ COMPARE_SCALAR_FIELD(generated);
1048
+ COMPARE_NODE_FIELD(collClause);
1049
+ COMPARE_SCALAR_FIELD(collOid);
1050
+ COMPARE_NODE_FIELD(constraints);
1051
+ COMPARE_NODE_FIELD(fdwoptions);
1052
+ COMPARE_LOCATION_FIELD(location);
1053
+
1054
+ return true;
1055
+ }
1056
+
1057
+ static bool
1058
+ _equalTableLikeClause(const TableLikeClause *a, const TableLikeClause *b)
1059
+ {
1060
+ COMPARE_NODE_FIELD(relation);
1061
+ COMPARE_SCALAR_FIELD(options);
1062
+ COMPARE_SCALAR_FIELD(relationOid);
1063
+
1064
+ return true;
1065
+ }
1066
+
1067
+ static bool
1068
+ _equalIndexElem(const IndexElem *a, const IndexElem *b)
1069
+ {
1070
+ COMPARE_STRING_FIELD(name);
1071
+ COMPARE_NODE_FIELD(expr);
1072
+ COMPARE_STRING_FIELD(indexcolname);
1073
+ COMPARE_NODE_FIELD(collation);
1074
+ COMPARE_NODE_FIELD(opclass);
1075
+ COMPARE_NODE_FIELD(opclassopts);
1076
+ COMPARE_SCALAR_FIELD(ordering);
1077
+ COMPARE_SCALAR_FIELD(nulls_ordering);
1078
+
1079
+ return true;
1080
+ }
1081
+
1082
+ static bool
1083
+ _equalDefElem(const DefElem *a, const DefElem *b)
1084
+ {
1085
+ COMPARE_STRING_FIELD(defnamespace);
1086
+ COMPARE_STRING_FIELD(defname);
1087
+ COMPARE_NODE_FIELD(arg);
1088
+ COMPARE_SCALAR_FIELD(defaction);
1089
+ COMPARE_LOCATION_FIELD(location);
1090
+
1091
+ return true;
1092
+ }
1093
+
1094
+ static bool
1095
+ _equalLockingClause(const LockingClause *a, const LockingClause *b)
1096
+ {
1097
+ COMPARE_NODE_FIELD(lockedRels);
1098
+ COMPARE_SCALAR_FIELD(strength);
1099
+ COMPARE_SCALAR_FIELD(waitPolicy);
1100
+
1101
+ return true;
1102
+ }
1103
+
1104
+ static bool
1105
+ _equalXmlSerialize(const XmlSerialize *a, const XmlSerialize *b)
1106
+ {
1107
+ COMPARE_SCALAR_FIELD(xmloption);
1108
+ COMPARE_NODE_FIELD(expr);
1109
+ COMPARE_NODE_FIELD(typeName);
1110
+ COMPARE_SCALAR_FIELD(indent);
1111
+ COMPARE_LOCATION_FIELD(location);
1112
+
1113
+ return true;
1114
+ }
1115
+
1116
+ static bool
1117
+ _equalPartitionElem(const PartitionElem *a, const PartitionElem *b)
1118
+ {
1119
+ COMPARE_STRING_FIELD(name);
1120
+ COMPARE_NODE_FIELD(expr);
1121
+ COMPARE_NODE_FIELD(collation);
1122
+ COMPARE_NODE_FIELD(opclass);
1123
+ COMPARE_LOCATION_FIELD(location);
1124
+
1125
+ return true;
1126
+ }
1127
+
1128
+ static bool
1129
+ _equalPartitionSpec(const PartitionSpec *a, const PartitionSpec *b)
1130
+ {
1131
+ COMPARE_SCALAR_FIELD(strategy);
1132
+ COMPARE_NODE_FIELD(partParams);
1133
+ COMPARE_LOCATION_FIELD(location);
1134
+
1135
+ return true;
1136
+ }
1137
+
1138
+ static bool
1139
+ _equalPartitionBoundSpec(const PartitionBoundSpec *a, const PartitionBoundSpec *b)
1140
+ {
1141
+ COMPARE_SCALAR_FIELD(strategy);
1142
+ COMPARE_SCALAR_FIELD(is_default);
1143
+ COMPARE_SCALAR_FIELD(modulus);
1144
+ COMPARE_SCALAR_FIELD(remainder);
1145
+ COMPARE_NODE_FIELD(listdatums);
1146
+ COMPARE_NODE_FIELD(lowerdatums);
1147
+ COMPARE_NODE_FIELD(upperdatums);
1148
+ COMPARE_LOCATION_FIELD(location);
1149
+
1150
+ return true;
1151
+ }
1152
+
1153
+ static bool
1154
+ _equalPartitionRangeDatum(const PartitionRangeDatum *a, const PartitionRangeDatum *b)
1155
+ {
1156
+ COMPARE_SCALAR_FIELD(kind);
1157
+ COMPARE_NODE_FIELD(value);
1158
+ COMPARE_LOCATION_FIELD(location);
1159
+
1160
+ return true;
1161
+ }
1162
+
1163
+ static bool
1164
+ _equalPartitionCmd(const PartitionCmd *a, const PartitionCmd *b)
1165
+ {
1166
+ COMPARE_NODE_FIELD(name);
1167
+ COMPARE_NODE_FIELD(bound);
1168
+ COMPARE_SCALAR_FIELD(concurrent);
1169
+
1170
+ return true;
1171
+ }
1172
+
1173
+ static bool
1174
+ _equalRangeTblEntry(const RangeTblEntry *a, const RangeTblEntry *b)
1175
+ {
1176
+ COMPARE_SCALAR_FIELD(rtekind);
1177
+ COMPARE_SCALAR_FIELD(relid);
1178
+ COMPARE_SCALAR_FIELD(relkind);
1179
+ COMPARE_SCALAR_FIELD(rellockmode);
1180
+ COMPARE_NODE_FIELD(tablesample);
1181
+ COMPARE_SCALAR_FIELD(perminfoindex);
1182
+ COMPARE_NODE_FIELD(subquery);
1183
+ COMPARE_SCALAR_FIELD(security_barrier);
1184
+ COMPARE_SCALAR_FIELD(jointype);
1185
+ COMPARE_SCALAR_FIELD(joinmergedcols);
1186
+ COMPARE_NODE_FIELD(joinaliasvars);
1187
+ COMPARE_NODE_FIELD(joinleftcols);
1188
+ COMPARE_NODE_FIELD(joinrightcols);
1189
+ COMPARE_NODE_FIELD(join_using_alias);
1190
+ COMPARE_NODE_FIELD(functions);
1191
+ COMPARE_SCALAR_FIELD(funcordinality);
1192
+ COMPARE_NODE_FIELD(tablefunc);
1193
+ COMPARE_NODE_FIELD(values_lists);
1194
+ COMPARE_STRING_FIELD(ctename);
1195
+ COMPARE_SCALAR_FIELD(ctelevelsup);
1196
+ COMPARE_SCALAR_FIELD(self_reference);
1197
+ COMPARE_NODE_FIELD(coltypes);
1198
+ COMPARE_NODE_FIELD(coltypmods);
1199
+ COMPARE_NODE_FIELD(colcollations);
1200
+ COMPARE_STRING_FIELD(enrname);
1201
+ COMPARE_SCALAR_FIELD(enrtuples);
1202
+ COMPARE_NODE_FIELD(alias);
1203
+ COMPARE_NODE_FIELD(eref);
1204
+ COMPARE_SCALAR_FIELD(lateral);
1205
+ COMPARE_SCALAR_FIELD(inh);
1206
+ COMPARE_SCALAR_FIELD(inFromCl);
1207
+ COMPARE_NODE_FIELD(securityQuals);
1208
+
1209
+ return true;
1210
+ }
1211
+
1212
+ static bool
1213
+ _equalRTEPermissionInfo(const RTEPermissionInfo *a, const RTEPermissionInfo *b)
1214
+ {
1215
+ COMPARE_SCALAR_FIELD(relid);
1216
+ COMPARE_SCALAR_FIELD(inh);
1217
+ COMPARE_SCALAR_FIELD(requiredPerms);
1218
+ COMPARE_SCALAR_FIELD(checkAsUser);
1219
+ COMPARE_BITMAPSET_FIELD(selectedCols);
1220
+ COMPARE_BITMAPSET_FIELD(insertedCols);
1221
+ COMPARE_BITMAPSET_FIELD(updatedCols);
1222
+
1223
+ return true;
1224
+ }
1225
+
1226
+ static bool
1227
+ _equalRangeTblFunction(const RangeTblFunction *a, const RangeTblFunction *b)
1228
+ {
1229
+ COMPARE_NODE_FIELD(funcexpr);
1230
+ COMPARE_SCALAR_FIELD(funccolcount);
1231
+ COMPARE_NODE_FIELD(funccolnames);
1232
+ COMPARE_NODE_FIELD(funccoltypes);
1233
+ COMPARE_NODE_FIELD(funccoltypmods);
1234
+ COMPARE_NODE_FIELD(funccolcollations);
1235
+ COMPARE_BITMAPSET_FIELD(funcparams);
1236
+
1237
+ return true;
1238
+ }
1239
+
1240
+ static bool
1241
+ _equalTableSampleClause(const TableSampleClause *a, const TableSampleClause *b)
1242
+ {
1243
+ COMPARE_SCALAR_FIELD(tsmhandler);
1244
+ COMPARE_NODE_FIELD(args);
1245
+ COMPARE_NODE_FIELD(repeatable);
1246
+
1247
+ return true;
1248
+ }
1249
+
1250
+ static bool
1251
+ _equalWithCheckOption(const WithCheckOption *a, const WithCheckOption *b)
1252
+ {
1253
+ COMPARE_SCALAR_FIELD(kind);
1254
+ COMPARE_STRING_FIELD(relname);
1255
+ COMPARE_STRING_FIELD(polname);
1256
+ COMPARE_NODE_FIELD(qual);
1257
+ COMPARE_SCALAR_FIELD(cascaded);
1258
+
1259
+ return true;
1260
+ }
1261
+
1262
+ static bool
1263
+ _equalSortGroupClause(const SortGroupClause *a, const SortGroupClause *b)
1264
+ {
1265
+ COMPARE_SCALAR_FIELD(tleSortGroupRef);
1266
+ COMPARE_SCALAR_FIELD(eqop);
1267
+ COMPARE_SCALAR_FIELD(sortop);
1268
+ COMPARE_SCALAR_FIELD(nulls_first);
1269
+ COMPARE_SCALAR_FIELD(hashable);
1270
+
1271
+ return true;
1272
+ }
1273
+
1274
+ static bool
1275
+ _equalGroupingSet(const GroupingSet *a, const GroupingSet *b)
1276
+ {
1277
+ COMPARE_SCALAR_FIELD(kind);
1278
+ COMPARE_NODE_FIELD(content);
1279
+ COMPARE_LOCATION_FIELD(location);
1280
+
1281
+ return true;
1282
+ }
1283
+
1284
+ static bool
1285
+ _equalWindowClause(const WindowClause *a, const WindowClause *b)
1286
+ {
1287
+ COMPARE_STRING_FIELD(name);
1288
+ COMPARE_STRING_FIELD(refname);
1289
+ COMPARE_NODE_FIELD(partitionClause);
1290
+ COMPARE_NODE_FIELD(orderClause);
1291
+ COMPARE_SCALAR_FIELD(frameOptions);
1292
+ COMPARE_NODE_FIELD(startOffset);
1293
+ COMPARE_NODE_FIELD(endOffset);
1294
+ COMPARE_NODE_FIELD(runCondition);
1295
+ COMPARE_SCALAR_FIELD(startInRangeFunc);
1296
+ COMPARE_SCALAR_FIELD(endInRangeFunc);
1297
+ COMPARE_SCALAR_FIELD(inRangeColl);
1298
+ COMPARE_SCALAR_FIELD(inRangeAsc);
1299
+ COMPARE_SCALAR_FIELD(inRangeNullsFirst);
1300
+ COMPARE_SCALAR_FIELD(winref);
1301
+ COMPARE_SCALAR_FIELD(copiedOrder);
1302
+
1303
+ return true;
1304
+ }
1305
+
1306
+ static bool
1307
+ _equalRowMarkClause(const RowMarkClause *a, const RowMarkClause *b)
1308
+ {
1309
+ COMPARE_SCALAR_FIELD(rti);
1310
+ COMPARE_SCALAR_FIELD(strength);
1311
+ COMPARE_SCALAR_FIELD(waitPolicy);
1312
+ COMPARE_SCALAR_FIELD(pushedDown);
1313
+
1314
+ return true;
1315
+ }
1316
+
1317
+ static bool
1318
+ _equalWithClause(const WithClause *a, const WithClause *b)
1319
+ {
1320
+ COMPARE_NODE_FIELD(ctes);
1321
+ COMPARE_SCALAR_FIELD(recursive);
1322
+ COMPARE_LOCATION_FIELD(location);
1323
+
1324
+ return true;
1325
+ }
1326
+
1327
+ static bool
1328
+ _equalInferClause(const InferClause *a, const InferClause *b)
1329
+ {
1330
+ COMPARE_NODE_FIELD(indexElems);
1331
+ COMPARE_NODE_FIELD(whereClause);
1332
+ COMPARE_STRING_FIELD(conname);
1333
+ COMPARE_LOCATION_FIELD(location);
1334
+
1335
+ return true;
1336
+ }
1337
+
1338
+ static bool
1339
+ _equalOnConflictClause(const OnConflictClause *a, const OnConflictClause *b)
1340
+ {
1341
+ COMPARE_SCALAR_FIELD(action);
1342
+ COMPARE_NODE_FIELD(infer);
1343
+ COMPARE_NODE_FIELD(targetList);
1344
+ COMPARE_NODE_FIELD(whereClause);
1345
+ COMPARE_LOCATION_FIELD(location);
1346
+
1347
+ return true;
1348
+ }
1349
+
1350
+ static bool
1351
+ _equalCTESearchClause(const CTESearchClause *a, const CTESearchClause *b)
1352
+ {
1353
+ COMPARE_NODE_FIELD(search_col_list);
1354
+ COMPARE_SCALAR_FIELD(search_breadth_first);
1355
+ COMPARE_STRING_FIELD(search_seq_column);
1356
+ COMPARE_LOCATION_FIELD(location);
1357
+
1358
+ return true;
1359
+ }
1360
+
1361
+ static bool
1362
+ _equalCTECycleClause(const CTECycleClause *a, const CTECycleClause *b)
1363
+ {
1364
+ COMPARE_NODE_FIELD(cycle_col_list);
1365
+ COMPARE_STRING_FIELD(cycle_mark_column);
1366
+ COMPARE_NODE_FIELD(cycle_mark_value);
1367
+ COMPARE_NODE_FIELD(cycle_mark_default);
1368
+ COMPARE_STRING_FIELD(cycle_path_column);
1369
+ COMPARE_LOCATION_FIELD(location);
1370
+ COMPARE_SCALAR_FIELD(cycle_mark_type);
1371
+ COMPARE_SCALAR_FIELD(cycle_mark_typmod);
1372
+ COMPARE_SCALAR_FIELD(cycle_mark_collation);
1373
+ COMPARE_SCALAR_FIELD(cycle_mark_neop);
1374
+
1375
+ return true;
1376
+ }
1377
+
1378
+ static bool
1379
+ _equalCommonTableExpr(const CommonTableExpr *a, const CommonTableExpr *b)
1380
+ {
1381
+ COMPARE_STRING_FIELD(ctename);
1382
+ COMPARE_NODE_FIELD(aliascolnames);
1383
+ COMPARE_SCALAR_FIELD(ctematerialized);
1384
+ COMPARE_NODE_FIELD(ctequery);
1385
+ COMPARE_NODE_FIELD(search_clause);
1386
+ COMPARE_NODE_FIELD(cycle_clause);
1387
+ COMPARE_LOCATION_FIELD(location);
1388
+ COMPARE_SCALAR_FIELD(cterecursive);
1389
+ COMPARE_SCALAR_FIELD(cterefcount);
1390
+ COMPARE_NODE_FIELD(ctecolnames);
1391
+ COMPARE_NODE_FIELD(ctecoltypes);
1392
+ COMPARE_NODE_FIELD(ctecoltypmods);
1393
+ COMPARE_NODE_FIELD(ctecolcollations);
1394
+
1395
+ return true;
1396
+ }
1397
+
1398
+ static bool
1399
+ _equalMergeWhenClause(const MergeWhenClause *a, const MergeWhenClause *b)
1400
+ {
1401
+ COMPARE_SCALAR_FIELD(matched);
1402
+ COMPARE_SCALAR_FIELD(commandType);
1403
+ COMPARE_SCALAR_FIELD(override);
1404
+ COMPARE_NODE_FIELD(condition);
1405
+ COMPARE_NODE_FIELD(targetList);
1406
+ COMPARE_NODE_FIELD(values);
1407
+
1408
+ return true;
1409
+ }
1410
+
1411
+ static bool
1412
+ _equalMergeAction(const MergeAction *a, const MergeAction *b)
1413
+ {
1414
+ COMPARE_SCALAR_FIELD(matched);
1415
+ COMPARE_SCALAR_FIELD(commandType);
1416
+ COMPARE_SCALAR_FIELD(override);
1417
+ COMPARE_NODE_FIELD(qual);
1418
+ COMPARE_NODE_FIELD(targetList);
1419
+ COMPARE_NODE_FIELD(updateColnos);
1420
+
1421
+ return true;
1422
+ }
1423
+
1424
+ static bool
1425
+ _equalTriggerTransition(const TriggerTransition *a, const TriggerTransition *b)
1426
+ {
1427
+ COMPARE_STRING_FIELD(name);
1428
+ COMPARE_SCALAR_FIELD(isNew);
1429
+ COMPARE_SCALAR_FIELD(isTable);
1430
+
1431
+ return true;
1432
+ }
1433
+
1434
+ static bool
1435
+ _equalJsonOutput(const JsonOutput *a, const JsonOutput *b)
1436
+ {
1437
+ COMPARE_NODE_FIELD(typeName);
1438
+ COMPARE_NODE_FIELD(returning);
1439
+
1440
+ return true;
1441
+ }
1442
+
1443
+ static bool
1444
+ _equalJsonKeyValue(const JsonKeyValue *a, const JsonKeyValue *b)
1445
+ {
1446
+ COMPARE_NODE_FIELD(key);
1447
+ COMPARE_NODE_FIELD(value);
1448
+
1449
+ return true;
1450
+ }
1451
+
1452
+ static bool
1453
+ _equalJsonObjectConstructor(const JsonObjectConstructor *a, const JsonObjectConstructor *b)
1454
+ {
1455
+ COMPARE_NODE_FIELD(exprs);
1456
+ COMPARE_NODE_FIELD(output);
1457
+ COMPARE_SCALAR_FIELD(absent_on_null);
1458
+ COMPARE_SCALAR_FIELD(unique);
1459
+ COMPARE_LOCATION_FIELD(location);
1460
+
1461
+ return true;
1462
+ }
1463
+
1464
+ static bool
1465
+ _equalJsonArrayConstructor(const JsonArrayConstructor *a, const JsonArrayConstructor *b)
1466
+ {
1467
+ COMPARE_NODE_FIELD(exprs);
1468
+ COMPARE_NODE_FIELD(output);
1469
+ COMPARE_SCALAR_FIELD(absent_on_null);
1470
+ COMPARE_LOCATION_FIELD(location);
1471
+
1472
+ return true;
1473
+ }
1474
+
1475
+ static bool
1476
+ _equalJsonArrayQueryConstructor(const JsonArrayQueryConstructor *a, const JsonArrayQueryConstructor *b)
1477
+ {
1478
+ COMPARE_NODE_FIELD(query);
1479
+ COMPARE_NODE_FIELD(output);
1480
+ COMPARE_NODE_FIELD(format);
1481
+ COMPARE_SCALAR_FIELD(absent_on_null);
1482
+ COMPARE_LOCATION_FIELD(location);
1483
+
1484
+ return true;
1485
+ }
1486
+
1487
+ static bool
1488
+ _equalJsonAggConstructor(const JsonAggConstructor *a, const JsonAggConstructor *b)
1489
+ {
1490
+ COMPARE_NODE_FIELD(output);
1491
+ COMPARE_NODE_FIELD(agg_filter);
1492
+ COMPARE_NODE_FIELD(agg_order);
1493
+ COMPARE_NODE_FIELD(over);
1494
+ COMPARE_LOCATION_FIELD(location);
1495
+
1496
+ return true;
1497
+ }
1498
+
1499
+ static bool
1500
+ _equalJsonObjectAgg(const JsonObjectAgg *a, const JsonObjectAgg *b)
1501
+ {
1502
+ COMPARE_NODE_FIELD(constructor);
1503
+ COMPARE_NODE_FIELD(arg);
1504
+ COMPARE_SCALAR_FIELD(absent_on_null);
1505
+ COMPARE_SCALAR_FIELD(unique);
1506
+
1507
+ return true;
1508
+ }
1509
+
1510
+ static bool
1511
+ _equalJsonArrayAgg(const JsonArrayAgg *a, const JsonArrayAgg *b)
1512
+ {
1513
+ COMPARE_NODE_FIELD(constructor);
1514
+ COMPARE_NODE_FIELD(arg);
1515
+ COMPARE_SCALAR_FIELD(absent_on_null);
1516
+
1517
+ return true;
1518
+ }
1519
+
1520
+ static bool
1521
+ _equalRawStmt(const RawStmt *a, const RawStmt *b)
1522
+ {
1523
+ COMPARE_NODE_FIELD(stmt);
1524
+ COMPARE_LOCATION_FIELD(stmt_location);
1525
+ COMPARE_SCALAR_FIELD(stmt_len);
1526
+
1527
+ return true;
1528
+ }
1529
+
1530
+ static bool
1531
+ _equalInsertStmt(const InsertStmt *a, const InsertStmt *b)
1532
+ {
1533
+ COMPARE_NODE_FIELD(relation);
1534
+ COMPARE_NODE_FIELD(cols);
1535
+ COMPARE_NODE_FIELD(selectStmt);
1536
+ COMPARE_NODE_FIELD(onConflictClause);
1537
+ COMPARE_NODE_FIELD(returningList);
1538
+ COMPARE_NODE_FIELD(withClause);
1539
+ COMPARE_SCALAR_FIELD(override);
1540
+
1541
+ return true;
1542
+ }
1543
+
1544
+ static bool
1545
+ _equalDeleteStmt(const DeleteStmt *a, const DeleteStmt *b)
1546
+ {
1547
+ COMPARE_NODE_FIELD(relation);
1548
+ COMPARE_NODE_FIELD(usingClause);
1549
+ COMPARE_NODE_FIELD(whereClause);
1550
+ COMPARE_NODE_FIELD(returningList);
1551
+ COMPARE_NODE_FIELD(withClause);
1552
+
1553
+ return true;
1554
+ }
1555
+
1556
+ static bool
1557
+ _equalUpdateStmt(const UpdateStmt *a, const UpdateStmt *b)
1558
+ {
1559
+ COMPARE_NODE_FIELD(relation);
1560
+ COMPARE_NODE_FIELD(targetList);
1561
+ COMPARE_NODE_FIELD(whereClause);
1562
+ COMPARE_NODE_FIELD(fromClause);
1563
+ COMPARE_NODE_FIELD(returningList);
1564
+ COMPARE_NODE_FIELD(withClause);
1565
+
1566
+ return true;
1567
+ }
1568
+
1569
+ static bool
1570
+ _equalMergeStmt(const MergeStmt *a, const MergeStmt *b)
1571
+ {
1572
+ COMPARE_NODE_FIELD(relation);
1573
+ COMPARE_NODE_FIELD(sourceRelation);
1574
+ COMPARE_NODE_FIELD(joinCondition);
1575
+ COMPARE_NODE_FIELD(mergeWhenClauses);
1576
+ COMPARE_NODE_FIELD(withClause);
1577
+
1578
+ return true;
1579
+ }
1580
+
1581
+ static bool
1582
+ _equalSelectStmt(const SelectStmt *a, const SelectStmt *b)
1583
+ {
1584
+ COMPARE_NODE_FIELD(distinctClause);
1585
+ COMPARE_NODE_FIELD(intoClause);
1586
+ COMPARE_NODE_FIELD(targetList);
1587
+ COMPARE_NODE_FIELD(fromClause);
1588
+ COMPARE_NODE_FIELD(whereClause);
1589
+ COMPARE_NODE_FIELD(groupClause);
1590
+ COMPARE_SCALAR_FIELD(groupDistinct);
1591
+ COMPARE_NODE_FIELD(havingClause);
1592
+ COMPARE_NODE_FIELD(windowClause);
1593
+ COMPARE_NODE_FIELD(valuesLists);
1594
+ COMPARE_NODE_FIELD(sortClause);
1595
+ COMPARE_NODE_FIELD(limitOffset);
1596
+ COMPARE_NODE_FIELD(limitCount);
1597
+ COMPARE_SCALAR_FIELD(limitOption);
1598
+ COMPARE_NODE_FIELD(lockingClause);
1599
+ COMPARE_NODE_FIELD(withClause);
1600
+ COMPARE_SCALAR_FIELD(op);
1601
+ COMPARE_SCALAR_FIELD(all);
1602
+ COMPARE_NODE_FIELD(larg);
1603
+ COMPARE_NODE_FIELD(rarg);
1604
+
1605
+ return true;
1606
+ }
1607
+
1608
+ static bool
1609
+ _equalSetOperationStmt(const SetOperationStmt *a, const SetOperationStmt *b)
1610
+ {
1611
+ COMPARE_SCALAR_FIELD(op);
1612
+ COMPARE_SCALAR_FIELD(all);
1613
+ COMPARE_NODE_FIELD(larg);
1614
+ COMPARE_NODE_FIELD(rarg);
1615
+ COMPARE_NODE_FIELD(colTypes);
1616
+ COMPARE_NODE_FIELD(colTypmods);
1617
+ COMPARE_NODE_FIELD(colCollations);
1618
+ COMPARE_NODE_FIELD(groupClauses);
1619
+
1620
+ return true;
1621
+ }
1622
+
1623
+ static bool
1624
+ _equalReturnStmt(const ReturnStmt *a, const ReturnStmt *b)
1625
+ {
1626
+ COMPARE_NODE_FIELD(returnval);
1627
+
1628
+ return true;
1629
+ }
1630
+
1631
+ static bool
1632
+ _equalPLAssignStmt(const PLAssignStmt *a, const PLAssignStmt *b)
1633
+ {
1634
+ COMPARE_STRING_FIELD(name);
1635
+ COMPARE_NODE_FIELD(indirection);
1636
+ COMPARE_SCALAR_FIELD(nnames);
1637
+ COMPARE_NODE_FIELD(val);
1638
+ COMPARE_LOCATION_FIELD(location);
1639
+
1640
+ return true;
1641
+ }
1642
+
1643
+ static bool
1644
+ _equalCreateSchemaStmt(const CreateSchemaStmt *a, const CreateSchemaStmt *b)
1645
+ {
1646
+ COMPARE_STRING_FIELD(schemaname);
1647
+ COMPARE_NODE_FIELD(authrole);
1648
+ COMPARE_NODE_FIELD(schemaElts);
1649
+ COMPARE_SCALAR_FIELD(if_not_exists);
1650
+
1651
+ return true;
1652
+ }
1653
+
1654
+ static bool
1655
+ _equalAlterTableStmt(const AlterTableStmt *a, const AlterTableStmt *b)
1656
+ {
1657
+ COMPARE_NODE_FIELD(relation);
1658
+ COMPARE_NODE_FIELD(cmds);
1659
+ COMPARE_SCALAR_FIELD(objtype);
1660
+ COMPARE_SCALAR_FIELD(missing_ok);
1661
+
1662
+ return true;
1663
+ }
1664
+
1665
+ static bool
1666
+ _equalReplicaIdentityStmt(const ReplicaIdentityStmt *a, const ReplicaIdentityStmt *b)
1667
+ {
1668
+ COMPARE_SCALAR_FIELD(identity_type);
1669
+ COMPARE_STRING_FIELD(name);
1670
+
1671
+ return true;
1672
+ }
1673
+
1674
+ static bool
1675
+ _equalAlterTableCmd(const AlterTableCmd *a, const AlterTableCmd *b)
1676
+ {
1677
+ COMPARE_SCALAR_FIELD(subtype);
1678
+ COMPARE_STRING_FIELD(name);
1679
+ COMPARE_SCALAR_FIELD(num);
1680
+ COMPARE_NODE_FIELD(newowner);
1681
+ COMPARE_NODE_FIELD(def);
1682
+ COMPARE_SCALAR_FIELD(behavior);
1683
+ COMPARE_SCALAR_FIELD(missing_ok);
1684
+ COMPARE_SCALAR_FIELD(recurse);
1685
+
1686
+ return true;
1687
+ }
1688
+
1689
+ static bool
1690
+ _equalAlterCollationStmt(const AlterCollationStmt *a, const AlterCollationStmt *b)
1691
+ {
1692
+ COMPARE_NODE_FIELD(collname);
1693
+
1694
+ return true;
1695
+ }
1696
+
1697
+ static bool
1698
+ _equalAlterDomainStmt(const AlterDomainStmt *a, const AlterDomainStmt *b)
1699
+ {
1700
+ COMPARE_SCALAR_FIELD(subtype);
1701
+ COMPARE_NODE_FIELD(typeName);
1702
+ COMPARE_STRING_FIELD(name);
1703
+ COMPARE_NODE_FIELD(def);
1704
+ COMPARE_SCALAR_FIELD(behavior);
1705
+ COMPARE_SCALAR_FIELD(missing_ok);
1706
+
1707
+ return true;
1708
+ }
1709
+
1710
+ static bool
1711
+ _equalGrantStmt(const GrantStmt *a, const GrantStmt *b)
1712
+ {
1713
+ COMPARE_SCALAR_FIELD(is_grant);
1714
+ COMPARE_SCALAR_FIELD(targtype);
1715
+ COMPARE_SCALAR_FIELD(objtype);
1716
+ COMPARE_NODE_FIELD(objects);
1717
+ COMPARE_NODE_FIELD(privileges);
1718
+ COMPARE_NODE_FIELD(grantees);
1719
+ COMPARE_SCALAR_FIELD(grant_option);
1720
+ COMPARE_NODE_FIELD(grantor);
1721
+ COMPARE_SCALAR_FIELD(behavior);
1722
+
1723
+ return true;
1724
+ }
1725
+
1726
+ static bool
1727
+ _equalObjectWithArgs(const ObjectWithArgs *a, const ObjectWithArgs *b)
1728
+ {
1729
+ COMPARE_NODE_FIELD(objname);
1730
+ COMPARE_NODE_FIELD(objargs);
1731
+ COMPARE_NODE_FIELD(objfuncargs);
1732
+ COMPARE_SCALAR_FIELD(args_unspecified);
1733
+
1734
+ return true;
1735
+ }
1736
+
1737
+ static bool
1738
+ _equalAccessPriv(const AccessPriv *a, const AccessPriv *b)
1739
+ {
1740
+ COMPARE_STRING_FIELD(priv_name);
1741
+ COMPARE_NODE_FIELD(cols);
1742
+
1743
+ return true;
1744
+ }
1745
+
1746
+ static bool
1747
+ _equalGrantRoleStmt(const GrantRoleStmt *a, const GrantRoleStmt *b)
1748
+ {
1749
+ COMPARE_NODE_FIELD(granted_roles);
1750
+ COMPARE_NODE_FIELD(grantee_roles);
1751
+ COMPARE_SCALAR_FIELD(is_grant);
1752
+ COMPARE_NODE_FIELD(opt);
1753
+ COMPARE_NODE_FIELD(grantor);
1754
+ COMPARE_SCALAR_FIELD(behavior);
1755
+
1756
+ return true;
1757
+ }
1758
+
1759
+ static bool
1760
+ _equalAlterDefaultPrivilegesStmt(const AlterDefaultPrivilegesStmt *a, const AlterDefaultPrivilegesStmt *b)
1761
+ {
1762
+ COMPARE_NODE_FIELD(options);
1763
+ COMPARE_NODE_FIELD(action);
1764
+
1765
+ return true;
1766
+ }
1767
+
1768
+ static bool
1769
+ _equalCopyStmt(const CopyStmt *a, const CopyStmt *b)
1770
+ {
1771
+ COMPARE_NODE_FIELD(relation);
1772
+ COMPARE_NODE_FIELD(query);
1773
+ COMPARE_NODE_FIELD(attlist);
1774
+ COMPARE_SCALAR_FIELD(is_from);
1775
+ COMPARE_SCALAR_FIELD(is_program);
1776
+ COMPARE_STRING_FIELD(filename);
1777
+ COMPARE_NODE_FIELD(options);
1778
+ COMPARE_NODE_FIELD(whereClause);
1779
+
1780
+ return true;
1781
+ }
1782
+
1783
+ static bool
1784
+ _equalVariableSetStmt(const VariableSetStmt *a, const VariableSetStmt *b)
1785
+ {
1786
+ COMPARE_SCALAR_FIELD(kind);
1787
+ COMPARE_STRING_FIELD(name);
1788
+ COMPARE_NODE_FIELD(args);
1789
+ COMPARE_SCALAR_FIELD(is_local);
1790
+
1791
+ return true;
1792
+ }
1793
+
1794
+ static bool
1795
+ _equalVariableShowStmt(const VariableShowStmt *a, const VariableShowStmt *b)
1796
+ {
1797
+ COMPARE_STRING_FIELD(name);
1798
+
1799
+ return true;
1800
+ }
1801
+
1802
+ static bool
1803
+ _equalCreateStmt(const CreateStmt *a, const CreateStmt *b)
1804
+ {
1805
+ COMPARE_NODE_FIELD(relation);
1806
+ COMPARE_NODE_FIELD(tableElts);
1807
+ COMPARE_NODE_FIELD(inhRelations);
1808
+ COMPARE_NODE_FIELD(partbound);
1809
+ COMPARE_NODE_FIELD(partspec);
1810
+ COMPARE_NODE_FIELD(ofTypename);
1811
+ COMPARE_NODE_FIELD(constraints);
1812
+ COMPARE_NODE_FIELD(options);
1813
+ COMPARE_SCALAR_FIELD(oncommit);
1814
+ COMPARE_STRING_FIELD(tablespacename);
1815
+ COMPARE_STRING_FIELD(accessMethod);
1816
+ COMPARE_SCALAR_FIELD(if_not_exists);
1817
+
1818
+ return true;
1819
+ }
1820
+
1821
+ static bool
1822
+ _equalConstraint(const Constraint *a, const Constraint *b)
1823
+ {
1824
+ COMPARE_SCALAR_FIELD(contype);
1825
+ COMPARE_STRING_FIELD(conname);
1826
+ COMPARE_SCALAR_FIELD(deferrable);
1827
+ COMPARE_SCALAR_FIELD(initdeferred);
1828
+ COMPARE_LOCATION_FIELD(location);
1829
+ COMPARE_SCALAR_FIELD(is_no_inherit);
1830
+ COMPARE_NODE_FIELD(raw_expr);
1831
+ COMPARE_STRING_FIELD(cooked_expr);
1832
+ COMPARE_SCALAR_FIELD(generated_when);
1833
+ COMPARE_SCALAR_FIELD(nulls_not_distinct);
1834
+ COMPARE_NODE_FIELD(keys);
1835
+ COMPARE_NODE_FIELD(including);
1836
+ COMPARE_NODE_FIELD(exclusions);
1837
+ COMPARE_NODE_FIELD(options);
1838
+ COMPARE_STRING_FIELD(indexname);
1839
+ COMPARE_STRING_FIELD(indexspace);
1840
+ COMPARE_SCALAR_FIELD(reset_default_tblspc);
1841
+ COMPARE_STRING_FIELD(access_method);
1842
+ COMPARE_NODE_FIELD(where_clause);
1843
+ COMPARE_NODE_FIELD(pktable);
1844
+ COMPARE_NODE_FIELD(fk_attrs);
1845
+ COMPARE_NODE_FIELD(pk_attrs);
1846
+ COMPARE_SCALAR_FIELD(fk_matchtype);
1847
+ COMPARE_SCALAR_FIELD(fk_upd_action);
1848
+ COMPARE_SCALAR_FIELD(fk_del_action);
1849
+ COMPARE_NODE_FIELD(fk_del_set_cols);
1850
+ COMPARE_NODE_FIELD(old_conpfeqop);
1851
+ COMPARE_SCALAR_FIELD(old_pktable_oid);
1852
+ COMPARE_SCALAR_FIELD(skip_validation);
1853
+ COMPARE_SCALAR_FIELD(initially_valid);
1854
+
1855
+ return true;
1856
+ }
1857
+
1858
+ static bool
1859
+ _equalCreateTableSpaceStmt(const CreateTableSpaceStmt *a, const CreateTableSpaceStmt *b)
1860
+ {
1861
+ COMPARE_STRING_FIELD(tablespacename);
1862
+ COMPARE_NODE_FIELD(owner);
1863
+ COMPARE_STRING_FIELD(location);
1864
+ COMPARE_NODE_FIELD(options);
1865
+
1866
+ return true;
1867
+ }
1868
+
1869
+ static bool
1870
+ _equalDropTableSpaceStmt(const DropTableSpaceStmt *a, const DropTableSpaceStmt *b)
1871
+ {
1872
+ COMPARE_STRING_FIELD(tablespacename);
1873
+ COMPARE_SCALAR_FIELD(missing_ok);
1874
+
1875
+ return true;
1876
+ }
1877
+
1878
+ static bool
1879
+ _equalAlterTableSpaceOptionsStmt(const AlterTableSpaceOptionsStmt *a, const AlterTableSpaceOptionsStmt *b)
1880
+ {
1881
+ COMPARE_STRING_FIELD(tablespacename);
1882
+ COMPARE_NODE_FIELD(options);
1883
+ COMPARE_SCALAR_FIELD(isReset);
1884
+
1885
+ return true;
1886
+ }
1887
+
1888
+ static bool
1889
+ _equalAlterTableMoveAllStmt(const AlterTableMoveAllStmt *a, const AlterTableMoveAllStmt *b)
1890
+ {
1891
+ COMPARE_STRING_FIELD(orig_tablespacename);
1892
+ COMPARE_SCALAR_FIELD(objtype);
1893
+ COMPARE_NODE_FIELD(roles);
1894
+ COMPARE_STRING_FIELD(new_tablespacename);
1895
+ COMPARE_SCALAR_FIELD(nowait);
1896
+
1897
+ return true;
1898
+ }
1899
+
1900
+ static bool
1901
+ _equalCreateExtensionStmt(const CreateExtensionStmt *a, const CreateExtensionStmt *b)
1902
+ {
1903
+ COMPARE_STRING_FIELD(extname);
1904
+ COMPARE_SCALAR_FIELD(if_not_exists);
1905
+ COMPARE_NODE_FIELD(options);
1906
+
1907
+ return true;
1908
+ }
1909
+
1910
+ static bool
1911
+ _equalAlterExtensionStmt(const AlterExtensionStmt *a, const AlterExtensionStmt *b)
1912
+ {
1913
+ COMPARE_STRING_FIELD(extname);
1914
+ COMPARE_NODE_FIELD(options);
1915
+
1916
+ return true;
1917
+ }
1918
+
1919
+ static bool
1920
+ _equalAlterExtensionContentsStmt(const AlterExtensionContentsStmt *a, const AlterExtensionContentsStmt *b)
1921
+ {
1922
+ COMPARE_STRING_FIELD(extname);
1923
+ COMPARE_SCALAR_FIELD(action);
1924
+ COMPARE_SCALAR_FIELD(objtype);
1925
+ COMPARE_NODE_FIELD(object);
1926
+
1927
+ return true;
1928
+ }
1929
+
1930
+ static bool
1931
+ _equalCreateFdwStmt(const CreateFdwStmt *a, const CreateFdwStmt *b)
1932
+ {
1933
+ COMPARE_STRING_FIELD(fdwname);
1934
+ COMPARE_NODE_FIELD(func_options);
1935
+ COMPARE_NODE_FIELD(options);
1936
+
1937
+ return true;
1938
+ }
1939
+
1940
+ static bool
1941
+ _equalAlterFdwStmt(const AlterFdwStmt *a, const AlterFdwStmt *b)
1942
+ {
1943
+ COMPARE_STRING_FIELD(fdwname);
1944
+ COMPARE_NODE_FIELD(func_options);
1945
+ COMPARE_NODE_FIELD(options);
1946
+
1947
+ return true;
1948
+ }
1949
+
1950
+ static bool
1951
+ _equalCreateForeignServerStmt(const CreateForeignServerStmt *a, const CreateForeignServerStmt *b)
1952
+ {
1953
+ COMPARE_STRING_FIELD(servername);
1954
+ COMPARE_STRING_FIELD(servertype);
1955
+ COMPARE_STRING_FIELD(version);
1956
+ COMPARE_STRING_FIELD(fdwname);
1957
+ COMPARE_SCALAR_FIELD(if_not_exists);
1958
+ COMPARE_NODE_FIELD(options);
1959
+
1960
+ return true;
1961
+ }
1962
+
1963
+ static bool
1964
+ _equalAlterForeignServerStmt(const AlterForeignServerStmt *a, const AlterForeignServerStmt *b)
1965
+ {
1966
+ COMPARE_STRING_FIELD(servername);
1967
+ COMPARE_STRING_FIELD(version);
1968
+ COMPARE_NODE_FIELD(options);
1969
+ COMPARE_SCALAR_FIELD(has_version);
1970
+
1971
+ return true;
1972
+ }
1973
+
1974
+ static bool
1975
+ _equalCreateForeignTableStmt(const CreateForeignTableStmt *a, const CreateForeignTableStmt *b)
1976
+ {
1977
+ COMPARE_NODE_FIELD(base.relation);
1978
+ COMPARE_NODE_FIELD(base.tableElts);
1979
+ COMPARE_NODE_FIELD(base.inhRelations);
1980
+ COMPARE_NODE_FIELD(base.partbound);
1981
+ COMPARE_NODE_FIELD(base.partspec);
1982
+ COMPARE_NODE_FIELD(base.ofTypename);
1983
+ COMPARE_NODE_FIELD(base.constraints);
1984
+ COMPARE_NODE_FIELD(base.options);
1985
+ COMPARE_SCALAR_FIELD(base.oncommit);
1986
+ COMPARE_STRING_FIELD(base.tablespacename);
1987
+ COMPARE_STRING_FIELD(base.accessMethod);
1988
+ COMPARE_SCALAR_FIELD(base.if_not_exists);
1989
+ COMPARE_STRING_FIELD(servername);
1990
+ COMPARE_NODE_FIELD(options);
1991
+
1992
+ return true;
1993
+ }
1994
+
1995
+ static bool
1996
+ _equalCreateUserMappingStmt(const CreateUserMappingStmt *a, const CreateUserMappingStmt *b)
1997
+ {
1998
+ COMPARE_NODE_FIELD(user);
1999
+ COMPARE_STRING_FIELD(servername);
2000
+ COMPARE_SCALAR_FIELD(if_not_exists);
2001
+ COMPARE_NODE_FIELD(options);
2002
+
2003
+ return true;
2004
+ }
2005
+
2006
+ static bool
2007
+ _equalAlterUserMappingStmt(const AlterUserMappingStmt *a, const AlterUserMappingStmt *b)
2008
+ {
2009
+ COMPARE_NODE_FIELD(user);
2010
+ COMPARE_STRING_FIELD(servername);
2011
+ COMPARE_NODE_FIELD(options);
2012
+
2013
+ return true;
2014
+ }
2015
+
2016
+ static bool
2017
+ _equalDropUserMappingStmt(const DropUserMappingStmt *a, const DropUserMappingStmt *b)
2018
+ {
2019
+ COMPARE_NODE_FIELD(user);
2020
+ COMPARE_STRING_FIELD(servername);
2021
+ COMPARE_SCALAR_FIELD(missing_ok);
2022
+
2023
+ return true;
2024
+ }
2025
+
2026
+ static bool
2027
+ _equalImportForeignSchemaStmt(const ImportForeignSchemaStmt *a, const ImportForeignSchemaStmt *b)
2028
+ {
2029
+ COMPARE_STRING_FIELD(server_name);
2030
+ COMPARE_STRING_FIELD(remote_schema);
2031
+ COMPARE_STRING_FIELD(local_schema);
2032
+ COMPARE_SCALAR_FIELD(list_type);
2033
+ COMPARE_NODE_FIELD(table_list);
2034
+ COMPARE_NODE_FIELD(options);
2035
+
2036
+ return true;
2037
+ }
2038
+
2039
+ static bool
2040
+ _equalCreatePolicyStmt(const CreatePolicyStmt *a, const CreatePolicyStmt *b)
2041
+ {
2042
+ COMPARE_STRING_FIELD(policy_name);
2043
+ COMPARE_NODE_FIELD(table);
2044
+ COMPARE_STRING_FIELD(cmd_name);
2045
+ COMPARE_SCALAR_FIELD(permissive);
2046
+ COMPARE_NODE_FIELD(roles);
2047
+ COMPARE_NODE_FIELD(qual);
2048
+ COMPARE_NODE_FIELD(with_check);
2049
+
2050
+ return true;
2051
+ }
2052
+
2053
+ static bool
2054
+ _equalAlterPolicyStmt(const AlterPolicyStmt *a, const AlterPolicyStmt *b)
2055
+ {
2056
+ COMPARE_STRING_FIELD(policy_name);
2057
+ COMPARE_NODE_FIELD(table);
2058
+ COMPARE_NODE_FIELD(roles);
2059
+ COMPARE_NODE_FIELD(qual);
2060
+ COMPARE_NODE_FIELD(with_check);
2061
+
2062
+ return true;
2063
+ }
2064
+
2065
+ static bool
2066
+ _equalCreateAmStmt(const CreateAmStmt *a, const CreateAmStmt *b)
2067
+ {
2068
+ COMPARE_STRING_FIELD(amname);
2069
+ COMPARE_NODE_FIELD(handler_name);
2070
+ COMPARE_SCALAR_FIELD(amtype);
2071
+
2072
+ return true;
2073
+ }
2074
+
2075
+ static bool
2076
+ _equalCreateTrigStmt(const CreateTrigStmt *a, const CreateTrigStmt *b)
2077
+ {
2078
+ COMPARE_SCALAR_FIELD(replace);
2079
+ COMPARE_SCALAR_FIELD(isconstraint);
2080
+ COMPARE_STRING_FIELD(trigname);
2081
+ COMPARE_NODE_FIELD(relation);
2082
+ COMPARE_NODE_FIELD(funcname);
2083
+ COMPARE_NODE_FIELD(args);
2084
+ COMPARE_SCALAR_FIELD(row);
2085
+ COMPARE_SCALAR_FIELD(timing);
2086
+ COMPARE_SCALAR_FIELD(events);
2087
+ COMPARE_NODE_FIELD(columns);
2088
+ COMPARE_NODE_FIELD(whenClause);
2089
+ COMPARE_NODE_FIELD(transitionRels);
2090
+ COMPARE_SCALAR_FIELD(deferrable);
2091
+ COMPARE_SCALAR_FIELD(initdeferred);
2092
+ COMPARE_NODE_FIELD(constrrel);
2093
+
2094
+ return true;
2095
+ }
2096
+
2097
+ static bool
2098
+ _equalCreateEventTrigStmt(const CreateEventTrigStmt *a, const CreateEventTrigStmt *b)
2099
+ {
2100
+ COMPARE_STRING_FIELD(trigname);
2101
+ COMPARE_STRING_FIELD(eventname);
2102
+ COMPARE_NODE_FIELD(whenclause);
2103
+ COMPARE_NODE_FIELD(funcname);
2104
+
2105
+ return true;
2106
+ }
2107
+
2108
+ static bool
2109
+ _equalAlterEventTrigStmt(const AlterEventTrigStmt *a, const AlterEventTrigStmt *b)
2110
+ {
2111
+ COMPARE_STRING_FIELD(trigname);
2112
+ COMPARE_SCALAR_FIELD(tgenabled);
2113
+
2114
+ return true;
2115
+ }
2116
+
2117
+ static bool
2118
+ _equalCreatePLangStmt(const CreatePLangStmt *a, const CreatePLangStmt *b)
2119
+ {
2120
+ COMPARE_SCALAR_FIELD(replace);
2121
+ COMPARE_STRING_FIELD(plname);
2122
+ COMPARE_NODE_FIELD(plhandler);
2123
+ COMPARE_NODE_FIELD(plinline);
2124
+ COMPARE_NODE_FIELD(plvalidator);
2125
+ COMPARE_SCALAR_FIELD(pltrusted);
2126
+
2127
+ return true;
2128
+ }
2129
+
2130
+ static bool
2131
+ _equalCreateRoleStmt(const CreateRoleStmt *a, const CreateRoleStmt *b)
2132
+ {
2133
+ COMPARE_SCALAR_FIELD(stmt_type);
2134
+ COMPARE_STRING_FIELD(role);
2135
+ COMPARE_NODE_FIELD(options);
2136
+
2137
+ return true;
2138
+ }
2139
+
2140
+ static bool
2141
+ _equalAlterRoleStmt(const AlterRoleStmt *a, const AlterRoleStmt *b)
2142
+ {
2143
+ COMPARE_NODE_FIELD(role);
2144
+ COMPARE_NODE_FIELD(options);
2145
+ COMPARE_SCALAR_FIELD(action);
2146
+
2147
+ return true;
2148
+ }
2149
+
2150
+ static bool
2151
+ _equalAlterRoleSetStmt(const AlterRoleSetStmt *a, const AlterRoleSetStmt *b)
2152
+ {
2153
+ COMPARE_NODE_FIELD(role);
2154
+ COMPARE_STRING_FIELD(database);
2155
+ COMPARE_NODE_FIELD(setstmt);
2156
+
2157
+ return true;
2158
+ }
2159
+
2160
+ static bool
2161
+ _equalDropRoleStmt(const DropRoleStmt *a, const DropRoleStmt *b)
2162
+ {
2163
+ COMPARE_NODE_FIELD(roles);
2164
+ COMPARE_SCALAR_FIELD(missing_ok);
2165
+
2166
+ return true;
2167
+ }
2168
+
2169
+ static bool
2170
+ _equalCreateSeqStmt(const CreateSeqStmt *a, const CreateSeqStmt *b)
2171
+ {
2172
+ COMPARE_NODE_FIELD(sequence);
2173
+ COMPARE_NODE_FIELD(options);
2174
+ COMPARE_SCALAR_FIELD(ownerId);
2175
+ COMPARE_SCALAR_FIELD(for_identity);
2176
+ COMPARE_SCALAR_FIELD(if_not_exists);
2177
+
2178
+ return true;
2179
+ }
2180
+
2181
+ static bool
2182
+ _equalAlterSeqStmt(const AlterSeqStmt *a, const AlterSeqStmt *b)
2183
+ {
2184
+ COMPARE_NODE_FIELD(sequence);
2185
+ COMPARE_NODE_FIELD(options);
2186
+ COMPARE_SCALAR_FIELD(for_identity);
2187
+ COMPARE_SCALAR_FIELD(missing_ok);
2188
+
2189
+ return true;
2190
+ }
2191
+
2192
+ static bool
2193
+ _equalDefineStmt(const DefineStmt *a, const DefineStmt *b)
2194
+ {
2195
+ COMPARE_SCALAR_FIELD(kind);
2196
+ COMPARE_SCALAR_FIELD(oldstyle);
2197
+ COMPARE_NODE_FIELD(defnames);
2198
+ COMPARE_NODE_FIELD(args);
2199
+ COMPARE_NODE_FIELD(definition);
2200
+ COMPARE_SCALAR_FIELD(if_not_exists);
2201
+ COMPARE_SCALAR_FIELD(replace);
2202
+
2203
+ return true;
2204
+ }
2205
+
2206
+ static bool
2207
+ _equalCreateDomainStmt(const CreateDomainStmt *a, const CreateDomainStmt *b)
2208
+ {
2209
+ COMPARE_NODE_FIELD(domainname);
2210
+ COMPARE_NODE_FIELD(typeName);
2211
+ COMPARE_NODE_FIELD(collClause);
2212
+ COMPARE_NODE_FIELD(constraints);
2213
+
2214
+ return true;
2215
+ }
2216
+
2217
+ static bool
2218
+ _equalCreateOpClassStmt(const CreateOpClassStmt *a, const CreateOpClassStmt *b)
2219
+ {
2220
+ COMPARE_NODE_FIELD(opclassname);
2221
+ COMPARE_NODE_FIELD(opfamilyname);
2222
+ COMPARE_STRING_FIELD(amname);
2223
+ COMPARE_NODE_FIELD(datatype);
2224
+ COMPARE_NODE_FIELD(items);
2225
+ COMPARE_SCALAR_FIELD(isDefault);
2226
+
2227
+ return true;
2228
+ }
2229
+
2230
+ static bool
2231
+ _equalCreateOpClassItem(const CreateOpClassItem *a, const CreateOpClassItem *b)
2232
+ {
2233
+ COMPARE_SCALAR_FIELD(itemtype);
2234
+ COMPARE_NODE_FIELD(name);
2235
+ COMPARE_SCALAR_FIELD(number);
2236
+ COMPARE_NODE_FIELD(order_family);
2237
+ COMPARE_NODE_FIELD(class_args);
2238
+ COMPARE_NODE_FIELD(storedtype);
2239
+
2240
+ return true;
2241
+ }
2242
+
2243
+ static bool
2244
+ _equalCreateOpFamilyStmt(const CreateOpFamilyStmt *a, const CreateOpFamilyStmt *b)
2245
+ {
2246
+ COMPARE_NODE_FIELD(opfamilyname);
2247
+ COMPARE_STRING_FIELD(amname);
2248
+
2249
+ return true;
2250
+ }
2251
+
2252
+ static bool
2253
+ _equalAlterOpFamilyStmt(const AlterOpFamilyStmt *a, const AlterOpFamilyStmt *b)
2254
+ {
2255
+ COMPARE_NODE_FIELD(opfamilyname);
2256
+ COMPARE_STRING_FIELD(amname);
2257
+ COMPARE_SCALAR_FIELD(isDrop);
2258
+ COMPARE_NODE_FIELD(items);
2259
+
2260
+ return true;
2261
+ }
2262
+
2263
+ static bool
2264
+ _equalDropStmt(const DropStmt *a, const DropStmt *b)
2265
+ {
2266
+ COMPARE_NODE_FIELD(objects);
2267
+ COMPARE_SCALAR_FIELD(removeType);
2268
+ COMPARE_SCALAR_FIELD(behavior);
2269
+ COMPARE_SCALAR_FIELD(missing_ok);
2270
+ COMPARE_SCALAR_FIELD(concurrent);
2271
+
2272
+ return true;
2273
+ }
2274
+
2275
+ static bool
2276
+ _equalTruncateStmt(const TruncateStmt *a, const TruncateStmt *b)
2277
+ {
2278
+ COMPARE_NODE_FIELD(relations);
2279
+ COMPARE_SCALAR_FIELD(restart_seqs);
2280
+ COMPARE_SCALAR_FIELD(behavior);
2281
+
2282
+ return true;
2283
+ }
2284
+
2285
+ static bool
2286
+ _equalCommentStmt(const CommentStmt *a, const CommentStmt *b)
2287
+ {
2288
+ COMPARE_SCALAR_FIELD(objtype);
2289
+ COMPARE_NODE_FIELD(object);
2290
+ COMPARE_STRING_FIELD(comment);
2291
+
2292
+ return true;
2293
+ }
2294
+
2295
+ static bool
2296
+ _equalSecLabelStmt(const SecLabelStmt *a, const SecLabelStmt *b)
2297
+ {
2298
+ COMPARE_SCALAR_FIELD(objtype);
2299
+ COMPARE_NODE_FIELD(object);
2300
+ COMPARE_STRING_FIELD(provider);
2301
+ COMPARE_STRING_FIELD(label);
2302
+
2303
+ return true;
2304
+ }
2305
+
2306
+ static bool
2307
+ _equalDeclareCursorStmt(const DeclareCursorStmt *a, const DeclareCursorStmt *b)
2308
+ {
2309
+ COMPARE_STRING_FIELD(portalname);
2310
+ COMPARE_SCALAR_FIELD(options);
2311
+ COMPARE_NODE_FIELD(query);
2312
+
2313
+ return true;
2314
+ }
2315
+
2316
+ static bool
2317
+ _equalClosePortalStmt(const ClosePortalStmt *a, const ClosePortalStmt *b)
2318
+ {
2319
+ COMPARE_STRING_FIELD(portalname);
2320
+
2321
+ return true;
2322
+ }
2323
+
2324
+ static bool
2325
+ _equalFetchStmt(const FetchStmt *a, const FetchStmt *b)
2326
+ {
2327
+ COMPARE_SCALAR_FIELD(direction);
2328
+ COMPARE_SCALAR_FIELD(howMany);
2329
+ COMPARE_STRING_FIELD(portalname);
2330
+ COMPARE_SCALAR_FIELD(ismove);
2331
+
2332
+ return true;
2333
+ }
2334
+
2335
+ static bool
2336
+ _equalIndexStmt(const IndexStmt *a, const IndexStmt *b)
2337
+ {
2338
+ COMPARE_STRING_FIELD(idxname);
2339
+ COMPARE_NODE_FIELD(relation);
2340
+ COMPARE_STRING_FIELD(accessMethod);
2341
+ COMPARE_STRING_FIELD(tableSpace);
2342
+ COMPARE_NODE_FIELD(indexParams);
2343
+ COMPARE_NODE_FIELD(indexIncludingParams);
2344
+ COMPARE_NODE_FIELD(options);
2345
+ COMPARE_NODE_FIELD(whereClause);
2346
+ COMPARE_NODE_FIELD(excludeOpNames);
2347
+ COMPARE_STRING_FIELD(idxcomment);
2348
+ COMPARE_SCALAR_FIELD(indexOid);
2349
+ COMPARE_SCALAR_FIELD(oldNumber);
2350
+ COMPARE_SCALAR_FIELD(oldCreateSubid);
2351
+ COMPARE_SCALAR_FIELD(oldFirstRelfilelocatorSubid);
2352
+ COMPARE_SCALAR_FIELD(unique);
2353
+ COMPARE_SCALAR_FIELD(nulls_not_distinct);
2354
+ COMPARE_SCALAR_FIELD(primary);
2355
+ COMPARE_SCALAR_FIELD(isconstraint);
2356
+ COMPARE_SCALAR_FIELD(deferrable);
2357
+ COMPARE_SCALAR_FIELD(initdeferred);
2358
+ COMPARE_SCALAR_FIELD(transformed);
2359
+ COMPARE_SCALAR_FIELD(concurrent);
2360
+ COMPARE_SCALAR_FIELD(if_not_exists);
2361
+ COMPARE_SCALAR_FIELD(reset_default_tblspc);
2362
+
2363
+ return true;
2364
+ }
2365
+
2366
+ static bool
2367
+ _equalCreateStatsStmt(const CreateStatsStmt *a, const CreateStatsStmt *b)
2368
+ {
2369
+ COMPARE_NODE_FIELD(defnames);
2370
+ COMPARE_NODE_FIELD(stat_types);
2371
+ COMPARE_NODE_FIELD(exprs);
2372
+ COMPARE_NODE_FIELD(relations);
2373
+ COMPARE_STRING_FIELD(stxcomment);
2374
+ COMPARE_SCALAR_FIELD(transformed);
2375
+ COMPARE_SCALAR_FIELD(if_not_exists);
2376
+
2377
+ return true;
2378
+ }
2379
+
2380
+ static bool
2381
+ _equalStatsElem(const StatsElem *a, const StatsElem *b)
2382
+ {
2383
+ COMPARE_STRING_FIELD(name);
2384
+ COMPARE_NODE_FIELD(expr);
2385
+
2386
+ return true;
2387
+ }
2388
+
2389
+ static bool
2390
+ _equalAlterStatsStmt(const AlterStatsStmt *a, const AlterStatsStmt *b)
2391
+ {
2392
+ COMPARE_NODE_FIELD(defnames);
2393
+ COMPARE_SCALAR_FIELD(stxstattarget);
2394
+ COMPARE_SCALAR_FIELD(missing_ok);
2395
+
2396
+ return true;
2397
+ }
2398
+
2399
+ static bool
2400
+ _equalCreateFunctionStmt(const CreateFunctionStmt *a, const CreateFunctionStmt *b)
2401
+ {
2402
+ COMPARE_SCALAR_FIELD(is_procedure);
2403
+ COMPARE_SCALAR_FIELD(replace);
2404
+ COMPARE_NODE_FIELD(funcname);
2405
+ COMPARE_NODE_FIELD(parameters);
2406
+ COMPARE_NODE_FIELD(returnType);
2407
+ COMPARE_NODE_FIELD(options);
2408
+ COMPARE_NODE_FIELD(sql_body);
2409
+
2410
+ return true;
2411
+ }
2412
+
2413
+ static bool
2414
+ _equalFunctionParameter(const FunctionParameter *a, const FunctionParameter *b)
2415
+ {
2416
+ COMPARE_STRING_FIELD(name);
2417
+ COMPARE_NODE_FIELD(argType);
2418
+ COMPARE_SCALAR_FIELD(mode);
2419
+ COMPARE_NODE_FIELD(defexpr);
2420
+
2421
+ return true;
2422
+ }
2423
+
2424
+ static bool
2425
+ _equalAlterFunctionStmt(const AlterFunctionStmt *a, const AlterFunctionStmt *b)
2426
+ {
2427
+ COMPARE_SCALAR_FIELD(objtype);
2428
+ COMPARE_NODE_FIELD(func);
2429
+ COMPARE_NODE_FIELD(actions);
2430
+
2431
+ return true;
2432
+ }
2433
+
2434
+ static bool
2435
+ _equalDoStmt(const DoStmt *a, const DoStmt *b)
2436
+ {
2437
+ COMPARE_NODE_FIELD(args);
2438
+
2439
+ return true;
2440
+ }
2441
+
2442
+ static bool
2443
+ _equalCallStmt(const CallStmt *a, const CallStmt *b)
2444
+ {
2445
+ COMPARE_NODE_FIELD(funccall);
2446
+ COMPARE_NODE_FIELD(funcexpr);
2447
+ COMPARE_NODE_FIELD(outargs);
2448
+
2449
+ return true;
2450
+ }
2451
+
2452
+ static bool
2453
+ _equalRenameStmt(const RenameStmt *a, const RenameStmt *b)
2454
+ {
2455
+ COMPARE_SCALAR_FIELD(renameType);
2456
+ COMPARE_SCALAR_FIELD(relationType);
2457
+ COMPARE_NODE_FIELD(relation);
2458
+ COMPARE_NODE_FIELD(object);
2459
+ COMPARE_STRING_FIELD(subname);
2460
+ COMPARE_STRING_FIELD(newname);
2461
+ COMPARE_SCALAR_FIELD(behavior);
2462
+ COMPARE_SCALAR_FIELD(missing_ok);
2463
+
2464
+ return true;
2465
+ }
2466
+
2467
+ static bool
2468
+ _equalAlterObjectDependsStmt(const AlterObjectDependsStmt *a, const AlterObjectDependsStmt *b)
2469
+ {
2470
+ COMPARE_SCALAR_FIELD(objectType);
2471
+ COMPARE_NODE_FIELD(relation);
2472
+ COMPARE_NODE_FIELD(object);
2473
+ COMPARE_NODE_FIELD(extname);
2474
+ COMPARE_SCALAR_FIELD(remove);
2475
+
2476
+ return true;
2477
+ }
2478
+
2479
+ static bool
2480
+ _equalAlterObjectSchemaStmt(const AlterObjectSchemaStmt *a, const AlterObjectSchemaStmt *b)
2481
+ {
2482
+ COMPARE_SCALAR_FIELD(objectType);
2483
+ COMPARE_NODE_FIELD(relation);
2484
+ COMPARE_NODE_FIELD(object);
2485
+ COMPARE_STRING_FIELD(newschema);
2486
+ COMPARE_SCALAR_FIELD(missing_ok);
2487
+
2488
+ return true;
2489
+ }
2490
+
2491
+ static bool
2492
+ _equalAlterOwnerStmt(const AlterOwnerStmt *a, const AlterOwnerStmt *b)
2493
+ {
2494
+ COMPARE_SCALAR_FIELD(objectType);
2495
+ COMPARE_NODE_FIELD(relation);
2496
+ COMPARE_NODE_FIELD(object);
2497
+ COMPARE_NODE_FIELD(newowner);
2498
+
2499
+ return true;
2500
+ }
2501
+
2502
+ static bool
2503
+ _equalAlterOperatorStmt(const AlterOperatorStmt *a, const AlterOperatorStmt *b)
2504
+ {
2505
+ COMPARE_NODE_FIELD(opername);
2506
+ COMPARE_NODE_FIELD(options);
2507
+
2508
+ return true;
2509
+ }
2510
+
2511
+ static bool
2512
+ _equalAlterTypeStmt(const AlterTypeStmt *a, const AlterTypeStmt *b)
2513
+ {
2514
+ COMPARE_NODE_FIELD(typeName);
2515
+ COMPARE_NODE_FIELD(options);
2516
+
2517
+ return true;
2518
+ }
2519
+
2520
+ static bool
2521
+ _equalRuleStmt(const RuleStmt *a, const RuleStmt *b)
2522
+ {
2523
+ COMPARE_NODE_FIELD(relation);
2524
+ COMPARE_STRING_FIELD(rulename);
2525
+ COMPARE_NODE_FIELD(whereClause);
2526
+ COMPARE_SCALAR_FIELD(event);
2527
+ COMPARE_SCALAR_FIELD(instead);
2528
+ COMPARE_NODE_FIELD(actions);
2529
+ COMPARE_SCALAR_FIELD(replace);
2530
+
2531
+ return true;
2532
+ }
2533
+
2534
+ static bool
2535
+ _equalNotifyStmt(const NotifyStmt *a, const NotifyStmt *b)
2536
+ {
2537
+ COMPARE_STRING_FIELD(conditionname);
2538
+ COMPARE_STRING_FIELD(payload);
2539
+
2540
+ return true;
2541
+ }
2542
+
2543
+ static bool
2544
+ _equalListenStmt(const ListenStmt *a, const ListenStmt *b)
2545
+ {
2546
+ COMPARE_STRING_FIELD(conditionname);
2547
+
2548
+ return true;
2549
+ }
2550
+
2551
+ static bool
2552
+ _equalUnlistenStmt(const UnlistenStmt *a, const UnlistenStmt *b)
2553
+ {
2554
+ COMPARE_STRING_FIELD(conditionname);
2555
+
2556
+ return true;
2557
+ }
2558
+
2559
+ static bool
2560
+ _equalTransactionStmt(const TransactionStmt *a, const TransactionStmt *b)
2561
+ {
2562
+ COMPARE_SCALAR_FIELD(kind);
2563
+ COMPARE_NODE_FIELD(options);
2564
+ COMPARE_STRING_FIELD(savepoint_name);
2565
+ COMPARE_STRING_FIELD(gid);
2566
+ COMPARE_SCALAR_FIELD(chain);
2567
+
2568
+ return true;
2569
+ }
2570
+
2571
+ static bool
2572
+ _equalCompositeTypeStmt(const CompositeTypeStmt *a, const CompositeTypeStmt *b)
2573
+ {
2574
+ COMPARE_NODE_FIELD(typevar);
2575
+ COMPARE_NODE_FIELD(coldeflist);
2576
+
2577
+ return true;
2578
+ }
2579
+
2580
+ static bool
2581
+ _equalCreateEnumStmt(const CreateEnumStmt *a, const CreateEnumStmt *b)
2582
+ {
2583
+ COMPARE_NODE_FIELD(typeName);
2584
+ COMPARE_NODE_FIELD(vals);
2585
+
2586
+ return true;
2587
+ }
2588
+
2589
+ static bool
2590
+ _equalCreateRangeStmt(const CreateRangeStmt *a, const CreateRangeStmt *b)
2591
+ {
2592
+ COMPARE_NODE_FIELD(typeName);
2593
+ COMPARE_NODE_FIELD(params);
2594
+
2595
+ return true;
2596
+ }
2597
+
2598
+ static bool
2599
+ _equalAlterEnumStmt(const AlterEnumStmt *a, const AlterEnumStmt *b)
2600
+ {
2601
+ COMPARE_NODE_FIELD(typeName);
2602
+ COMPARE_STRING_FIELD(oldVal);
2603
+ COMPARE_STRING_FIELD(newVal);
2604
+ COMPARE_STRING_FIELD(newValNeighbor);
2605
+ COMPARE_SCALAR_FIELD(newValIsAfter);
2606
+ COMPARE_SCALAR_FIELD(skipIfNewValExists);
2607
+
2608
+ return true;
2609
+ }
2610
+
2611
+ static bool
2612
+ _equalViewStmt(const ViewStmt *a, const ViewStmt *b)
2613
+ {
2614
+ COMPARE_NODE_FIELD(view);
2615
+ COMPARE_NODE_FIELD(aliases);
2616
+ COMPARE_NODE_FIELD(query);
2617
+ COMPARE_SCALAR_FIELD(replace);
2618
+ COMPARE_NODE_FIELD(options);
2619
+ COMPARE_SCALAR_FIELD(withCheckOption);
2620
+
2621
+ return true;
2622
+ }
2623
+
2624
+ static bool
2625
+ _equalLoadStmt(const LoadStmt *a, const LoadStmt *b)
2626
+ {
2627
+ COMPARE_STRING_FIELD(filename);
2628
+
2629
+ return true;
2630
+ }
2631
+
2632
+ static bool
2633
+ _equalCreatedbStmt(const CreatedbStmt *a, const CreatedbStmt *b)
2634
+ {
2635
+ COMPARE_STRING_FIELD(dbname);
2636
+ COMPARE_NODE_FIELD(options);
2637
+
2638
+ return true;
2639
+ }
2640
+
2641
+ static bool
2642
+ _equalAlterDatabaseStmt(const AlterDatabaseStmt *a, const AlterDatabaseStmt *b)
2643
+ {
2644
+ COMPARE_STRING_FIELD(dbname);
2645
+ COMPARE_NODE_FIELD(options);
2646
+
2647
+ return true;
2648
+ }
2649
+
2650
+ static bool
2651
+ _equalAlterDatabaseRefreshCollStmt(const AlterDatabaseRefreshCollStmt *a, const AlterDatabaseRefreshCollStmt *b)
2652
+ {
2653
+ COMPARE_STRING_FIELD(dbname);
2654
+
2655
+ return true;
2656
+ }
2657
+
2658
+ static bool
2659
+ _equalAlterDatabaseSetStmt(const AlterDatabaseSetStmt *a, const AlterDatabaseSetStmt *b)
2660
+ {
2661
+ COMPARE_STRING_FIELD(dbname);
2662
+ COMPARE_NODE_FIELD(setstmt);
2663
+
2664
+ return true;
2665
+ }
2666
+
2667
+ static bool
2668
+ _equalDropdbStmt(const DropdbStmt *a, const DropdbStmt *b)
2669
+ {
2670
+ COMPARE_STRING_FIELD(dbname);
2671
+ COMPARE_SCALAR_FIELD(missing_ok);
2672
+ COMPARE_NODE_FIELD(options);
2673
+
2674
+ return true;
2675
+ }
2676
+
2677
+ static bool
2678
+ _equalAlterSystemStmt(const AlterSystemStmt *a, const AlterSystemStmt *b)
2679
+ {
2680
+ COMPARE_NODE_FIELD(setstmt);
2681
+
2682
+ return true;
2683
+ }
2684
+
2685
+ static bool
2686
+ _equalClusterStmt(const ClusterStmt *a, const ClusterStmt *b)
2687
+ {
2688
+ COMPARE_NODE_FIELD(relation);
2689
+ COMPARE_STRING_FIELD(indexname);
2690
+ COMPARE_NODE_FIELD(params);
2691
+
2692
+ return true;
2693
+ }
2694
+
2695
+ static bool
2696
+ _equalVacuumStmt(const VacuumStmt *a, const VacuumStmt *b)
2697
+ {
2698
+ COMPARE_NODE_FIELD(options);
2699
+ COMPARE_NODE_FIELD(rels);
2700
+ COMPARE_SCALAR_FIELD(is_vacuumcmd);
2701
+
2702
+ return true;
2703
+ }
2704
+
2705
+ static bool
2706
+ _equalVacuumRelation(const VacuumRelation *a, const VacuumRelation *b)
2707
+ {
2708
+ COMPARE_NODE_FIELD(relation);
2709
+ COMPARE_SCALAR_FIELD(oid);
2710
+ COMPARE_NODE_FIELD(va_cols);
2711
+
2712
+ return true;
2713
+ }
2714
+
2715
+ static bool
2716
+ _equalExplainStmt(const ExplainStmt *a, const ExplainStmt *b)
2717
+ {
2718
+ COMPARE_NODE_FIELD(query);
2719
+ COMPARE_NODE_FIELD(options);
2720
+
2721
+ return true;
2722
+ }
2723
+
2724
+ static bool
2725
+ _equalCreateTableAsStmt(const CreateTableAsStmt *a, const CreateTableAsStmt *b)
2726
+ {
2727
+ COMPARE_NODE_FIELD(query);
2728
+ COMPARE_NODE_FIELD(into);
2729
+ COMPARE_SCALAR_FIELD(objtype);
2730
+ COMPARE_SCALAR_FIELD(is_select_into);
2731
+ COMPARE_SCALAR_FIELD(if_not_exists);
2732
+
2733
+ return true;
2734
+ }
2735
+
2736
+ static bool
2737
+ _equalRefreshMatViewStmt(const RefreshMatViewStmt *a, const RefreshMatViewStmt *b)
2738
+ {
2739
+ COMPARE_SCALAR_FIELD(concurrent);
2740
+ COMPARE_SCALAR_FIELD(skipData);
2741
+ COMPARE_NODE_FIELD(relation);
2742
+
2743
+ return true;
2744
+ }
2745
+
2746
+ static bool
2747
+ _equalCheckPointStmt(const CheckPointStmt *a, const CheckPointStmt *b)
2748
+ {
2749
+
2750
+ return true;
2751
+ }
2752
+
2753
+ static bool
2754
+ _equalDiscardStmt(const DiscardStmt *a, const DiscardStmt *b)
2755
+ {
2756
+ COMPARE_SCALAR_FIELD(target);
2757
+
2758
+ return true;
2759
+ }
2760
+
2761
+ static bool
2762
+ _equalLockStmt(const LockStmt *a, const LockStmt *b)
2763
+ {
2764
+ COMPARE_NODE_FIELD(relations);
2765
+ COMPARE_SCALAR_FIELD(mode);
2766
+ COMPARE_SCALAR_FIELD(nowait);
2767
+
2768
+ return true;
2769
+ }
2770
+
2771
+ static bool
2772
+ _equalConstraintsSetStmt(const ConstraintsSetStmt *a, const ConstraintsSetStmt *b)
2773
+ {
2774
+ COMPARE_NODE_FIELD(constraints);
2775
+ COMPARE_SCALAR_FIELD(deferred);
2776
+
2777
+ return true;
2778
+ }
2779
+
2780
+ static bool
2781
+ _equalReindexStmt(const ReindexStmt *a, const ReindexStmt *b)
2782
+ {
2783
+ COMPARE_SCALAR_FIELD(kind);
2784
+ COMPARE_NODE_FIELD(relation);
2785
+ COMPARE_STRING_FIELD(name);
2786
+ COMPARE_NODE_FIELD(params);
2787
+
2788
+ return true;
2789
+ }
2790
+
2791
+ static bool
2792
+ _equalCreateConversionStmt(const CreateConversionStmt *a, const CreateConversionStmt *b)
2793
+ {
2794
+ COMPARE_NODE_FIELD(conversion_name);
2795
+ COMPARE_STRING_FIELD(for_encoding_name);
2796
+ COMPARE_STRING_FIELD(to_encoding_name);
2797
+ COMPARE_NODE_FIELD(func_name);
2798
+ COMPARE_SCALAR_FIELD(def);
2799
+
2800
+ return true;
2801
+ }
2802
+
2803
+ static bool
2804
+ _equalCreateCastStmt(const CreateCastStmt *a, const CreateCastStmt *b)
2805
+ {
2806
+ COMPARE_NODE_FIELD(sourcetype);
2807
+ COMPARE_NODE_FIELD(targettype);
2808
+ COMPARE_NODE_FIELD(func);
2809
+ COMPARE_SCALAR_FIELD(context);
2810
+ COMPARE_SCALAR_FIELD(inout);
2811
+
2812
+ return true;
2813
+ }
2814
+
2815
+ static bool
2816
+ _equalCreateTransformStmt(const CreateTransformStmt *a, const CreateTransformStmt *b)
2817
+ {
2818
+ COMPARE_SCALAR_FIELD(replace);
2819
+ COMPARE_NODE_FIELD(type_name);
2820
+ COMPARE_STRING_FIELD(lang);
2821
+ COMPARE_NODE_FIELD(fromsql);
2822
+ COMPARE_NODE_FIELD(tosql);
2823
+
2824
+ return true;
2825
+ }
2826
+
2827
+ static bool
2828
+ _equalPrepareStmt(const PrepareStmt *a, const PrepareStmt *b)
2829
+ {
2830
+ COMPARE_STRING_FIELD(name);
2831
+ COMPARE_NODE_FIELD(argtypes);
2832
+ COMPARE_NODE_FIELD(query);
2833
+
2834
+ return true;
2835
+ }
2836
+
2837
+ static bool
2838
+ _equalExecuteStmt(const ExecuteStmt *a, const ExecuteStmt *b)
2839
+ {
2840
+ COMPARE_STRING_FIELD(name);
2841
+ COMPARE_NODE_FIELD(params);
2842
+
2843
+ return true;
2844
+ }
2845
+
2846
+ static bool
2847
+ _equalDeallocateStmt(const DeallocateStmt *a, const DeallocateStmt *b)
2848
+ {
2849
+ COMPARE_STRING_FIELD(name);
2850
+
2851
+ return true;
2852
+ }
2853
+
2854
+ static bool
2855
+ _equalDropOwnedStmt(const DropOwnedStmt *a, const DropOwnedStmt *b)
2856
+ {
2857
+ COMPARE_NODE_FIELD(roles);
2858
+ COMPARE_SCALAR_FIELD(behavior);
2859
+
2860
+ return true;
2861
+ }
2862
+
2863
+ static bool
2864
+ _equalReassignOwnedStmt(const ReassignOwnedStmt *a, const ReassignOwnedStmt *b)
2865
+ {
2866
+ COMPARE_NODE_FIELD(roles);
2867
+ COMPARE_NODE_FIELD(newrole);
2868
+
2869
+ return true;
2870
+ }
2871
+
2872
+ static bool
2873
+ _equalAlterTSDictionaryStmt(const AlterTSDictionaryStmt *a, const AlterTSDictionaryStmt *b)
2874
+ {
2875
+ COMPARE_NODE_FIELD(dictname);
2876
+ COMPARE_NODE_FIELD(options);
2877
+
2878
+ return true;
2879
+ }
2880
+
2881
+ static bool
2882
+ _equalAlterTSConfigurationStmt(const AlterTSConfigurationStmt *a, const AlterTSConfigurationStmt *b)
2883
+ {
2884
+ COMPARE_SCALAR_FIELD(kind);
2885
+ COMPARE_NODE_FIELD(cfgname);
2886
+ COMPARE_NODE_FIELD(tokentype);
2887
+ COMPARE_NODE_FIELD(dicts);
2888
+ COMPARE_SCALAR_FIELD(override);
2889
+ COMPARE_SCALAR_FIELD(replace);
2890
+ COMPARE_SCALAR_FIELD(missing_ok);
2891
+
2892
+ return true;
2893
+ }
2894
+
2895
+ static bool
2896
+ _equalPublicationTable(const PublicationTable *a, const PublicationTable *b)
2897
+ {
2898
+ COMPARE_NODE_FIELD(relation);
2899
+ COMPARE_NODE_FIELD(whereClause);
2900
+ COMPARE_NODE_FIELD(columns);
2901
+
2902
+ return true;
2903
+ }
2904
+
2905
+ static bool
2906
+ _equalPublicationObjSpec(const PublicationObjSpec *a, const PublicationObjSpec *b)
2907
+ {
2908
+ COMPARE_SCALAR_FIELD(pubobjtype);
2909
+ COMPARE_STRING_FIELD(name);
2910
+ COMPARE_NODE_FIELD(pubtable);
2911
+ COMPARE_LOCATION_FIELD(location);
2912
+
2913
+ return true;
2914
+ }
2915
+
2916
+ static bool
2917
+ _equalCreatePublicationStmt(const CreatePublicationStmt *a, const CreatePublicationStmt *b)
2918
+ {
2919
+ COMPARE_STRING_FIELD(pubname);
2920
+ COMPARE_NODE_FIELD(options);
2921
+ COMPARE_NODE_FIELD(pubobjects);
2922
+ COMPARE_SCALAR_FIELD(for_all_tables);
2923
+
2924
+ return true;
2925
+ }
2926
+
2927
+ static bool
2928
+ _equalAlterPublicationStmt(const AlterPublicationStmt *a, const AlterPublicationStmt *b)
2929
+ {
2930
+ COMPARE_STRING_FIELD(pubname);
2931
+ COMPARE_NODE_FIELD(options);
2932
+ COMPARE_NODE_FIELD(pubobjects);
2933
+ COMPARE_SCALAR_FIELD(for_all_tables);
2934
+ COMPARE_SCALAR_FIELD(action);
2935
+
2936
+ return true;
2937
+ }
2938
+
2939
+ static bool
2940
+ _equalCreateSubscriptionStmt(const CreateSubscriptionStmt *a, const CreateSubscriptionStmt *b)
2941
+ {
2942
+ COMPARE_STRING_FIELD(subname);
2943
+ COMPARE_STRING_FIELD(conninfo);
2944
+ COMPARE_NODE_FIELD(publication);
2945
+ COMPARE_NODE_FIELD(options);
2946
+
2947
+ return true;
2948
+ }
2949
+
2950
+ static bool
2951
+ _equalAlterSubscriptionStmt(const AlterSubscriptionStmt *a, const AlterSubscriptionStmt *b)
2952
+ {
2953
+ COMPARE_SCALAR_FIELD(kind);
2954
+ COMPARE_STRING_FIELD(subname);
2955
+ COMPARE_STRING_FIELD(conninfo);
2956
+ COMPARE_NODE_FIELD(publication);
2957
+ COMPARE_NODE_FIELD(options);
2958
+
2959
+ return true;
2960
+ }
2961
+
2962
+ static bool
2963
+ _equalDropSubscriptionStmt(const DropSubscriptionStmt *a, const DropSubscriptionStmt *b)
2964
+ {
2965
+ COMPARE_STRING_FIELD(subname);
2966
+ COMPARE_SCALAR_FIELD(missing_ok);
2967
+ COMPARE_SCALAR_FIELD(behavior);
2968
+
2969
+ return true;
2970
+ }
2971
+
2972
+ static bool
2973
+ _equalPathKey(const PathKey *a, const PathKey *b)
2974
+ {
2975
+ COMPARE_SCALAR_FIELD(pk_eclass);
2976
+ COMPARE_SCALAR_FIELD(pk_opfamily);
2977
+ COMPARE_SCALAR_FIELD(pk_strategy);
2978
+ COMPARE_SCALAR_FIELD(pk_nulls_first);
2979
+
2980
+ return true;
2981
+ }
2982
+
2983
+ static bool
2984
+ _equalRestrictInfo(const RestrictInfo *a, const RestrictInfo *b)
2985
+ {
2986
+ COMPARE_NODE_FIELD(clause);
2987
+ COMPARE_SCALAR_FIELD(is_pushed_down);
2988
+ COMPARE_SCALAR_FIELD(has_clone);
2989
+ COMPARE_SCALAR_FIELD(is_clone);
2990
+ COMPARE_SCALAR_FIELD(security_level);
2991
+ COMPARE_BITMAPSET_FIELD(required_relids);
2992
+ COMPARE_BITMAPSET_FIELD(incompatible_relids);
2993
+ COMPARE_BITMAPSET_FIELD(outer_relids);
2994
+ COMPARE_SCALAR_FIELD(rinfo_serial);
2995
+
2996
+ return true;
2997
+ }
2998
+
2999
+ static bool
3000
+ _equalPlaceHolderVar(const PlaceHolderVar *a, const PlaceHolderVar *b)
3001
+ {
3002
+ COMPARE_BITMAPSET_FIELD(phnullingrels);
3003
+ COMPARE_SCALAR_FIELD(phid);
3004
+ COMPARE_SCALAR_FIELD(phlevelsup);
3005
+
3006
+ return true;
3007
+ }
3008
+
3009
+ static bool
3010
+ _equalSpecialJoinInfo(const SpecialJoinInfo *a, const SpecialJoinInfo *b)
3011
+ {
3012
+ COMPARE_BITMAPSET_FIELD(min_lefthand);
3013
+ COMPARE_BITMAPSET_FIELD(min_righthand);
3014
+ COMPARE_BITMAPSET_FIELD(syn_lefthand);
3015
+ COMPARE_BITMAPSET_FIELD(syn_righthand);
3016
+ COMPARE_SCALAR_FIELD(jointype);
3017
+ COMPARE_SCALAR_FIELD(ojrelid);
3018
+ COMPARE_BITMAPSET_FIELD(commute_above_l);
3019
+ COMPARE_BITMAPSET_FIELD(commute_above_r);
3020
+ COMPARE_BITMAPSET_FIELD(commute_below_l);
3021
+ COMPARE_BITMAPSET_FIELD(commute_below_r);
3022
+ COMPARE_SCALAR_FIELD(lhs_strict);
3023
+ COMPARE_SCALAR_FIELD(semi_can_btree);
3024
+ COMPARE_SCALAR_FIELD(semi_can_hash);
3025
+ COMPARE_NODE_FIELD(semi_operators);
3026
+ COMPARE_NODE_FIELD(semi_rhs_exprs);
3027
+
3028
+ return true;
3029
+ }
3030
+
3031
+ static bool
3032
+ _equalAppendRelInfo(const AppendRelInfo *a, const AppendRelInfo *b)
3033
+ {
3034
+ COMPARE_SCALAR_FIELD(parent_relid);
3035
+ COMPARE_SCALAR_FIELD(child_relid);
3036
+ COMPARE_SCALAR_FIELD(parent_reltype);
3037
+ COMPARE_SCALAR_FIELD(child_reltype);
3038
+ COMPARE_NODE_FIELD(translated_vars);
3039
+ COMPARE_SCALAR_FIELD(num_child_cols);
3040
+ COMPARE_POINTER_FIELD(parent_colnos, a->num_child_cols * sizeof(AttrNumber));
3041
+ COMPARE_SCALAR_FIELD(parent_reloid);
3042
+
3043
+ return true;
3044
+ }
3045
+
3046
+ static bool
3047
+ _equalPlaceHolderInfo(const PlaceHolderInfo *a, const PlaceHolderInfo *b)
3048
+ {
3049
+ COMPARE_SCALAR_FIELD(phid);
3050
+ COMPARE_NODE_FIELD(ph_var);
3051
+ COMPARE_BITMAPSET_FIELD(ph_eval_at);
3052
+ COMPARE_BITMAPSET_FIELD(ph_lateral);
3053
+ COMPARE_BITMAPSET_FIELD(ph_needed);
3054
+ COMPARE_SCALAR_FIELD(ph_width);
3055
+
3056
+ return true;
3057
+ }
3058
+
3059
+ static bool
3060
+ _equalInteger(const Integer *a, const Integer *b)
3061
+ {
3062
+ COMPARE_SCALAR_FIELD(ival);
3063
+
3064
+ return true;
3065
+ }
3066
+
3067
+ static bool
3068
+ _equalFloat(const Float *a, const Float *b)
3069
+ {
3070
+ COMPARE_STRING_FIELD(fval);
3071
+
3072
+ return true;
3073
+ }
3074
+
3075
+ static bool
3076
+ _equalBoolean(const Boolean *a, const Boolean *b)
3077
+ {
3078
+ COMPARE_SCALAR_FIELD(boolval);
3079
+
3080
+ return true;
3081
+ }
3082
+
3083
+ static bool
3084
+ _equalString(const String *a, const String *b)
3085
+ {
3086
+ COMPARE_STRING_FIELD(sval);
3087
+
3088
+ return true;
3089
+ }
3090
+
3091
+ static bool
3092
+ _equalBitString(const BitString *a, const BitString *b)
3093
+ {
3094
+ COMPARE_STRING_FIELD(bsval);
3095
+
3096
+ return true;
3097
+ }