pg_query 5.1.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (479) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/README.md +1 -1
  4. data/Rakefile +2 -2
  5. data/ext/pg_query/include/pg_query.h +4 -3
  6. data/ext/pg_query/include/pg_query_enum_defs.c +424 -154
  7. data/ext/pg_query/include/pg_query_fingerprint_conds.c +68 -4
  8. data/ext/pg_query/include/pg_query_fingerprint_defs.c +2952 -1845
  9. data/ext/pg_query/include/pg_query_outfuncs_conds.c +51 -3
  10. data/ext/pg_query/include/pg_query_outfuncs_defs.c +210 -23
  11. data/ext/pg_query/include/pg_query_readfuncs_conds.c +17 -1
  12. data/ext/pg_query/include/pg_query_readfuncs_defs.c +271 -52
  13. data/ext/pg_query/include/postgres/access/amapi.h +10 -3
  14. data/ext/pg_query/include/postgres/access/attmap.h +1 -1
  15. data/ext/pg_query/include/postgres/access/attnum.h +1 -1
  16. data/ext/pg_query/include/postgres/access/brin_internal.h +116 -0
  17. data/ext/pg_query/include/postgres/access/brin_tuple.h +112 -0
  18. data/ext/pg_query/include/postgres/access/clog.h +2 -3
  19. data/ext/pg_query/include/postgres/access/commit_ts.h +2 -3
  20. data/ext/pg_query/include/postgres/access/detoast.h +1 -1
  21. data/ext/pg_query/include/postgres/access/genam.h +8 -4
  22. data/ext/pg_query/include/postgres/access/gin.h +1 -1
  23. data/ext/pg_query/include/postgres/access/htup.h +1 -1
  24. data/ext/pg_query/include/postgres/access/htup_details.h +11 -11
  25. data/ext/pg_query/include/postgres/access/itup.h +3 -3
  26. data/ext/pg_query/include/postgres/access/parallel.h +1 -2
  27. data/ext/pg_query/include/postgres/access/printtup.h +1 -1
  28. data/ext/pg_query/include/postgres/access/relation.h +1 -1
  29. data/ext/pg_query/include/postgres/access/relscan.h +1 -1
  30. data/ext/pg_query/include/postgres/access/rmgrlist.h +1 -1
  31. data/ext/pg_query/include/postgres/access/sdir.h +1 -1
  32. data/ext/pg_query/include/postgres/access/skey.h +1 -1
  33. data/ext/pg_query/include/postgres/access/slru.h +221 -0
  34. data/ext/pg_query/include/postgres/access/stratnum.h +1 -1
  35. data/ext/pg_query/include/postgres/access/sysattr.h +1 -1
  36. data/ext/pg_query/include/postgres/access/table.h +1 -1
  37. data/ext/pg_query/include/postgres/access/tableam.h +33 -24
  38. data/ext/pg_query/include/postgres/access/tidstore.h +50 -0
  39. data/ext/pg_query/include/postgres/access/toast_compression.h +2 -2
  40. data/ext/pg_query/include/postgres/access/transam.h +7 -7
  41. data/ext/pg_query/include/postgres/access/tsmapi.h +1 -1
  42. data/ext/pg_query/include/postgres/access/tupconvert.h +1 -1
  43. data/ext/pg_query/include/postgres/access/tupdesc.h +5 -5
  44. data/ext/pg_query/include/postgres/access/tupmacs.h +1 -1
  45. data/ext/pg_query/include/postgres/access/twophase.h +2 -2
  46. data/ext/pg_query/include/postgres/access/xact.h +5 -5
  47. data/ext/pg_query/include/postgres/access/xlog.h +20 -12
  48. data/ext/pg_query/include/postgres/access/xlog_internal.h +4 -3
  49. data/ext/pg_query/include/postgres/access/xlogbackup.h +3 -1
  50. data/ext/pg_query/include/postgres/access/xlogdefs.h +5 -5
  51. data/ext/pg_query/include/postgres/access/xlogprefetcher.h +2 -2
  52. data/ext/pg_query/include/postgres/access/xlogreader.h +2 -2
  53. data/ext/pg_query/include/postgres/access/xlogrecord.h +3 -3
  54. data/ext/pg_query/include/postgres/access/xlogrecovery.h +4 -4
  55. data/ext/pg_query/include/postgres/archive/archive_module.h +9 -1
  56. data/ext/pg_query/include/postgres/c.h +31 -36
  57. data/ext/pg_query/include/postgres/catalog/catalog.h +3 -1
  58. data/ext/pg_query/include/postgres/catalog/catversion.h +2 -2
  59. data/ext/pg_query/include/postgres/catalog/dependency.h +17 -59
  60. data/ext/pg_query/include/postgres/catalog/genbki.h +12 -6
  61. data/ext/pg_query/include/postgres/catalog/index.h +22 -18
  62. data/ext/pg_query/include/postgres/catalog/indexing.h +1 -1
  63. data/ext/pg_query/include/postgres/catalog/namespace.h +18 -19
  64. data/ext/pg_query/include/postgres/catalog/objectaccess.h +2 -2
  65. data/ext/pg_query/include/postgres/catalog/objectaddress.h +1 -1
  66. data/ext/pg_query/include/postgres/catalog/pg_aggregate.h +4 -2
  67. data/ext/pg_query/include/postgres/catalog/pg_aggregate_d.h +1 -1
  68. data/ext/pg_query/include/postgres/catalog/pg_am.h +6 -3
  69. data/ext/pg_query/include/postgres/catalog/pg_am_d.h +1 -1
  70. data/ext/pg_query/include/postgres/catalog/pg_attribute.h +31 -14
  71. data/ext/pg_query/include/postgres/catalog/pg_attribute_d.h +3 -3
  72. data/ext/pg_query/include/postgres/catalog/pg_authid.h +6 -3
  73. data/ext/pg_query/include/postgres/catalog/pg_authid_d.h +2 -1
  74. data/ext/pg_query/include/postgres/catalog/pg_class.h +10 -5
  75. data/ext/pg_query/include/postgres/catalog/pg_class_d.h +4 -2
  76. data/ext/pg_query/include/postgres/catalog/pg_collation.h +11 -5
  77. data/ext/pg_query/include/postgres/catalog/pg_collation_d.h +5 -2
  78. data/ext/pg_query/include/postgres/catalog/pg_constraint.h +15 -10
  79. data/ext/pg_query/include/postgres/catalog/pg_constraint_d.h +2 -1
  80. data/ext/pg_query/include/postgres/catalog/pg_control.h +5 -3
  81. data/ext/pg_query/include/postgres/catalog/pg_conversion.h +8 -4
  82. data/ext/pg_query/include/postgres/catalog/pg_conversion_d.h +1 -1
  83. data/ext/pg_query/include/postgres/catalog/pg_database.h +9 -4
  84. data/ext/pg_query/include/postgres/catalog/pg_database_d.h +13 -12
  85. data/ext/pg_query/include/postgres/catalog/pg_depend.h +3 -3
  86. data/ext/pg_query/include/postgres/catalog/pg_depend_d.h +1 -1
  87. data/ext/pg_query/include/postgres/catalog/pg_event_trigger.h +6 -3
  88. data/ext/pg_query/include/postgres/catalog/pg_event_trigger_d.h +1 -1
  89. data/ext/pg_query/include/postgres/catalog/pg_index.h +5 -3
  90. data/ext/pg_query/include/postgres/catalog/pg_index_d.h +1 -1
  91. data/ext/pg_query/include/postgres/catalog/pg_language.h +6 -3
  92. data/ext/pg_query/include/postgres/catalog/pg_language_d.h +1 -1
  93. data/ext/pg_query/include/postgres/catalog/pg_namespace.h +6 -3
  94. data/ext/pg_query/include/postgres/catalog/pg_namespace_d.h +1 -1
  95. data/ext/pg_query/include/postgres/catalog/pg_opclass.h +6 -3
  96. data/ext/pg_query/include/postgres/catalog/pg_opclass_d.h +1 -1
  97. data/ext/pg_query/include/postgres/catalog/pg_operator.h +20 -3
  98. data/ext/pg_query/include/postgres/catalog/pg_operator_d.h +1 -1
  99. data/ext/pg_query/include/postgres/catalog/pg_opfamily.h +6 -3
  100. data/ext/pg_query/include/postgres/catalog/pg_opfamily_d.h +1 -1
  101. data/ext/pg_query/include/postgres/catalog/pg_partitioned_table.h +4 -2
  102. data/ext/pg_query/include/postgres/catalog/pg_partitioned_table_d.h +1 -1
  103. data/ext/pg_query/include/postgres/catalog/pg_proc.h +6 -3
  104. data/ext/pg_query/include/postgres/catalog/pg_proc_d.h +1 -1
  105. data/ext/pg_query/include/postgres/catalog/pg_publication.h +6 -3
  106. data/ext/pg_query/include/postgres/catalog/pg_publication_d.h +1 -1
  107. data/ext/pg_query/include/postgres/catalog/pg_replication_origin.h +6 -3
  108. data/ext/pg_query/include/postgres/catalog/pg_replication_origin_d.h +1 -1
  109. data/ext/pg_query/include/postgres/catalog/pg_statistic.h +10 -4
  110. data/ext/pg_query/include/postgres/catalog/pg_statistic_d.h +7 -3
  111. data/ext/pg_query/include/postgres/catalog/pg_statistic_ext.h +10 -7
  112. data/ext/pg_query/include/postgres/catalog/pg_statistic_ext_d.h +3 -3
  113. data/ext/pg_query/include/postgres/catalog/pg_transform.h +6 -3
  114. data/ext/pg_query/include/postgres/catalog/pg_transform_d.h +1 -1
  115. data/ext/pg_query/include/postgres/catalog/pg_trigger.h +4 -4
  116. data/ext/pg_query/include/postgres/catalog/pg_trigger_d.h +1 -1
  117. data/ext/pg_query/include/postgres/catalog/pg_ts_config.h +6 -3
  118. data/ext/pg_query/include/postgres/catalog/pg_ts_config_d.h +1 -1
  119. data/ext/pg_query/include/postgres/catalog/pg_ts_dict.h +6 -3
  120. data/ext/pg_query/include/postgres/catalog/pg_ts_dict_d.h +1 -1
  121. data/ext/pg_query/include/postgres/catalog/pg_ts_parser.h +6 -3
  122. data/ext/pg_query/include/postgres/catalog/pg_ts_parser_d.h +1 -1
  123. data/ext/pg_query/include/postgres/catalog/pg_ts_template.h +6 -3
  124. data/ext/pg_query/include/postgres/catalog/pg_ts_template_d.h +1 -1
  125. data/ext/pg_query/include/postgres/catalog/pg_type.h +6 -3
  126. data/ext/pg_query/include/postgres/catalog/pg_type_d.h +1 -1
  127. data/ext/pg_query/include/postgres/catalog/storage.h +1 -1
  128. data/ext/pg_query/include/postgres/catalog/syscache_ids.h +104 -0
  129. data/ext/pg_query/include/postgres/commands/async.h +2 -6
  130. data/ext/pg_query/include/postgres/commands/dbcommands.h +1 -1
  131. data/ext/pg_query/include/postgres/commands/defrem.h +6 -6
  132. data/ext/pg_query/include/postgres/commands/event_trigger.h +5 -2
  133. data/ext/pg_query/include/postgres/commands/explain.h +19 -3
  134. data/ext/pg_query/include/postgres/commands/prepare.h +1 -1
  135. data/ext/pg_query/include/postgres/commands/tablespace.h +1 -1
  136. data/ext/pg_query/include/postgres/commands/trigger.h +1 -1
  137. data/ext/pg_query/include/postgres/commands/vacuum.h +28 -26
  138. data/ext/pg_query/include/postgres/common/cryptohash.h +2 -2
  139. data/ext/pg_query/include/postgres/common/file_perm.h +1 -1
  140. data/ext/pg_query/include/postgres/common/file_utils.h +65 -0
  141. data/ext/pg_query/include/postgres/common/hashfn.h +16 -1
  142. data/ext/pg_query/include/postgres/common/hashfn_unstable.h +453 -0
  143. data/ext/pg_query/include/postgres/common/int.h +79 -4
  144. data/ext/pg_query/include/postgres/common/keywords.h +1 -1
  145. data/ext/pg_query/include/postgres/common/kwlookup.h +1 -1
  146. data/ext/pg_query/include/postgres/common/pg_prng.h +2 -1
  147. data/ext/pg_query/include/postgres/common/relpath.h +4 -4
  148. data/ext/pg_query/include/postgres/common/scram-common.h +1 -1
  149. data/ext/pg_query/include/postgres/common/sha2.h +1 -1
  150. data/ext/pg_query/include/postgres/common/string.h +1 -1
  151. data/ext/pg_query/include/postgres/common/unicode_east_asian_fw_table.h +2 -3
  152. data/ext/pg_query/include/postgres/copyfuncs.funcs.c +278 -30
  153. data/ext/pg_query/include/postgres/copyfuncs.switch.c +55 -4
  154. data/ext/pg_query/include/postgres/datatype/timestamp.h +28 -2
  155. data/ext/pg_query/include/postgres/equalfuncs.funcs.c +239 -26
  156. data/ext/pg_query/include/postgres/equalfuncs.switch.c +55 -4
  157. data/ext/pg_query/include/postgres/executor/execdesc.h +1 -1
  158. data/ext/pg_query/include/postgres/executor/executor.h +6 -5
  159. data/ext/pg_query/include/postgres/executor/functions.h +2 -1
  160. data/ext/pg_query/include/postgres/executor/instrument.h +5 -3
  161. data/ext/pg_query/include/postgres/executor/spi.h +2 -8
  162. data/ext/pg_query/include/postgres/executor/tablefunc.h +1 -1
  163. data/ext/pg_query/include/postgres/executor/tuptable.h +31 -2
  164. data/ext/pg_query/include/postgres/fmgr.h +2 -2
  165. data/ext/pg_query/include/postgres/foreign/fdwapi.h +1 -1
  166. data/ext/pg_query/include/postgres/funcapi.h +2 -2
  167. data/ext/pg_query/include/postgres/gram.h +871 -830
  168. data/ext/pg_query/include/postgres/gramparse.h +1 -1
  169. data/ext/pg_query/include/postgres/jit/jit.h +4 -3
  170. data/ext/pg_query/include/postgres/kwlist_d.h +511 -466
  171. data/ext/pg_query/include/postgres/lib/dshash.h +25 -10
  172. data/ext/pg_query/include/postgres/lib/ilist.h +1 -1
  173. data/ext/pg_query/include/postgres/lib/pairingheap.h +1 -1
  174. data/ext/pg_query/include/postgres/lib/simplehash.h +40 -18
  175. data/ext/pg_query/include/postgres/lib/sort_template.h +14 -1
  176. data/ext/pg_query/include/postgres/lib/stringinfo.h +93 -11
  177. data/ext/pg_query/include/postgres/libpq/auth.h +1 -1
  178. data/ext/pg_query/include/postgres/libpq/crypt.h +2 -2
  179. data/ext/pg_query/include/postgres/libpq/hba.h +4 -4
  180. data/ext/pg_query/include/postgres/libpq/libpq-be.h +29 -25
  181. data/ext/pg_query/include/postgres/libpq/libpq.h +6 -7
  182. data/ext/pg_query/include/postgres/libpq/pqcomm.h +26 -20
  183. data/ext/pg_query/include/postgres/libpq/pqformat.h +2 -3
  184. data/ext/pg_query/include/postgres/libpq/pqsignal.h +1 -1
  185. data/ext/pg_query/include/postgres/libpq/protocol.h +89 -0
  186. data/ext/pg_query/include/postgres/libpq/sasl.h +1 -1
  187. data/ext/pg_query/include/postgres/libpq/scram.h +1 -1
  188. data/ext/pg_query/include/postgres/mb/pg_wchar.h +102 -82
  189. data/ext/pg_query/include/postgres/mb/stringinfo_mb.h +1 -1
  190. data/ext/pg_query/include/postgres/miscadmin.h +64 -52
  191. data/ext/pg_query/include/postgres/nodes/bitmapset.h +17 -3
  192. data/ext/pg_query/include/postgres/nodes/execnodes.h +109 -25
  193. data/ext/pg_query/include/postgres/nodes/extensible.h +1 -1
  194. data/ext/pg_query/include/postgres/nodes/lockoptions.h +4 -4
  195. data/ext/pg_query/include/postgres/nodes/makefuncs.h +8 -2
  196. data/ext/pg_query/include/postgres/nodes/memnodes.h +43 -4
  197. data/ext/pg_query/include/postgres/nodes/miscnodes.h +1 -1
  198. data/ext/pg_query/include/postgres/nodes/nodeFuncs.h +1 -1
  199. data/ext/pg_query/include/postgres/nodes/nodes.h +30 -41
  200. data/ext/pg_query/include/postgres/nodes/nodetags.h +464 -444
  201. data/ext/pg_query/include/postgres/nodes/params.h +1 -1
  202. data/ext/pg_query/include/postgres/nodes/parsenodes.h +358 -175
  203. data/ext/pg_query/include/postgres/nodes/pathnodes.h +60 -9
  204. data/ext/pg_query/include/postgres/nodes/pg_list.h +62 -11
  205. data/ext/pg_query/include/postgres/nodes/plannodes.h +11 -10
  206. data/ext/pg_query/include/postgres/nodes/primnodes.h +344 -50
  207. data/ext/pg_query/include/postgres/nodes/print.h +1 -1
  208. data/ext/pg_query/include/postgres/nodes/queryjumble.h +2 -2
  209. data/ext/pg_query/include/postgres/nodes/replnodes.h +23 -2
  210. data/ext/pg_query/include/postgres/nodes/supportnodes.h +1 -1
  211. data/ext/pg_query/include/postgres/nodes/tidbitmap.h +1 -1
  212. data/ext/pg_query/include/postgres/nodes/value.h +1 -1
  213. data/ext/pg_query/include/postgres/optimizer/cost.h +5 -4
  214. data/ext/pg_query/include/postgres/optimizer/geqo.h +1 -1
  215. data/ext/pg_query/include/postgres/optimizer/geqo_gene.h +1 -1
  216. data/ext/pg_query/include/postgres/optimizer/optimizer.h +5 -2
  217. data/ext/pg_query/include/postgres/optimizer/paths.h +13 -8
  218. data/ext/pg_query/include/postgres/optimizer/planmain.h +7 -1
  219. data/ext/pg_query/include/postgres/parser/analyze.h +3 -1
  220. data/ext/pg_query/include/postgres/parser/kwlist.h +22 -2
  221. data/ext/pg_query/include/postgres/parser/parse_agg.h +1 -1
  222. data/ext/pg_query/include/postgres/parser/parse_coerce.h +2 -2
  223. data/ext/pg_query/include/postgres/parser/parse_expr.h +1 -1
  224. data/ext/pg_query/include/postgres/parser/parse_func.h +2 -2
  225. data/ext/pg_query/include/postgres/parser/parse_node.h +3 -2
  226. data/ext/pg_query/include/postgres/parser/parse_oper.h +4 -1
  227. data/ext/pg_query/include/postgres/parser/parse_relation.h +1 -1
  228. data/ext/pg_query/include/postgres/parser/parse_type.h +2 -2
  229. data/ext/pg_query/include/postgres/parser/parser.h +3 -3
  230. data/ext/pg_query/include/postgres/parser/parsetree.h +1 -1
  231. data/ext/pg_query/include/postgres/parser/scanner.h +1 -1
  232. data/ext/pg_query/include/postgres/parser/scansup.h +1 -1
  233. data/ext/pg_query/include/postgres/partitioning/partdefs.h +1 -1
  234. data/ext/pg_query/include/postgres/pg_config.h +34 -34
  235. data/ext/pg_query/include/postgres/pg_config_manual.h +21 -8
  236. data/ext/pg_query/include/postgres/pg_getopt.h +1 -1
  237. data/ext/pg_query/include/postgres/pg_trace.h +1 -1
  238. data/ext/pg_query/include/postgres/pgstat.h +13 -11
  239. data/ext/pg_query/include/postgres/pgtime.h +1 -1
  240. data/ext/pg_query/include/postgres/pl_reserved_kwlist.h +1 -1
  241. data/ext/pg_query/include/postgres/pl_reserved_kwlist_d.h +1 -1
  242. data/ext/pg_query/include/postgres/pl_unreserved_kwlist.h +1 -1
  243. data/ext/pg_query/include/postgres/pl_unreserved_kwlist_d.h +1 -1
  244. data/ext/pg_query/include/postgres/plerrcodes.h +4 -4
  245. data/ext/pg_query/include/postgres/plpgsql.h +15 -13
  246. data/ext/pg_query/include/postgres/port/atomics/arch-arm.h +1 -1
  247. data/ext/pg_query/include/postgres/port/atomics/arch-hppa.h +1 -1
  248. data/ext/pg_query/include/postgres/port/atomics/arch-ppc.h +3 -1
  249. data/ext/pg_query/include/postgres/port/atomics/arch-x86.h +3 -1
  250. data/ext/pg_query/include/postgres/port/atomics/fallback.h +1 -1
  251. data/ext/pg_query/include/postgres/port/atomics/generic-gcc.h +38 -1
  252. data/ext/pg_query/include/postgres/port/atomics/generic-msvc.h +19 -1
  253. data/ext/pg_query/include/postgres/port/atomics/generic-sunpro.h +16 -1
  254. data/ext/pg_query/include/postgres/port/atomics/generic.h +38 -2
  255. data/ext/pg_query/include/postgres/port/atomics.h +93 -6
  256. data/ext/pg_query/include/postgres/port/pg_bitutils.h +91 -9
  257. data/ext/pg_query/include/postgres/port/pg_bswap.h +1 -1
  258. data/ext/pg_query/include/postgres/port/pg_crc32c.h +10 -1
  259. data/ext/pg_query/include/postgres/port/pg_iovec.h +117 -0
  260. data/ext/pg_query/include/postgres/port/simd.h +48 -1
  261. data/ext/pg_query/include/postgres/port/win32/sys/socket.h +8 -0
  262. data/ext/pg_query/include/postgres/port/win32_port.h +1 -11
  263. data/ext/pg_query/include/postgres/port.h +7 -3
  264. data/ext/pg_query/include/postgres/portability/instr_time.h +1 -1
  265. data/ext/pg_query/include/postgres/postgres.h +1 -1
  266. data/ext/pg_query/include/postgres/postmaster/autovacuum.h +5 -16
  267. data/ext/pg_query/include/postgres/postmaster/bgworker.h +8 -6
  268. data/ext/pg_query/include/postgres/postmaster/bgworker_internals.h +3 -7
  269. data/ext/pg_query/include/postgres/postmaster/bgwriter.h +3 -3
  270. data/ext/pg_query/include/postgres/postmaster/interrupt.h +1 -1
  271. data/ext/pg_query/include/postgres/postmaster/pgarch.h +2 -2
  272. data/ext/pg_query/include/postgres/postmaster/postmaster.h +25 -5
  273. data/ext/pg_query/include/postgres/postmaster/startup.h +2 -2
  274. data/ext/pg_query/include/postgres/postmaster/syslogger.h +2 -4
  275. data/ext/pg_query/include/postgres/postmaster/walsummarizer.h +35 -0
  276. data/ext/pg_query/include/postgres/postmaster/walwriter.h +2 -2
  277. data/ext/pg_query/include/postgres/regex/regex.h +92 -9
  278. data/ext/pg_query/include/postgres/replication/logicallauncher.h +1 -1
  279. data/ext/pg_query/include/postgres/replication/logicalproto.h +2 -2
  280. data/ext/pg_query/include/postgres/replication/logicalworker.h +2 -1
  281. data/ext/pg_query/include/postgres/replication/origin.h +1 -1
  282. data/ext/pg_query/include/postgres/replication/reorderbuffer.h +18 -28
  283. data/ext/pg_query/include/postgres/replication/slot.h +41 -5
  284. data/ext/pg_query/include/postgres/replication/slotsync.h +38 -0
  285. data/ext/pg_query/include/postgres/replication/syncrep.h +1 -1
  286. data/ext/pg_query/include/postgres/replication/walreceiver.h +37 -11
  287. data/ext/pg_query/include/postgres/replication/walsender.h +5 -3
  288. data/ext/pg_query/include/postgres/rewrite/prs2lock.h +1 -1
  289. data/ext/pg_query/include/postgres/rewrite/rewriteHandler.h +7 -1
  290. data/ext/pg_query/include/postgres/rewrite/rewriteManip.h +2 -2
  291. data/ext/pg_query/include/postgres/rewrite/rewriteSupport.h +1 -1
  292. data/ext/pg_query/include/postgres/storage/block.h +1 -1
  293. data/ext/pg_query/include/postgres/storage/buf.h +1 -1
  294. data/ext/pg_query/include/postgres/storage/bufmgr.h +59 -41
  295. data/ext/pg_query/include/postgres/storage/bufpage.h +1 -1
  296. data/ext/pg_query/include/postgres/storage/condition_variable.h +1 -1
  297. data/ext/pg_query/include/postgres/storage/dsm.h +1 -1
  298. data/ext/pg_query/include/postgres/storage/dsm_impl.h +2 -2
  299. data/ext/pg_query/include/postgres/storage/fd.h +30 -13
  300. data/ext/pg_query/include/postgres/storage/fileset.h +1 -1
  301. data/ext/pg_query/include/postgres/storage/ipc.h +4 -1
  302. data/ext/pg_query/include/postgres/storage/item.h +1 -1
  303. data/ext/pg_query/include/postgres/storage/itemid.h +1 -1
  304. data/ext/pg_query/include/postgres/storage/itemptr.h +1 -1
  305. data/ext/pg_query/include/postgres/storage/large_object.h +1 -1
  306. data/ext/pg_query/include/postgres/storage/latch.h +4 -2
  307. data/ext/pg_query/include/postgres/storage/lmgr.h +8 -2
  308. data/ext/pg_query/include/postgres/storage/lock.h +19 -19
  309. data/ext/pg_query/include/postgres/storage/lockdefs.h +1 -1
  310. data/ext/pg_query/include/postgres/storage/lwlock.h +17 -9
  311. data/ext/pg_query/include/postgres/storage/lwlocknames.h +7 -10
  312. data/ext/pg_query/include/postgres/storage/off.h +1 -1
  313. data/ext/pg_query/include/postgres/storage/pg_sema.h +1 -1
  314. data/ext/pg_query/include/postgres/storage/pg_shmem.h +5 -4
  315. data/ext/pg_query/include/postgres/storage/pmsignal.h +2 -2
  316. data/ext/pg_query/include/postgres/storage/predicate.h +1 -5
  317. data/ext/pg_query/include/postgres/storage/proc.h +48 -23
  318. data/ext/pg_query/include/postgres/storage/procarray.h +5 -1
  319. data/ext/pg_query/include/postgres/storage/proclist_types.h +11 -9
  320. data/ext/pg_query/include/postgres/storage/procnumber.h +43 -0
  321. data/ext/pg_query/include/postgres/storage/procsignal.h +8 -6
  322. data/ext/pg_query/include/postgres/storage/read_stream.h +65 -0
  323. data/ext/pg_query/include/postgres/storage/relfilelocator.h +16 -15
  324. data/ext/pg_query/include/postgres/storage/s_lock.h +7 -27
  325. data/ext/pg_query/include/postgres/storage/sharedfileset.h +1 -1
  326. data/ext/pg_query/include/postgres/storage/shm_mq.h +2 -2
  327. data/ext/pg_query/include/postgres/storage/shm_toc.h +1 -1
  328. data/ext/pg_query/include/postgres/storage/shmem.h +1 -1
  329. data/ext/pg_query/include/postgres/storage/sinval.h +3 -3
  330. data/ext/pg_query/include/postgres/storage/smgr.h +41 -27
  331. data/ext/pg_query/include/postgres/storage/spin.h +1 -1
  332. data/ext/pg_query/include/postgres/storage/standby.h +13 -3
  333. data/ext/pg_query/include/postgres/storage/standbydefs.h +2 -2
  334. data/ext/pg_query/include/postgres/storage/sync.h +4 -4
  335. data/ext/pg_query/include/postgres/tcop/cmdtag.h +1 -2
  336. data/ext/pg_query/include/postgres/tcop/cmdtaglist.h +3 -2
  337. data/ext/pg_query/include/postgres/tcop/deparse_utility.h +2 -2
  338. data/ext/pg_query/include/postgres/tcop/dest.h +3 -2
  339. data/ext/pg_query/include/postgres/tcop/fastpath.h +1 -1
  340. data/ext/pg_query/include/postgres/tcop/pquery.h +1 -1
  341. data/ext/pg_query/include/postgres/tcop/tcopprot.h +9 -5
  342. data/ext/pg_query/include/postgres/tcop/utility.h +2 -2
  343. data/ext/pg_query/include/postgres/tsearch/ts_cache.h +1 -1
  344. data/ext/pg_query/include/postgres/utils/acl.h +19 -7
  345. data/ext/pg_query/include/postgres/utils/aclchk_internal.h +1 -1
  346. data/ext/pg_query/include/postgres/utils/array.h +1 -2
  347. data/ext/pg_query/include/postgres/utils/ascii.h +84 -0
  348. data/ext/pg_query/include/postgres/utils/backend_progress.h +3 -2
  349. data/ext/pg_query/include/postgres/utils/backend_status.h +8 -10
  350. data/ext/pg_query/include/postgres/utils/builtins.h +4 -1
  351. data/ext/pg_query/include/postgres/utils/bytea.h +2 -2
  352. data/ext/pg_query/include/postgres/utils/catcache.h +5 -6
  353. data/ext/pg_query/include/postgres/utils/date.h +1 -1
  354. data/ext/pg_query/include/postgres/utils/datetime.h +4 -1
  355. data/ext/pg_query/include/postgres/utils/datum.h +1 -1
  356. data/ext/pg_query/include/postgres/utils/dsa.h +44 -5
  357. data/ext/pg_query/include/postgres/utils/elog.h +3 -8
  358. data/ext/pg_query/include/postgres/utils/errcodes.h +1 -3
  359. data/ext/pg_query/include/postgres/utils/expandeddatum.h +1 -1
  360. data/ext/pg_query/include/postgres/utils/expandedrecord.h +1 -1
  361. data/ext/pg_query/include/postgres/utils/float.h +1 -1
  362. data/ext/pg_query/include/postgres/utils/fmgroids.h +49 -16
  363. data/ext/pg_query/include/postgres/utils/fmgrprotos.h +47 -14
  364. data/ext/pg_query/include/postgres/utils/fmgrtab.h +1 -1
  365. data/ext/pg_query/include/postgres/utils/guc.h +20 -6
  366. data/ext/pg_query/include/postgres/utils/guc_hooks.h +23 -2
  367. data/ext/pg_query/include/postgres/utils/guc_tables.h +6 -5
  368. data/ext/pg_query/include/postgres/utils/hsearch.h +2 -2
  369. data/ext/pg_query/include/postgres/utils/injection_point.h +44 -0
  370. data/ext/pg_query/include/postgres/utils/inval.h +1 -1
  371. data/ext/pg_query/include/postgres/utils/logtape.h +5 -5
  372. data/ext/pg_query/include/postgres/utils/lsyscache.h +6 -3
  373. data/ext/pg_query/include/postgres/utils/memdebug.h +1 -1
  374. data/ext/pg_query/include/postgres/utils/memutils.h +12 -5
  375. data/ext/pg_query/include/postgres/utils/memutils_internal.h +53 -13
  376. data/ext/pg_query/include/postgres/utils/memutils_memorychunk.h +25 -9
  377. data/ext/pg_query/include/postgres/utils/numeric.h +6 -1
  378. data/ext/pg_query/include/postgres/utils/palloc.h +1 -15
  379. data/ext/pg_query/include/postgres/utils/partcache.h +1 -1
  380. data/ext/pg_query/include/postgres/utils/pg_locale.h +8 -7
  381. data/ext/pg_query/include/postgres/utils/pgstat_internal.h +11 -17
  382. data/ext/pg_query/include/postgres/utils/plancache.h +5 -3
  383. data/ext/pg_query/include/postgres/utils/portal.h +9 -9
  384. data/ext/pg_query/include/postgres/utils/queryenvironment.h +2 -2
  385. data/ext/pg_query/include/postgres/utils/regproc.h +1 -1
  386. data/ext/pg_query/include/postgres/utils/rel.h +14 -15
  387. data/ext/pg_query/include/postgres/utils/relcache.h +2 -5
  388. data/ext/pg_query/include/postgres/utils/reltrigger.h +1 -1
  389. data/ext/pg_query/include/postgres/utils/resowner.h +90 -9
  390. data/ext/pg_query/include/postgres/utils/ruleutils.h +1 -1
  391. data/ext/pg_query/include/postgres/utils/sharedtuplestore.h +1 -1
  392. data/ext/pg_query/include/postgres/utils/snapmgr.h +1 -52
  393. data/ext/pg_query/include/postgres/utils/snapshot.h +2 -2
  394. data/ext/pg_query/include/postgres/utils/sortsupport.h +1 -1
  395. data/ext/pg_query/include/postgres/utils/syscache.h +2 -98
  396. data/ext/pg_query/include/postgres/utils/timeout.h +3 -2
  397. data/ext/pg_query/include/postgres/utils/timestamp.h +1 -1
  398. data/ext/pg_query/include/postgres/utils/tuplesort.h +36 -9
  399. data/ext/pg_query/include/postgres/utils/tuplestore.h +2 -5
  400. data/ext/pg_query/include/postgres/utils/typcache.h +2 -1
  401. data/ext/pg_query/include/postgres/utils/varlena.h +1 -1
  402. data/ext/pg_query/include/postgres/utils/wait_event.h +28 -214
  403. data/ext/pg_query/include/postgres/utils/wait_event_types.h +218 -0
  404. data/ext/pg_query/include/postgres/utils/xml.h +4 -4
  405. data/ext/pg_query/include/postgres/varatt.h +1 -1
  406. data/ext/pg_query/include/protobuf/pg_query.pb-c.h +1546 -792
  407. data/ext/pg_query/include/protobuf/pg_query.pb.h +58365 -46595
  408. data/ext/pg_query/pg_query.pb-c.c +6598 -3739
  409. data/ext/pg_query/pg_query_normalize.c +42 -1
  410. data/ext/pg_query/pg_query_outfuncs_json.c +3 -1
  411. data/ext/pg_query/pg_query_parse_plpgsql.c +12 -13
  412. data/ext/pg_query/pg_query_readfuncs_protobuf.c +2 -2
  413. data/ext/pg_query/pg_query_ruby_freebsd.sym +0 -1
  414. data/ext/pg_query/pg_query_scan.c +1 -1
  415. data/ext/pg_query/postgres_deparse.c +409 -21
  416. data/ext/pg_query/src_backend_catalog_namespace.c +241 -66
  417. data/ext/pg_query/src_backend_catalog_pg_proc.c +1 -3
  418. data/ext/pg_query/src_backend_commands_define.c +2 -3
  419. data/ext/pg_query/src_backend_nodes_bitmapset.c +137 -94
  420. data/ext/pg_query/src_backend_nodes_copyfuncs.c +1 -1
  421. data/ext/pg_query/src_backend_nodes_equalfuncs.c +1 -1
  422. data/ext/pg_query/src_backend_nodes_extensible.c +1 -1
  423. data/ext/pg_query/src_backend_nodes_list.c +3 -7
  424. data/ext/pg_query/src_backend_nodes_makefuncs.c +59 -20
  425. data/ext/pg_query/src_backend_nodes_nodeFuncs.c +109 -2
  426. data/ext/pg_query/src_backend_nodes_value.c +1 -1
  427. data/ext/pg_query/src_backend_parser_gram.c +34490 -32135
  428. data/ext/pg_query/src_backend_parser_parser.c +8 -8
  429. data/ext/pg_query/src_backend_parser_scan.c +5637 -3028
  430. data/ext/pg_query/src_backend_parser_scansup.c +2 -1
  431. data/ext/pg_query/src_backend_storage_ipc_ipc.c +1 -1
  432. data/ext/pg_query/src_backend_tcop_postgres.c +34 -10
  433. data/ext/pg_query/src_backend_utils_activity_pgstat_database.c +2 -2
  434. data/ext/pg_query/src_backend_utils_adt_datum.c +8 -6
  435. data/ext/pg_query/src_backend_utils_adt_expandeddatum.c +1 -1
  436. data/ext/pg_query/src_backend_utils_adt_format_type.c +1 -1
  437. data/ext/pg_query/src_backend_utils_adt_numutils.c +4 -5
  438. data/ext/pg_query/src_backend_utils_adt_ruleutils.c +101 -28
  439. data/ext/pg_query/src_backend_utils_error_assert.c +1 -1
  440. data/ext/pg_query/src_backend_utils_error_elog.c +47 -42
  441. data/ext/pg_query/src_backend_utils_fmgr_fmgr.c +4 -2
  442. data/ext/pg_query/src_backend_utils_init_globals.c +15 -3
  443. data/ext/pg_query/src_backend_utils_mb_mbutils.c +11 -18
  444. data/ext/pg_query/src_backend_utils_misc_guc_tables.c +16 -6
  445. data/ext/pg_query/src_backend_utils_mmgr_alignedalloc.c +8 -5
  446. data/ext/pg_query/src_backend_utils_mmgr_aset.c +308 -238
  447. data/ext/pg_query/src_backend_utils_mmgr_bump.c +728 -0
  448. data/ext/pg_query/src_backend_utils_mmgr_generation.c +273 -197
  449. data/ext/pg_query/src_backend_utils_mmgr_mcxt.c +270 -215
  450. data/ext/pg_query/src_backend_utils_mmgr_slab.c +154 -96
  451. data/ext/pg_query/src_common_encnames.c +43 -44
  452. data/ext/pg_query/src_common_hashfn.c +1 -1
  453. data/ext/pg_query/src_common_keywords.c +1 -1
  454. data/ext/pg_query/src_common_kwlist_d.h +511 -466
  455. data/ext/pg_query/src_common_kwlookup.c +1 -1
  456. data/ext/pg_query/src_common_psprintf.c +3 -3
  457. data/ext/pg_query/src_common_stringinfo.c +18 -1
  458. data/ext/pg_query/src_common_wchar.c +45 -108
  459. data/ext/pg_query/src_pl_plpgsql_src_pl_comp.c +99 -5
  460. data/ext/pg_query/src_pl_plpgsql_src_pl_funcs.c +1 -1
  461. data/ext/pg_query/src_pl_plpgsql_src_pl_gram.c +242 -143
  462. data/ext/pg_query/src_pl_plpgsql_src_pl_handler.c +1 -1
  463. data/ext/pg_query/src_pl_plpgsql_src_pl_reserved_kwlist_d.h +1 -1
  464. data/ext/pg_query/src_pl_plpgsql_src_pl_scanner.c +19 -1
  465. data/ext/pg_query/src_pl_plpgsql_src_pl_unreserved_kwlist_d.h +1 -1
  466. data/ext/pg_query/src_port_pg_bitutils.c +173 -28
  467. data/ext/pg_query/src_port_pgstrcasecmp.c +29 -1
  468. data/ext/pg_query/src_port_snprintf.c +1 -1
  469. data/ext/pg_query/src_port_strerror.c +1 -3
  470. data/ext/pg_query/src_port_strlcpy.c +1 -1
  471. data/lib/pg_query/param_refs.rb +1 -1
  472. data/lib/pg_query/pg_query_pb.rb +26 -3
  473. data/lib/pg_query/treewalker.rb +38 -11
  474. data/lib/pg_query/truncate.rb +1 -1
  475. data/lib/pg_query/version.rb +1 -1
  476. metadata +25 -11
  477. data/ext/pg_query/include/postgres/storage/backendid.h +0 -37
  478. data/ext/pg_query/include/postgres/storage/sinvaladt.h +0 -45
  479. data/ext/pg_query/src_backend_nodes_nodes.c +0 -38
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * PostgreSQL write-ahead log manager
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/access/xlog.h
@@ -19,12 +19,15 @@
19
19
 
