pg_query 2.2.0 → 4.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (467) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +59 -31
  4. data/Rakefile +2 -2
  5. data/ext/pg_query/include/access/amapi.h +45 -1
  6. data/ext/pg_query/include/access/attmap.h +1 -1
  7. data/ext/pg_query/include/access/attnum.h +2 -2
  8. data/ext/pg_query/include/access/clog.h +4 -2
  9. data/ext/pg_query/include/access/commit_ts.h +6 -9
  10. data/ext/pg_query/include/access/detoast.h +1 -11
  11. data/ext/pg_query/include/access/genam.h +15 -12
  12. data/ext/pg_query/include/access/gin.h +2 -2
  13. data/ext/pg_query/include/access/htup.h +1 -1
  14. data/ext/pg_query/include/access/htup_details.h +75 -87
  15. data/ext/pg_query/include/access/itup.h +7 -1
  16. data/ext/pg_query/include/access/parallel.h +2 -2
  17. data/ext/pg_query/include/access/printtup.h +1 -1
  18. data/ext/pg_query/include/access/relation.h +1 -1
  19. data/ext/pg_query/include/access/relscan.h +17 -2
  20. data/ext/pg_query/include/access/rmgr.h +30 -3
  21. data/ext/pg_query/include/access/rmgrlist.h +23 -23
  22. data/ext/pg_query/include/access/sdir.h +1 -1
  23. data/ext/pg_query/include/access/skey.h +1 -1
  24. data/ext/pg_query/include/access/stratnum.h +4 -2
  25. data/ext/pg_query/include/access/sysattr.h +1 -1
  26. data/ext/pg_query/include/access/table.h +2 -1
  27. data/ext/pg_query/include/access/tableam.h +272 -20
  28. data/ext/pg_query/include/access/toast_compression.h +73 -0
  29. data/ext/pg_query/include/access/transam.h +123 -13
  30. data/ext/pg_query/include/access/tupconvert.h +1 -1
  31. data/ext/pg_query/include/access/tupdesc.h +1 -1
  32. data/ext/pg_query/include/access/tupmacs.h +3 -3
  33. data/ext/pg_query/include/access/twophase.h +3 -1
  34. data/ext/pg_query/include/access/xact.h +73 -19
  35. data/ext/pg_query/include/access/xlog.h +60 -155
  36. data/ext/pg_query/include/access/xlog_internal.h +40 -13
  37. data/ext/pg_query/include/access/xlogdefs.h +8 -16
  38. data/ext/pg_query/include/access/xlogprefetcher.h +55 -0
  39. data/ext/pg_query/include/access/xlogreader.h +145 -39
  40. data/ext/pg_query/include/access/xlogrecord.h +18 -9
  41. data/ext/pg_query/include/access/xlogrecovery.h +157 -0
  42. data/ext/pg_query/include/c.h +101 -44
  43. data/ext/pg_query/include/catalog/catalog.h +3 -1
  44. data/ext/pg_query/include/catalog/catversion.h +2 -2
  45. data/ext/pg_query/include/catalog/dependency.h +8 -16
  46. data/ext/pg_query/include/catalog/genbki.h +83 -5
  47. data/ext/pg_query/include/catalog/index.h +18 -3
  48. data/ext/pg_query/include/catalog/indexing.h +12 -324
  49. data/ext/pg_query/include/catalog/namespace.h +4 -2
  50. data/ext/pg_query/include/catalog/objectaccess.h +70 -2
  51. data/ext/pg_query/include/catalog/objectaddress.h +11 -6
  52. data/ext/pg_query/include/catalog/pg_aggregate.h +14 -10
  53. data/ext/pg_query/include/catalog/pg_aggregate_d.h +2 -1
  54. data/ext/pg_query/include/catalog/pg_am.h +4 -1
  55. data/ext/pg_query/include/catalog/pg_am_d.h +3 -1
  56. data/ext/pg_query/include/catalog/pg_attribute.h +27 -10
  57. data/ext/pg_query/include/catalog/pg_attribute_d.h +21 -18
  58. data/ext/pg_query/include/catalog/pg_authid.h +7 -2
  59. data/ext/pg_query/include/catalog/pg_authid_d.h +17 -9
  60. data/ext/pg_query/include/catalog/pg_class.h +44 -14
  61. data/ext/pg_query/include/catalog/pg_class_d.h +30 -1
  62. data/ext/pg_query/include/catalog/pg_collation.h +33 -8
  63. data/ext/pg_query/include/catalog/pg_collation_d.h +20 -3
  64. data/ext/pg_query/include/catalog/pg_constraint.h +38 -12
  65. data/ext/pg_query/include/catalog/pg_constraint_d.h +10 -4
  66. data/ext/pg_query/include/catalog/pg_control.h +3 -5
  67. data/ext/pg_query/include/catalog/pg_conversion.h +7 -4
  68. data/ext/pg_query/include/catalog/pg_conversion_d.h +4 -1
  69. data/ext/pg_query/include/catalog/pg_depend.h +11 -7
  70. data/ext/pg_query/include/catalog/pg_depend_d.h +3 -1
  71. data/ext/pg_query/include/catalog/pg_event_trigger.h +9 -3
  72. data/ext/pg_query/include/catalog/pg_event_trigger_d.h +3 -1
  73. data/ext/pg_query/include/catalog/pg_index.h +17 -7
  74. data/ext/pg_query/include/catalog/pg_index_d.h +20 -17
  75. data/ext/pg_query/include/catalog/pg_language.h +10 -5
  76. data/ext/pg_query/include/catalog/pg_language_d.h +3 -1
  77. data/ext/pg_query/include/catalog/pg_namespace.h +7 -2
  78. data/ext/pg_query/include/catalog/pg_namespace_d.h +3 -1
  79. data/ext/pg_query/include/catalog/pg_opclass.h +8 -5
  80. data/ext/pg_query/include/catalog/pg_opclass_d.h +3 -1
  81. data/ext/pg_query/include/catalog/pg_operator.h +18 -15
  82. data/ext/pg_query/include/catalog/pg_operator_d.h +37 -1
  83. data/ext/pg_query/include/catalog/pg_opfamily.h +6 -3
  84. data/ext/pg_query/include/catalog/pg_opfamily_d.h +3 -1
  85. data/ext/pg_query/include/catalog/pg_parameter_acl.h +60 -0
  86. data/ext/pg_query/include/catalog/pg_parameter_acl_d.h +34 -0
  87. data/ext/pg_query/include/catalog/pg_partitioned_table.h +20 -9
  88. data/ext/pg_query/include/catalog/pg_partitioned_table_d.h +2 -1
  89. data/ext/pg_query/include/catalog/pg_proc.h +20 -11
  90. data/ext/pg_query/include/catalog/pg_proc_d.h +10 -8
  91. data/ext/pg_query/include/catalog/pg_publication.h +50 -7
  92. data/ext/pg_query/include/catalog/pg_publication_d.h +3 -1
  93. data/ext/pg_query/include/catalog/pg_replication_origin.h +6 -1
  94. data/ext/pg_query/include/catalog/pg_replication_origin_d.h +5 -1
  95. data/ext/pg_query/include/catalog/pg_statistic.h +19 -12
  96. data/ext/pg_query/include/catalog/pg_statistic_d.h +2 -1
  97. data/ext/pg_query/include/catalog/pg_statistic_ext.h +19 -5
  98. data/ext/pg_query/include/catalog/pg_statistic_ext_d.h +7 -2
  99. data/ext/pg_query/include/catalog/pg_transform.h +8 -5
  100. data/ext/pg_query/include/catalog/pg_transform_d.h +3 -1
  101. data/ext/pg_query/include/catalog/pg_trigger.h +24 -8
  102. data/ext/pg_query/include/catalog/pg_trigger_d.h +4 -1
  103. data/ext/pg_query/include/catalog/pg_ts_config.h +6 -3
  104. data/ext/pg_query/include/catalog/pg_ts_config_d.h +3 -1
  105. data/ext/pg_query/include/catalog/pg_ts_dict.h +8 -3
  106. data/ext/pg_query/include/catalog/pg_ts_dict_d.h +3 -1
  107. data/ext/pg_query/include/catalog/pg_ts_parser.h +6 -3
  108. data/ext/pg_query/include/catalog/pg_ts_parser_d.h +3 -1
  109. data/ext/pg_query/include/catalog/pg_ts_template.h +6 -3
  110. data/ext/pg_query/include/catalog/pg_ts_template_d.h +3 -1
  111. data/ext/pg_query/include/catalog/pg_type.h +55 -24
  112. data/ext/pg_query/include/catalog/pg_type_d.h +70 -31
  113. data/ext/pg_query/include/catalog/storage.h +5 -3
  114. data/ext/pg_query/include/commands/async.h +3 -4
  115. data/ext/pg_query/include/commands/dbcommands.h +2 -1
  116. data/ext/pg_query/include/commands/defrem.h +11 -24
  117. data/ext/pg_query/include/commands/event_trigger.h +2 -2
  118. data/ext/pg_query/include/commands/explain.h +1 -1
  119. data/ext/pg_query/include/commands/prepare.h +1 -1
  120. data/ext/pg_query/include/commands/tablespace.h +2 -2
  121. data/ext/pg_query/include/commands/trigger.h +18 -16
  122. data/ext/pg_query/include/commands/user.h +2 -2
  123. data/ext/pg_query/include/commands/vacuum.h +88 -41
  124. data/ext/pg_query/include/commands/variable.h +1 -1
  125. data/ext/pg_query/include/common/file_perm.h +4 -4
  126. data/ext/pg_query/include/common/hashfn.h +1 -1
  127. data/ext/pg_query/include/common/ip.h +1 -7
  128. data/ext/pg_query/include/common/keywords.h +2 -6
  129. data/ext/pg_query/include/common/kwlookup.h +1 -1
  130. data/ext/pg_query/include/common/pg_prng.h +60 -0
  131. data/ext/pg_query/include/common/relpath.h +2 -2
  132. data/ext/pg_query/include/common/string.h +24 -1
  133. data/ext/pg_query/include/common/unicode_combining_table.h +114 -2
  134. data/ext/pg_query/include/common/unicode_east_asian_fw_table.h +125 -0
  135. data/ext/pg_query/include/datatype/timestamp.h +40 -1
  136. data/ext/pg_query/include/executor/execdesc.h +1 -1
  137. data/ext/pg_query/include/executor/executor.h +65 -22
  138. data/ext/pg_query/include/executor/functions.h +17 -3
  139. data/ext/pg_query/include/executor/instrument.h +33 -16
  140. data/ext/pg_query/include/executor/spi.h +41 -3
  141. data/ext/pg_query/include/executor/tablefunc.h +1 -1
  142. data/ext/pg_query/include/executor/tuptable.h +1 -1
  143. data/ext/pg_query/include/fmgr.h +13 -7
  144. data/ext/pg_query/include/funcapi.h +16 -4
  145. data/ext/pg_query/include/getaddrinfo.h +1 -1
  146. data/ext/pg_query/include/jit/jit.h +11 -11
  147. data/ext/pg_query/include/kwlist_d.h +517 -494
  148. data/ext/pg_query/include/lib/dshash.h +112 -0
  149. data/ext/pg_query/include/lib/ilist.h +20 -1
  150. data/ext/pg_query/include/lib/pairingheap.h +1 -1
  151. data/ext/pg_query/include/lib/simplehash.h +140 -15
  152. data/ext/pg_query/include/lib/sort_template.h +432 -0
  153. data/ext/pg_query/include/lib/stringinfo.h +1 -1
  154. data/ext/pg_query/include/libpq/auth.h +6 -4
  155. data/ext/pg_query/include/libpq/crypt.h +5 -4
  156. data/ext/pg_query/include/libpq/hba.h +43 -4
  157. data/ext/pg_query/include/libpq/libpq-be.h +23 -6
  158. data/ext/pg_query/include/libpq/libpq.h +30 -20
  159. data/ext/pg_query/include/libpq/pqcomm.h +17 -31
  160. data/ext/pg_query/include/libpq/pqformat.h +1 -1
  161. data/ext/pg_query/include/libpq/pqsignal.h +4 -4
  162. data/ext/pg_query/include/mb/pg_wchar.h +105 -23
  163. data/ext/pg_query/include/mb/stringinfo_mb.h +1 -1
  164. data/ext/pg_query/include/miscadmin.h +47 -41
  165. data/ext/pg_query/include/nodes/bitmapset.h +1 -1
  166. data/ext/pg_query/include/nodes/execnodes.h +270 -78
  167. data/ext/pg_query/include/nodes/extensible.h +4 -2
  168. data/ext/pg_query/include/nodes/lockoptions.h +1 -1
  169. data/ext/pg_query/include/nodes/makefuncs.h +7 -6
  170. data/ext/pg_query/include/nodes/memnodes.h +5 -3
  171. data/ext/pg_query/include/nodes/nodeFuncs.h +1 -1
  172. data/ext/pg_query/include/nodes/nodes.h +30 -11
  173. data/ext/pg_query/include/nodes/params.h +1 -1
  174. data/ext/pg_query/include/nodes/parsenodes.h +322 -90
  175. data/ext/pg_query/include/nodes/pathnodes.h +243 -66
  176. data/ext/pg_query/include/nodes/pg_list.h +75 -69
  177. data/ext/pg_query/include/nodes/plannodes.h +111 -28
  178. data/ext/pg_query/include/nodes/primnodes.h +99 -47
  179. data/ext/pg_query/include/nodes/print.h +1 -1
  180. data/ext/pg_query/include/nodes/tidbitmap.h +1 -1
  181. data/ext/pg_query/include/nodes/value.h +58 -39
  182. data/ext/pg_query/include/optimizer/cost.h +9 -2
  183. data/ext/pg_query/include/optimizer/geqo.h +9 -7
  184. data/ext/pg_query/include/optimizer/geqo_gene.h +1 -1
  185. data/ext/pg_query/include/optimizer/optimizer.h +25 -17
  186. data/ext/pg_query/include/optimizer/paths.h +6 -6
  187. data/ext/pg_query/include/optimizer/planmain.h +15 -14
  188. data/ext/pg_query/include/parser/analyze.h +19 -5
  189. data/ext/pg_query/include/parser/gram.h +947 -913
  190. data/ext/pg_query/include/parser/gramparse.h +1 -1
  191. data/ext/pg_query/include/parser/kwlist.h +463 -453
  192. data/ext/pg_query/include/parser/parse_agg.h +2 -7
  193. data/ext/pg_query/include/parser/parse_coerce.h +3 -1
  194. data/ext/pg_query/include/parser/parse_expr.h +2 -3
  195. data/ext/pg_query/include/parser/parse_func.h +2 -1
  196. data/ext/pg_query/include/parser/parse_node.h +21 -9
  197. data/ext/pg_query/include/parser/parse_oper.h +1 -3
  198. data/ext/pg_query/include/parser/parse_relation.h +5 -4
  199. data/ext/pg_query/include/parser/parse_type.h +1 -1
  200. data/ext/pg_query/include/parser/parser.h +31 -4
  201. data/ext/pg_query/include/parser/parsetree.h +1 -1
  202. data/ext/pg_query/include/parser/scanner.h +1 -1
  203. data/ext/pg_query/include/parser/scansup.h +2 -5
  204. data/ext/pg_query/include/partitioning/partdefs.h +1 -1
  205. data/ext/pg_query/include/pg_config.h +83 -41
  206. data/ext/pg_query/include/pg_config_manual.h +74 -21
  207. data/ext/pg_query/include/pg_getopt.h +6 -6
  208. data/ext/pg_query/include/pg_query.h +5 -4
  209. data/ext/pg_query/include/pg_query_enum_defs.c +358 -241
  210. data/ext/pg_query/include/pg_query_fingerprint_conds.c +44 -7
  211. data/ext/pg_query/include/pg_query_fingerprint_defs.c +939 -113
  212. data/ext/pg_query/include/pg_query_outfuncs_conds.c +43 -13
  213. data/ext/pg_query/include/pg_query_outfuncs_defs.c +151 -26
  214. data/ext/pg_query/include/pg_query_readfuncs_conds.c +11 -2
  215. data/ext/pg_query/include/pg_query_readfuncs_defs.c +173 -30
  216. data/ext/pg_query/include/pg_trace.h +1 -1
  217. data/ext/pg_query/include/pgstat.h +449 -1238
  218. data/ext/pg_query/include/pgtime.h +14 -4
  219. data/ext/pg_query/include/pl_gram.h +126 -128
  220. data/ext/pg_query/include/pl_reserved_kwlist.h +1 -1
  221. data/ext/pg_query/include/pl_reserved_kwlist_d.h +10 -10
  222. data/ext/pg_query/include/pl_unreserved_kwlist.h +2 -3
  223. data/ext/pg_query/include/pl_unreserved_kwlist_d.h +54 -56
  224. data/ext/pg_query/include/plerrcodes.h +9 -1
  225. data/ext/pg_query/include/plpgsql.h +52 -54
  226. data/ext/pg_query/include/port/atomics/arch-arm.h +7 -1
  227. data/ext/pg_query/include/port/atomics/arch-ppc.h +1 -1
  228. data/ext/pg_query/include/port/atomics/arch-x86.h +1 -1
  229. data/ext/pg_query/include/port/atomics/fallback.h +1 -1
  230. data/ext/pg_query/include/port/atomics/generic-gcc.h +3 -3
  231. data/ext/pg_query/include/port/atomics/generic.h +1 -1
  232. data/ext/pg_query/include/port/atomics.h +1 -1
  233. data/ext/pg_query/include/port/pg_bitutils.h +40 -10
  234. data/ext/pg_query/include/port/pg_bswap.h +1 -1
  235. data/ext/pg_query/include/port/pg_crc32c.h +1 -1
  236. data/ext/pg_query/include/port.h +71 -46
  237. data/ext/pg_query/include/portability/instr_time.h +1 -1
  238. data/ext/pg_query/include/postgres.h +60 -16
  239. data/ext/pg_query/include/postmaster/autovacuum.h +17 -17
  240. data/ext/pg_query/include/postmaster/auxprocess.h +20 -0
  241. data/ext/pg_query/include/postmaster/bgworker.h +2 -1
  242. data/ext/pg_query/include/postmaster/bgworker_internals.h +2 -2
  243. data/ext/pg_query/include/postmaster/bgwriter.h +5 -5
  244. data/ext/pg_query/include/postmaster/fork_process.h +1 -1
  245. data/ext/pg_query/include/postmaster/interrupt.h +1 -1
  246. data/ext/pg_query/include/postmaster/pgarch.h +42 -8
  247. data/ext/pg_query/include/postmaster/postmaster.h +18 -17
  248. data/ext/pg_query/include/postmaster/startup.h +39 -0
  249. data/ext/pg_query/include/postmaster/syslogger.h +15 -10
  250. data/ext/pg_query/include/postmaster/walwriter.h +3 -3
  251. data/ext/pg_query/include/protobuf/pg_query.pb-c.h +1419 -914
  252. data/ext/pg_query/include/protobuf/pg_query.pb.h +43678 -32769
  253. data/ext/pg_query/include/regex/regex.h +18 -16
  254. data/ext/pg_query/include/replication/logicallauncher.h +3 -5
  255. data/ext/pg_query/include/replication/logicalproto.h +161 -17
  256. data/ext/pg_query/include/replication/logicalworker.h +1 -1
  257. data/ext/pg_query/include/replication/origin.h +7 -7
  258. data/ext/pg_query/include/replication/reorderbuffer.h +259 -42
  259. data/ext/pg_query/include/replication/slot.h +22 -11
  260. data/ext/pg_query/include/replication/syncrep.h +5 -5
  261. data/ext/pg_query/include/replication/walreceiver.h +145 -13
  262. data/ext/pg_query/include/replication/walsender.h +8 -8
  263. data/ext/pg_query/include/rewrite/prs2lock.h +1 -1
  264. data/ext/pg_query/include/rewrite/rewriteHandler.h +1 -3
  265. data/ext/pg_query/include/rewrite/rewriteManip.h +1 -1
  266. data/ext/pg_query/include/rewrite/rewriteSupport.h +1 -1
  267. data/ext/pg_query/include/storage/backendid.h +3 -3
  268. data/ext/pg_query/include/storage/block.h +4 -10
  269. data/ext/pg_query/include/storage/buf.h +1 -1
  270. data/ext/pg_query/include/storage/bufmgr.h +19 -14
  271. data/ext/pg_query/include/storage/bufpage.h +6 -8
  272. data/ext/pg_query/include/storage/condition_variable.h +13 -2
  273. data/ext/pg_query/include/storage/dsm.h +4 -1
  274. data/ext/pg_query/include/storage/dsm_impl.h +3 -2
  275. data/ext/pg_query/include/storage/fd.h +33 -3
  276. data/ext/pg_query/include/storage/fileset.h +40 -0
  277. data/ext/pg_query/include/storage/ipc.h +4 -1
  278. data/ext/pg_query/include/storage/item.h +1 -1
  279. data/ext/pg_query/include/storage/itemid.h +1 -1
  280. data/ext/pg_query/include/storage/itemptr.h +3 -1
  281. data/ext/pg_query/include/storage/large_object.h +2 -2
  282. data/ext/pg_query/include/storage/latch.h +9 -13
  283. data/ext/pg_query/include/storage/lmgr.h +2 -1
  284. data/ext/pg_query/include/storage/lock.h +11 -8
  285. data/ext/pg_query/include/storage/lockdefs.h +2 -2
  286. data/ext/pg_query/include/storage/lwlock.h +5 -32
  287. data/ext/pg_query/include/storage/lwlocknames.h +0 -1
  288. data/ext/pg_query/include/storage/off.h +1 -1
  289. data/ext/pg_query/include/storage/pg_sema.h +1 -1
  290. data/ext/pg_query/include/storage/pg_shmem.h +9 -7
  291. data/ext/pg_query/include/storage/pmsignal.h +15 -4
  292. data/ext/pg_query/include/storage/predicate.h +4 -4
  293. data/ext/pg_query/include/storage/proc.h +173 -59
  294. data/ext/pg_query/include/storage/procarray.h +98 -0
  295. data/ext/pg_query/include/storage/proclist_types.h +1 -1
  296. data/ext/pg_query/include/storage/procsignal.h +3 -7
  297. data/ext/pg_query/include/storage/relfilenode.h +1 -1
  298. data/ext/pg_query/include/storage/s_lock.h +60 -21
  299. data/ext/pg_query/include/storage/sharedfileset.h +3 -11
  300. data/ext/pg_query/include/storage/shm_mq.h +5 -4
  301. data/ext/pg_query/include/storage/shm_toc.h +1 -1
  302. data/ext/pg_query/include/storage/shmem.h +1 -1
  303. data/ext/pg_query/include/storage/sinval.h +3 -3
  304. data/ext/pg_query/include/storage/sinvaladt.h +1 -1
  305. data/ext/pg_query/include/storage/smgr.h +10 -8
  306. data/ext/pg_query/include/storage/spin.h +2 -2
  307. data/ext/pg_query/include/storage/standby.h +13 -6
  308. data/ext/pg_query/include/storage/standbydefs.h +2 -2
  309. data/ext/pg_query/include/storage/sync.h +7 -3
  310. data/ext/pg_query/include/tcop/cmdtag.h +1 -1
  311. data/ext/pg_query/include/tcop/cmdtaglist.h +3 -2
  312. data/ext/pg_query/include/tcop/deparse_utility.h +1 -1
  313. data/ext/pg_query/include/tcop/dest.h +1 -1
  314. data/ext/pg_query/include/tcop/fastpath.h +1 -2
  315. data/ext/pg_query/include/tcop/pquery.h +1 -1
  316. data/ext/pg_query/include/tcop/tcopprot.h +19 -11
  317. data/ext/pg_query/include/tcop/utility.h +7 -3
  318. data/ext/pg_query/include/tsearch/ts_cache.h +2 -2
  319. data/ext/pg_query/include/utils/acl.h +24 -3
  320. data/ext/pg_query/include/utils/aclchk_internal.h +1 -1
  321. data/ext/pg_query/include/utils/array.h +7 -2
  322. data/ext/pg_query/include/utils/backend_progress.h +44 -0
  323. data/ext/pg_query/include/utils/backend_status.h +321 -0
  324. data/ext/pg_query/include/utils/builtins.h +10 -11
  325. data/ext/pg_query/include/utils/bytea.h +3 -2
  326. data/ext/pg_query/include/utils/catcache.h +1 -1
  327. data/ext/pg_query/include/utils/date.h +1 -1
  328. data/ext/pg_query/include/utils/datetime.h +8 -7
  329. data/ext/pg_query/include/utils/datum.h +9 -1
  330. data/ext/pg_query/include/utils/dsa.h +1 -1
  331. data/ext/pg_query/include/utils/dynahash.h +4 -3
  332. data/ext/pg_query/include/utils/elog.h +52 -21
  333. data/ext/pg_query/include/utils/errcodes.h +2 -0
  334. data/ext/pg_query/include/utils/expandeddatum.h +1 -1
  335. data/ext/pg_query/include/utils/expandedrecord.h +1 -1
  336. data/ext/pg_query/include/utils/float.h +7 -7
  337. data/ext/pg_query/include/utils/fmgroids.h +1300 -696
  338. data/ext/pg_query/include/utils/fmgrprotos.h +199 -16
  339. data/ext/pg_query/include/utils/fmgrtab.h +6 -5
  340. data/ext/pg_query/include/utils/guc.h +69 -43
  341. data/ext/pg_query/include/utils/guc_tables.h +23 -19
  342. data/ext/pg_query/include/utils/hsearch.h +15 -11
  343. data/ext/pg_query/include/utils/inval.h +4 -1
  344. data/ext/pg_query/include/utils/lsyscache.h +11 -1
  345. data/ext/pg_query/include/utils/memdebug.h +1 -1
  346. data/ext/pg_query/include/utils/memutils.h +8 -3
  347. data/ext/pg_query/include/utils/numeric.h +19 -5
  348. data/ext/pg_query/include/utils/palloc.h +25 -3
  349. data/ext/pg_query/include/utils/partcache.h +1 -1
  350. data/ext/pg_query/include/utils/pg_locale.h +17 -9
  351. data/ext/pg_query/include/utils/pg_lsn.h +1 -1
  352. data/ext/pg_query/include/utils/pgstat_internal.h +784 -0
  353. data/ext/pg_query/include/utils/pidfile.h +1 -1
  354. data/ext/pg_query/include/utils/plancache.h +6 -5
  355. data/ext/pg_query/include/utils/portal.h +10 -12
  356. data/ext/pg_query/include/utils/ps_status.h +1 -1
  357. data/ext/pg_query/include/utils/queryenvironment.h +1 -1
  358. data/ext/pg_query/include/utils/queryjumble.h +88 -0
  359. data/ext/pg_query/include/utils/regproc.h +14 -3
  360. data/ext/pg_query/include/utils/rel.h +71 -19
  361. data/ext/pg_query/include/utils/relcache.h +8 -5
  362. data/ext/pg_query/include/utils/reltrigger.h +1 -1
  363. data/ext/pg_query/include/utils/resowner.h +1 -1
  364. data/ext/pg_query/include/utils/rls.h +2 -2
  365. data/ext/pg_query/include/utils/ruleutils.h +4 -1
  366. data/ext/pg_query/include/utils/sharedtuplestore.h +1 -1
  367. data/ext/pg_query/include/utils/snapmgr.h +34 -14
  368. data/ext/pg_query/include/utils/snapshot.h +14 -1
  369. data/ext/pg_query/include/utils/sortsupport.h +117 -2
  370. data/ext/pg_query/include/utils/syscache.h +6 -1
  371. data/ext/pg_query/include/utils/timeout.h +11 -4
  372. data/ext/pg_query/include/utils/timestamp.h +6 -5
  373. data/ext/pg_query/include/utils/tuplesort.h +25 -11
  374. data/ext/pg_query/include/utils/tuplestore.h +2 -2
  375. data/ext/pg_query/include/utils/typcache.h +24 -17
  376. data/ext/pg_query/include/utils/tzparser.h +1 -1
  377. data/ext/pg_query/include/utils/varlena.h +5 -3
  378. data/ext/pg_query/include/utils/wait_event.h +289 -0
  379. data/ext/pg_query/include/utils/xml.h +4 -4
  380. data/ext/pg_query/pg_query.pb-c.c +4302 -2304
  381. data/ext/pg_query/pg_query_deparse.c +1106 -373
  382. data/ext/pg_query/pg_query_fingerprint.c +30 -10
  383. data/ext/pg_query/pg_query_json_plpgsql.c +0 -25
  384. data/ext/pg_query/pg_query_normalize.c +1 -1
  385. data/ext/pg_query/pg_query_outfuncs_json.c +54 -16
  386. data/ext/pg_query/pg_query_outfuncs_protobuf.c +70 -10
  387. data/ext/pg_query/pg_query_parse.c +1 -1
  388. data/ext/pg_query/pg_query_readfuncs_protobuf.c +42 -8
  389. data/ext/pg_query/pg_query_scan.c +2 -1
  390. data/ext/pg_query/pg_query_split.c +3 -2
  391. data/ext/pg_query/src_backend_catalog_namespace.c +20 -9
  392. data/ext/pg_query/src_backend_catalog_pg_proc.c +4 -1
  393. data/ext/pg_query/src_backend_commands_define.c +11 -1
  394. data/ext/pg_query/src_backend_nodes_bitmapset.c +3 -1
  395. data/ext/pg_query/src_backend_nodes_copyfuncs.c +401 -76
  396. data/ext/pg_query/src_backend_nodes_equalfuncs.c +290 -46
  397. data/ext/pg_query/src_backend_nodes_extensible.c +1 -1
  398. data/ext/pg_query/src_backend_nodes_list.c +74 -11
  399. data/ext/pg_query/src_backend_nodes_makefuncs.c +5 -4
  400. data/ext/pg_query/src_backend_nodes_nodeFuncs.c +55 -12
  401. data/ext/pg_query/src_backend_nodes_value.c +28 -19
  402. data/ext/pg_query/src_backend_parser_gram.c +33874 -31261
  403. data/ext/pg_query/src_backend_parser_parser.c +26 -7
  404. data/ext/pg_query/src_backend_parser_scan.c +172 -209
  405. data/ext/pg_query/src_backend_parser_scansup.c +4 -28
  406. data/ext/pg_query/src_backend_postmaster_postmaster.c +77 -106
  407. data/ext/pg_query/src_backend_storage_ipc_ipc.c +13 -4
  408. data/ext/pg_query/src_backend_storage_lmgr_s_lock.c +5 -4
  409. data/ext/pg_query/src_backend_tcop_postgres.c +62 -23
  410. data/ext/pg_query/src_backend_utils_activity_pgstat_database.c +140 -0
  411. data/ext/pg_query/src_backend_utils_adt_datum.c +13 -1
  412. data/ext/pg_query/src_backend_utils_adt_expandeddatum.c +1 -1
  413. data/ext/pg_query/src_backend_utils_adt_format_type.c +6 -2
  414. data/ext/pg_query/src_backend_utils_adt_ruleutils.c +71 -5
  415. data/ext/pg_query/src_backend_utils_error_assert.c +16 -14
  416. data/ext/pg_query/src_backend_utils_error_elog.c +172 -99
  417. data/ext/pg_query/src_backend_utils_fmgr_fmgr.c +12 -17
  418. data/ext/pg_query/src_backend_utils_hash_dynahash.c +40 -10
  419. data/ext/pg_query/src_backend_utils_init_globals.c +5 -5
  420. data/ext/pg_query/src_backend_utils_mb_mbutils.c +55 -66
  421. data/ext/pg_query/src_backend_utils_misc_guc.c +206 -45
  422. data/ext/pg_query/src_backend_utils_mmgr_aset.c +7 -5
  423. data/ext/pg_query/src_backend_utils_mmgr_mcxt.c +123 -35
  424. data/ext/pg_query/src_common_encnames.c +1 -1
  425. data/ext/pg_query/src_common_hashfn.c +3 -3
  426. data/ext/pg_query/src_common_keywords.c +15 -2
  427. data/ext/pg_query/src_common_kwlist_d.h +517 -494
  428. data/ext/pg_query/src_common_kwlookup.c +1 -1
  429. data/ext/pg_query/src_common_pg_prng.c +152 -0
  430. data/ext/pg_query/src_common_psprintf.c +1 -1
  431. data/ext/pg_query/src_common_string.c +7 -1
  432. data/ext/pg_query/src_common_stringinfo.c +1 -1
  433. data/ext/pg_query/src_common_wchar.c +701 -109
  434. data/ext/pg_query/src_pl_plpgsql_src_pl_comp.c +45 -20
  435. data/ext/pg_query/src_pl_plpgsql_src_pl_funcs.c +1 -18
  436. data/ext/pg_query/src_pl_plpgsql_src_pl_gram.c +1233 -1259
  437. data/ext/pg_query/src_pl_plpgsql_src_pl_handler.c +1 -1
  438. data/ext/pg_query/src_pl_plpgsql_src_pl_reserved_kwlist_d.h +10 -10
  439. data/ext/pg_query/src_pl_plpgsql_src_pl_scanner.c +2 -2
  440. data/ext/pg_query/src_pl_plpgsql_src_pl_unreserved_kwlist_d.h +54 -56
  441. data/ext/pg_query/src_port_pg_bitutils.c +41 -31
  442. data/ext/pg_query/src_port_pgsleep.c +1 -1
  443. data/ext/pg_query/src_port_pgstrcasecmp.c +1 -1
  444. data/ext/pg_query/src_port_qsort.c +12 -224
  445. data/ext/pg_query/src_port_snprintf.c +37 -13
  446. data/ext/pg_query/src_port_strerror.c +9 -19
  447. data/ext/pg_query/src_port_strnlen.c +1 -1
  448. data/lib/pg_query/filter_columns.rb +1 -1
  449. data/lib/pg_query/fingerprint.rb +5 -1
  450. data/lib/pg_query/node.rb +2 -2
  451. data/lib/pg_query/param_refs.rb +1 -1
  452. data/lib/pg_query/parse.rb +20 -8
  453. data/lib/pg_query/pg_query_pb.rb +1108 -942
  454. data/lib/pg_query/treewalker.rb +6 -0
  455. data/lib/pg_query/truncate.rb +1 -1
  456. data/lib/pg_query/version.rb +1 -1
  457. metadata +27 -17
  458. data/ext/pg_query/include/access/xloginsert.h +0 -64
  459. data/ext/pg_query/include/bootstrap/bootstrap.h +0 -62
  460. data/ext/pg_query/include/parser/parse_clause.h +0 -54
  461. data/ext/pg_query/include/parser/parse_collate.h +0 -27
  462. data/ext/pg_query/include/parser/parse_target.h +0 -46
  463. data/ext/pg_query/pg_query_ruby_freebsd.sym +0 -2
  464. data/ext/pg_query/src_backend_libpq_pqcomm.c +0 -659
  465. data/ext/pg_query/src_backend_parser_parse_expr.c +0 -313
  466. data/ext/pg_query/src_port_erand48.c +0 -127
  467. data/ext/pg_query/src_port_random.c +0 -31
