pg_query 5.1.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (490) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/README.md +1 -1
  4. data/Rakefile +4 -4
  5. data/ext/pg_query/ext_symbols_freebsd.sym +1 -0
  6. data/ext/pg_query/ext_symbols_freebsd_with_ruby_abi_version.sym +2 -0
  7. data/ext/pg_query/ext_symbols_openbsd.sym +1 -0
  8. data/ext/pg_query/ext_symbols_openbsd_with_ruby_abi_version.sym +2 -0
  9. data/ext/pg_query/ext_symbols_with_ruby_abi_version.sym +2 -0
  10. data/ext/pg_query/extconf.rb +20 -6
  11. data/ext/pg_query/include/pg_query.h +4 -3
  12. data/ext/pg_query/include/pg_query_enum_defs.c +424 -154
  13. data/ext/pg_query/include/pg_query_fingerprint_conds.c +68 -4
  14. data/ext/pg_query/include/pg_query_fingerprint_defs.c +2952 -1845
  15. data/ext/pg_query/include/pg_query_outfuncs_conds.c +51 -3
  16. data/ext/pg_query/include/pg_query_outfuncs_defs.c +210 -23
  17. data/ext/pg_query/include/pg_query_readfuncs_conds.c +17 -1
  18. data/ext/pg_query/include/pg_query_readfuncs_defs.c +271 -52
  19. data/ext/pg_query/include/postgres/access/amapi.h +14 -3
  20. data/ext/pg_query/include/postgres/access/attmap.h +1 -1
  21. data/ext/pg_query/include/postgres/access/attnum.h +1 -1
  22. data/ext/pg_query/include/postgres/access/brin_internal.h +116 -0
  23. data/ext/pg_query/include/postgres/access/brin_tuple.h +112 -0
  24. data/ext/pg_query/include/postgres/access/clog.h +2 -3
  25. data/ext/pg_query/include/postgres/access/commit_ts.h +2 -3
  26. data/ext/pg_query/include/postgres/access/detoast.h +1 -1
  27. data/ext/pg_query/include/postgres/access/genam.h +17 -4
  28. data/ext/pg_query/include/postgres/access/gin.h +1 -1
  29. data/ext/pg_query/include/postgres/access/htup.h +1 -1
  30. data/ext/pg_query/include/postgres/access/htup_details.h +11 -11
  31. data/ext/pg_query/include/postgres/access/itup.h +3 -3
  32. data/ext/pg_query/include/postgres/access/parallel.h +1 -2
  33. data/ext/pg_query/include/postgres/access/printtup.h +1 -1
  34. data/ext/pg_query/include/postgres/access/relation.h +1 -1
  35. data/ext/pg_query/include/postgres/access/relscan.h +1 -1
  36. data/ext/pg_query/include/postgres/access/rmgrlist.h +1 -1
  37. data/ext/pg_query/include/postgres/access/sdir.h +1 -1
  38. data/ext/pg_query/include/postgres/access/skey.h +1 -1
  39. data/ext/pg_query/include/postgres/access/slru.h +218 -0
  40. data/ext/pg_query/include/postgres/access/stratnum.h +1 -1
  41. data/ext/pg_query/include/postgres/access/sysattr.h +1 -1
  42. data/ext/pg_query/include/postgres/access/table.h +1 -1
  43. data/ext/pg_query/include/postgres/access/tableam.h +35 -25
  44. data/ext/pg_query/include/postgres/access/tidstore.h +50 -0
  45. data/ext/pg_query/include/postgres/access/toast_compression.h +2 -2
  46. data/ext/pg_query/include/postgres/access/transam.h +50 -7
  47. data/ext/pg_query/include/postgres/access/tsmapi.h +1 -1
  48. data/ext/pg_query/include/postgres/access/tupconvert.h +1 -1
  49. data/ext/pg_query/include/postgres/access/tupdesc.h +5 -5
  50. data/ext/pg_query/include/postgres/access/tupmacs.h +1 -1
  51. data/ext/pg_query/include/postgres/access/twophase.h +2 -2
  52. data/ext/pg_query/include/postgres/access/xact.h +5 -5
  53. data/ext/pg_query/include/postgres/access/xlog.h +20 -12
  54. data/ext/pg_query/include/postgres/access/xlog_internal.h +4 -3
  55. data/ext/pg_query/include/postgres/access/xlogbackup.h +3 -1
  56. data/ext/pg_query/include/postgres/access/xlogdefs.h +5 -5
  57. data/ext/pg_query/include/postgres/access/xlogprefetcher.h +2 -2
  58. data/ext/pg_query/include/postgres/access/xlogreader.h +2 -2
  59. data/ext/pg_query/include/postgres/access/xlogrecord.h +3 -3
  60. data/ext/pg_query/include/postgres/access/xlogrecovery.h +4 -4
  61. data/ext/pg_query/include/postgres/archive/archive_module.h +9 -1
  62. data/ext/pg_query/include/postgres/c.h +32 -37
  63. data/ext/pg_query/include/postgres/catalog/catalog.h +3 -1
  64. data/ext/pg_query/include/postgres/catalog/catversion.h +2 -2
  65. data/ext/pg_query/include/postgres/catalog/dependency.h +17 -59
  66. data/ext/pg_query/include/postgres/catalog/genbki.h +12 -6
  67. data/ext/pg_query/include/postgres/catalog/index.h +22 -18
  68. data/ext/pg_query/include/postgres/catalog/indexing.h +1 -1
  69. data/ext/pg_query/include/postgres/catalog/namespace.h +18 -19
  70. data/ext/pg_query/include/postgres/catalog/objectaccess.h +2 -2
  71. data/ext/pg_query/include/postgres/catalog/objectaddress.h +5 -1
  72. data/ext/pg_query/include/postgres/catalog/pg_aggregate.h +4 -2
  73. data/ext/pg_query/include/postgres/catalog/pg_aggregate_d.h +1 -1
  74. data/ext/pg_query/include/postgres/catalog/pg_am.h +6 -3
  75. data/ext/pg_query/include/postgres/catalog/pg_am_d.h +1 -1
  76. data/ext/pg_query/include/postgres/catalog/pg_attribute.h +31 -14
  77. data/ext/pg_query/include/postgres/catalog/pg_attribute_d.h +3 -3
  78. data/ext/pg_query/include/postgres/catalog/pg_authid.h +6 -3
  79. data/ext/pg_query/include/postgres/catalog/pg_authid_d.h +2 -1
  80. data/ext/pg_query/include/postgres/catalog/pg_class.h +10 -5
  81. data/ext/pg_query/include/postgres/catalog/pg_class_d.h +4 -2
  82. data/ext/pg_query/include/postgres/catalog/pg_collation.h +11 -5
  83. data/ext/pg_query/include/postgres/catalog/pg_collation_d.h +5 -2
  84. data/ext/pg_query/include/postgres/catalog/pg_constraint.h +15 -10
  85. data/ext/pg_query/include/postgres/catalog/pg_constraint_d.h +2 -1
  86. data/ext/pg_query/include/postgres/catalog/pg_control.h +5 -3
  87. data/ext/pg_query/include/postgres/catalog/pg_conversion.h +8 -4
  88. data/ext/pg_query/include/postgres/catalog/pg_conversion_d.h +1 -1
  89. data/ext/pg_query/include/postgres/catalog/pg_database.h +9 -4
  90. data/ext/pg_query/include/postgres/catalog/pg_database_d.h +13 -12
  91. data/ext/pg_query/include/postgres/catalog/pg_depend.h +3 -3
  92. data/ext/pg_query/include/postgres/catalog/pg_depend_d.h +1 -1
  93. data/ext/pg_query/include/postgres/catalog/pg_event_trigger.h +6 -3
  94. data/ext/pg_query/include/postgres/catalog/pg_event_trigger_d.h +1 -1
  95. data/ext/pg_query/include/postgres/catalog/pg_index.h +5 -3
  96. data/ext/pg_query/include/postgres/catalog/pg_index_d.h +1 -1
  97. data/ext/pg_query/include/postgres/catalog/pg_language.h +6 -3
  98. data/ext/pg_query/include/postgres/catalog/pg_language_d.h +1 -1
  99. data/ext/pg_query/include/postgres/catalog/pg_namespace.h +6 -3
  100. data/ext/pg_query/include/postgres/catalog/pg_namespace_d.h +1 -1
  101. data/ext/pg_query/include/postgres/catalog/pg_opclass.h +6 -3
  102. data/ext/pg_query/include/postgres/catalog/pg_opclass_d.h +1 -1
  103. data/ext/pg_query/include/postgres/catalog/pg_operator.h +20 -3
  104. data/ext/pg_query/include/postgres/catalog/pg_operator_d.h +1 -1
  105. data/ext/pg_query/include/postgres/catalog/pg_opfamily.h +6 -3
  106. data/ext/pg_query/include/postgres/catalog/pg_opfamily_d.h +1 -1
  107. data/ext/pg_query/include/postgres/catalog/pg_partitioned_table.h +4 -2
  108. data/ext/pg_query/include/postgres/catalog/pg_partitioned_table_d.h +1 -1
  109. data/ext/pg_query/include/postgres/catalog/pg_proc.h +6 -3
  110. data/ext/pg_query/include/postgres/catalog/pg_proc_d.h +1 -1
  111. data/ext/pg_query/include/postgres/catalog/pg_publication.h +6 -3
  112. data/ext/pg_query/include/postgres/catalog/pg_publication_d.h +1 -1
  113. data/ext/pg_query/include/postgres/catalog/pg_replication_origin.h +6 -3
  114. data/ext/pg_query/include/postgres/catalog/pg_replication_origin_d.h +1 -1
  115. data/ext/pg_query/include/postgres/catalog/pg_statistic.h +10 -4
  116. data/ext/pg_query/include/postgres/catalog/pg_statistic_d.h +7 -3
  117. data/ext/pg_query/include/postgres/catalog/pg_statistic_ext.h +10 -7
  118. data/ext/pg_query/include/postgres/catalog/pg_statistic_ext_d.h +3 -3
  119. data/ext/pg_query/include/postgres/catalog/pg_transform.h +6 -3
  120. data/ext/pg_query/include/postgres/catalog/pg_transform_d.h +1 -1
  121. data/ext/pg_query/include/postgres/catalog/pg_trigger.h +4 -4
  122. data/ext/pg_query/include/postgres/catalog/pg_trigger_d.h +1 -1
  123. data/ext/pg_query/include/postgres/catalog/pg_ts_config.h +6 -3
  124. data/ext/pg_query/include/postgres/catalog/pg_ts_config_d.h +1 -1
  125. data/ext/pg_query/include/postgres/catalog/pg_ts_dict.h +6 -3
  126. data/ext/pg_query/include/postgres/catalog/pg_ts_dict_d.h +1 -1
  127. data/ext/pg_query/include/postgres/catalog/pg_ts_parser.h +6 -3
  128. data/ext/pg_query/include/postgres/catalog/pg_ts_parser_d.h +1 -1
  129. data/ext/pg_query/include/postgres/catalog/pg_ts_template.h +6 -3
  130. data/ext/pg_query/include/postgres/catalog/pg_ts_template_d.h +1 -1
  131. data/ext/pg_query/include/postgres/catalog/pg_type.h +6 -3
  132. data/ext/pg_query/include/postgres/catalog/pg_type_d.h +1 -1
  133. data/ext/pg_query/include/postgres/catalog/storage.h +1 -1
  134. data/ext/pg_query/include/postgres/catalog/syscache_ids.h +104 -0
  135. data/ext/pg_query/include/postgres/commands/async.h +2 -6
  136. data/ext/pg_query/include/postgres/commands/dbcommands.h +1 -1
  137. data/ext/pg_query/include/postgres/commands/defrem.h +6 -6
  138. data/ext/pg_query/include/postgres/commands/event_trigger.h +11 -2
  139. data/ext/pg_query/include/postgres/commands/explain.h +19 -3
  140. data/ext/pg_query/include/postgres/commands/prepare.h +1 -1
  141. data/ext/pg_query/include/postgres/commands/tablespace.h +1 -1
  142. data/ext/pg_query/include/postgres/commands/trigger.h +1 -1
  143. data/ext/pg_query/include/postgres/commands/vacuum.h +28 -26
  144. data/ext/pg_query/include/postgres/common/cryptohash.h +2 -2
  145. data/ext/pg_query/include/postgres/common/file_perm.h +1 -1
  146. data/ext/pg_query/include/postgres/common/file_utils.h +65 -0
  147. data/ext/pg_query/include/postgres/common/hashfn.h +16 -1
  148. data/ext/pg_query/include/postgres/common/hashfn_unstable.h +407 -0
  149. data/ext/pg_query/include/postgres/common/int.h +79 -4
  150. data/ext/pg_query/include/postgres/common/keywords.h +1 -1
  151. data/ext/pg_query/include/postgres/common/kwlookup.h +1 -1
  152. data/ext/pg_query/include/postgres/common/pg_prng.h +2 -1
  153. data/ext/pg_query/include/postgres/common/relpath.h +4 -4
  154. data/ext/pg_query/include/postgres/common/scram-common.h +1 -1
  155. data/ext/pg_query/include/postgres/common/sha2.h +1 -1
  156. data/ext/pg_query/include/postgres/common/string.h +1 -1
  157. data/ext/pg_query/include/postgres/common/unicode_east_asian_fw_table.h +2 -3
  158. data/ext/pg_query/include/postgres/copyfuncs.funcs.c +278 -30
  159. data/ext/pg_query/include/postgres/copyfuncs.switch.c +55 -4
  160. data/ext/pg_query/include/postgres/datatype/timestamp.h +29 -3
  161. data/ext/pg_query/include/postgres/equalfuncs.funcs.c +239 -26
  162. data/ext/pg_query/include/postgres/equalfuncs.switch.c +55 -4
  163. data/ext/pg_query/include/postgres/executor/execdesc.h +2 -2
  164. data/ext/pg_query/include/postgres/executor/executor.h +6 -5
  165. data/ext/pg_query/include/postgres/executor/functions.h +2 -1
  166. data/ext/pg_query/include/postgres/executor/instrument.h +5 -3
  167. data/ext/pg_query/include/postgres/executor/spi.h +2 -8
  168. data/ext/pg_query/include/postgres/executor/tablefunc.h +1 -1
  169. data/ext/pg_query/include/postgres/executor/tuptable.h +31 -2
  170. data/ext/pg_query/include/postgres/fmgr.h +2 -2
  171. data/ext/pg_query/include/postgres/foreign/fdwapi.h +1 -1
  172. data/ext/pg_query/include/postgres/funcapi.h +2 -2
  173. data/ext/pg_query/include/postgres/gram.h +871 -830
  174. data/ext/pg_query/include/postgres/gramparse.h +1 -1
  175. data/ext/pg_query/include/postgres/jit/jit.h +4 -3
  176. data/ext/pg_query/include/postgres/kwlist_d.h +511 -466
  177. data/ext/pg_query/include/postgres/lib/dshash.h +25 -10
  178. data/ext/pg_query/include/postgres/lib/ilist.h +1 -1
  179. data/ext/pg_query/include/postgres/lib/pairingheap.h +1 -1
  180. data/ext/pg_query/include/postgres/lib/simplehash.h +40 -18
  181. data/ext/pg_query/include/postgres/lib/sort_template.h +14 -1
  182. data/ext/pg_query/include/postgres/lib/stringinfo.h +93 -11
  183. data/ext/pg_query/include/postgres/libpq/auth.h +1 -1
  184. data/ext/pg_query/include/postgres/libpq/crypt.h +2 -2
  185. data/ext/pg_query/include/postgres/libpq/hba.h +4 -4
  186. data/ext/pg_query/include/postgres/libpq/libpq-be.h +35 -28
  187. data/ext/pg_query/include/postgres/libpq/libpq.h +6 -7
  188. data/ext/pg_query/include/postgres/libpq/pqcomm.h +26 -20
  189. data/ext/pg_query/include/postgres/libpq/pqformat.h +2 -3
  190. data/ext/pg_query/include/postgres/libpq/pqsignal.h +1 -1
  191. data/ext/pg_query/include/postgres/libpq/protocol.h +89 -0
  192. data/ext/pg_query/include/postgres/libpq/sasl.h +1 -1
  193. data/ext/pg_query/include/postgres/libpq/scram.h +1 -1
  194. data/ext/pg_query/include/postgres/mb/pg_wchar.h +103 -82
  195. data/ext/pg_query/include/postgres/mb/stringinfo_mb.h +1 -1
  196. data/ext/pg_query/include/postgres/miscadmin.h +72 -52
  197. data/ext/pg_query/include/postgres/nodes/bitmapset.h +17 -3
  198. data/ext/pg_query/include/postgres/nodes/execnodes.h +112 -25
  199. data/ext/pg_query/include/postgres/nodes/extensible.h +1 -1
  200. data/ext/pg_query/include/postgres/nodes/lockoptions.h +4 -4
  201. data/ext/pg_query/include/postgres/nodes/makefuncs.h +8 -2
  202. data/ext/pg_query/include/postgres/nodes/memnodes.h +43 -4
  203. data/ext/pg_query/include/postgres/nodes/miscnodes.h +1 -1
  204. data/ext/pg_query/include/postgres/nodes/nodeFuncs.h +1 -1
  205. data/ext/pg_query/include/postgres/nodes/nodes.h +30 -41
  206. data/ext/pg_query/include/postgres/nodes/nodetags.h +464 -444
  207. data/ext/pg_query/include/postgres/nodes/params.h +1 -1
  208. data/ext/pg_query/include/postgres/nodes/parsenodes.h +358 -175
  209. data/ext/pg_query/include/postgres/nodes/pathnodes.h +64 -10
  210. data/ext/pg_query/include/postgres/nodes/pg_list.h +62 -11
  211. data/ext/pg_query/include/postgres/nodes/plannodes.h +11 -10
  212. data/ext/pg_query/include/postgres/nodes/primnodes.h +352 -54
  213. data/ext/pg_query/include/postgres/nodes/print.h +1 -1
  214. data/ext/pg_query/include/postgres/nodes/queryjumble.h +2 -2
  215. data/ext/pg_query/include/postgres/nodes/replnodes.h +23 -2
  216. data/ext/pg_query/include/postgres/nodes/supportnodes.h +1 -1
  217. data/ext/pg_query/include/postgres/nodes/tidbitmap.h +1 -1
  218. data/ext/pg_query/include/postgres/nodes/value.h +1 -1
  219. data/ext/pg_query/include/postgres/optimizer/cost.h +5 -4
  220. data/ext/pg_query/include/postgres/optimizer/geqo.h +1 -1
  221. data/ext/pg_query/include/postgres/optimizer/geqo_gene.h +1 -1
  222. data/ext/pg_query/include/postgres/optimizer/optimizer.h +5 -2
  223. data/ext/pg_query/include/postgres/optimizer/paths.h +13 -8
  224. data/ext/pg_query/include/postgres/optimizer/planmain.h +7 -1
  225. data/ext/pg_query/include/postgres/parser/analyze.h +3 -1
  226. data/ext/pg_query/include/postgres/parser/kwlist.h +22 -2
  227. data/ext/pg_query/include/postgres/parser/parse_agg.h +1 -1
  228. data/ext/pg_query/include/postgres/parser/parse_coerce.h +5 -2
  229. data/ext/pg_query/include/postgres/parser/parse_expr.h +1 -1
  230. data/ext/pg_query/include/postgres/parser/parse_func.h +2 -2
  231. data/ext/pg_query/include/postgres/parser/parse_node.h +3 -2
  232. data/ext/pg_query/include/postgres/parser/parse_oper.h +4 -1
  233. data/ext/pg_query/include/postgres/parser/parse_relation.h +1 -1
  234. data/ext/pg_query/include/postgres/parser/parse_type.h +2 -2
  235. data/ext/pg_query/include/postgres/parser/parser.h +3 -3
  236. data/ext/pg_query/include/postgres/parser/parsetree.h +1 -1
  237. data/ext/pg_query/include/postgres/parser/scanner.h +1 -1
  238. data/ext/pg_query/include/postgres/parser/scansup.h +1 -1
  239. data/ext/pg_query/include/postgres/partitioning/partdefs.h +1 -1
  240. data/ext/pg_query/include/postgres/pg_config.h +53 -45
  241. data/ext/pg_query/include/postgres/pg_config_manual.h +21 -8
  242. data/ext/pg_query/include/postgres/pg_getopt.h +1 -1
  243. data/ext/pg_query/include/postgres/pg_trace.h +1 -1
  244. data/ext/pg_query/include/postgres/pgstat.h +13 -11
  245. data/ext/pg_query/include/postgres/pgtime.h +1 -1
  246. data/ext/pg_query/include/postgres/pl_reserved_kwlist.h +1 -1
  247. data/ext/pg_query/include/postgres/pl_reserved_kwlist_d.h +1 -1
  248. data/ext/pg_query/include/postgres/pl_unreserved_kwlist.h +1 -1
  249. data/ext/pg_query/include/postgres/pl_unreserved_kwlist_d.h +1 -1
  250. data/ext/pg_query/include/postgres/plerrcodes.h +4 -4
  251. data/ext/pg_query/include/postgres/plpgsql.h +15 -13
  252. data/ext/pg_query/include/postgres/port/atomics/arch-arm.h +1 -1
  253. data/ext/pg_query/include/postgres/port/atomics/arch-hppa.h +1 -1
  254. data/ext/pg_query/include/postgres/port/atomics/arch-ppc.h +3 -1
  255. data/ext/pg_query/include/postgres/port/atomics/arch-x86.h +3 -1
  256. data/ext/pg_query/include/postgres/port/atomics/fallback.h +1 -1
  257. data/ext/pg_query/include/postgres/port/atomics/generic-gcc.h +38 -1
  258. data/ext/pg_query/include/postgres/port/atomics/generic-msvc.h +19 -1
  259. data/ext/pg_query/include/postgres/port/atomics/generic-sunpro.h +16 -1
  260. data/ext/pg_query/include/postgres/port/atomics/generic.h +38 -2
  261. data/ext/pg_query/include/postgres/port/atomics.h +93 -6
  262. data/ext/pg_query/include/postgres/port/pg_bitutils.h +91 -9
  263. data/ext/pg_query/include/postgres/port/pg_bswap.h +1 -1
  264. data/ext/pg_query/include/postgres/port/pg_crc32c.h +10 -1
  265. data/ext/pg_query/include/postgres/port/pg_iovec.h +117 -0
  266. data/ext/pg_query/include/postgres/port/simd.h +48 -1
  267. data/ext/pg_query/include/postgres/port/win32/sys/socket.h +8 -0
  268. data/ext/pg_query/include/postgres/port/win32_port.h +1 -13
  269. data/ext/pg_query/include/postgres/port.h +39 -4
  270. data/ext/pg_query/include/postgres/portability/instr_time.h +1 -1
  271. data/ext/pg_query/include/postgres/postgres.h +1 -1
  272. data/ext/pg_query/include/postgres/postmaster/autovacuum.h +5 -16
  273. data/ext/pg_query/include/postgres/postmaster/bgworker.h +8 -6
  274. data/ext/pg_query/include/postgres/postmaster/bgworker_internals.h +3 -7
  275. data/ext/pg_query/include/postgres/postmaster/bgwriter.h +3 -3
  276. data/ext/pg_query/include/postgres/postmaster/interrupt.h +1 -1
  277. data/ext/pg_query/include/postgres/postmaster/pgarch.h +2 -2
  278. data/ext/pg_query/include/postgres/postmaster/postmaster.h +25 -5
  279. data/ext/pg_query/include/postgres/postmaster/startup.h +2 -2
  280. data/ext/pg_query/include/postgres/postmaster/syslogger.h +2 -4
  281. data/ext/pg_query/include/postgres/postmaster/walsummarizer.h +35 -0
  282. data/ext/pg_query/include/postgres/postmaster/walwriter.h +2 -2
  283. data/ext/pg_query/include/postgres/regex/regex.h +92 -9
  284. data/ext/pg_query/include/postgres/replication/logicallauncher.h +1 -1
  285. data/ext/pg_query/include/postgres/replication/logicalproto.h +2 -2
  286. data/ext/pg_query/include/postgres/replication/logicalworker.h +2 -1
  287. data/ext/pg_query/include/postgres/replication/origin.h +1 -1
  288. data/ext/pg_query/include/postgres/replication/reorderbuffer.h +27 -46
  289. data/ext/pg_query/include/postgres/replication/slot.h +45 -5
  290. data/ext/pg_query/include/postgres/replication/slotsync.h +38 -0
  291. data/ext/pg_query/include/postgres/replication/syncrep.h +1 -1
  292. data/ext/pg_query/include/postgres/replication/walreceiver.h +37 -11
  293. data/ext/pg_query/include/postgres/replication/walsender.h +5 -3
  294. data/ext/pg_query/include/postgres/rewrite/prs2lock.h +1 -1
  295. data/ext/pg_query/include/postgres/rewrite/rewriteHandler.h +7 -1
  296. data/ext/pg_query/include/postgres/rewrite/rewriteManip.h +2 -2
  297. data/ext/pg_query/include/postgres/rewrite/rewriteSupport.h +1 -1
  298. data/ext/pg_query/include/postgres/storage/block.h +1 -1
  299. data/ext/pg_query/include/postgres/storage/buf.h +1 -1
  300. data/ext/pg_query/include/postgres/storage/bufmgr.h +59 -41
  301. data/ext/pg_query/include/postgres/storage/bufpage.h +1 -1
  302. data/ext/pg_query/include/postgres/storage/condition_variable.h +1 -1
  303. data/ext/pg_query/include/postgres/storage/dsm.h +1 -1
  304. data/ext/pg_query/include/postgres/storage/dsm_impl.h +2 -2
  305. data/ext/pg_query/include/postgres/storage/fd.h +30 -13
  306. data/ext/pg_query/include/postgres/storage/fileset.h +1 -1
  307. data/ext/pg_query/include/postgres/storage/ipc.h +4 -1
  308. data/ext/pg_query/include/postgres/storage/item.h +1 -1
  309. data/ext/pg_query/include/postgres/storage/itemid.h +1 -1
  310. data/ext/pg_query/include/postgres/storage/itemptr.h +1 -1
  311. data/ext/pg_query/include/postgres/storage/large_object.h +1 -1
  312. data/ext/pg_query/include/postgres/storage/latch.h +4 -2
  313. data/ext/pg_query/include/postgres/storage/lmgr.h +8 -2
  314. data/ext/pg_query/include/postgres/storage/lock.h +19 -19
  315. data/ext/pg_query/include/postgres/storage/lockdefs.h +3 -1
  316. data/ext/pg_query/include/postgres/storage/lwlock.h +17 -9
  317. data/ext/pg_query/include/postgres/storage/lwlocknames.h +7 -10
  318. data/ext/pg_query/include/postgres/storage/off.h +1 -1
  319. data/ext/pg_query/include/postgres/storage/pg_sema.h +1 -1
  320. data/ext/pg_query/include/postgres/storage/pg_shmem.h +5 -4
  321. data/ext/pg_query/include/postgres/storage/pmsignal.h +2 -2
  322. data/ext/pg_query/include/postgres/storage/predicate.h +1 -5
  323. data/ext/pg_query/include/postgres/storage/proc.h +48 -26
  324. data/ext/pg_query/include/postgres/storage/procarray.h +5 -1
  325. data/ext/pg_query/include/postgres/storage/proclist_types.h +11 -9
  326. data/ext/pg_query/include/postgres/storage/procnumber.h +43 -0
  327. data/ext/pg_query/include/postgres/storage/procsignal.h +8 -6
  328. data/ext/pg_query/include/postgres/storage/read_stream.h +65 -0
  329. data/ext/pg_query/include/postgres/storage/relfilelocator.h +16 -15
  330. data/ext/pg_query/include/postgres/storage/s_lock.h +7 -27
  331. data/ext/pg_query/include/postgres/storage/sharedfileset.h +1 -1
  332. data/ext/pg_query/include/postgres/storage/shm_mq.h +2 -2
  333. data/ext/pg_query/include/postgres/storage/shm_toc.h +1 -1
  334. data/ext/pg_query/include/postgres/storage/shmem.h +1 -1
  335. data/ext/pg_query/include/postgres/storage/sinval.h +3 -3
  336. data/ext/pg_query/include/postgres/storage/smgr.h +46 -29
  337. data/ext/pg_query/include/postgres/storage/spin.h +1 -1
  338. data/ext/pg_query/include/postgres/storage/standby.h +13 -3
  339. data/ext/pg_query/include/postgres/storage/standbydefs.h +2 -2
  340. data/ext/pg_query/include/postgres/storage/sync.h +4 -4
  341. data/ext/pg_query/include/postgres/tcop/cmdtag.h +1 -2
  342. data/ext/pg_query/include/postgres/tcop/cmdtaglist.h +3 -2
  343. data/ext/pg_query/include/postgres/tcop/deparse_utility.h +2 -2
  344. data/ext/pg_query/include/postgres/tcop/dest.h +3 -2
  345. data/ext/pg_query/include/postgres/tcop/fastpath.h +1 -1
  346. data/ext/pg_query/include/postgres/tcop/pquery.h +1 -1
  347. data/ext/pg_query/include/postgres/tcop/tcopprot.h +9 -5
  348. data/ext/pg_query/include/postgres/tcop/utility.h +2 -2
  349. data/ext/pg_query/include/postgres/tsearch/ts_cache.h +1 -1
  350. data/ext/pg_query/include/postgres/utils/acl.h +19 -7
  351. data/ext/pg_query/include/postgres/utils/aclchk_internal.h +1 -1
  352. data/ext/pg_query/include/postgres/utils/array.h +1 -2
  353. data/ext/pg_query/include/postgres/utils/ascii.h +84 -0
  354. data/ext/pg_query/include/postgres/utils/backend_progress.h +3 -2
  355. data/ext/pg_query/include/postgres/utils/backend_status.h +8 -10
  356. data/ext/pg_query/include/postgres/utils/builtins.h +4 -1
  357. data/ext/pg_query/include/postgres/utils/bytea.h +2 -2
  358. data/ext/pg_query/include/postgres/utils/catcache.h +6 -6
  359. data/ext/pg_query/include/postgres/utils/date.h +1 -1
  360. data/ext/pg_query/include/postgres/utils/datetime.h +4 -1
  361. data/ext/pg_query/include/postgres/utils/datum.h +1 -1
  362. data/ext/pg_query/include/postgres/utils/dsa.h +44 -5
  363. data/ext/pg_query/include/postgres/utils/elog.h +3 -8
  364. data/ext/pg_query/include/postgres/utils/errcodes.h +1 -3
  365. data/ext/pg_query/include/postgres/utils/expandeddatum.h +1 -1
  366. data/ext/pg_query/include/postgres/utils/expandedrecord.h +1 -1
  367. data/ext/pg_query/include/postgres/utils/float.h +1 -1
  368. data/ext/pg_query/include/postgres/utils/fmgroids.h +49 -16
  369. data/ext/pg_query/include/postgres/utils/fmgrprotos.h +47 -14
  370. data/ext/pg_query/include/postgres/utils/fmgrtab.h +1 -1
  371. data/ext/pg_query/include/postgres/utils/guc.h +20 -6
  372. data/ext/pg_query/include/postgres/utils/guc_hooks.h +23 -2
  373. data/ext/pg_query/include/postgres/utils/guc_tables.h +6 -5
  374. data/ext/pg_query/include/postgres/utils/hsearch.h +2 -2
  375. data/ext/pg_query/include/postgres/utils/injection_point.h +44 -0
  376. data/ext/pg_query/include/postgres/utils/inval.h +1 -1
  377. data/ext/pg_query/include/postgres/utils/logtape.h +5 -5
  378. data/ext/pg_query/include/postgres/utils/lsyscache.h +6 -3
  379. data/ext/pg_query/include/postgres/utils/memdebug.h +1 -1
  380. data/ext/pg_query/include/postgres/utils/memutils.h +12 -5
  381. data/ext/pg_query/include/postgres/utils/memutils_internal.h +53 -13
  382. data/ext/pg_query/include/postgres/utils/memutils_memorychunk.h +25 -9
  383. data/ext/pg_query/include/postgres/utils/numeric.h +6 -1
  384. data/ext/pg_query/include/postgres/utils/palloc.h +1 -15
  385. data/ext/pg_query/include/postgres/utils/partcache.h +1 -1
  386. data/ext/pg_query/include/postgres/utils/pg_locale.h +8 -7
  387. data/ext/pg_query/include/postgres/utils/pgstat_internal.h +30 -17
  388. data/ext/pg_query/include/postgres/utils/plancache.h +5 -3
  389. data/ext/pg_query/include/postgres/utils/portal.h +10 -10
  390. data/ext/pg_query/include/postgres/utils/queryenvironment.h +2 -2
  391. data/ext/pg_query/include/postgres/utils/regproc.h +1 -1
  392. data/ext/pg_query/include/postgres/utils/rel.h +14 -15
  393. data/ext/pg_query/include/postgres/utils/relcache.h +2 -5
  394. data/ext/pg_query/include/postgres/utils/reltrigger.h +1 -1
  395. data/ext/pg_query/include/postgres/utils/resowner.h +90 -9
  396. data/ext/pg_query/include/postgres/utils/ruleutils.h +1 -1
  397. data/ext/pg_query/include/postgres/utils/sharedtuplestore.h +1 -1
  398. data/ext/pg_query/include/postgres/utils/snapmgr.h +1 -52
  399. data/ext/pg_query/include/postgres/utils/snapshot.h +2 -2
  400. data/ext/pg_query/include/postgres/utils/sortsupport.h +1 -1
  401. data/ext/pg_query/include/postgres/utils/syscache.h +7 -98
  402. data/ext/pg_query/include/postgres/utils/timeout.h +3 -2
  403. data/ext/pg_query/include/postgres/utils/timestamp.h +1 -1
  404. data/ext/pg_query/include/postgres/utils/tuplesort.h +36 -9
  405. data/ext/pg_query/include/postgres/utils/tuplestore.h +2 -5
  406. data/ext/pg_query/include/postgres/utils/typcache.h +2 -1
  407. data/ext/pg_query/include/postgres/utils/varlena.h +1 -1
  408. data/ext/pg_query/include/postgres/utils/wait_event.h +28 -214
  409. data/ext/pg_query/include/postgres/utils/wait_event_types.h +218 -0
  410. data/ext/pg_query/include/postgres/utils/xml.h +4 -4
  411. data/ext/pg_query/include/postgres/varatt.h +1 -1
  412. data/ext/pg_query/include/protobuf/pg_query.pb-c.h +1546 -792
  413. data/ext/pg_query/include/protobuf/pg_query.pb.h +58365 -46595
  414. data/ext/pg_query/pg_query.pb-c.c +6598 -3739
  415. data/ext/pg_query/pg_query_normalize.c +42 -1
  416. data/ext/pg_query/pg_query_outfuncs_json.c +3 -1
  417. data/ext/pg_query/pg_query_parse_plpgsql.c +12 -13
  418. data/ext/pg_query/pg_query_readfuncs_protobuf.c +2 -2
  419. data/ext/pg_query/pg_query_scan.c +1 -1
  420. data/ext/pg_query/postgres_deparse.c +601 -172
  421. data/ext/pg_query/src_backend_catalog_namespace.c +241 -66
  422. data/ext/pg_query/src_backend_catalog_pg_proc.c +1 -3
  423. data/ext/pg_query/src_backend_commands_define.c +2 -3
  424. data/ext/pg_query/src_backend_nodes_bitmapset.c +137 -94
  425. data/ext/pg_query/src_backend_nodes_copyfuncs.c +1 -1
  426. data/ext/pg_query/src_backend_nodes_equalfuncs.c +1 -1
  427. data/ext/pg_query/src_backend_nodes_extensible.c +1 -1
  428. data/ext/pg_query/src_backend_nodes_list.c +3 -7
  429. data/ext/pg_query/src_backend_nodes_makefuncs.c +59 -20
  430. data/ext/pg_query/src_backend_nodes_nodeFuncs.c +109 -2
  431. data/ext/pg_query/src_backend_nodes_value.c +1 -1
  432. data/ext/pg_query/src_backend_parser_gram.c +34491 -32136
  433. data/ext/pg_query/src_backend_parser_parser.c +8 -8
  434. data/ext/pg_query/src_backend_parser_scan.c +5637 -3028
  435. data/ext/pg_query/src_backend_parser_scansup.c +2 -1
  436. data/ext/pg_query/src_backend_storage_ipc_ipc.c +1 -1
  437. data/ext/pg_query/src_backend_tcop_postgres.c +34 -10
  438. data/ext/pg_query/src_backend_utils_activity_pgstat_database.c +2 -2
  439. data/ext/pg_query/src_backend_utils_adt_datum.c +8 -6
  440. data/ext/pg_query/src_backend_utils_adt_expandeddatum.c +1 -1
  441. data/ext/pg_query/src_backend_utils_adt_format_type.c +1 -1
  442. data/ext/pg_query/src_backend_utils_adt_numutils.c +4 -5
  443. data/ext/pg_query/src_backend_utils_adt_ruleutils.c +101 -28
  444. data/ext/pg_query/src_backend_utils_error_assert.c +1 -1
  445. data/ext/pg_query/src_backend_utils_error_elog.c +47 -42
  446. data/ext/pg_query/src_backend_utils_fmgr_fmgr.c +4 -2
  447. data/ext/pg_query/src_backend_utils_init_globals.c +15 -3
  448. data/ext/pg_query/src_backend_utils_mb_mbutils.c +11 -18
  449. data/ext/pg_query/src_backend_utils_misc_guc_tables.c +16 -6
  450. data/ext/pg_query/src_backend_utils_mmgr_alignedalloc.c +8 -5
  451. data/ext/pg_query/src_backend_utils_mmgr_aset.c +308 -238
  452. data/ext/pg_query/src_backend_utils_mmgr_bump.c +728 -0
  453. data/ext/pg_query/src_backend_utils_mmgr_generation.c +273 -197
  454. data/ext/pg_query/src_backend_utils_mmgr_mcxt.c +270 -215
  455. data/ext/pg_query/src_backend_utils_mmgr_slab.c +154 -96
  456. data/ext/pg_query/src_common_encnames.c +43 -44
  457. data/ext/pg_query/src_common_hashfn.c +1 -1
  458. data/ext/pg_query/src_common_keywords.c +1 -1
  459. data/ext/pg_query/src_common_kwlist_d.h +511 -466
  460. data/ext/pg_query/src_common_kwlookup.c +1 -1
  461. data/ext/pg_query/src_common_psprintf.c +3 -3
  462. data/ext/pg_query/src_common_stringinfo.c +18 -1
  463. data/ext/pg_query/src_common_wchar.c +92 -109
  464. data/ext/pg_query/src_pl_plpgsql_src_pl_comp.c +99 -5
  465. data/ext/pg_query/src_pl_plpgsql_src_pl_funcs.c +1 -1
  466. data/ext/pg_query/src_pl_plpgsql_src_pl_gram.c +242 -143
  467. data/ext/pg_query/src_pl_plpgsql_src_pl_handler.c +1 -1
  468. data/ext/pg_query/src_pl_plpgsql_src_pl_reserved_kwlist_d.h +1 -1
  469. data/ext/pg_query/src_pl_plpgsql_src_pl_scanner.c +19 -1
  470. data/ext/pg_query/src_pl_plpgsql_src_pl_unreserved_kwlist_d.h +1 -1
  471. data/ext/pg_query/src_port_pg_bitutils.c +173 -28
  472. data/ext/pg_query/src_port_pgstrcasecmp.c +29 -1
  473. data/ext/pg_query/src_port_snprintf.c +15 -18
  474. data/ext/pg_query/src_port_strerror.c +1 -3
  475. data/ext/pg_query/src_port_strlcpy.c +1 -1
  476. data/lib/pg_query/fingerprint.rb +3 -5
  477. data/lib/pg_query/param_refs.rb +2 -2
  478. data/lib/pg_query/parse.rb +5 -7
  479. data/lib/pg_query/parse_error.rb +1 -0
  480. data/lib/pg_query/pg_query_pb.rb +27 -25
  481. data/lib/pg_query/scan.rb +1 -0
  482. data/lib/pg_query/treewalker.rb +38 -15
  483. data/lib/pg_query/truncate.rb +18 -20
  484. data/lib/pg_query/version.rb +1 -1
  485. metadata +31 -82
  486. data/ext/pg_query/include/postgres/storage/backendid.h +0 -37
  487. data/ext/pg_query/include/postgres/storage/sinvaladt.h +0 -45
  488. data/ext/pg_query/pg_query_ruby_freebsd.sym +0 -2
  489. data/ext/pg_query/src_backend_nodes_nodes.c +0 -38
  490. /data/ext/pg_query/{pg_query_ruby.sym → ext_symbols.sym} +0 -0