20
20
 
21
21
  /* Sync methods */
22
- #define SYNC_METHOD_FSYNC 0
23
- #define SYNC_METHOD_FDATASYNC 1
24
- #define SYNC_METHOD_OPEN 2 /* for O_SYNC */
25
- #define SYNC_METHOD_FSYNC_WRITETHROUGH 3
26
- #define SYNC_METHOD_OPEN_DSYNC 4 /* for O_DSYNC */
27
- extern PGDLLIMPORT int sync_method;
22
+ enum WalSyncMethod
23
+ {
24
+ WAL_SYNC_METHOD_FSYNC = 0,
25
+ WAL_SYNC_METHOD_FDATASYNC,
26
+ WAL_SYNC_METHOD_OPEN, /* for O_SYNC */
27
+ WAL_SYNC_METHOD_FSYNC_WRITETHROUGH,
28
+ WAL_SYNC_METHOD_OPEN_DSYNC /* for O_DSYNC */
29
+ };
30
+ extern PGDLLIMPORT int wal_sync_method;
28
31
 
29
32
  extern PGDLLIMPORT XLogRecPtr ProcLastRecPtr;
30
33
  extern PGDLLIMPORT XLogRecPtr XactLastRecEnd;
@@ -59,7 +62,7 @@ typedef enum ArchiveMode
59
62
  {
60
63
  ARCHIVE_MODE_OFF = 0, /* disabled */
61
64
  ARCHIVE_MODE_ON, /* enabled while server is running normally */
62
- ARCHIVE_MODE_ALWAYS /* enabled always (even during recovery) */
65
+ ARCHIVE_MODE_ALWAYS, /* enabled always (even during recovery) */
63
66
  } ArchiveMode;