@@ -3,7 +3,7 @@
3
3
  * kwlist_d.h
4
4
  * List of keywords represented as a ScanKeywordList.
5
5
  *
6
- * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
6
+ * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
7
7
  * Portions Copyright (c) 1994, Regents of the University of California
8
8
  *
9
9
  * NOTES
@@ -41,10 +41,12 @@ static const char ScanKeywords_kw_string[] =
41
41
  "array\0"
42
42
  "as\0"
43
43
  "asc\0"
44
+ "asensitive\0"
44
45
  "assertion\0"
45
46
  "assignment\0"
46
47
  "asymmetric\0"
47
48
  "at\0"
49
+ "atomic\0"
48
50
  "attach\0"
49
51
  "attribute\0"
50
52
  "authorization\0"
@@ -57,6 +59,7 @@ static const char ScanKeywords_kw_string[] =
57
59
  "bit\0"
58
60
  "boolean\0"
59
61
  "both\0"
62
+ "breadth\0"
60
63
  "by\0"
61
64
  "cache\0"
62
65
  "call\0"
@@ -84,6 +87,7 @@ static const char ScanKeywords_kw_string[] =
84
87
  "comments\0"
85
88
  "commit\0"
86
89
  "committed\0"
90
+ "compression\0"
87
91
  "concurrently\0"