@@ -3,7 +3,7 @@
3
3
  * equalfuncs.funcs.c
4
4
  * Generated node infrastructure code
5
5
  *
6
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
6
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
7
7
  * Portions Copyright (c) 1994, Regents of the University of California
8
8
  *
9
9
  * NOTES
@@ -64,6 +64,7 @@ _equalRangeVar(const RangeVar *a, const RangeVar *b)
64
64
  static bool
65
65
  _equalTableFunc(const TableFunc *a, const TableFunc *b)
66
66
  {
67
+ COMPARE_SCALAR_FIELD(functype);
67
68
  COMPARE_NODE_FIELD(ns_uris);
68
69
  COMPARE_NODE_FIELD(ns_names);
69
70
  COMPARE_NODE_FIELD(docexpr);
@@ -74,7 +75,10 @@ _equalTableFunc(const TableFunc *a, const TableFunc *b)
74
75
  COMPARE_NODE_FIELD(colcollations);
75
76
  COMPARE_NODE_FIELD(colexprs);
76
77
  COMPARE_NODE_FIELD(coldefexprs);
78
+ COMPARE_NODE_FIELD(colvalexprs);
79
+ COMPARE_NODE_FIELD(passingvalexprs);
77
80
  COMPARE_BITMAPSET_FIELD(notnulls);
81
+ COMPARE_NODE_FIELD(plan);
78
82
  COMPARE_SCALAR_FIELD(ordinalitycol);
79
83
  COMPARE_LOCATION_FIELD(location);
80
84
 
@@ -168,6 +172,7 @@ _equalWindowFunc(const WindowFunc *a, const WindowFunc *b)
168
172
  COMPARE_SCALAR_FIELD(inputcollid);
169
173
  COMPARE_NODE_FIELD(args);
170
174
  COMPARE_NODE_FIELD(aggfilter);
175
+ COMPARE_NODE_FIELD(runCondition);
171
176
  COMPARE_SCALAR_FIELD(winref);
172
177
  COMPARE_SCALAR_FIELD(winstar);
173
178
  COMPARE_SCALAR_FIELD(winagg);
@@ -176,6 +181,27 @@ _equalWindowFunc(const WindowFunc *a, const WindowFunc *b)
176
181
  return true;
177
182
  }