64
67
  extern PGDLLIMPORT int XLogArchiveMode;
65
68
 
@@ -68,7 +71,7 @@ typedef enum WalLevel
68
71
  {
69
72
  WAL_LEVEL_MINIMAL = 0,
70
73
  WAL_LEVEL_REPLICA,
71
- WAL_LEVEL_LOGICAL
74
+ WAL_LEVEL_LOGICAL,
72
75
  } WalLevel;
73
76
 
74
77
  /* Compression algorithms for WAL */
@@ -77,7 +80,7 @@ typedef enum WalCompression
77
80
  WAL_COMPRESSION_NONE = 0,
78
81
  WAL_COMPRESSION_PGLZ,
79
82
  WAL_COMPRESSION_LZ4,
80
- WAL_COMPRESSION_ZSTD
83
+ WAL_COMPRESSION_ZSTD,
81
84
  } WalCompression;
82
85
 
83
86
  /* Recovery states */
@@ -85,7 +88,7 @@ typedef enum RecoveryState
85
88
  {
86
89
  RECOVERY_STATE_CRASH = 0, /* crash recovery */
87
90
  RECOVERY_STATE_ARCHIVE, /* archive recovery */
88
- RECOVERY_STATE_DONE /* currently in production */
91
+ RECOVERY_STATE_DONE, /* currently in production */
89
92
  } RecoveryState;