88
92
  "configuration\0"
89
93
  "conflict\0"
@@ -125,6 +129,7 @@ static const char ScanKeywords_kw_string[] =
125
129
  "delimiter\0"
126
130
  "delimiters\0"
127
131
  "depends\0"
132
+ "depth\0"
128
133
  "desc\0"
129
134
  "detach\0"
130
135
  "dictionary\0"
@@ -160,6 +165,7 @@ static const char ScanKeywords_kw_string[] =
160
165
  "family\0"
161
166
  "fetch\0"
162
167
  "filter\0"
168
+ "finalize\0"
163
169
  "first\0"
164
170
  "float\0"
165
171
  "following\0"
@@ -242,8 +248,10 @@ static const char ScanKeywords_kw_string[] =
242
248
  "logged\0"
243
249
  "mapping\0"
244
250
  "match\0"
251
+ "matched\0"
245
252
  "materialized\0"
246
253
  "maxvalue\0"
254
+ "merge\0"
247
255
  "method\0"
248
256
  "minute\0"
249
257
  "minvalue\0"
@@ -298,6 +306,7 @@ static const char ScanKeywords_kw_string[] =
298
306
  "owned\0"
299
307
  "owner\0"
300
308
  "parallel\0"
309
+ "parameter\0"
301
310
  "parser\0"