178
183
 
184
+ static bool
185
+ _equalWindowFuncRunCondition(const WindowFuncRunCondition *a, const WindowFuncRunCondition *b)
186
+ {
187
+ COMPARE_SCALAR_FIELD(opno);
188
+ COMPARE_SCALAR_FIELD(inputcollid);
189
+ COMPARE_SCALAR_FIELD(wfunc_left);
190
+ COMPARE_NODE_FIELD(arg);
191
+
192
+ return true;
193
+ }
194
+
195
+ static bool
196
+ _equalMergeSupportFunc(const MergeSupportFunc *a, const MergeSupportFunc *b)
197
+ {
198
+ COMPARE_SCALAR_FIELD(msftype);
199
+ COMPARE_SCALAR_FIELD(msfcollid);
200
+ COMPARE_LOCATION_FIELD(location);
201
+
202
+ return true;
203
+ }
204
+
179
205
  static bool
180
206
  _equalSubscriptingRef(const SubscriptingRef *a, const SubscriptingRef *b)
181
207
  {
@@ -596,6 +622,70 @@ _equalJsonIsPredicate(const JsonIsPredicate *a, const JsonIsPredicate *b)
596
622
  return true;
597
623
  }
598
624
 
625
+ static bool
626
+ _equalJsonBehavior(const JsonBehavior *a, const JsonBehavior *b)
627
+ {
628
+ COMPARE_SCALAR_FIELD(btype);
629
+ COMPARE_NODE_FIELD(expr);
630
+ COMPARE_SCALAR_FIELD(coerce);
631
+ COMPARE_LOCATION_FIELD(location);
632
+
633
+ return true;
634
+ }
635
+
636
+ static bool
637
+ _equalJsonExpr(const JsonExpr *a, const JsonExpr *b)
638
+ {
639
+ COMPARE_SCALAR_FIELD(op);
640
+ COMPARE_STRING_FIELD(column_name);
641
+ COMPARE_NODE_FIELD(formatted_expr);
642
+ COMPARE_NODE_FIELD(format);
643
+ COMPARE_NODE_FIELD(path_spec);
644
+ COMPARE_NODE_FIELD(returning);
645
+ COMPARE_NODE_FIELD(passing_names);
646
+ COMPARE_NODE_FIELD(passing_values);
647
+ COMPARE_NODE_FIELD(on_empty);
648
+ COMPARE_NODE_FIELD(on_error);
649
+ COMPARE_SCALAR_FIELD(use_io_coercion);
650
+ COMPARE_SCALAR_FIELD(use_json_coercion);
651
+ COMPARE_SCALAR_FIELD(wrapper);
652
+ COMPARE_SCALAR_FIELD(omit_quotes);
653
+ COMPARE_SCALAR_FIELD(collation);
654
+ COMPARE_LOCATION_FIELD(location);
655
+
656
+ return true;
657
+ }
658
+
659
+ static bool
660
+ _equalJsonTablePath(const JsonTablePath *a, const JsonTablePath *b)
661
+ {
662
+ COMPARE_NODE_FIELD(value);
663
+ COMPARE_STRING_FIELD(name);
664
+
665
+ return true;
666
+ }
667
+
668
+ static bool
669
+ _equalJsonTablePathScan(const JsonTablePathScan *a, const JsonTablePathScan *b)
670
+ {
671
+ COMPARE_NODE_FIELD(path);
672
+ COMPARE_SCALAR_FIELD(errorOnError);
673
+ COMPARE_NODE_FIELD(child);
674
+ COMPARE_SCALAR_FIELD(colMin);
675
+ COMPARE_SCALAR_FIELD(colMax);
676
+
677
+ return true;
678
+ }
679
+
680
+ static bool
681
+ _equalJsonTableSiblingJoin(const JsonTableSiblingJoin *a, const JsonTableSiblingJoin *b)
682
+ {
683
+ COMPARE_NODE_FIELD(lplan);
684
+ COMPARE_NODE_FIELD(rplan);
685
+
686
+ return true;
687
+ }
688
+
599
689
  static bool