90
93
 
91
94
  extern PGDLLIMPORT int wal_level;
@@ -187,7 +190,7 @@ typedef enum WALAvailability
187
190
  WALAVAIL_EXTENDED, /* WAL segment is reserved by a slot or
188
191
  * wal_keep_size */
189
192
  WALAVAIL_UNRESERVED, /* no longer reserved, but not removed yet */
190
- WALAVAIL_REMOVED /* WAL segment has been removed */
193
+ WALAVAIL_REMOVED, /* WAL segment has been removed */
191
194
  } WALAvailability;
192
195
 
193
196
  struct XLogRecData;
@@ -206,6 +209,7 @@ extern int XLogFileOpen(XLogSegNo segno, TimeLineID tli);
206
209
 
207
210
  extern void CheckXLogRemoved(XLogSegNo segno, TimeLineID tli);
208
211
  extern XLogSegNo XLogGetLastRemovedSegno(void);
212
+ extern XLogSegNo XLogGetOldestSegno(TimeLineID tli);
209
213
  extern void XLogSetAsyncXactLSN(XLogRecPtr asyncXactLSN);
210
214
  extern void XLogSetReplicationSlotMinimumLSN(XLogRecPtr lsn);
211
215
 
@@ -244,10 +248,14 @@ extern XLogRecPtr GetRedoRecPtr(void);
244
248
  extern XLogRecPtr GetInsertRecPtr(void);
