pg_query 2.2.1 → 4.2.1

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