600
690
  _equalNullTest(const NullTest *a, const NullTest *b)
601
691
  {
@@ -617,6 +707,19 @@ _equalBooleanTest(const BooleanTest *a, const BooleanTest *b)
617
707
  return true;
618
708
  }
619
709
 
710
+ static bool
711
+ _equalMergeAction(const MergeAction *a, const MergeAction *b)
712
+ {
713
+ COMPARE_SCALAR_FIELD(matchKind);
714
+ COMPARE_SCALAR_FIELD(commandType);
715
+ COMPARE_SCALAR_FIELD(override);
716
+ COMPARE_NODE_FIELD(qual);
717
+ COMPARE_NODE_FIELD(targetList);
718
+ COMPARE_NODE_FIELD(updateColnos);
719
+
720
+ return true;
721
+ }
722
+
620
723
  static bool
621
724
  _equalCoerceToDomain(const CoerceToDomain *a, const CoerceToDomain *b)
622
725
  {
@@ -765,7 +868,8 @@ _equalQuery(const Query *a, const Query *b)
765
868
  COMPARE_NODE_FIELD(rteperminfos);
766
869
  COMPARE_NODE_FIELD(jointree);
767
870
  COMPARE_NODE_FIELD(mergeActionList);
768
- COMPARE_SCALAR_FIELD(mergeUseOuterJoin);
871
+ COMPARE_SCALAR_FIELD(mergeTargetRelation);
872
+ COMPARE_NODE_FIELD(mergeJoinCondition);
769
873
  COMPARE_NODE_FIELD(targetList);
770
874
  COMPARE_SCALAR_FIELD(override);
771
875
  COMPARE_NODE_FIELD(onConflict);
@@ -785,7 +889,7 @@ _equalQuery(const Query *a, const Query *b)
785
889
  COMPARE_NODE_FIELD(constraintDeps);
786
890
  COMPARE_NODE_FIELD(withCheckOptions);
787
891
  COMPARE_LOCATION_FIELD(stmt_location);
788
- COMPARE_SCALAR_FIELD(stmt_len);
892
+ COMPARE_LOCATION_FIELD(stmt_len);
789
893
 
790
894
  return true;
791
895
  }