245
249
  extern XLogRecPtr GetFlushRecPtr(TimeLineID *insertTLI);
246
250
  extern TimeLineID GetWALInsertionTimeLine(void);
251
+ extern TimeLineID GetWALInsertionTimeLineIfSet(void);
247
252
  extern XLogRecPtr GetLastImportantRecPtr(void);
248
253
 
249
254
  extern void SetWalWriterSleeping(bool sleeping);
250
255
 
256
+ extern Size WALReadFromBuffers(char *dstbuf, XLogRecPtr startptr, Size count,
257
+ TimeLineID tli);
258
+
251
259
  /*
252
260
  * Routines used by xlogrecovery.c to call back into xlog.c during recovery.
253
261
  */
@@ -11,7 +11,7 @@
11
11
  * Note: This file must be includable in both frontend and backend contexts,
12
12
  * to allow stand-alone tools like pg_receivewal to deal with WAL files.
13
13
  *
14
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
14
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
15
15
  * Portions Copyright (c) 1994, Regents of the University of California
16
16
  *
17
17
  * src/include/access/xlog_internal.h
@@ -31,7 +31,7 @@
31
31
  /*
32
32
  * Each page of XLOG file has a header like this:
33
33
  */
34
- #define XLOG_PAGE_MAGIC 0xD113 /* can be used as WAL version indicator */
34
+ #define XLOG_PAGE_MAGIC 0xD116 /* can be used as WAL version indicator */
35
35
 
