pg_query 2.2.1 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Rakefile +2 -2
- data/ext/pg_query/include/access/amapi.h +45 -1
- data/ext/pg_query/include/access/attmap.h +1 -1
- data/ext/pg_query/include/access/attnum.h +2 -2
- data/ext/pg_query/include/access/clog.h +4 -2
- data/ext/pg_query/include/access/commit_ts.h +6 -9
- data/ext/pg_query/include/access/detoast.h +1 -11
- data/ext/pg_query/include/access/genam.h +15 -12
- data/ext/pg_query/include/access/gin.h +2 -2
- data/ext/pg_query/include/access/htup.h +1 -1
- data/ext/pg_query/include/access/htup_details.h +75 -87
- data/ext/pg_query/include/access/itup.h +7 -1
- data/ext/pg_query/include/access/parallel.h +2 -2
- data/ext/pg_query/include/access/printtup.h +1 -1
- data/ext/pg_query/include/access/relation.h +1 -1
- data/ext/pg_query/include/access/relscan.h +17 -2
- data/ext/pg_query/include/access/rmgr.h +30 -3
- data/ext/pg_query/include/access/rmgrlist.h +23 -23
- data/ext/pg_query/include/access/sdir.h +1 -1
- data/ext/pg_query/include/access/skey.h +1 -1
- data/ext/pg_query/include/access/stratnum.h +4 -2
- data/ext/pg_query/include/access/sysattr.h +1 -1
- data/ext/pg_query/include/access/table.h +2 -1
- data/ext/pg_query/include/access/tableam.h +272 -20
- data/ext/pg_query/include/access/toast_compression.h +73 -0
- data/ext/pg_query/include/access/transam.h +123 -13
- data/ext/pg_query/include/access/tupconvert.h +1 -1
- data/ext/pg_query/include/access/tupdesc.h +1 -1
- data/ext/pg_query/include/access/tupmacs.h +3 -3
- data/ext/pg_query/include/access/twophase.h +3 -1
- data/ext/pg_query/include/access/xact.h +73 -19
- data/ext/pg_query/include/access/xlog.h +60 -155
- data/ext/pg_query/include/access/xlog_internal.h +40 -13
- data/ext/pg_query/include/access/xlogdefs.h +8 -16
- data/ext/pg_query/include/access/xlogprefetcher.h +55 -0
- data/ext/pg_query/include/access/xlogreader.h +145 -39
- data/ext/pg_query/include/access/xlogrecord.h +18 -9
- data/ext/pg_query/include/access/xlogrecovery.h +157 -0
- data/ext/pg_query/include/c.h +101 -44
- data/ext/pg_query/include/catalog/catalog.h +3 -1
- data/ext/pg_query/include/catalog/catversion.h +2 -2
- data/ext/pg_query/include/catalog/dependency.h +8 -16
- data/ext/pg_query/include/catalog/genbki.h +83 -5
- data/ext/pg_query/include/catalog/index.h +18 -3
- data/ext/pg_query/include/catalog/indexing.h +12 -324
- data/ext/pg_query/include/catalog/namespace.h +4 -2
- data/ext/pg_query/include/catalog/objectaccess.h +70 -2
- data/ext/pg_query/include/catalog/objectaddress.h +11 -6
- data/ext/pg_query/include/catalog/pg_aggregate.h +14 -10
- data/ext/pg_query/include/catalog/pg_aggregate_d.h +2 -1
- data/ext/pg_query/include/catalog/pg_am.h +4 -1
- data/ext/pg_query/include/catalog/pg_am_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_attribute.h +27 -10
- data/ext/pg_query/include/catalog/pg_attribute_d.h +21 -18
- data/ext/pg_query/include/catalog/pg_authid.h +7 -2
- data/ext/pg_query/include/catalog/pg_authid_d.h +17 -9
- data/ext/pg_query/include/catalog/pg_class.h +44 -14
- data/ext/pg_query/include/catalog/pg_class_d.h +30 -1
- data/ext/pg_query/include/catalog/pg_collation.h +33 -8
- data/ext/pg_query/include/catalog/pg_collation_d.h +20 -3
- data/ext/pg_query/include/catalog/pg_constraint.h +38 -12
- data/ext/pg_query/include/catalog/pg_constraint_d.h +10 -4
- data/ext/pg_query/include/catalog/pg_control.h +3 -5
- data/ext/pg_query/include/catalog/pg_conversion.h +7 -4
- data/ext/pg_query/include/catalog/pg_conversion_d.h +4 -1
- data/ext/pg_query/include/catalog/pg_depend.h +11 -7
- data/ext/pg_query/include/catalog/pg_depend_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_event_trigger.h +9 -3
- data/ext/pg_query/include/catalog/pg_event_trigger_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_index.h +17 -7
- data/ext/pg_query/include/catalog/pg_index_d.h +20 -17
- data/ext/pg_query/include/catalog/pg_language.h +10 -5
- data/ext/pg_query/include/catalog/pg_language_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_namespace.h +7 -2
- data/ext/pg_query/include/catalog/pg_namespace_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_opclass.h +8 -5
- data/ext/pg_query/include/catalog/pg_opclass_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_operator.h +18 -15
- data/ext/pg_query/include/catalog/pg_operator_d.h +37 -1
- data/ext/pg_query/include/catalog/pg_opfamily.h +6 -3
- data/ext/pg_query/include/catalog/pg_opfamily_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_parameter_acl.h +60 -0
- data/ext/pg_query/include/catalog/pg_parameter_acl_d.h +34 -0
- data/ext/pg_query/include/catalog/pg_partitioned_table.h +20 -9
- data/ext/pg_query/include/catalog/pg_partitioned_table_d.h +2 -1
- data/ext/pg_query/include/catalog/pg_proc.h +20 -11
- data/ext/pg_query/include/catalog/pg_proc_d.h +10 -8
- data/ext/pg_query/include/catalog/pg_publication.h +50 -7
- data/ext/pg_query/include/catalog/pg_publication_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_replication_origin.h +6 -1
- data/ext/pg_query/include/catalog/pg_replication_origin_d.h +5 -1
- data/ext/pg_query/include/catalog/pg_statistic.h +19 -12
- data/ext/pg_query/include/catalog/pg_statistic_d.h +2 -1
- data/ext/pg_query/include/catalog/pg_statistic_ext.h +19 -5
- data/ext/pg_query/include/catalog/pg_statistic_ext_d.h +7 -2
- data/ext/pg_query/include/catalog/pg_transform.h +8 -5
- data/ext/pg_query/include/catalog/pg_transform_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_trigger.h +24 -8
- data/ext/pg_query/include/catalog/pg_trigger_d.h +4 -1
- data/ext/pg_query/include/catalog/pg_ts_config.h +6 -3
- data/ext/pg_query/include/catalog/pg_ts_config_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_ts_dict.h +8 -3
- data/ext/pg_query/include/catalog/pg_ts_dict_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_ts_parser.h +6 -3
- data/ext/pg_query/include/catalog/pg_ts_parser_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_ts_template.h +6 -3
- data/ext/pg_query/include/catalog/pg_ts_template_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_type.h +55 -24
- data/ext/pg_query/include/catalog/pg_type_d.h +70 -31
- data/ext/pg_query/include/catalog/storage.h +5 -3
- data/ext/pg_query/include/commands/async.h +3 -4
- data/ext/pg_query/include/commands/dbcommands.h +2 -1
- data/ext/pg_query/include/commands/defrem.h +11 -24
- data/ext/pg_query/include/commands/event_trigger.h +2 -2
- data/ext/pg_query/include/commands/explain.h +1 -1
- data/ext/pg_query/include/commands/prepare.h +1 -1
- data/ext/pg_query/include/commands/tablespace.h +2 -2
- data/ext/pg_query/include/commands/trigger.h +18 -16
- data/ext/pg_query/include/commands/user.h +2 -2
- data/ext/pg_query/include/commands/vacuum.h +88 -41
- data/ext/pg_query/include/commands/variable.h +1 -1
- data/ext/pg_query/include/common/file_perm.h +4 -4
- data/ext/pg_query/include/common/hashfn.h +1 -1
- data/ext/pg_query/include/common/ip.h +1 -7
- data/ext/pg_query/include/common/keywords.h +2 -6
- data/ext/pg_query/include/common/kwlookup.h +1 -1
- data/ext/pg_query/include/common/pg_prng.h +60 -0
- data/ext/pg_query/include/common/relpath.h +2 -2
- data/ext/pg_query/include/common/string.h +24 -1
- data/ext/pg_query/include/common/unicode_combining_table.h +114 -2
- data/ext/pg_query/include/common/unicode_east_asian_fw_table.h +125 -0
- data/ext/pg_query/include/datatype/timestamp.h +40 -1
- data/ext/pg_query/include/executor/execdesc.h +1 -1
- data/ext/pg_query/include/executor/executor.h +65 -22
- data/ext/pg_query/include/executor/functions.h +17 -3
- data/ext/pg_query/include/executor/instrument.h +33 -16
- data/ext/pg_query/include/executor/spi.h +41 -3
- data/ext/pg_query/include/executor/tablefunc.h +1 -1
- data/ext/pg_query/include/executor/tuptable.h +1 -1
- data/ext/pg_query/include/fmgr.h +13 -7
- data/ext/pg_query/include/funcapi.h +16 -4
- data/ext/pg_query/include/getaddrinfo.h +1 -1
- data/ext/pg_query/include/jit/jit.h +11 -11
- data/ext/pg_query/include/kwlist_d.h +517 -494
- data/ext/pg_query/include/lib/dshash.h +112 -0
- data/ext/pg_query/include/lib/ilist.h +20 -1
- data/ext/pg_query/include/lib/pairingheap.h +1 -1
- data/ext/pg_query/include/lib/simplehash.h +140 -15
- data/ext/pg_query/include/lib/sort_template.h +432 -0
- data/ext/pg_query/include/lib/stringinfo.h +1 -1
- data/ext/pg_query/include/libpq/auth.h +6 -4
- data/ext/pg_query/include/libpq/crypt.h +5 -4
- data/ext/pg_query/include/libpq/hba.h +43 -4
- data/ext/pg_query/include/libpq/libpq-be.h +23 -6
- data/ext/pg_query/include/libpq/libpq.h +30 -20
- data/ext/pg_query/include/libpq/pqcomm.h +17 -31
- data/ext/pg_query/include/libpq/pqformat.h +1 -1
- data/ext/pg_query/include/libpq/pqsignal.h +4 -4
- data/ext/pg_query/include/mb/pg_wchar.h +105 -23
- data/ext/pg_query/include/mb/stringinfo_mb.h +1 -1
- data/ext/pg_query/include/miscadmin.h +47 -41
- data/ext/pg_query/include/nodes/bitmapset.h +1 -1
- data/ext/pg_query/include/nodes/execnodes.h +270 -78
- data/ext/pg_query/include/nodes/extensible.h +4 -2
- data/ext/pg_query/include/nodes/lockoptions.h +1 -1
- data/ext/pg_query/include/nodes/makefuncs.h +7 -6
- data/ext/pg_query/include/nodes/memnodes.h +5 -3
- data/ext/pg_query/include/nodes/nodeFuncs.h +1 -1
- data/ext/pg_query/include/nodes/nodes.h +30 -11
- data/ext/pg_query/include/nodes/params.h +1 -1
- data/ext/pg_query/include/nodes/parsenodes.h +322 -90
- data/ext/pg_query/include/nodes/pathnodes.h +243 -66
- data/ext/pg_query/include/nodes/pg_list.h +75 -69
- data/ext/pg_query/include/nodes/plannodes.h +111 -28
- data/ext/pg_query/include/nodes/primnodes.h +99 -47
- data/ext/pg_query/include/nodes/print.h +1 -1
- data/ext/pg_query/include/nodes/tidbitmap.h +1 -1
- data/ext/pg_query/include/nodes/value.h +58 -39
- data/ext/pg_query/include/optimizer/cost.h +9 -2
- data/ext/pg_query/include/optimizer/geqo.h +9 -7
- data/ext/pg_query/include/optimizer/geqo_gene.h +1 -1
- data/ext/pg_query/include/optimizer/optimizer.h +25 -17
- data/ext/pg_query/include/optimizer/paths.h +6 -6
- data/ext/pg_query/include/optimizer/planmain.h +15 -14
- data/ext/pg_query/include/parser/analyze.h +19 -5
- data/ext/pg_query/include/parser/gram.h +947 -913
- data/ext/pg_query/include/parser/gramparse.h +1 -1
- data/ext/pg_query/include/parser/kwlist.h +463 -453
- data/ext/pg_query/include/parser/parse_agg.h +2 -7
- data/ext/pg_query/include/parser/parse_coerce.h +3 -1
- data/ext/pg_query/include/parser/parse_expr.h +2 -3
- data/ext/pg_query/include/parser/parse_func.h +2 -1
- data/ext/pg_query/include/parser/parse_node.h +21 -9
- data/ext/pg_query/include/parser/parse_oper.h +1 -3
- data/ext/pg_query/include/parser/parse_relation.h +5 -4
- data/ext/pg_query/include/parser/parse_type.h +1 -1
- data/ext/pg_query/include/parser/parser.h +31 -4
- data/ext/pg_query/include/parser/parsetree.h +1 -1
- data/ext/pg_query/include/parser/scanner.h +1 -1
- data/ext/pg_query/include/parser/scansup.h +2 -5
- data/ext/pg_query/include/partitioning/partdefs.h +1 -1
- data/ext/pg_query/include/pg_config.h +83 -41
- data/ext/pg_query/include/pg_config_manual.h +74 -21
- data/ext/pg_query/include/pg_getopt.h +6 -6
- data/ext/pg_query/include/pg_query.h +5 -4
- data/ext/pg_query/include/pg_query_enum_defs.c +358 -241
- data/ext/pg_query/include/pg_query_fingerprint_conds.c +44 -7
- data/ext/pg_query/include/pg_query_fingerprint_defs.c +939 -113
- data/ext/pg_query/include/pg_query_outfuncs_conds.c +43 -13
- data/ext/pg_query/include/pg_query_outfuncs_defs.c +151 -26
- data/ext/pg_query/include/pg_query_readfuncs_conds.c +11 -2
- data/ext/pg_query/include/pg_query_readfuncs_defs.c +173 -30
- data/ext/pg_query/include/pg_trace.h +1 -1
- data/ext/pg_query/include/pgstat.h +449 -1238
- data/ext/pg_query/include/pgtime.h +14 -4
- data/ext/pg_query/include/pl_gram.h +126 -128
- data/ext/pg_query/include/pl_reserved_kwlist.h +1 -1
- data/ext/pg_query/include/pl_reserved_kwlist_d.h +10 -10
- data/ext/pg_query/include/pl_unreserved_kwlist.h +2 -3
- data/ext/pg_query/include/pl_unreserved_kwlist_d.h +54 -56
- data/ext/pg_query/include/plerrcodes.h +9 -1
- data/ext/pg_query/include/plpgsql.h +52 -54
- data/ext/pg_query/include/port/atomics/arch-arm.h +7 -1
- data/ext/pg_query/include/port/atomics/arch-ppc.h +1 -1
- data/ext/pg_query/include/port/atomics/arch-x86.h +1 -1
- data/ext/pg_query/include/port/atomics/fallback.h +1 -1
- data/ext/pg_query/include/port/atomics/generic-gcc.h +3 -3
- data/ext/pg_query/include/port/atomics/generic.h +1 -1
- data/ext/pg_query/include/port/atomics.h +1 -1
- data/ext/pg_query/include/port/pg_bitutils.h +40 -10
- data/ext/pg_query/include/port/pg_bswap.h +1 -1
- data/ext/pg_query/include/port/pg_crc32c.h +1 -1
- data/ext/pg_query/include/port.h +71 -46
- data/ext/pg_query/include/portability/instr_time.h +1 -1
- data/ext/pg_query/include/postgres.h +60 -16
- data/ext/pg_query/include/postmaster/autovacuum.h +17 -17
- data/ext/pg_query/include/postmaster/auxprocess.h +20 -0
- data/ext/pg_query/include/postmaster/bgworker.h +2 -1
- data/ext/pg_query/include/postmaster/bgworker_internals.h +2 -2
- data/ext/pg_query/include/postmaster/bgwriter.h +5 -5
- data/ext/pg_query/include/postmaster/fork_process.h +1 -1
- data/ext/pg_query/include/postmaster/interrupt.h +1 -1
- data/ext/pg_query/include/postmaster/pgarch.h +42 -8
- data/ext/pg_query/include/postmaster/postmaster.h +18 -17
- data/ext/pg_query/include/postmaster/startup.h +39 -0
- data/ext/pg_query/include/postmaster/syslogger.h +15 -10
- data/ext/pg_query/include/postmaster/walwriter.h +3 -3
- data/ext/pg_query/include/protobuf/pg_query.pb-c.h +1419 -914
- data/ext/pg_query/include/protobuf/pg_query.pb.h +43678 -32769
- data/ext/pg_query/include/regex/regex.h +18 -16
- data/ext/pg_query/include/replication/logicallauncher.h +3 -5
- data/ext/pg_query/include/replication/logicalproto.h +161 -17
- data/ext/pg_query/include/replication/logicalworker.h +1 -1
- data/ext/pg_query/include/replication/origin.h +7 -7
- data/ext/pg_query/include/replication/reorderbuffer.h +259 -42
- data/ext/pg_query/include/replication/slot.h +22 -11
- data/ext/pg_query/include/replication/syncrep.h +5 -5
- data/ext/pg_query/include/replication/walreceiver.h +145 -13
- data/ext/pg_query/include/replication/walsender.h +8 -8
- data/ext/pg_query/include/rewrite/prs2lock.h +1 -1
- data/ext/pg_query/include/rewrite/rewriteHandler.h +1 -3
- data/ext/pg_query/include/rewrite/rewriteManip.h +1 -1
- data/ext/pg_query/include/rewrite/rewriteSupport.h +1 -1
- data/ext/pg_query/include/storage/backendid.h +3 -3
- data/ext/pg_query/include/storage/block.h +4 -10
- data/ext/pg_query/include/storage/buf.h +1 -1
- data/ext/pg_query/include/storage/bufmgr.h +19 -14
- data/ext/pg_query/include/storage/bufpage.h +6 -8
- data/ext/pg_query/include/storage/condition_variable.h +13 -2
- data/ext/pg_query/include/storage/dsm.h +4 -1
- data/ext/pg_query/include/storage/dsm_impl.h +3 -2
- data/ext/pg_query/include/storage/fd.h +33 -3
- data/ext/pg_query/include/storage/fileset.h +40 -0
- data/ext/pg_query/include/storage/ipc.h +4 -1
- data/ext/pg_query/include/storage/item.h +1 -1
- data/ext/pg_query/include/storage/itemid.h +1 -1
- data/ext/pg_query/include/storage/itemptr.h +3 -1
- data/ext/pg_query/include/storage/large_object.h +2 -2
- data/ext/pg_query/include/storage/latch.h +9 -13
- data/ext/pg_query/include/storage/lmgr.h +2 -1
- data/ext/pg_query/include/storage/lock.h +11 -8
- data/ext/pg_query/include/storage/lockdefs.h +2 -2
- data/ext/pg_query/include/storage/lwlock.h +5 -32
- data/ext/pg_query/include/storage/lwlocknames.h +0 -1
- data/ext/pg_query/include/storage/off.h +1 -1
- data/ext/pg_query/include/storage/pg_sema.h +1 -1
- data/ext/pg_query/include/storage/pg_shmem.h +9 -7
- data/ext/pg_query/include/storage/pmsignal.h +15 -4
- data/ext/pg_query/include/storage/predicate.h +4 -4
- data/ext/pg_query/include/storage/proc.h +173 -59
- data/ext/pg_query/include/storage/procarray.h +98 -0
- data/ext/pg_query/include/storage/proclist_types.h +1 -1
- data/ext/pg_query/include/storage/procsignal.h +3 -7
- data/ext/pg_query/include/storage/relfilenode.h +1 -1
- data/ext/pg_query/include/storage/s_lock.h +60 -21
- data/ext/pg_query/include/storage/sharedfileset.h +3 -11
- data/ext/pg_query/include/storage/shm_mq.h +5 -4
- data/ext/pg_query/include/storage/shm_toc.h +1 -1
- data/ext/pg_query/include/storage/shmem.h +1 -1
- data/ext/pg_query/include/storage/sinval.h +3 -3
- data/ext/pg_query/include/storage/sinvaladt.h +1 -1
- data/ext/pg_query/include/storage/smgr.h +10 -8
- data/ext/pg_query/include/storage/spin.h +2 -2
- data/ext/pg_query/include/storage/standby.h +13 -6
- data/ext/pg_query/include/storage/standbydefs.h +2 -2
- data/ext/pg_query/include/storage/sync.h +7 -3
- data/ext/pg_query/include/tcop/cmdtag.h +1 -1
- data/ext/pg_query/include/tcop/cmdtaglist.h +3 -2
- data/ext/pg_query/include/tcop/deparse_utility.h +1 -1
- data/ext/pg_query/include/tcop/dest.h +1 -1
- data/ext/pg_query/include/tcop/fastpath.h +1 -2
- data/ext/pg_query/include/tcop/pquery.h +1 -1
- data/ext/pg_query/include/tcop/tcopprot.h +19 -11
- data/ext/pg_query/include/tcop/utility.h +7 -3
- data/ext/pg_query/include/tsearch/ts_cache.h +2 -2
- data/ext/pg_query/include/utils/acl.h +24 -3
- data/ext/pg_query/include/utils/aclchk_internal.h +1 -1
- data/ext/pg_query/include/utils/array.h +7 -2
- data/ext/pg_query/include/utils/backend_progress.h +44 -0
- data/ext/pg_query/include/utils/backend_status.h +321 -0
- data/ext/pg_query/include/utils/builtins.h +10 -11
- data/ext/pg_query/include/utils/bytea.h +3 -2
- data/ext/pg_query/include/utils/catcache.h +1 -1
- data/ext/pg_query/include/utils/date.h +1 -1
- data/ext/pg_query/include/utils/datetime.h +8 -7
- data/ext/pg_query/include/utils/datum.h +9 -1
- data/ext/pg_query/include/utils/dsa.h +1 -1
- data/ext/pg_query/include/utils/dynahash.h +4 -3
- data/ext/pg_query/include/utils/elog.h +52 -21
- data/ext/pg_query/include/utils/errcodes.h +2 -0
- data/ext/pg_query/include/utils/expandeddatum.h +1 -1
- data/ext/pg_query/include/utils/expandedrecord.h +1 -1
- data/ext/pg_query/include/utils/float.h +7 -7
- data/ext/pg_query/include/utils/fmgroids.h +1300 -696
- data/ext/pg_query/include/utils/fmgrprotos.h +199 -16
- data/ext/pg_query/include/utils/fmgrtab.h +6 -5
- data/ext/pg_query/include/utils/guc.h +69 -43
- data/ext/pg_query/include/utils/guc_tables.h +23 -19
- data/ext/pg_query/include/utils/hsearch.h +15 -11
- data/ext/pg_query/include/utils/inval.h +4 -1
- data/ext/pg_query/include/utils/lsyscache.h +11 -1
- data/ext/pg_query/include/utils/memdebug.h +1 -1
- data/ext/pg_query/include/utils/memutils.h +8 -3
- data/ext/pg_query/include/utils/numeric.h +19 -5
- data/ext/pg_query/include/utils/palloc.h +25 -3
- data/ext/pg_query/include/utils/partcache.h +1 -1
- data/ext/pg_query/include/utils/pg_locale.h +17 -9
- data/ext/pg_query/include/utils/pg_lsn.h +1 -1
- data/ext/pg_query/include/utils/pgstat_internal.h +784 -0
- data/ext/pg_query/include/utils/pidfile.h +1 -1
- data/ext/pg_query/include/utils/plancache.h +6 -5
- data/ext/pg_query/include/utils/portal.h +10 -12
- data/ext/pg_query/include/utils/ps_status.h +1 -1
- data/ext/pg_query/include/utils/queryenvironment.h +1 -1
- data/ext/pg_query/include/utils/queryjumble.h +88 -0
- data/ext/pg_query/include/utils/regproc.h +14 -3
- data/ext/pg_query/include/utils/rel.h +71 -19
- data/ext/pg_query/include/utils/relcache.h +8 -5
- data/ext/pg_query/include/utils/reltrigger.h +1 -1
- data/ext/pg_query/include/utils/resowner.h +1 -1
- data/ext/pg_query/include/utils/rls.h +2 -2
- data/ext/pg_query/include/utils/ruleutils.h +4 -1
- data/ext/pg_query/include/utils/sharedtuplestore.h +1 -1
- data/ext/pg_query/include/utils/snapmgr.h +34 -14
- data/ext/pg_query/include/utils/snapshot.h +14 -1
- data/ext/pg_query/include/utils/sortsupport.h +117 -2
- data/ext/pg_query/include/utils/syscache.h +6 -1
- data/ext/pg_query/include/utils/timeout.h +11 -4
- data/ext/pg_query/include/utils/timestamp.h +6 -5
- data/ext/pg_query/include/utils/tuplesort.h +25 -11
- data/ext/pg_query/include/utils/tuplestore.h +2 -2
- data/ext/pg_query/include/utils/typcache.h +24 -17
- data/ext/pg_query/include/utils/tzparser.h +1 -1
- data/ext/pg_query/include/utils/varlena.h +5 -3
- data/ext/pg_query/include/utils/wait_event.h +289 -0
- data/ext/pg_query/include/utils/xml.h +4 -4
- data/ext/pg_query/pg_query.pb-c.c +4302 -2304
- data/ext/pg_query/pg_query_deparse.c +986 -301
- data/ext/pg_query/pg_query_fingerprint.c +30 -10
- data/ext/pg_query/pg_query_json_plpgsql.c +0 -25
- data/ext/pg_query/pg_query_normalize.c +1 -1
- data/ext/pg_query/pg_query_outfuncs_json.c +54 -16
- data/ext/pg_query/pg_query_outfuncs_protobuf.c +70 -10
- data/ext/pg_query/pg_query_parse.c +1 -1
- data/ext/pg_query/pg_query_readfuncs_protobuf.c +42 -8
- data/ext/pg_query/pg_query_scan.c +2 -1
- data/ext/pg_query/pg_query_split.c +3 -2
- data/ext/pg_query/src_backend_catalog_namespace.c +20 -9
- data/ext/pg_query/src_backend_catalog_pg_proc.c +4 -1
- data/ext/pg_query/src_backend_commands_define.c +11 -1
- data/ext/pg_query/src_backend_nodes_bitmapset.c +3 -1
- data/ext/pg_query/src_backend_nodes_copyfuncs.c +401 -76
- data/ext/pg_query/src_backend_nodes_equalfuncs.c +290 -46
- data/ext/pg_query/src_backend_nodes_extensible.c +1 -1
- data/ext/pg_query/src_backend_nodes_list.c +74 -11
- data/ext/pg_query/src_backend_nodes_makefuncs.c +5 -4
- data/ext/pg_query/src_backend_nodes_nodeFuncs.c +55 -12
- data/ext/pg_query/src_backend_nodes_value.c +28 -19
- data/ext/pg_query/src_backend_parser_gram.c +33874 -31261
- data/ext/pg_query/src_backend_parser_parser.c +26 -7
- data/ext/pg_query/src_backend_parser_scan.c +172 -209
- data/ext/pg_query/src_backend_parser_scansup.c +4 -28
- data/ext/pg_query/src_backend_postmaster_postmaster.c +77 -106
- data/ext/pg_query/src_backend_storage_ipc_ipc.c +13 -4
- data/ext/pg_query/src_backend_storage_lmgr_s_lock.c +5 -4
- data/ext/pg_query/src_backend_tcop_postgres.c +62 -23
- data/ext/pg_query/src_backend_utils_activity_pgstat_database.c +140 -0
- data/ext/pg_query/src_backend_utils_adt_datum.c +13 -1
- data/ext/pg_query/src_backend_utils_adt_expandeddatum.c +1 -1
- data/ext/pg_query/src_backend_utils_adt_format_type.c +6 -2
- data/ext/pg_query/src_backend_utils_adt_ruleutils.c +71 -5
- data/ext/pg_query/src_backend_utils_error_assert.c +16 -14
- data/ext/pg_query/src_backend_utils_error_elog.c +172 -99
- data/ext/pg_query/src_backend_utils_fmgr_fmgr.c +12 -17
- data/ext/pg_query/src_backend_utils_hash_dynahash.c +40 -10
- data/ext/pg_query/src_backend_utils_init_globals.c +5 -5
- data/ext/pg_query/src_backend_utils_mb_mbutils.c +55 -66
- data/ext/pg_query/src_backend_utils_misc_guc.c +206 -45
- data/ext/pg_query/src_backend_utils_mmgr_aset.c +7 -5
- data/ext/pg_query/src_backend_utils_mmgr_mcxt.c +123 -35
- data/ext/pg_query/src_common_encnames.c +1 -1
- data/ext/pg_query/src_common_hashfn.c +3 -3
- data/ext/pg_query/src_common_keywords.c +15 -2
- data/ext/pg_query/src_common_kwlist_d.h +517 -494
- data/ext/pg_query/src_common_kwlookup.c +1 -1
- data/ext/pg_query/src_common_pg_prng.c +152 -0
- data/ext/pg_query/src_common_psprintf.c +1 -1
- data/ext/pg_query/src_common_string.c +7 -1
- data/ext/pg_query/src_common_stringinfo.c +1 -1
- data/ext/pg_query/src_common_wchar.c +701 -109
- data/ext/pg_query/src_pl_plpgsql_src_pl_comp.c +45 -20
- data/ext/pg_query/src_pl_plpgsql_src_pl_funcs.c +1 -18
- data/ext/pg_query/src_pl_plpgsql_src_pl_gram.c +1233 -1259
- data/ext/pg_query/src_pl_plpgsql_src_pl_handler.c +1 -1
- data/ext/pg_query/src_pl_plpgsql_src_pl_reserved_kwlist_d.h +10 -10
- data/ext/pg_query/src_pl_plpgsql_src_pl_scanner.c +2 -2
- data/ext/pg_query/src_pl_plpgsql_src_pl_unreserved_kwlist_d.h +54 -56
- data/ext/pg_query/src_port_pg_bitutils.c +41 -31
- data/ext/pg_query/src_port_pgsleep.c +1 -1
- data/ext/pg_query/src_port_pgstrcasecmp.c +1 -1
- data/ext/pg_query/src_port_qsort.c +12 -224
- data/ext/pg_query/src_port_snprintf.c +37 -13
- data/ext/pg_query/src_port_strerror.c +9 -19
- data/ext/pg_query/src_port_strnlen.c +1 -1
- data/lib/pg_query/filter_columns.rb +1 -1
- data/lib/pg_query/fingerprint.rb +5 -1
- data/lib/pg_query/node.rb +2 -2
- data/lib/pg_query/param_refs.rb +1 -1
- data/lib/pg_query/parse.rb +8 -7
- data/lib/pg_query/pg_query_pb.rb +1108 -942
- data/lib/pg_query/truncate.rb +1 -1
- data/lib/pg_query/version.rb +1 -1
- metadata +23 -13
- data/ext/pg_query/include/access/xloginsert.h +0 -64
- data/ext/pg_query/include/bootstrap/bootstrap.h +0 -62
- data/ext/pg_query/include/parser/parse_clause.h +0 -54
- data/ext/pg_query/include/parser/parse_collate.h +0 -27
- data/ext/pg_query/include/parser/parse_target.h +0 -46
- data/ext/pg_query/pg_query_ruby_freebsd.sym +0 -2
- data/ext/pg_query/src_backend_libpq_pqcomm.c +0 -659
- data/ext/pg_query/src_backend_parser_parse_expr.c +0 -313
- data/ext/pg_query/src_port_erand48.c +0 -127
- 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-
|
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
|
-
|
516
|
+
125,
|
507
517
|
135,
|
508
518
|
146,
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
224,
|
519
|
+
157,
|
520
|
+
160,
|
521
|
+
167,
|
522
|
+
174,
|
523
|
+
184,
|
524
|
+
198,
|
525
|
+
207,
|
526
|
+
214,
|
527
|
+
220,
|
519
528
|
228,
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
529
|
+
235,
|
530
|
+
242,
|
531
|
+
246,
|
532
|
+
254,
|
533
|
+
259,
|
534
|
+
267,
|
526
535
|
270,
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
536
|
+
276,
|
537
|
+
281,
|
538
|
+
288,
|
539
|
+
296,
|
540
|
+
305,
|
541
|
+
310,
|
542
|
+
315,
|
543
|
+
323,
|
544
|
+
329,
|
534
545
|
334,
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
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
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
550,
|
559
|
+
456,
|
560
|
+
463,
|
561
|
+
473,
|
562
|
+
485,
|
563
|
+
498,
|
564
|
+
512,
|
565
|
+
521,
|
566
|
+
532,
|
567
|
+
543,
|
559
568
|
555,
|
560
|
-
|
561
|
-
568,
|
569
|
+
563,
|
562
570
|
572,
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
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
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
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
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
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
|
-
|
620
|
-
|
629
|
+
1053,
|
630
|
+
1060,
|
621
631
|
1068,
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
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
|
-
|
636
|
-
|
637
|
-
|
643
|
+
1163,
|
644
|
+
1167,
|
645
|
+
1173,
|
646
|
+
1181,
|
638
647
|
1189,
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
648
|
+
1196,
|
649
|
+
1201,
|
650
|
+
1206,
|
651
|
+
1215,
|
652
|
+
1225,
|
653
|
+
1235,
|
645
654
|
1242,
|
646
|
-
|
655
|
+
1248,
|
647
656
|
1256,
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
657
|
+
1265,
|
658
|
+
1271,
|
659
|
+
1280,
|
660
|
+
1287,
|
661
|
+
1295,
|
662
|
+
1302,
|
663
|
+
1309,
|
664
|
+
1314,
|
665
|
+
1319,
|
666
|
+
1328,
|
658
667
|
1331,
|
659
|
-
|
660
|
-
|
668
|
+
1337,
|
669
|
+
1347,
|
661
670
|
1357,
|
662
|
-
|
671
|
+
1366,
|
663
672
|
1373,
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
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
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
697
|
+
1561,
|
698
|
+
1566,
|
699
|
+
1570,
|
700
|
+
1576,
|
701
|
+
1585,
|
694
702
|
1591,
|
695
|
-
|
703
|
+
1596,
|
696
704
|
1604,
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
705
|
+
1612,
|
706
|
+
1622,
|
707
|
+
1628,
|
708
|
+
1633,
|
709
|
+
1639,
|
710
|
+
1644,
|
711
|
+
1650,
|
712
|
+
1657,
|
713
|
+
1662,
|
704
714
|
1668,
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
1738,
|
715
|
+
1678,
|
716
|
+
1693,
|
717
|
+
1702,
|
718
|
+
1707,
|
719
|
+
1714,
|
720
|
+
1721,
|
721
|
+
1729,
|
722
|
+
1735,
|
714
723
|
1743,
|
715
|
-
|
716
|
-
|
717
|
-
1763,
|
724
|
+
1756,
|
725
|
+
1765,
|
718
726
|
1771,
|
719
|
-
|
720
|
-
|
721
|
-
1786,
|
722
|
-
1790,
|
727
|
+
1778,
|
728
|
+
1785,
|
723
729
|
1794,
|
724
730
|
1799,
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
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
|
-
|
738
|
-
1893,
|
746
|
+
1889,
|
739
747
|
1900,
|
740
|
-
|
741
|
-
|
742
|
-
1914,
|
748
|
+
1904,
|
749
|
+
1912,
|
743
750
|
1919,
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
751
|
+
1927,
|
752
|
+
1934,
|
753
|
+
1939,
|
754
|
+
1946,
|
755
|
+
1952,
|
756
|
+
1960,
|
757
|
+
1967,
|
758
|
+
1970,
|
759
|
+
1974,
|
760
|
+
1981,
|
754
761
|
1986,
|
755
|
-
|
756
|
-
|
757
|
-
|
762
|
+
1990,
|
763
|
+
1993,
|
764
|
+
1998,
|
765
|
+
2007,
|
758
766
|
2014,
|
767
|
+
2022,
|
759
768
|
2025,
|
760
769
|
2031,
|
761
|
-
|
762
|
-
|
770
|
+
2042,
|
771
|
+
2049,
|
763
772
|
2053,
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
+
2059,
|
774
|
+
2064,
|
775
|
+
2073,
|
776
|
+
2081,
|
777
|
+
2092,
|
778
|
+
2098,
|
779
|
+
2104,
|
780
|
+
2113,
|
781
|
+
2123,
|
782
|
+
2130,
|
773
783
|
2138,
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
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
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
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
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
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
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
2515,
|
823
|
+
2475,
|
824
|
+
2484,
|
825
|
+
2491,
|
826
|
+
2501,
|
827
|
+
2509,
|
828
|
+
2516,
|
821
829
|
2522,
|
822
|
-
|
830
|
+
2527,
|
823
831
|
2536,
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
832
|
+
2543,
|
833
|
+
2551,
|
834
|
+
2560,
|
835
|
+
2564,
|
836
|
+
2569,
|
837
|
+
2574,
|
828
838
|
2584,
|
829
839
|
2591,
|
830
840
|
2599,
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
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
|
-
|
850
|
-
|
858
|
+
2737,
|
859
|
+
2742,
|
851
860
|
2751,
|
852
|
-
|
861
|
+
2760,
|
853
862
|
2765,
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
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
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
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
|
-
|
917
|
+
3190,
|
909
918
|
3197,
|
910
919
|
3203,
|
911
920
|
3212,
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
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
|
-
|
932
|
-
|
933
|
-
3398,
|
943
|
+
3382,
|
944
|
+
3392,
|
934
945
|
3403,
|
935
|
-
|
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
|
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[
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
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 =
|
1084
|
+
uint32 b = 0;
|
1062
1085
|
|
1063
1086
|
while (keylen--)
|
1064
1087
|
{
|
1065
1088
|
unsigned char c = *k++ | 0x20;
|
1066
1089
|
|
1067
|
-
a = a *
|
1090
|
+
a = a * 257 + c;
|
1068
1091
|
b = b * 127 + c;
|
1069
1092
|
}
|
1070
|
-
return h[a %
|
1093
|
+
return h[a % 921] + h[b % 921];
|
1071
1094
|
}
|
1072
1095
|
|
1073
1096
|
const ScanKeywordList ScanKeywords = {
|