@@ -1160,6 +1264,13 @@ _equalPartitionRangeDatum(const PartitionRangeDatum *a, const PartitionRangeDatu
1160
1264
  return true;
1161
1265
  }
1162
1266
 
1267
+ static bool
1268
+ _equalSinglePartitionSpec(const SinglePartitionSpec *a, const SinglePartitionSpec *b)
1269
+ {
1270
+
1271
+ return true;
1272
+ }
1273
+
1163
1274
  static bool
1164
1275
  _equalPartitionCmd(const PartitionCmd *a, const PartitionCmd *b)
1165
1276
  {
@@ -1173,12 +1284,15 @@ _equalPartitionCmd(const PartitionCmd *a, const PartitionCmd *b)
1173
1284
  static bool
1174
1285
  _equalRangeTblEntry(const RangeTblEntry *a, const RangeTblEntry *b)
1175
1286
  {
1287
+ COMPARE_NODE_FIELD(alias);
1288
+ COMPARE_NODE_FIELD(eref);
1176
1289
  COMPARE_SCALAR_FIELD(rtekind);
1177
1290
  COMPARE_SCALAR_FIELD(relid);
1291
+ COMPARE_SCALAR_FIELD(inh);
1178
1292
  COMPARE_SCALAR_FIELD(relkind);
1179
1293
  COMPARE_SCALAR_FIELD(rellockmode);
1180
- COMPARE_NODE_FIELD(tablesample);
1181
1294
  COMPARE_SCALAR_FIELD(perminfoindex);
1295
+ COMPARE_NODE_FIELD(tablesample);
1182
1296
  COMPARE_NODE_FIELD(subquery);
1183
1297
  COMPARE_SCALAR_FIELD(security_barrier);
1184
1298
  COMPARE_SCALAR_FIELD(jointype);
@@ -1199,10 +1313,7 @@ _equalRangeTblEntry(const RangeTblEntry *a, const RangeTblEntry *b)
1199
1313
  COMPARE_NODE_FIELD(colcollations);
1200
1314
  COMPARE_STRING_FIELD(enrname);
1201
1315
  COMPARE_SCALAR_FIELD(enrtuples);
1202
- COMPARE_NODE_FIELD(alias);
1203
- COMPARE_NODE_FIELD(eref);
1204
1316
  COMPARE_SCALAR_FIELD(lateral);
1205
- COMPARE_SCALAR_FIELD(inh);
1206
1317
  COMPARE_SCALAR_FIELD(inFromCl);
1207
1318
  COMPARE_NODE_FIELD(securityQuals);
1208
1319
 
@@ -1291,7 +1402,6 @@ _equalWindowClause(const WindowClause *a, const WindowClause *b)
1291
1402
  COMPARE_SCALAR_FIELD(frameOptions);
1292
1403
  COMPARE_NODE_FIELD(startOffset);
1293
1404
  COMPARE_NODE_FIELD(endOffset);
1294
- COMPARE_NODE_FIELD(runCondition);
1295
1405
  COMPARE_SCALAR_FIELD(startInRangeFunc);
1296
1406
  COMPARE_SCALAR_FIELD(endInRangeFunc);
1297
1407
  COMPARE_SCALAR_FIELD(inRangeColl);
@@ -1398,7 +1508,7 @@ _equalCommonTableExpr(const CommonTableExpr *a, const CommonTableExpr *b)
1398
1508
  static bool
1399
1509
  _equalMergeWhenClause(const MergeWhenClause *a, const MergeWhenClause *b)
1400
1510
  {
1401
- COMPARE_SCALAR_FIELD(matched);
1511
+ COMPARE_SCALAR_FIELD(matchKind);
1402
1512
  COMPARE_SCALAR_FIELD(commandType);
1403
1513
  COMPARE_SCALAR_FIELD(override);
1404
1514
  COMPARE_NODE_FIELD(condition);
@@ -1409,33 +1519,91 @@ _equalMergeWhenClause(const MergeWhenClause *a, const MergeWhenClause *b)
1409
1519
  }
1410
1520
 
1411
1521
  static bool
1412
- _equalMergeAction(const MergeAction *a, const MergeAction *b)
1522
+ _equalTriggerTransition(const TriggerTransition *a, const TriggerTransition *b)
1413
1523
  {
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);
1524
+ COMPARE_STRING_FIELD(name);
1525
+ COMPARE_SCALAR_FIELD(isNew);
1526
+ COMPARE_SCALAR_FIELD(isTable);
1420
1527
 
1421
1528
  return true;
1422
1529
  }
1423
1530
 
1424
1531
  static bool
1425
- _equalTriggerTransition(const TriggerTransition *a, const TriggerTransition *b)
1532
+ _equalJsonOutput(const JsonOutput *a, const JsonOutput *b)
1533
+ {
1534
+ COMPARE_NODE_FIELD(typeName);
1535
+ COMPARE_NODE_FIELD(returning);
1536
+
1537
+ return true;
1538
+ }
1539
+
1540
+ static bool
1541
+ _equalJsonArgument(const JsonArgument *a, const JsonArgument *b)
1426
1542
  {
1543
+ COMPARE_NODE_FIELD(val);
1427
1544
  COMPARE_STRING_FIELD(name);
1428
- COMPARE_SCALAR_FIELD(isNew);
1429
- COMPARE_SCALAR_FIELD(isTable);
1430
1545
 
1431
1546
  return true;
1432
1547
  }
1433
1548
 
1434
1549
  static bool
1435
- _equalJsonOutput(const JsonOutput *a, const JsonOutput *b)
1550
+ _equalJsonFuncExpr(const JsonFuncExpr *a, const JsonFuncExpr *b)
1551
+ {
1552
+ COMPARE_SCALAR_FIELD(op);
1553
+ COMPARE_STRING_FIELD(column_name);
1554
+ COMPARE_NODE_FIELD(context_item);
1555
+ COMPARE_NODE_FIELD(pathspec);
1556
+ COMPARE_NODE_FIELD(passing);
1557
+ COMPARE_NODE_FIELD(output);
1558
+ COMPARE_NODE_FIELD(on_empty);
1559
+ COMPARE_NODE_FIELD(on_error);
1560
+ COMPARE_SCALAR_FIELD(wrapper);
1561
+ COMPARE_SCALAR_FIELD(quotes);
1562
+ COMPARE_LOCATION_FIELD(location);
1563
+
1564
+ return true;
1565
+ }
1566
+
1567
+ static bool
1568
+ _equalJsonTablePathSpec(const JsonTablePathSpec *a, const JsonTablePathSpec *b)
1569
+ {
1570
+ COMPARE_NODE_FIELD(string);
1571
+ COMPARE_STRING_FIELD(name);
1572
+ COMPARE_LOCATION_FIELD(name_location);
1573
+ COMPARE_LOCATION_FIELD(location);
1574
+
1575
+ return true;
1576
+ }
1577
+
1578
+ static bool
1579
+ _equalJsonTable(const JsonTable *a, const JsonTable *b)
1436
1580
  {
1581
+ COMPARE_NODE_FIELD(context_item);
1582
+ COMPARE_NODE_FIELD(pathspec);
1583
+ COMPARE_NODE_FIELD(passing);
1584
+ COMPARE_NODE_FIELD(columns);
1585
+ COMPARE_NODE_FIELD(on_error);
1586
+ COMPARE_NODE_FIELD(alias);
1587
+ COMPARE_SCALAR_FIELD(lateral);
1588
+ COMPARE_LOCATION_FIELD(location);
1589
+
1590
+ return true;
1591
+ }
1592
+
1593
+ static bool
1594
+ _equalJsonTableColumn(const JsonTableColumn *a, const JsonTableColumn *b)
1595
+ {
1596
+ COMPARE_SCALAR_FIELD(coltype);
1597
+ COMPARE_STRING_FIELD(name);
1437
1598
  COMPARE_NODE_FIELD(typeName);
1438
- COMPARE_NODE_FIELD(returning);
1599
+ COMPARE_NODE_FIELD(pathspec);
1600
+ COMPARE_NODE_FIELD(format);
1601
+ COMPARE_SCALAR_FIELD(wrapper);
1602
+ COMPARE_SCALAR_FIELD(quotes);
1603
+ COMPARE_NODE_FIELD(columns);
1604
+ COMPARE_NODE_FIELD(on_empty);
1605
+ COMPARE_NODE_FIELD(on_error);
1606
+ COMPARE_LOCATION_FIELD(location);
1439
1607
 
1440
1608
  return true;
1441
1609
  }
@@ -1449,6 +1617,37 @@ _equalJsonKeyValue(const JsonKeyValue *a, const JsonKeyValue *b)
1449
1617
  return true;
1450
1618
  }