36
36
  typedef struct XLogPageHeaderData
37
37
  {
@@ -302,6 +302,7 @@ typedef struct xl_end_of_recovery
302
302
  TimestampTz end_time;
303
303
  TimeLineID ThisTimeLineID; /* new TLI */
304
304
  TimeLineID PrevTimeLineID; /* previous TLI we forked off from */
305
+ int wal_level;
305
306
  } xl_end_of_recovery;
306
307
 
307
308
  /*
@@ -322,7 +323,7 @@ typedef enum
322
323
  {
323
324
  RECOVERY_TARGET_ACTION_PAUSE,
324
325
  RECOVERY_TARGET_ACTION_PROMOTE,
325
- RECOVERY_TARGET_ACTION_SHUTDOWN
326
+ RECOVERY_TARGET_ACTION_SHUTDOWN,
326
327
  } RecoveryTargetAction;
327
328
 
328
329
  struct LogicalDecodingContext;
@@ -3,7 +3,7 @@
3
3
  * xlogbackup.h
4
4
  * Definitions for internals of base backups.
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
  * IDENTIFICATION
@@ -28,6 +28,8 @@ typedef struct BackupState
28
28
  XLogRecPtr checkpointloc; /* last checkpoint location */
29
29
  pg_time_t starttime; /* backup start time */
30
30
  bool started_in_recovery; /* backup started in recovery? */
31
+ XLogRecPtr istartpoint; /* incremental based on backup at this LSN */
32
+ TimeLineID istarttli; /* incremental based on backup on this TLI */
31
33
 
32
34
  /* Fields saved at the end of backup */
33
35
  XLogRecPtr stoppoint; /* backup stop WAL location */
@@ -4,7 +4,7 @@
4
4
  * Postgres write-ahead log manager record pointer and
5
5
  * timeline number definitions
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/access/xlogdefs.h
@@ -71,12 +71,12 @@ typedef uint16 RepOriginId;
71
71
  *
72
72
  * Note that we define our own O_DSYNC on Windows, but not O_SYNC.
73
73
  */
74
- #if defined(PLATFORM_DEFAULT_SYNC_METHOD)
75
- #define DEFAULT_SYNC_METHOD PLATFORM_DEFAULT_SYNC_METHOD
74
+ #if defined(PLATFORM_DEFAULT_WAL_SYNC_METHOD)
75
+ #define DEFAULT_WAL_SYNC_METHOD PLATFORM_DEFAULT_WAL_SYNC_METHOD
76
76
  #elif defined(O_DSYNC) && (!defined(O_SYNC) || O_DSYNC != O_SYNC)
77
- #define DEFAULT_SYNC_METHOD SYNC_METHOD_OPEN_DSYNC
77
+ #define DEFAULT_WAL_SYNC_METHOD WAL_SYNC_METHOD_OPEN_DSYNC
78
78
  #else
79
- #define DEFAULT_SYNC_METHOD SYNC_METHOD_FDATASYNC
79
+ #define DEFAULT_WAL_SYNC_METHOD WAL_SYNC_METHOD_FDATASYNC
80
80
  #endif
81
81
 
82
82
  #endif /* XLOG_DEFS_H */
@@ -3,7 +3,7 @@
3
3
  * xlogprefetcher.h
4
4
  * Declarations for the recovery prefetching module.
5
5
  *
6
- * Portions Copyright (c) 2022-2023, PostgreSQL Global Development Group
6
+ * Portions Copyright (c) 2022-2024, PostgreSQL Global Development Group
7
7
  * Portions Copyright (c) 1994, Regents of the University of California
8
8
  *
9
9
  * IDENTIFICATION
@@ -25,7 +25,7 @@ typedef enum
25
25
  {
26
26
  RECOVERY_PREFETCH_OFF,
27
27
  RECOVERY_PREFETCH_ON,
28
- RECOVERY_PREFETCH_TRY
28
+ RECOVERY_PREFETCH_TRY,
29
29
  } RecoveryPrefetchValue;
30
30
 
31
31
  struct XLogPrefetcher;
@@ -3,7 +3,7 @@
3
3
  * xlogreader.h
4
4
  * Definitions for the generic XLog reading facility
5
5
  *
6
- * Portions Copyright (c) 2013-2023, PostgreSQL Global Development Group
6
+ * Portions Copyright (c) 2013-2024, PostgreSQL Global Development Group
7
7
  *
8
8
  * IDENTIFICATION
9
9
  * src/include/access/xlogreader.h
@@ -350,7 +350,7 @@ typedef enum XLogPageReadResult
350
350
  {
351
351
  XLREAD_SUCCESS = 0, /* record is successfully read */
352
352
  XLREAD_FAIL = -1, /* failed during reading a record */
353
- XLREAD_WOULDBLOCK = -2 /* nonblocking mode only, no data */
353
+ XLREAD_WOULDBLOCK = -2, /* nonblocking mode only, no data */
354
354
  } XLogPageReadResult;
355
355
 
356
356
  /* Read the next XLog record. Returns NULL on end-of-WAL or failure */
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Definitions for the WAL record format.
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/access/xlogrecord.h
@@ -68,8 +68,8 @@ typedef struct XLogRecord
68
68
  * in length if we ignore any allocation overhead of the XLogReader.
69
69
  *
70
70
  * To accommodate some overhead, this value allows for 4M of allocation
71
- * overhead, that should be plenty enough for what
72
- * DecodeXLogRecordRequiredSpace() expects as extra.
71
+ * overhead, that should be plenty enough for what the XLogReader
72
+ * infrastructure expects as extra.
73
73
  */
74
74
  #define XLogRecordMaxSize (1020 * 1024 * 1024)
75
75
 
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Functions for WAL recovery and standby mode
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/access/xlogrecovery.h
@@ -27,7 +27,7 @@ typedef enum
27
27
  RECOVERY_TARGET_TIME,
28
28
  RECOVERY_TARGET_NAME,
29
29
  RECOVERY_TARGET_LSN,
30
- RECOVERY_TARGET_IMMEDIATE
30
+ RECOVERY_TARGET_IMMEDIATE,
31
31
  } RecoveryTargetType;
32
32
 
33
33
  /*
@@ -37,7 +37,7 @@ typedef enum
37
37
  {
38
38
  RECOVERY_TARGET_TIMELINE_CONTROLFILE,
39
39
  RECOVERY_TARGET_TIMELINE_LATEST,
40
- RECOVERY_TARGET_TIMELINE_NUMERIC
40
+ RECOVERY_TARGET_TIMELINE_NUMERIC,
41
41
  } RecoveryTargetTimeLineGoal;
42
42
 
43
43
  /* Recovery pause states */
@@ -45,7 +45,7 @@ typedef enum RecoveryPauseState
45
45
  {
46
46
  RECOVERY_NOT_PAUSED, /* pause not requested */
47
47
  RECOVERY_PAUSE_REQUESTED, /* pause requested, but not yet paused */
48
- RECOVERY_PAUSED /* recovery is paused */
48
+ RECOVERY_PAUSED, /* recovery is paused */
49
49
  } RecoveryPauseState;
50
50
 
51
51
  /* User-settable GUC parameters */
@@ -3,7 +3,7 @@
3
3
  * archive_module.h
4
4
  * Exports for archive modules.
5
5
  *
6
- * Copyright (c) 2022-2023, PostgreSQL Global Development Group
6
+ * Copyright (c) 2022-2024, PostgreSQL Global Development Group
7
7
  *
8
8
  * src/include/archive/archive_module.h
9
9
  *
@@ -56,4 +56,12 @@ typedef const ArchiveModuleCallbacks *(*ArchiveModuleInit) (void);
56
56
 
57
57
  extern PGDLLEXPORT const ArchiveModuleCallbacks *_PG_archive_module_init(void);
58
58
 
59
+ /* Support for messages reported from archive module callbacks. */
60
+
61
+ extern PGDLLIMPORT char *arch_module_check_errdetail_string;
62
+
63
+ #define arch_module_check_errdetail \
64
+ pre_format_elog_string(errno, TEXTDOMAIN), \
65
+ arch_module_check_errdetail_string = format_elog_string
66
+
59
67
  #endif /* _ARCHIVE_MODULE_H */
@@ -9,7 +9,7 @@
9
9
  * polluting the namespace with lots of stuff...
10
10
  *
11
11
  *
12
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
12
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
13
13
  * Portions Copyright (c) 1994, Regents of the University of California
14
14
  *
15
15
  * src/include/c.h
@@ -75,6 +75,11 @@
75
75
  #include <libintl.h>
76
76
  #endif
77
77
 