302
311
  "partial\0"
303
312
  "partition\0"
@@ -341,6 +350,7 @@ static const char ScanKeywords_kw_string[] =
341
350
  "reset\0"
342
351
  "restart\0"
343
352
  "restrict\0"
353
+ "return\0"
344
354
  "returning\0"
345
355
  "returns\0"
346
356
  "revoke\0"
@@ -494,571 +504,584 @@ static const uint16 ScanKeywords_kw_offsets[] = {
494
504
  107,
495
505
  110,
496
506
  114,
497
- 124,
507
+ 125,
498
508
  135,
499
509
  146,
500
- 149,
501
- 156,
502
- 166,
503
- 180,
504
- 189,
505
- 196,
506
- 202,
507
- 210,
508
- 217,
509
- 224,
510
+ 157,
511
+ 160,
512
+ 167,
513
+ 174,
514
+ 184,
515
+ 198,
516
+ 207,
517
+ 214,
518
+ 220,
510
519
  228,
511
- 236,
512
- 241,
513
- 244,
514
- 250,
515
- 255,
516
- 262,
520
+ 235,
521
+ 242,
522
+ 246,
523
+ 254,
524
+ 259,
525
+ 267,
517
526
  270,
518
- 279,
519
- 284,
520
- 289,
521
- 297,
522
- 303,
523
- 308,
524
- 318,
527
+ 276,
528
+ 281,
529
+ 288,
530
+ 296,
531
+ 305,
532
+ 310,
533
+ 315,
534
+ 323,
535
+ 329,
525
536
  334,
526
- 340,
527
- 351,
528
- 357,
529
- 363,
530
- 371,
531
- 380,
532
- 388,
533
- 398,
534
- 405,
535
- 413,
536
- 421,
537
- 430,
538
- 437,
537
+ 344,
538
+ 360,
539
+ 366,
540
+ 377,
541
+ 383,
542
+ 389,
543
+ 397,
544
+ 406,
545
+ 414,
546
+ 424,
547
+ 431,
548
+ 439,
539
549
  447,
540
- 460,
541
- 474,
542
- 483,
543
- 494,
544
- 505,
545
- 517,
546
- 525,
547
- 534,
548
- 545,
549
- 550,
550
+ 456,
551
+ 463,
552
+ 473,
553
+ 485,
554
+ 498,
555
+ 512,
556
+ 521,
557
+ 532,
558
+ 543,
550
559
  555,
551
- 562,
552
- 568,
560
+ 563,
553
561
  572,
554
- 577,
555
- 585,
556
- 601,
557
- 614,
558
- 627,
559
- 642,
560
- 655,
561
- 673,
562
- 686,
562
+ 583,
563
+ 588,
564
+ 593,
565
+ 600,
566
+ 606,
567
+ 610,
568
+ 615,
569
+ 623,
570
+ 639,
571
+ 652,
572
+ 665,
573
+ 680,
563
574
  693,
564
- 699,
565
- 704,
566
- 713,
567
- 717,
568
- 728,
569
- 732,
570
- 740,
571
- 748,
572
- 756,
573
- 765,
574
- 776,
575
- 785,
576
- 793,
577
- 800,
578
- 810,
579
- 821,
580
- 829,
581
- 834,
582
- 841,
583
- 852,
584
- 860,
585
- 868,
586
- 877,
587
- 880,
588
- 889,
575
+ 711,
576
+ 724,
577
+ 731,
578
+ 737,
579
+ 742,
580
+ 751,
581
+ 755,
582
+ 766,
583
+ 770,
584
+ 778,
585
+ 786,
586
+ 794,
587
+ 803,
588
+ 814,
589
+ 823,
590
+ 831,
591
+ 838,
592
+ 848,
593
+ 859,
594
+ 867,
595
+ 873,
596
+ 878,
597
+ 885,
589
598
  896,
590
- 903,
591
- 908,
592
- 913,
593
- 918,
594
- 925,
595
- 934,
596
- 944,
597
- 948,
598
- 953,
599
- 960,
600
- 966,
601
- 973,
602
- 981,
603
- 991,
604
- 1001,
605
- 1009,
606
- 1016,
607
- 1024,
599
+ 904,
600
+ 912,
601
+ 921,
602
+ 924,
603
+ 933,
604
+ 940,
605
+ 947,
606
+ 952,
607
+ 957,
608
+ 962,
609
+ 969,
610
+ 978,
611
+ 988,
612
+ 992,
613
+ 997,
614
+ 1004,
615
+ 1010,
616
+ 1017,
617
+ 1025,
608
618
  1035,
609
619
  1045,
610
- 1054,
611
- 1062,
620
+ 1053,
621
+ 1060,
612
622
  1068,
613
- 1075,
614
- 1081,
615
- 1088,
616
- 1094,
617
- 1100,
618
- 1110,
619
- 1114,
620
- 1120,
621
- 1128,
622
- 1136,
623
- 1143,
624
- 1148,
623
+ 1079,
624
+ 1089,
625
+ 1098,
626
+ 1106,
627
+ 1112,
628
+ 1119,
629
+ 1125,
630
+ 1132,
631
+ 1141,
632
+ 1147,
625
633
  1153,
626
- 1162,
627
- 1172,
628
- 1182,
634
+ 1163,
635
+ 1167,
636
+ 1173,
637
+ 1181,
629
638
  1189,
630
- 1195,
631
- 1203,
632
- 1212,
633
- 1218,
634
- 1227,
635
- 1234,
639
+ 1196,
640
+ 1201,
641
+ 1206,
642
+ 1215,
643
+ 1225,
644
+ 1235,
636
645
  1242,
637
- 1249,
646
+ 1248,
638
647
  1256,
639
- 1261,
640
- 1266,
641
- 1275,
642
- 1278,
643
- 1284,
644
- 1294,
645
- 1304,
646
- 1313,
647
- 1320,
648
- 1323,
648
+ 1265,
649
+ 1271,
650
+ 1280,
651
+ 1287,
652
+ 1295,
653
+ 1302,
654
+ 1309,
655
+ 1314,
656
+ 1319,
657
+ 1328,
649
658
  1331,
650
- 1341,
651
- 1351,
659
+ 1337,
660
+ 1347,
652
661
  1357,
653
- 1365,
662
+ 1366,
654
663
  1373,
655
- 1382,
656
- 1392,
657
- 1399,
658
- 1405,
659
- 1411,
660
- 1417,
661
- 1429,
662
- 1436,
663
- 1444,
664
- 1448,
665
- 1456,
666
- 1466,
667
- 1475,
668
- 1480,
669
- 1488,
670
- 1491,
671
- 1498,
672
- 1508,
673
- 1513,
674
- 1517,
675
- 1523,
676
- 1532,
677
- 1538,
678
- 1543,
664
+ 1376,
665
+ 1384,
666
+ 1394,
667
+ 1404,
668
+ 1410,
669
+ 1418,
670
+ 1426,
671
+ 1435,
672
+ 1445,
673
+ 1452,
674
+ 1458,
675
+ 1464,
676
+ 1470,
677
+ 1482,
678
+ 1489,
679
+ 1497,
680
+ 1501,
681
+ 1509,
682
+ 1519,
683
+ 1528,
684
+ 1533,
685
+ 1541,
686
+ 1544,
679
687
  1551,
680
- 1559,
681
- 1569,
682
- 1575,
683
- 1580,
684
- 1586,
688
+ 1561,
689
+ 1566,
690
+ 1570,
691
+ 1576,
692
+ 1585,
685
693
  1591,
686
- 1597,
694
+ 1596,
687
695
  1604,
688
- 1609,
689
- 1615,
690
- 1625,
691
- 1640,
692
- 1649,
693
- 1654,
694
- 1661,
696
+ 1612,
697
+ 1622,
698
+ 1628,
699
+ 1633,
700
+ 1639,
701
+ 1644,
702
+ 1650,
703
+ 1657,
704
+ 1662,
695
705
  1668,
696
- 1676,
697
- 1682,
698
- 1695,
699
- 1704,
700
- 1711,
701
- 1718,
702
- 1727,
703
- 1732,
704
- 1738,
706
+ 1678,
707
+ 1693,
708
+ 1702,
709
+ 1707,
710
+ 1714,
711
+ 1721,
712
+ 1729,
713
+ 1735,
705
714
  1743,
706
- 1748,
707
- 1754,
708
- 1763,
715
+ 1756,
716
+ 1765,
709
717
  1771,
710
- 1777,
711
- 1781,
712
- 1786,
713
- 1790,
718
+ 1778,
719
+ 1785,
714
720
  1794,
715
721
  1799,
716
- 1804,
717
- 1807,
718
- 1812,
719
- 1822,
720
- 1833,
721
- 1837,
722
- 1845,
723
- 1852,
724
- 1860,
725
- 1867,
726
- 1872,
722
+ 1805,
723
+ 1810,
724
+ 1815,
725
+ 1821,
726
+ 1830,
727
+ 1838,
728
+ 1844,
729
+ 1848,
730
+ 1853,
731
+ 1857,
732
+ 1861,
733
+ 1866,
734
+ 1871,
735
+ 1874,
727
736
  1879,
728
- 1885,
729
- 1893,
737
+ 1889,
730
738
  1900,
731
- 1903,
732
- 1907,
733
- 1914,
739
+ 1904,
740
+ 1912,
734
741
  1919,
735
- 1923,
736
- 1926,
737
- 1931,
738
- 1940,
739
- 1947,
740
- 1955,
741
- 1958,
742
- 1964,
743
- 1975,
744
- 1982,
742
+ 1927,
743
+ 1934,
744
+ 1939,
745
+ 1946,
746
+ 1952,
747
+ 1960,
748
+ 1967,
749
+ 1970,
750
+ 1974,
751
+ 1981,
745
752
  1986,
746
- 1992,
747
- 1997,
748
- 2006,
753
+ 1990,
754
+ 1993,
755
+ 1998,
756
+ 2007,
749
757
  2014,
758
+ 2022,
750
759
  2025,
751
760
  2031,
752
- 2037,
753
- 2046,
761
+ 2042,
762
+ 2049,
754
763
  2053,
755
- 2061,
756
- 2071,
757
- 2079,
758
- 2088,
759
- 2096,
760
- 2102,
761
- 2109,
762
- 2118,
763
- 2128,
764
+ 2059,
765
+ 2064,
766
+ 2073,
767
+ 2081,
768
+ 2092,
769
+ 2098,
770
+ 2104,
771
+ 2113,
772
+ 2123,
773
+ 2130,
764
774
  2138,
765
- 2146,
766
- 2155,
767
- 2164,
768
- 2172,
769
- 2178,
770
- 2189,
771
- 2200,
772
- 2210,
773
- 2221,
774
- 2229,
775
+ 2148,
776
+ 2156,
777
+ 2165,
778
+ 2173,
779
+ 2179,
780
+ 2186,
781
+ 2195,
782
+ 2205,
783
+ 2215,
784
+ 2223,
785
+ 2232,
775
786
  2241,
776
- 2247,
777
- 2253,
778
- 2258,
779
- 2263,
780
- 2272,
781
- 2280,
782
- 2290,
783
- 2294,
784
- 2305,
785
- 2317,
786
- 2325,
787
- 2333,
788
- 2342,
789
- 2350,
787
+ 2249,
788
+ 2255,
789
+ 2266,
790
+ 2277,
791
+ 2287,
792
+ 2298,
793
+ 2306,
794
+ 2318,
795
+ 2324,
796
+ 2330,
797
+ 2335,
798
+ 2340,
799
+ 2349,
790
800
  2357,
791
- 2368,
792
- 2376,
793
- 2384,
794
- 2390,
795
- 2398,
796
- 2407,
797
- 2417,
798
- 2425,
799
- 2432,
800
- 2438,
801
- 2443,
802
- 2452,
803
- 2459,
801
+ 2367,
802
+ 2371,
803
+ 2382,
804
+ 2394,
805
+ 2402,
806
+ 2410,
807
+ 2419,
808
+ 2427,
809
+ 2434,
810
+ 2445,
811
+ 2453,
812
+ 2461,
804
813
  2467,
805
- 2476,
806
- 2480,
807
- 2485,
808
- 2490,
809
- 2500,
810
- 2507,
811
- 2515,
814
+ 2475,
815
+ 2484,
816
+ 2491,
817
+ 2501,
818
+ 2509,
819
+ 2516,
812
820
  2522,
813
- 2529,
821
+ 2527,
814
822
  2536,
815
- 2545,
816
- 2552,
817
- 2561,
818
- 2571,
823
+ 2543,
824
+ 2551,
825
+ 2560,
826
+ 2564,
827
+ 2569,
828
+ 2574,
819
829
  2584,
820
830
  2591,
821
831
  2599,
822
- 2612,
823
- 2616,
824
- 2622,
825
- 2627,
826
- 2633,
827
- 2638,
828
- 2646,
829
- 2653,
830
- 2658,
831
- 2667,
832
- 2676,
833
- 2681,
834
- 2685,
835
- 2692,
836
- 2703,
837
- 2709,
838
- 2719,
832
+ 2606,
833
+ 2613,
834
+ 2620,
835
+ 2629,
836
+ 2636,
837
+ 2645,
838
+ 2655,
839
+ 2668,
840
+ 2675,
841
+ 2683,
842
+ 2696,
843
+ 2700,
844
+ 2706,
845
+ 2711,
846
+ 2717,
847
+ 2722,
839
848
  2730,
840
- 2736,
841
- 2743,
849
+ 2737,
850
+ 2742,
842
851
  2751,
843
- 2758,
852
+ 2760,
844
853
  2765,
845
- 2771,
846
- 2784,
847
- 2794,
848
- 2802,
849
- 2812,
850
- 2818,
851
- 2825,
852
- 2831,
853
- 2838,
854
- 2850,
855
- 2861,
856
- 2866,
857
- 2875,
858
- 2885,
859
- 2890,
860
- 2895,
861
- 2900,
862
- 2905,
854
+ 2769,
855
+ 2776,
856
+ 2787,
857
+ 2793,
858
+ 2803,
859
+ 2814,
860
+ 2820,
861
+ 2827,
862
+ 2835,
863
+ 2842,
864
+ 2849,
865
+ 2855,
866
+ 2868,
867
+ 2878,
868
+ 2886,
869
+ 2896,
870
+ 2902,
871
+ 2909,
863
872
  2915,
864
- 2918,
865
- 2927,
866
- 2939,
867
- 2949,
868
- 2955,
869
- 2963,
870
- 2968,
871
- 2973,
872
- 2982,
873
- 2990,
874
- 2995,
875
- 3001,
876
- 3009,
877
- 3019,
878
- 3031,
879
- 3043,
880
- 3049,
881
- 3056,
882
- 3064,
883
- 3073,
884
- 3082,
885
- 3088,
886
- 3095,
887
- 3100,
888
- 3106,
889
- 3113,
890
- 3119,
891
- 3128,
892
- 3138,
893
- 3144,
894
- 3151,
895
- 3159,
896
- 3168,
897
- 3176,
873
+ 2922,
874
+ 2934,
875
+ 2945,
876
+ 2950,
877
+ 2959,
878
+ 2969,
879
+ 2974,
880
+ 2979,
881
+ 2984,
882
+ 2989,
883
+ 2999,
884
+ 3002,
885
+ 3011,
886
+ 3023,
887
+ 3033,
888
+ 3039,
889
+ 3047,
890
+ 3052,
891
+ 3057,
892
+ 3066,
893
+ 3074,
894
+ 3079,
895
+ 3085,
896
+ 3093,
897
+ 3103,
898
+ 3115,
899
+ 3127,
900
+ 3133,
901
+ 3140,
902
+ 3148,
903
+ 3157,
904
+ 3166,
905
+ 3172,
906
+ 3179,
898
907
  3184,
899
- 3192,
908
+ 3190,
900
909
  3197,
901
910
  3203,
902
911
  3212,
903
- 3217,
904
- 3223,
905
- 3234,
906
- 3241,
907
- 3246,
908
- 3253,
909
- 3261,
910
- 3266,
911
- 3274,
912
- 3280,
913
- 3284,
914
- 3298,
915
- 3308,
916
- 3319,
917
- 3329,
918
- 3339,
919
- 3353,
920
- 3362,
912
+ 3222,
913
+ 3228,
914
+ 3235,
915
+ 3243,
916
+ 3252,
917
+ 3260,
918
+ 3268,
919
+ 3276,
920
+ 3281,
921
+ 3287,
922
+ 3296,
923
+ 3301,
924
+ 3307,
925
+ 3318,
926
+ 3325,
927
+ 3330,
928
+ 3337,
929
+ 3345,
930
+ 3350,
931
+ 3358,
932
+ 3364,
921
933
  3368,
922
- 3376,
923
- 3389,
924
- 3398,
934
+ 3382,
935
+ 3392,
925
936
  3403,
926
- 3407,
937
+ 3413,
938
+ 3423,
939
+ 3437,
940
+ 3446,
941
+ 3452,
942
+ 3460,
943
+ 3473,
944
+ 3482,
945
+ 3487,
946
+ 3491,
927
947
  };