1451
1619
 
1620
+ static bool
1621
+ _equalJsonParseExpr(const JsonParseExpr *a, const JsonParseExpr *b)
1622
+ {
1623
+ COMPARE_NODE_FIELD(expr);
1624
+ COMPARE_NODE_FIELD(output);
1625
+ COMPARE_SCALAR_FIELD(unique_keys);
1626
+ COMPARE_LOCATION_FIELD(location);
1627
+
1628
+ return true;
1629
+ }
1630
+
1631
+ static bool
1632
+ _equalJsonScalarExpr(const JsonScalarExpr *a, const JsonScalarExpr *b)
1633
+ {
1634
+ COMPARE_NODE_FIELD(expr);
1635
+ COMPARE_NODE_FIELD(output);
1636
+ COMPARE_LOCATION_FIELD(location);
1637
+
1638
+ return true;
1639
+ }
1640
+
1641
+ static bool
1642
+ _equalJsonSerializeExpr(const JsonSerializeExpr *a, const JsonSerializeExpr *b)
1643
+ {
1644
+ COMPARE_NODE_FIELD(expr);
1645
+ COMPARE_NODE_FIELD(output);
1646
+ COMPARE_LOCATION_FIELD(location);
1647
+
1648
+ return true;
1649
+ }
1650
+
1452
1651
  static bool