78
+ /* Define before including zlib.h to add const decorations to zlib API. */
79
+ #ifdef HAVE_LIBZ
80
+ #define ZLIB_CONST
81
+ #endif
82
+
78
83
 
79
84
  /* ----------------------------------------------------------------
80
85
  * Section 1: compiler characteristics
@@ -100,8 +105,6 @@
100
105
  * GCC: https://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html
101
106
  * Clang: https://clang.llvm.org/docs/AttributeReference.html
102
107
  * Sunpro: https://docs.oracle.com/cd/E18659_01/html/821-1384/gjzke.html
103
- * XLC: https://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.2/com.ibm.xlc131.aix.doc/language_ref/function_attributes.html
104
- * XLC: https://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.2/com.ibm.xlc131.aix.doc/language_ref/type_attrib.html
105
108
  */
106
109
 
107
110
  /*
@@ -132,6 +135,19 @@
132
135
  #define pg_nodiscard
133
136
  #endif
134
137
 
138
+ /*
139
+ * This macro will disable address safety instrumentation for a function
140
+ * when running with "-fsanitize=address". Think twice before using this!
141
+ */
142
+ #if defined(__clang__) || __GNUC__ >= 8
143
+ #define pg_attribute_no_sanitize_address() __attribute__((no_sanitize("address")))
144
+ #elif __has_attribute(no_sanitize_address)
145
+ /* This would work for clang, but it's deprecated. */
146
+ #define pg_attribute_no_sanitize_address() __attribute__((no_sanitize_address))
147
+ #else
148
+ #define pg_attribute_no_sanitize_address()
149
+ #endif
150
+
135
151
  /*
136
152
  * Place this macro before functions that should be allowed to make misaligned
137
153
  * accesses. Think twice before using it on non-x86-specific code!
@@ -166,8 +182,8 @@
166
182
  #define PG_USED_FOR_ASSERTS_ONLY pg_attribute_unused()
167
183
  #endif
168
184
 
169
- /* GCC and XLC support format attributes */
170
- #if defined(__GNUC__) || defined(__IBMC__)
185
+ /* GCC supports format attributes */
186
+ #if defined(__GNUC__)
171
187
  #define pg_attribute_format_arg(a) __attribute__((format_arg(a)))
172
188
  #define pg_attribute_printf(f,a) __attribute__((format(PG_PRINTF_ATTRIBUTE, f, a)))
173
189
  #else
@@ -175,8 +191,8 @@
175
191
  #define pg_attribute_printf(f,a)
176
192
  #endif
177
193
 
178
- /* GCC, Sunpro and XLC support aligned, packed and noreturn */
179
- #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
194
+ /* GCC and Sunpro support aligned, packed and noreturn */
195
+ #if defined(__GNUC__) || defined(__SUNPRO_C)
180
196
  #define pg_attribute_aligned(a) __attribute__((aligned(a)))
181
197
  #define pg_attribute_noreturn() __attribute__((noreturn))
182
198
  #define pg_attribute_packed() __attribute__((packed))
@@ -207,8 +223,8 @@
207
223
  * choose not to. But, if possible, don't force inlining in unoptimized
208
224
  * debug builds.
209
225
  */
210
- #if (defined(__GNUC__) && __GNUC__ > 3 && defined(__OPTIMIZE__)) || defined(__SUNPRO_C) || defined(__IBMC__)
211
- /* GCC > 3, Sunpro and XLC support always_inline via __attribute__ */
226
+ #if (defined(__GNUC__) && __GNUC__ > 3 && defined(__OPTIMIZE__)) || defined(__SUNPRO_C)
227
+ /* GCC > 3 and Sunpro support always_inline via __attribute__ */
212
228
  #define pg_attribute_always_inline __attribute__((always_inline)) inline
213
229
  #elif defined(_MSC_VER)
214
230
  /* MSVC has a special keyword for this */
@@ -224,8 +240,8 @@
224
240
  * for proper cost attribution. Note that unlike the pg_attribute_XXX macros
225
241
  * above, this should be placed before the function's return type and name.
226
242
  */
227
- /* GCC, Sunpro and XLC support noinline via __attribute__ */
228
- #if (defined(__GNUC__) && __GNUC__ > 2) || defined(__SUNPRO_C) || defined(__IBMC__)
243
+ /* GCC and Sunpro support noinline via __attribute__ */
244
+ #if (defined(__GNUC__) && __GNUC__ > 2) || defined(__SUNPRO_C)
229
245
  #define pg_noinline __attribute__((noinline))
230
246
  /* msvc via declspec */
231
247
  #elif defined(_MSC_VER)
@@ -1055,30 +1071,6 @@ extern void ExceptionalCondition(const char *conditionName,
1055
1071
  } while (0)
1056
1072
 
1057
1073
 
1058
- /*
1059
- * MemSetTest/MemSetLoop are a variant version that allow all the tests in
1060
- * MemSet to be done at compile time in cases where "val" and "len" are
1061
- * constants *and* we know the "start" pointer must be word-aligned.
1062
- * If MemSetTest succeeds, then it is okay to use MemSetLoop, otherwise use
1063
- * MemSetAligned. Beware of multiple evaluations of the arguments when using
1064
- * this approach.
1065
- */
1066
- #define MemSetTest(val, len) \
1067
- ( ((len) & LONG_ALIGN_MASK) == 0 && \
1068
- (len) <= MEMSET_LOOP_LIMIT && \
1069
- MEMSET_LOOP_LIMIT != 0 && \
1070
- (val) == 0 )
1071
-
1072
- #define MemSetLoop(start, val, len) \
1073
- do \
1074
- { \
1075
- long * _start = (long *) (start); \
1076
- long * _stop = (long *) ((char *) _start + (Size) (len)); \
1077
- \
1078
- while (_start < _stop) \
1079
- *_start++ = 0; \
1080
- } while (0)
1081
-
1082
1074
  /*
1083
1075
  * Macros for range-checking float values before converting to integer.
1084
1076
  * We must be careful here that the boundary values are expressed exactly
@@ -1240,7 +1232,10 @@ typedef union PGAlignedXLogBlock
1240
1232
  * Note that this only works in function scope, not for global variables (it'd
1241
1233
  * be nice, but not trivial, to improve that).
1242
1234
  */
1243
- #if defined(HAVE__BUILTIN_TYPES_COMPATIBLE_P)
1235
+ #if defined(__cplusplus)
1236
+ #define unconstify(underlying_type, expr) const_cast<underlying_type>(expr)
1237
+ #define unvolatize(underlying_type, expr) const_cast<underlying_type>(expr)
1238
+ #elif defined(HAVE__BUILTIN_TYPES_COMPATIBLE_P)
1244
1239
  #define unconstify(underlying_type, expr) \
1245
1240
  (StaticAssertExpr(__builtin_types_compatible_p(__typeof(expr), const underlying_type), \
1246
1241
  "wrong cast"), \
@@ -4,7 +4,7 @@
4
4
  * prototypes for functions in backend/catalog/catalog.c
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/catalog/catalog.h
@@ -21,11 +21,13 @@
21
21
  extern bool IsSystemRelation(Relation relation);
22
22
  extern bool IsToastRelation(Relation relation);
23
23
  extern bool IsCatalogRelation(Relation relation);
24
+ extern bool IsInplaceUpdateRelation(Relation relation);
24
25
 
25
26
  extern bool IsSystemClass(Oid relid, Form_pg_class reltuple);
26
27
  extern bool IsToastClass(Form_pg_class reltuple);
27
28
 
28
29
  extern bool IsCatalogRelationOid(Oid relid);
30
+ extern bool IsInplaceUpdateOid(Oid relid);
29
31
 
30
32
  extern bool IsCatalogNamespace(Oid namespaceId);
31
33
  extern bool IsToastNamespace(Oid namespaceId);
@@ -38,7 +38,7 @@
38
38
  * parsenodes.h will warrant a catversion update.
39
39
  *
40
40
  *
41
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
41
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
42
42
  * Portions Copyright (c) 1994, Regents of the University of California
43
43
  *
44
44
  * src/include/catalog/catversion.h
@@ -57,6 +57,6 @@
57
57
  */
58
58
 
59
59
  /* yyyymmddN */
60
- #define CATALOG_VERSION_NO 202307071
60
+ #define CATALOG_VERSION_NO 202406281
61
61
 
62
62
  #endif
@@ -4,7 +4,7 @@
4
4
  * Routines to support inter-object dependencies.
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/catalog/dependency.h
@@ -36,7 +36,7 @@ typedef enum DependencyType
36
36
  DEPENDENCY_PARTITION_PRI = 'P',
37
37
  DEPENDENCY_PARTITION_SEC = 'S',
38
38
  DEPENDENCY_EXTENSION = 'e',
39
- DEPENDENCY_AUTO_EXTENSION = 'x'
39
+ DEPENDENCY_AUTO_EXTENSION = 'x',
40
40
  } DependencyType;
41
41
 