928
948
 
929
- #define SCANKEYWORDS_NUM_KEYWORDS 450
949
+ #define SCANKEYWORDS_NUM_KEYWORDS 460
930
950
 
931
951
  static int
932
952
  ScanKeywords_hash_func(const void *key, size_t keylen)
933
953
  {
934
- static const int16 h[901] = {
935
- -172, 32767, 32767, 32767, 0, 56, 362, 32767,
936
- 0, 90, -251, 332, 32767, 66, 298, 0,
937
- 32767, 88, 27, 22, -125, 317, 0, 32767,
938
- -35, 0, 32767, 32767, 32767, 52, 32767, 275,
939
- 32767, -277, 32767, 32767, 316, 177, 32767, 0,
940
- 398, 58, 272, -88, 0, -147, 242, 143,
941
- 401, 0, 32767, 0, 293, 355, 0, 0,
942
- 303, 32767, 225, 580, 0, 378, 0, 0,
943
- 32767, -25, -312, 32767, -210, 0, 32767, -19,
944
- 32767, 91, 307, 354, 32767, 32767, -18, 36,
945
- 32767, 32767, 402, 292, 165, 274, 0, 32767,
946
- 10, -20, 32767, 294, 32767, -622, 326, 32767,
947
- -128, 0, 33, 32767, 32767, 325, 32767, 276,
948
- 343, 32767, 96, 173, 32767, 32767, 32767, 0,
949
- 32767, 320, -128, 32767, 357, 24, -9, 427,
950
- 32767, 32767, 0, 32767, 0, 0, 32767, 32767,
951
- 405, 32767, 125, 32767, 0, 32767, -40, 32767,
952
- 0, 80, 0, 32767, 0, 95, -146, 0,
953
- 32767, 26, 165, 32767, 41, 32767, 418, 32767,
954
- 32767, 40, 32767, 147, 32767, 32767, 32767, 91,
955
- 110, 9, 305, -340, 32767, 103, 32767, 0,
956
- 329, 32767, 32767, 310, 32767, 32767, 147, -262,
957
- 422, 393, 382, 136, 32767, 177, 0, 32767,
958
- 32767, 102, 0, 32767, 83, 141, 28, 167,
959
- -421, 32767, 38, 111, 0, 479, 32767, 32767,
960
- 29, 439, 32767, 427, -6, 182, 32767, 74,
961
- 32767, 360, 236, 32767, 32767, 327, -63, 162,
962
- 154, 184, 90, 263, 115, 127, 539, 347,
963
- -72, 32767, -159, 32767, -249, 152, 32767, 357,
964
- 404, -110, 32767, 404, 345, 32767, 80, 352,
965
- 422, 61, 32767, 32767, 32767, 243, 126, 117,
966
- 32767, 0, 32767, 32767, 208, 32767, 32767, -20,
967
- 430, -195, 32767, 32767, 32767, 118, -62, 32767,
968
- 32767, 98, 136, 0, 0, 32767, 261, 32767,
969
- 0, 32767, 230, 37, 750, 154, 32767, -86,
970
- 87, 32767, 6, 61, 32767, 205, 32767, 517,
971
- 107, 66, 304, 32767, 0, 32767, 32767, 32767,
972
- 333, 32767, 357, 239, 32767, 32767, 437, -26,
973
- 32767, 210, 0, 20, 369, 10, 32767, -78,
974
- 616, 70, 0, 32767, 86, 32767, 0, 32767,
975
- 14, 60, 32, 32767, 373, 32767, -218, 320,
976
- 32767, 268, 32767, 32767, 425, -67, 0, 32767,
977
- 252, 32767, -93, 193, -362, -140, 32767, -328,
978
- 32767, 0, 319, 336, 32767, 121, 0, 32767,
979
- 207, 32767, 481, -176, 276, 47, 235, 32767,
980
- 0, 221, 32767, 228, 32767, 84, 32767, 32767,
981
- 32767, 32767, 32767, 32767, 290, 32767, 32767, 84,
982
- -170, 82, 246, -43, 201, 155, -7, 299,
983
- 32767, 32767, 241, 32767, -418, 32767, 32767, -303,
984
- 32767, 32767, -40, 308, 32767, 0, 178, -67,
985
- 32767, 273, 32767, 0, 32767, 69, 387, 32767,
986
- 341, 0, 0, -19, 324, -88, 166, 32767,
987
- 6, 20, 32767, 17, 22, 359, 32767, 32767,
988
- 172, 0, 32767, 0, 206, 88, 0, 32767,
989
- 35, 0, 275, 114, 339, 32767, 32767, 32767,
990
- 32767, 32767, 524, 0, -52, 191, -115, 9,
991
- 200, 102, 0, 32767, 3, 0, 0, 0,
992
- -288, 0, -132, 32767, 0, 32767, 300, 0,
993
- 0, 0, 212, 32767, 260, 32767, -279, 104,
994
- 506, 0, 640, 38, 268, 32767, 131, 32767,
995
- 32767, 32767, 32767, 0, 0, 32767, 32767, 18,
996
- 100, 44, 67, 270, 245, 283, 224, -66,
997
- 32767, 32767, 32767, -67, 32767, 389, 32767, 0,
998
- 125, 354, 32767, 32767, -21, 124, 0, 204,
999
- 32767, 0, 99, 32767, 267, 32767, 0, 32767,
1000
- 32767, 231, 32767, -129, -113, 108, 23, 0,
1001
- 0, 32767, 32767, 0, 32767, 269, 32767, 32767,
1002
- -133, 32767, -384, 32767, 32767, 0, 32767, 32767,
1003
- 32767, 0, 32767, 32767, 32767, 0, 322, 424,
1004
- 117, -29, 32767, 32767, 145, 0, 0, 323,
1005
- 119, 32767, 32767, 32767, 392, -164, -143, -25,
1006
- -106, 0, 97, 32767, 32767, 235, 32767, 0,
1007
- 32767, 411, 363, 32767, 31, 32767, 443, 32767,
1008
- 76, 29, 32767, 323, 32767, 142, 32767, 0,
1009
- 244, 0, 32767, 28, 32767, 0, 377, -8,
1010
- -45, 32767, 37, 0, 350, 0, 32767, 32767,
1011
- 38, 416, 32767, 265, -78, -308, -51, 705,
1012
- 32767, 32767, 0, 66, 0, 32767, 32767, 32767,
1013
- 81, -250, 32767, 1, 421, 32767, 32767, 0,
1014
- 32767, 401, 198, 32767, 256, 290, 210, 32767,
1015
- 32767, 32767, 32767, 0, 444, 211, -99, 220,
1016
- 64, 32767, 32767, 32767, 32767, 190, 19, 0,
1017
- 216, 32767, 262, 32767, 404, 562, -222, 0,
1018
- 0, -162, 32767, 192, 65, 32767, 150, 191,
1019
- 0, 218, 267, 32767, 32767, 32767, 399, 189,
1020
- 356, 532, 0, 32767, 429, 32767, 32767, 54,
1021
- 279, 151, 0, 353, 394, 176, 215, 32767,
1022
- 15, 153, 137, 92, 420, 47, 253, 0,
1023
- 298, 32767, 32767, 32767, 234, 164, 241, 32767,
1024
- 0, 409, 0, 32767, 0, 32767, 0, 70,
1025
- 32767, 32767, 32767, 0, 32767, 32767, 32767, -138,
1026
- 32767, 32767, -46, 32767, 97, 32767, 0, -126,
1027
- 32767, 169, 322, 392, 32767, 0, 32767, 32767,
1028
- 0, 282, 296, 32767, 0, 403, 32767, -24,
1029
- 32767, -34, 32767, 32767, 32767, 418, 32767, 0,
1030
- 97, 238, 32767, 144, 428, 32767, 2, 32767,
1031
- 32767, 32767, 194, -182, 12, 32767, 391, 32767,
1032
- 880, 32767, 32767, 50, 331, 0, 0, 358,
1033
- 20, 32767, 32767, 222, 317, 32767, 0, 125,
1034
- 32767, 0, 32767, 284, 32767, 32767, 197, 0,
1035
- 63, 32767, 0, 188, 32767, 32767, 147, 190,
1036
- 344, 32767, -42, 32767, 0, 187, 32767, 32767,
1037
- 350, 32767, 0, 0, 127, 32767, 32767, 161,
1038
- 32767, 0, 0, 382, 32767, 32767, 316, 130,
1039
- 32767, 379, 32767, 383, 368, 93, -195, 0,
1040
- 233, 73, 32767, 100, 32767, 338, 90, 32767,
1041
- 258, 32767, 32767, 235, 175, 32767, 32767, 0,
1042
- -9, 0, 0, 32767, 32767, 111, 417, 330,
1043
- 0, 0, 225, 32767, 0, 0, 32767, 0,
1044
- 64, 32767, 32767, 16, 113, 29, 0, 32767,
1045
- 32767, 0, 43, 0, 365, -41, -284, 0,
1046
- 0, 0, 61, 314, 255, 0, 32767, 145,
1047
- 32767, -445, 32767, 32767, 154,
954
+ static const int16 h[921] = {
955
+ 207, -201, 0, 223, -255, 28, 32767, -86,
956
+ 32767, 0, -35, -938, 32767, 32767, -13, 32767,
957
+ 450, 62, 42, 327, 309, -13, 0, 114,
958
+ 32767, -230, 135, -12, 424, 191, -114, 32767,
959
+ 45, 440, 673, 0, 0, 224, 286, 32767,
960
+ 32767, 16, 5, 0, 32767, 32767, -349, 32767,
961
+ -43, 32767, 32767, 32767, 32767, 32767, 0, 32767,
962
+ 32767, 262, 573, -75, 32767, 32767, 1113, 88,
963
+ 111, 32767, 7, -41, 223, 32767, 478, 275,
964
+ 32767, 0, 245, 1004, 59, 32767, 322, 256,
965
+ -130, 32767, 0, 378, 606, 994, -59, 32767,
966
+ -219, 32767, 489, 32767, -328, 32767, 88, 32767,
967
+ -228, 0, 1181, -705, 32767, 32767, 149, 32767,
968
+ 32767, 177, 0, 0, 32767, 32767, 32767, 473,
969
+ 142, 167, 130, 345, 461, 50, 426, 32767,
970
+ 32767, -104, 333, 32767, 5, 32767, 32767, 115,
971
+ 0, 34, 32767, -178, 32767, 32767, 0, 32767,
972
+ 32767, 32767, 429, 573, 32767, 3, 32767, 0,
973
+ 237, 32767, 324, 379, 32767, 409, 32767, 32767,
974
+ 362, -707, 638, 32767, 32767, -18, 23, 127,
975
+ 32767, 32767, -55, 0, 254, 32767, 0, 32767,
976
+ -16, 389, 32767, -287, 0, -43, 32767, 0,
977
+ 32767, 157, 23, 438, 907, 0, 32767, -213,
978
+ 299, 32767, 0, 32767, 32767, 229, 32767, 32767,
979
+ 32767, 32767, 186, 32767, 81, 32767, -707, 525,
980
+ 732, 515, 32767, 32767, 0, 32767, 32767, 126,
981
+ 32767, 32767, 0, 443, 32767, 102, -148, 188,
982
+ 393, 32767, 383, 32767, 212, 247, 32767, 389,
983
+ 54, -258, 0, 6, -32, 32767, 261, -190,
984
+ 112, 32767, 32767, 32767, 0, 32767, 0, 32767,
985
+ 32767, 215, 32767, 196, 32767, 445, 32767, 32767,
986
+ -456, -66, 161, 32767, 617, -484, 230, 32767,
987
+ 1078, 77, 124, 32767, 32767, -44, 32767, -271,
988
+ 148, 20, 344, 83, 32767, 32767, 32767, 108,
989
+ -768, 269, 32767, 32767, -66, 0, 32767, 32767,
990
+ 524, 433, 32767, 32767, 0, 32767, -564, -138,
991
+ 0, 4, 463, 354, 32767, 57, 0, 32767,
992
+ 552, 351, 32767, 32767, 0, 32767, 32767, 32767,
993
+ 65, 32767, 32767, 285, 158, 32767, 32767, -931,
994
+ 281, 32767, 32767, 32767, 32767, -357, -115, 32767,
995
+ 294, 435, 2, 32767, 305, 32767, 35, 434,
996
+ 32767, 172, 0, 32767, 326, -597, 263, 2,
997
+ 32767, -111, -79, 32767, 32767, -717, 198, 32767,
998
+ -715, 407, 32767, 32767, 159, 214, -135, 379,
999
+ 672, 656, 278, 0, 32767, 32767, 32767, 1109,
1000
+ 830, -173, 32767, 32767, 334, 32767, 32767, 32767,
1001
+ 32767, -447, 270, 61, 281, 32767, 0, 116,
1002
+ 32767, 99, -302, 32767, 32767, 0, 39, 32767,
1003
+ -61, 276, -45, 144, -121, 32767, 0, 198,
1004
+ 325, 72, 294, -174, -218, 73, -489, 32767,
1005
+ -372, 32767, 32767, 360, 345, 283, -453, 32767,
1006
+ 32767, 32767, 283, 806, 0, 32767, 32767, 32767,
1007
+ -65, 0, 32767, 8, 32767, 150, 32767, -251,
1008
+ 132, 0, 32767, 32767, 272, 32767, 15, -417,
1009
+ 889, -77, 0, 0, 16, 32767, 32767, 32767,
1010
+ 94, 32767, 32767, 32767, 32767, 219, 32767, -416,
1011
+ 391, 31, 208, 396, 0, 143, -37, 32767,
1012
+ 252, 0, 32767, 185, 32767, -140, 0, 32767,
1013
+ 456, -258, 32767, 381, 32767, 393, 32767, 32767,
1014
+ 32767, 32767, 1160, 32767, 32767, 384, 201, 197,
1015
+ 32767, 0, 131, 469, 89, 32767, 397, 0,
1016
+ 32767, 211, 32767, 102, 138, 32767, -379, 264,
1017
+ 32767, 386, 6, 32767, 32767, 162, 53, -81,
1018
+ -135, 59, 338, 230, 0, 0, 19, 8,
1019
+ 32767, 785, 423, 0, 257, 301, 523, -398,
1020
+ 421, 0, 32767, 0, 32767, 32767, 0, -758,
1021
+ 0, 562, 32767, 0, 32767, 32767, -213, 32767,
1022
+ 28, 32767, -696, 173, -413, 352, -223, 472,
1023
+ 275, 316, 32767, -186, 323, 32767, -163, 221,
1024
+ 246, 29, 222, -1042, 0, 33, 184, 32767,
1025
+ 32767, 0, 32767, 32767, 805, 32767, 305, 8,
1026
+ 226, 84, 32767, 379, 0, 32767, 134, 82,
1027
+ 32767, 399, 32767, 0, 0, 617, 32767, 32767,
1028
+ 31, 0, 256, 0, 32767, 103, 302, 32767,
1029
+ 208, 32767, -56, 0, -146, 32767, 243, 32767,
1030
+ 0, 32767, 32767, 32767, 32767, 784, 32767, 32767,
1031
+ 0, 197, 32767, 32767, 914, 155, -50, 32767,
1032
+ 32767, 32767, 292, 1122, 32767, 0, 32767, -167,
1033
+ 32767, 139, 113, 113, 32767, 410, 32767, 459,
1034
+ 331, 0, 295, 0, 0, 483, -345, 32767,
1035
+ 32767, -456, 32767, 32767, 0, 32767, 304, 32767,
1036
+ 138, 32767, 520, 326, 412, -237, 453, 32767,
1037
+ 50, 328, 32767, 32767, 0, -116, 0, -754,
1038
+ 0, -149, 32767, 32767, 28, -398, 0, 32767,
1039
+ 32767, -89, 353, -64, 51, 139, 32767, 32767,
1040
+ 66, 32767, 314, 209, 1218, 32767, 32767, 325,
1041
+ 0, 268, 32767, 32767, 446, 32767, 0, 32767,
1042
+ -115, 32767, 32767, 32767, 239, 344, 32767, 5,
1043
+ 32767, 0, -314, 0, -327, 32767, 181, 32767,
1044
+ 107, 393, 0, 32767, 12, 582, 119, 32767,
1045
+ -751, 32767, -578, 0, 349, 0, 32767, 404,
1046
+ 307, 85, 32767, 452, 53, -307, 0, 0,
1047
+ 32767, 32767, 664, 32767, 32767, 32767, -44, 32767,
1048
+ 0, 259, 366, 32767, 0, 0, 32767, -97,
1049
+ -131, 0, 32767, 178, 32767, 779, -231, -73,
1050
+ 0, 0, 145, 487, 223, 0, 0, 86,
1051
+ 32767, 0, 32767, 192, 321, 32767, 32767, 32767,
1052
+ -360, -140, 32767, 32767, 32767, 507, 32767, 247,
1053
+ 416, 32767, 0, 32767, 68, 98, 32767, 0,
1054
+ -268, 0, 32767, 204, 32767, 0, 739, 112,
1055
+ -283, 1180, 193, 32767, 32767, 220, 0, 0,
1056
+ 0, 0, 0, 32767, 0, 32767, 32767, 32767,
1057
+ 32767, 206, -374, 0, 315, 32767, 0, 0,
1058
+ -37, -363, 32767, 32767, 258, 32767, 459, 32767,
1059
+ 128, -1018, 374, 32767, 0, 32767, 0, -602,
1060
+ 32767, 346, 76, 363, 387, 296, -186, 32,
1061
+ 21, 32767, 32767, 32767, 32767, 32767, 32767, 32767,
1062
+ 0, 32767, 0, 165, 32767, 32767, 32767, 0,
1063
+ 790, -10, 32767, 32767, 32767, 32767, 0, 32767,
1064
+ 0, 228, 32767, -993, 32, -878, -154, 32767,
1065
+ 72, 369, 411, 585, 32767, 32767, 124, 32767,
1066
+ -253, -177, 294, 32767, 335, 0, 9, 0,
1067
+ 32767, 442, 0, 0, 32767, 449, 448, 0,
1068
+ 0, 32767, 0, 593, 0, 32767, 242, 432,
1069
+ 0, 32767, 0, 32767, 32767, 1360, 0, 32767,
1070
+ 238
1048
1071
  };
1049
1072
 
1050
1073
  const unsigned char *k = (const unsigned char *) key;
1051
1074
  uint32 a = 0;
1052
- uint32 b = 3;
1075
+ uint32 b = 0;
1053
1076
 
1054
1077
  while (keylen--)
1055
1078
  {
1056
1079
  unsigned char c = *k++ | 0x20;
1057
1080
 
1058
- a = a * 31 + c;
1081
+ a = a * 257 + c;
1059
1082
  b = b * 127 + c;
1060
1083
  }
1061
- return h[a % 901] + h[b % 901];
1084
+ return h[a % 921] + h[b % 921];
1062
1085
  }
1063
1086
 
1064
1087
  const ScanKeywordList ScanKeywords = {