1453
1652
  _equalJsonObjectConstructor(const JsonObjectConstructor *a, const JsonObjectConstructor *b)
1454
1653
  {
@@ -1522,7 +1721,7 @@ _equalRawStmt(const RawStmt *a, const RawStmt *b)
1522
1721
  {
1523
1722
  COMPARE_NODE_FIELD(stmt);
1524
1723
  COMPARE_LOCATION_FIELD(stmt_location);
1525
- COMPARE_SCALAR_FIELD(stmt_len);
1724
+ COMPARE_LOCATION_FIELD(stmt_len);
1526
1725
 
1527
1726
  return true;
1528
1727
  }
@@ -1573,6 +1772,7 @@ _equalMergeStmt(const MergeStmt *a, const MergeStmt *b)
1573
1772
  COMPARE_NODE_FIELD(sourceRelation);
1574
1773
  COMPARE_NODE_FIELD(joinCondition);
1575
1774
  COMPARE_NODE_FIELD(mergeWhenClauses);
1775
+ COMPARE_NODE_FIELD(returningList);
1576
1776
  COMPARE_NODE_FIELD(withClause);
1577
1777
 
1578
1778
  return true;
@@ -1825,11 +2025,13 @@ _equalConstraint(const Constraint *a, const Constraint *b)
1825
2025
  COMPARE_STRING_FIELD(conname);
1826
2026
  COMPARE_SCALAR_FIELD(deferrable);
1827
2027
  COMPARE_SCALAR_FIELD(initdeferred);
1828
- COMPARE_LOCATION_FIELD(location);
2028
+ COMPARE_SCALAR_FIELD(skip_validation);
2029
+ COMPARE_SCALAR_FIELD(initially_valid);
1829
2030
  COMPARE_SCALAR_FIELD(is_no_inherit);
1830
2031
  COMPARE_NODE_FIELD(raw_expr);
1831
2032
  COMPARE_STRING_FIELD(cooked_expr);
1832
2033
  COMPARE_SCALAR_FIELD(generated_when);
2034
+ COMPARE_SCALAR_FIELD(inhcount);
1833
2035
  COMPARE_SCALAR_FIELD(nulls_not_distinct);
1834
2036
  COMPARE_NODE_FIELD(keys);
1835
2037
  COMPARE_NODE_FIELD(including);
@@ -1849,8 +2051,7 @@ _equalConstraint(const Constraint *a, const Constraint *b)
1849
2051
  COMPARE_NODE_FIELD(fk_del_set_cols);
1850
2052
  COMPARE_NODE_FIELD(old_conpfeqop);
1851
2053
  COMPARE_SCALAR_FIELD(old_pktable_oid);
1852
- COMPARE_SCALAR_FIELD(skip_validation);
1853
- COMPARE_SCALAR_FIELD(initially_valid);
2054
+ COMPARE_LOCATION_FIELD(location);
1854
2055
 
1855
2056
  return true;
1856
2057
  }
@@ -2390,7 +2591,7 @@ static bool
2390
2591
  _equalAlterStatsStmt(const AlterStatsStmt *a, const AlterStatsStmt *b)
2391
2592
  {
2392
2593
  COMPARE_NODE_FIELD(defnames);
2393
- COMPARE_SCALAR_FIELD(stxstattarget);
2594
+ COMPARE_NODE_FIELD(stxstattarget);
2394
2595
  COMPARE_SCALAR_FIELD(missing_ok);
2395
2596
 
2396
2597
  return true;
@@ -2564,6 +2765,7 @@ _equalTransactionStmt(const TransactionStmt *a, const TransactionStmt *b)
2564
2765
  COMPARE_STRING_FIELD(savepoint_name);
2565
2766
  COMPARE_STRING_FIELD(gid);
2566
2767
  COMPARE_SCALAR_FIELD(chain);
2768
+ COMPARE_LOCATION_FIELD(location);
2567
2769
 
2568
2770
  return true;
2569
2771
  }
@@ -2847,6 +3049,8 @@ static bool
2847
3049
  _equalDeallocateStmt(const DeallocateStmt *a, const DeallocateStmt *b)
2848
3050
  {
2849
3051
  COMPARE_STRING_FIELD(name);
3052
+ COMPARE_SCALAR_FIELD(isall);
3053
+ COMPARE_LOCATION_FIELD(location);
2850
3054
 
2851
3055
  return true;
2852
3056
  }
@@ -2980,6 +3184,15 @@ _equalPathKey(const PathKey *a, const PathKey *b)
2980
3184
  return true;
2981
3185
  }
2982
3186
 
3187
+ static bool
3188
+ _equalGroupByOrdering(const GroupByOrdering *a, const GroupByOrdering *b)
3189
+ {
3190
+ COMPARE_NODE_FIELD(pathkeys);
3191
+ COMPARE_NODE_FIELD(clauses);
3192
+
3193
+ return true;
3194
+ }
3195
+
2983
3196
  static bool
2984
3197
  _equalRestrictInfo(const RestrictInfo *a, const RestrictInfo *b)