42
42
  /*
@@ -56,11 +56,17 @@ typedef enum DependencyType
56
56
  * created for the owner of an object; hence two objects may be linked by
57
57
  * one or the other, but not both, of these dependency types.)
58
58
  *
59
- * (c) a SHARED_DEPENDENCY_POLICY entry means that the referenced object is
59
+ * (c) a SHARED_DEPENDENCY_INITACL entry means that the referenced object is
60
+ * a role mentioned in a pg_init_privs entry for the dependent object.
61
+ * The referenced object must be a pg_authid entry. (Unlike the case for
62
+ * SHARED_DEPENDENCY_ACL, we make an entry for such a role whether or not
63
+ * it is the object's owner.)
64
+ *
65
+ * (d) a SHARED_DEPENDENCY_POLICY entry means that the referenced object is
60
66
  * a role mentioned in a policy object. The referenced object must be a
61
67
  * pg_authid entry.
62
68
  *
63
- * (d) a SHARED_DEPENDENCY_TABLESPACE entry means that the referenced
69
+ * (e) a SHARED_DEPENDENCY_TABLESPACE entry means that the referenced
64
70
  * object is a tablespace mentioned in a relation without storage. The
65
71
  * referenced object must be a pg_tablespace entry. (Relations that have
66
72
  * storage don't need this: they are protected by the existence of a physical
@@ -73,65 +79,15 @@ typedef enum SharedDependencyType
73
79
  {
74
80
  SHARED_DEPENDENCY_OWNER = 'o',
75
81
  SHARED_DEPENDENCY_ACL = 'a',
82
+ SHARED_DEPENDENCY_INITACL = 'i',
76
83
  SHARED_DEPENDENCY_POLICY = 'r',
77
84
  SHARED_DEPENDENCY_TABLESPACE = 't',
78
- SHARED_DEPENDENCY_INVALID = 0
85
+ SHARED_DEPENDENCY_INVALID = 0,
79
86
  } SharedDependencyType;
80
87
 
81
88
  /* expansible list of ObjectAddresses (private in dependency.c) */
82
89
  typedef struct ObjectAddresses ObjectAddresses;
83
90
 
84
- /*
85
- * This enum covers all system catalogs whose OIDs can appear in
86
- * pg_depend.classId or pg_shdepend.classId. Keep object_classes[] in sync.
87
- */
88
- typedef enum ObjectClass
89
- {
90
- OCLASS_CLASS, /* pg_class */
91
- OCLASS_PROC, /* pg_proc */
92
- OCLASS_TYPE, /* pg_type */
93
- OCLASS_CAST, /* pg_cast */
94
- OCLASS_COLLATION, /* pg_collation */
95
- OCLASS_CONSTRAINT, /* pg_constraint */
96
- OCLASS_CONVERSION, /* pg_conversion */
97
- OCLASS_DEFAULT, /* pg_attrdef */
98
- OCLASS_LANGUAGE, /* pg_language */
99
- OCLASS_LARGEOBJECT, /* pg_largeobject */
100
- OCLASS_OPERATOR, /* pg_operator */
101
- OCLASS_OPCLASS, /* pg_opclass */
102
- OCLASS_OPFAMILY, /* pg_opfamily */
103
- OCLASS_AM, /* pg_am */
104
- OCLASS_AMOP, /* pg_amop */
105
- OCLASS_AMPROC, /* pg_amproc */
106
- OCLASS_REWRITE, /* pg_rewrite */
107
- OCLASS_TRIGGER, /* pg_trigger */
108
- OCLASS_SCHEMA, /* pg_namespace */
109
- OCLASS_STATISTIC_EXT, /* pg_statistic_ext */
110
- OCLASS_TSPARSER, /* pg_ts_parser */
111
- OCLASS_TSDICT, /* pg_ts_dict */
112
- OCLASS_TSTEMPLATE, /* pg_ts_template */
113
- OCLASS_TSCONFIG, /* pg_ts_config */
114
- OCLASS_ROLE, /* pg_authid */
115
- OCLASS_ROLE_MEMBERSHIP, /* pg_auth_members */
116
- OCLASS_DATABASE, /* pg_database */
117
- OCLASS_TBLSPACE, /* pg_tablespace */
118
- OCLASS_FDW, /* pg_foreign_data_wrapper */
119
- OCLASS_FOREIGN_SERVER, /* pg_foreign_server */
120
- OCLASS_USER_MAPPING, /* pg_user_mapping */
121
- OCLASS_DEFACL, /* pg_default_acl */
122
- OCLASS_EXTENSION, /* pg_extension */
123
- OCLASS_EVENT_TRIGGER, /* pg_event_trigger */
124
- OCLASS_PARAMETER_ACL, /* pg_parameter_acl */
125
- OCLASS_POLICY, /* pg_policy */
126
- OCLASS_PUBLICATION, /* pg_publication */
127
- OCLASS_PUBLICATION_NAMESPACE, /* pg_publication_namespace */
128
- OCLASS_PUBLICATION_REL, /* pg_publication_rel */
129
- OCLASS_SUBSCRIPTION, /* pg_subscription */
130
- OCLASS_TRANSFORM /* pg_transform */
131
- } ObjectClass;
132
-
133
- #define LAST_OCLASS OCLASS_TRANSFORM
134
-
135
91
  /* flag bits for performDeletion/performMultipleDeletions: */
136
92
  #define PERFORM_DELETION_INTERNAL 0x0001 /* internal action */
137
93
  #define PERFORM_DELETION_CONCURRENTLY 0x0002 /* concurrent drop */
@@ -164,8 +120,6 @@ extern void recordDependencyOnSingleRelExpr(const ObjectAddress *depender,
164
120
  DependencyType self_behavior,
165
121
  bool reverse_self);
166
122
 
167
- extern ObjectClass getObjectClass(const ObjectAddress *object);
168
-
169
123
  extern ObjectAddresses *new_object_addresses(void);
170
124
 
171
125
  extern void add_exact_object_address(const ObjectAddress *object,
@@ -223,7 +177,7 @@ extern List *getAutoExtensionsOfObject(Oid classId, Oid objectId);
223
177
 
224
178
  extern bool sequenceIsOwned(Oid seqId, char deptype, Oid *tableId, int32 *colId);
225
179
  extern List *getOwnedSequences(Oid relid);
226
- extern Oid getIdentitySequence(Oid relid, AttrNumber attnum, bool missing_ok);
180
+ extern Oid getIdentitySequence(Relation rel, AttrNumber attnum, bool missing_ok);
227
181
 
228
182
  extern Oid get_index_constraint(Oid indexId);
229
183
 
@@ -254,6 +208,10 @@ extern void updateAclDependencies(Oid classId, Oid objectId, int32 objsubId,
254
208
  int noldmembers, Oid *oldmembers,
255
209
  int nnewmembers, Oid *newmembers);
256
210
 
211
+ extern void updateInitAclDependencies(Oid classId, Oid objectId, int32 objsubId,
212
+ int noldmembers, Oid *oldmembers,
213
+ int nnewmembers, Oid *newmembers);
214
+
257
215
  extern bool checkSharedDependencies(Oid classId, Oid objectId,
258
216
  char **detail_msg, char **detail_log_msg);
259
217
 
@@ -9,7 +9,7 @@
9
9
  * bootstrap file from these header files.)
10
10
  *
11
11
  *
12
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
12
+ * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
13
13
  * Portions Copyright (c) 1994, Regents of the University of California
14
14
  *
15
15
  * src/include/catalog/genbki.h
@@ -76,14 +76,14 @@
76
76
  * The first two arguments are the index's name and OID. The third argument
77
77
  * is the name of a #define to generate for its OID. References to the index
78
78
  * in the C code should always use these #defines, not the actual index name
79
- * (much less the numeric OID). The rest is much like a standard 'create
80
- * index' SQL command.
79
+ * (much less the numeric OID). The fourth argument is the table name. The
80
+ * rest is much like a standard 'create index' SQL command.
81
81
  *
82
82
  * The macro definitions are just to keep the C compiler from spitting up.
83
83
  */
84
- #define DECLARE_INDEX(name,oid,oidmacro,decl) extern int no_such_variable
85
- #define DECLARE_UNIQUE_INDEX(name,oid,oidmacro,decl) extern int no_such_variable
86
- #define DECLARE_UNIQUE_INDEX_PKEY(name,oid,oidmacro,decl) extern int no_such_variable
84
+ #define DECLARE_INDEX(name,oid,oidmacro,tblname,decl) extern int no_such_variable
85
+ #define DECLARE_UNIQUE_INDEX(name,oid,oidmacro,tblname,decl) extern int no_such_variable
86
+ #define DECLARE_UNIQUE_INDEX_PKEY(name,oid,oidmacro,tblname,decl) extern int no_such_variable
87
87
 
88
88
  /*
89
89
  * These lines inform genbki.pl about manually-assigned OIDs that do not
@@ -120,6 +120,12 @@
120
120
  #define DECLARE_ARRAY_FOREIGN_KEY(cols,reftbl,refcols) extern int no_such_variable
121
121
  #define DECLARE_ARRAY_FOREIGN_KEY_OPT(cols,reftbl,refcols) extern int no_such_variable
122
122
 
123
+ /*
124
+ * Create a syscache with the given name, index, and bucket size. See
125
+ * syscache.c.
126
+ */
127
+ #define MAKE_SYSCACHE(name,idxname,nbuckets) extern int no_such_variable
128
+
123
129
  /* The following are never defined; they are here only for documentation. */
124
130
 
125
131
  /*