2985
3198
  {
@@ -3,7 +3,7 @@
3
3
  * equalfuncs.switch.c
4
4
  * Generated node infrastructure code
5
5
  *
6
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
6
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
7
7
  * Portions Copyright (c) 1994, Regents of the University of California
8
8
  *
9
9
  * NOTES
@@ -45,6 +45,12 @@
45
45
  case T_WindowFunc:
46
46
  retval = _equalWindowFunc(a, b);
47
47
  break;
48
+ case T_WindowFuncRunCondition:
49
+ retval = _equalWindowFuncRunCondition(a, b);
50
+ break;
51
+ case T_MergeSupportFunc:
52
+ retval = _equalMergeSupportFunc(a, b);
53
+ break;
48
54
  case T_SubscriptingRef:
49
55
  retval = _equalSubscriptingRef(a, b);
50
56
  break;
@@ -144,12 +150,30 @@
144
150
  case T_JsonIsPredicate:
145
151
  retval = _equalJsonIsPredicate(a, b);
146
152
  break;
153
+ case T_JsonBehavior:
154
+ retval = _equalJsonBehavior(a, b);
155
+ break;
156
+ case T_JsonExpr:
157
+ retval = _equalJsonExpr(a, b);
158
+ break;
159
+ case T_JsonTablePath:
160
+ retval = _equalJsonTablePath(a, b);
161
+ break;
162
+ case T_JsonTablePathScan:
163
+ retval = _equalJsonTablePathScan(a, b);
164
+ break;
165
+ case T_JsonTableSiblingJoin:
166
+ retval = _equalJsonTableSiblingJoin(a, b);
167
+ break;
147
168
  case T_NullTest:
148
169
  retval = _equalNullTest(a, b);
149
170
  break;
150
171
  case T_BooleanTest:
151
172
  retval = _equalBooleanTest(a, b);
152
173
  break;
174
+ case T_MergeAction:
175
+ retval = _equalMergeAction(a, b);
176
+ break;
153
177
  case T_CoerceToDomain:
154
178
  retval = _equalCoerceToDomain(a, b);
155
179
  break;
@@ -282,6 +306,9 @@
282
306
  case T_PartitionRangeDatum:
283
307
  retval = _equalPartitionRangeDatum(a, b);
284
308
  break;
309
+ case T_SinglePartitionSpec:
310
+ retval = _equalSinglePartitionSpec(a, b);
311
+ break;
285
312
  case T_PartitionCmd:
286
313
  retval = _equalPartitionCmd(a, b);
287
314
  break;
@@ -333,18 +360,39 @@
333
360
  case T_MergeWhenClause:
334
361
  retval = _equalMergeWhenClause(a, b);
335
362
  break;
336
- case T_MergeAction:
337
- retval = _equalMergeAction(a, b);
338
- break;
339
363
  case T_TriggerTransition:
340
364
  retval = _equalTriggerTransition(a, b);
341
365
  break;
342
366
  case T_JsonOutput:
343
367
  retval = _equalJsonOutput(a, b);
344
368
  break;
369
+ case T_JsonArgument:
370
+ retval = _equalJsonArgument(a, b);
371
+ break;
372
+ case T_JsonFuncExpr:
373
+ retval = _equalJsonFuncExpr(a, b);
374
+ break;
375
+ case T_JsonTablePathSpec:
376
+ retval = _equalJsonTablePathSpec(a, b);
377
+ break;
378
+ case T_JsonTable:
379
+ retval = _equalJsonTable(a, b);
380
+ break;
381
+ case T_JsonTableColumn:
382
+ retval = _equalJsonTableColumn(a, b);
383
+ break;
345
384
  case T_JsonKeyValue:
346
385
  retval = _equalJsonKeyValue(a, b);
347
386
  break;
387
+ case T_JsonParseExpr:
388
+ retval = _equalJsonParseExpr(a, b);
389
+ break;
390
+ case T_JsonScalarExpr:
391
+ retval = _equalJsonScalarExpr(a, b);
392
+ break;
393
+ case T_JsonSerializeExpr:
394
+ retval = _equalJsonSerializeExpr(a, b);
395
+ break;
348
396
  case T_JsonObjectConstructor:
349
397
  retval = _equalJsonObjectConstructor(a, b);
350
398
  break;
@@ -747,6 +795,9 @@
747
795
  case T_PathKey:
748
796
  retval = _equalPathKey(a, b);
749
797
  break;
798
+ case T_GroupByOrdering:
799
+ retval = _equalGroupByOrdering(a, b);
800
+ break;
750
801
  case T_RestrictInfo:
751
802
  retval = _equalRestrictInfo(a, b);
752
803
  break;
@@ -5,7 +5,7 @@
5
5
  * and related modules.
6
6
  *
7
7
  *
8
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
8
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
9
9
  * Portions Copyright (c) 1994, Regents of the University of California
10
10
  *
11
11
  * src/include/executor/execdesc.h
@@ -48,7 +48,7 @@ typedef struct QueryDesc
48
48
  EState *estate; /* executor's query-wide state */
49
49
  PlanState *planstate; /* tree of per-plan-node state */
50
50
 
51
- /* This field is set by ExecutorRun */
51
+ /* This field is set by ExecutePlan */
52
52
  bool already_executed; /* true if previously executed */
53
53
 
54
54
  /* This is always set NULL by the core system, but plugins can change it */
@@ -4,7 +4,7 @@
4
4
  * support for the POSTGRES executor module
5
5
  *
6
6
  *
7
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
7
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8
8
  * Portions Copyright (c) 1994, Regents of the University of California
9
9
  *
10
10
  * src/include/executor/executor.h
@@ -210,7 +210,8 @@ extern void standard_ExecutorEnd(QueryDesc *queryDesc);
210
210
  extern void ExecutorRewind(QueryDesc *queryDesc);
211
211
  extern bool ExecCheckPermissions(List *rangeTable,
212
212
  List *rteperminfos, bool ereport_on_violation);
213
- extern void CheckValidResultRel(ResultRelInfo *resultRelInfo, CmdType operation);
213
+ extern void CheckValidResultRel(ResultRelInfo *resultRelInfo, CmdType operation,
214
+ List *mergeActions);
214
215
  extern void InitResultRelInfo(ResultRelInfo *resultRelInfo,
215
216
  Relation resultRelationDesc,
216
217
  Index resultRelationIndex,
@@ -509,7 +510,7 @@ typedef struct TupOutputState
509
510
  extern TupOutputState *begin_tup_output_tupdesc(DestReceiver *dest,
510
511
  TupleDesc tupdesc,
511
512
  const TupleTableSlotOps *tts_ops);
512
- extern void do_tup_output(TupOutputState *tstate, Datum *values, bool *isnull);
513
+ extern void do_tup_output(TupOutputState *tstate, const Datum *values, const bool *isnull);
513
514
  extern void do_text_output_multiline(TupOutputState *tstate, const char *txt);
514
515
  extern void end_tup_output(TupOutputState *tstate);
515
516
 
@@ -569,7 +570,6 @@ extern void ExecAssignProjectionInfo(PlanState *planstate,
569
570
  TupleDesc inputDesc);
570
571
  extern void ExecConditionalAssignProjectionInfo(PlanState *planstate,
571
572
  TupleDesc inputDesc, int varno);
572
- extern void ExecFreeExprContext(PlanState *planstate);
573
573
  extern void ExecAssignScanType(ScanState *scanstate, TupleDesc tupDesc);
574
574
  extern void ExecCreateScanSlotFromOuterPlan(EState *estate,
575
575
  ScanState *scanstate,
@@ -640,12 +640,13 @@ extern bool ExecCheckIndexConstraints(ResultRelInfo *resultRelInfo,
640
640
  extern void check_exclusion_constraint(Relation heap, Relation index,
641
641
  IndexInfo *indexInfo,
642
642
  ItemPointer tupleid,
643
- Datum *values, bool *isnull,
643
+ const Datum *values, const bool *isnull,
644
644
  EState *estate, bool newIndex);
645
645
 
646
646
  /*
647
647
  * prototypes from functions in execReplication.c
648
648
  */
649
+ extern StrategyNumber get_equal_strategy_number_for_am(Oid am);
649
650
  extern bool RelationFindReplTupleByIndex(Relation rel, Oid idxoid,
650
651
  LockTupleMode lockmode,
651
652
  TupleTableSlot *searchslot,
@@ -4,7 +4,7 @@
4
4
  * Declarations for execution of SQL-language functions.
5
5
  *
6
6
  *
7
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
7
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8
8
  * Portions Copyright (c) 1994, Regents of the University of California
9
9
  *
10
10
  * src/include/executor/functions.h
@@ -47,6 +47,7 @@ extern void check_sql_fn_statements(List *queryTreeLists);
47
47
 
48
48
  extern bool check_sql_fn_retval(List *queryTreeLists,
49
49
  Oid rettype, TupleDesc rettupdesc,
50
+ char prokind,
50
51
  bool insertDroppedCols,
51
52
  List **resultTargetList);
52
53
 
@@ -4,7 +4,7 @@
4
4
  * definitions for run-time statistics collection
5
5
  *
6
6
  *
7
- * Copyright (c) 2001-2023, PostgreSQL Global Development Group
7
+ * Copyright (c) 2001-2024, PostgreSQL Global Development Group
8
8
  *
9
9
  * src/include/executor/instrument.h
10
10
  *
@@ -33,8 +33,10 @@ typedef struct BufferUsage
33
33
  int64 local_blks_written; /* # of local disk blocks written */
34
34
  int64 temp_blks_read; /* # of temp blocks read */
35
35
  int64 temp_blks_written; /* # of temp blocks written */
36
- instr_time blk_read_time; /* time spent reading blocks */
37
- instr_time blk_write_time; /* time spent writing blocks */
36
+ instr_time shared_blk_read_time; /* time spent reading shared blocks */
37
+ instr_time shared_blk_write_time; /* time spent writing shared blocks */
38
+ instr_time local_blk_read_time; /* time spent reading local blocks */
39
+ instr_time local_blk_write_time; /* time spent writing local blocks */
38
40
  instr_time temp_blk_read_time; /* time spent reading temp blocks */
39
41
  instr_time temp_blk_write_time; /* time spent writing temp blocks */
40
42
  } BufferUsage;
@@ -3,7 +3,7 @@
3
3
  * spi.h
4
4
  * Server Programming Interface public declarations
5
5
  *
6
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
6
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
7
7
  * Portions Copyright (c) 1994, Regents of the University of California
8
8
  *
9
9
  * src/include/executor/spi.h
@@ -97,16 +97,10 @@ typedef struct _SPI_plan *SPIPlanPtr;
97
97
  #define SPI_OK_REL_UNREGISTER 16
98
98
  #define SPI_OK_TD_REGISTER 17
99
99
  #define SPI_OK_MERGE 18
100
+ #define SPI_OK_MERGE_RETURNING 19
100
101
 
101
102
  #define SPI_OPT_NONATOMIC (1 << 0)
102
103
 
103
- /* These used to be functions, now just no-ops for backwards compatibility */
104
- #define SPI_push() ((void) 0)
105
- #define SPI_pop() ((void) 0)
106
- #define SPI_push_conditional() false
107
- #define SPI_pop_conditional(pushed) ((void) 0)
108
- #define SPI_restore_connection() ((void) 0)
109
-
110
104
  extern PGDLLIMPORT uint64 SPI_processed;
111
105
  extern PGDLLIMPORT SPITupleTable *SPI_tuptable;
112
106
  extern PGDLLIMPORT int SPI_result;