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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -1
- data/README.md +29 -33
- 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 +1106 -373
- 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 +18 -8
- 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 +28 -18
- 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
@@ -47,6 +47,17 @@ _enumToStringSortByNulls(SortByNulls value) {
|
|
47
47
|
return NULL;
|
48
48
|
}
|
49
49
|
|
50
|
+
static const char*
|
51
|
+
_enumToStringSetQuantifier(SetQuantifier value) {
|
52
|
+
switch(value) {
|
53
|
+
case SET_QUANTIFIER_DEFAULT: return "SET_QUANTIFIER_DEFAULT";
|
54
|
+
case SET_QUANTIFIER_ALL: return "SET_QUANTIFIER_ALL";
|
55
|
+
case SET_QUANTIFIER_DISTINCT: return "SET_QUANTIFIER_DISTINCT";
|
56
|
+
}
|
57
|
+
Assert(false);
|
58
|
+
return NULL;
|
59
|
+
}
|
60
|
+
|
50
61
|
static const char*
|
51
62
|
_enumToStringA_Expr_Kind(A_Expr_Kind value) {
|
52
63
|
switch(value) {
|
@@ -56,7 +67,6 @@ _enumToStringA_Expr_Kind(A_Expr_Kind value) {
|
|
56
67
|
case AEXPR_DISTINCT: return "AEXPR_DISTINCT";
|
57
68
|
case AEXPR_NOT_DISTINCT: return "AEXPR_NOT_DISTINCT";
|
58
69
|
case AEXPR_NULLIF: return "AEXPR_NULLIF";
|
59
|
-
case AEXPR_OF: return "AEXPR_OF";
|
60
70
|
case AEXPR_IN: return "AEXPR_IN";
|
61
71
|
case AEXPR_LIKE: return "AEXPR_LIKE";
|
62
72
|
case AEXPR_ILIKE: return "AEXPR_ILIKE";
|
@@ -65,7 +75,6 @@ _enumToStringA_Expr_Kind(A_Expr_Kind value) {
|
|
65
75
|
case AEXPR_NOT_BETWEEN: return "AEXPR_NOT_BETWEEN";
|
66
76
|
case AEXPR_BETWEEN_SYM: return "AEXPR_BETWEEN_SYM";
|
67
77
|
case AEXPR_NOT_BETWEEN_SYM: return "AEXPR_NOT_BETWEEN_SYM";
|
68
|
-
case AEXPR_PAREN: return "AEXPR_PAREN";
|
69
78
|
}
|
70
79
|
Assert(false);
|
71
80
|
return NULL;
|
@@ -75,6 +84,7 @@ static const char*
|
|
75
84
|
_enumToStringRoleSpecType(RoleSpecType value) {
|
76
85
|
switch(value) {
|
77
86
|
case ROLESPEC_CSTRING: return "ROLESPEC_CSTRING";
|
87
|
+
case ROLESPEC_CURRENT_ROLE: return "ROLESPEC_CURRENT_ROLE";
|
78
88
|
case ROLESPEC_CURRENT_USER: return "ROLESPEC_CURRENT_USER";
|
79
89
|
case ROLESPEC_SESSION_USER: return "ROLESPEC_SESSION_USER";
|
80
90
|
case ROLESPEC_PUBLIC: return "ROLESPEC_PUBLIC";
|
@@ -87,6 +97,7 @@ static const char*
|
|
87
97
|
_enumToStringTableLikeOption(TableLikeOption value) {
|
88
98
|
switch(value) {
|
89
99
|
case CREATE_TABLE_LIKE_COMMENTS: return "CREATE_TABLE_LIKE_COMMENTS";
|
100
|
+
case CREATE_TABLE_LIKE_COMPRESSION: return "CREATE_TABLE_LIKE_COMPRESSION";
|
90
101
|
case CREATE_TABLE_LIKE_CONSTRAINTS: return "CREATE_TABLE_LIKE_CONSTRAINTS";
|
91
102
|
case CREATE_TABLE_LIKE_DEFAULTS: return "CREATE_TABLE_LIKE_DEFAULTS";
|
92
103
|
case CREATE_TABLE_LIKE_GENERATED: return "CREATE_TABLE_LIKE_GENERATED";
|
@@ -147,6 +158,8 @@ _enumToStringWCOKind(WCOKind value) {
|
|
147
158
|
case WCO_RLS_INSERT_CHECK: return "WCO_RLS_INSERT_CHECK";
|
148
159
|
case WCO_RLS_UPDATE_CHECK: return "WCO_RLS_UPDATE_CHECK";
|
149
160
|
case WCO_RLS_CONFLICT_CHECK: return "WCO_RLS_CONFLICT_CHECK";
|
161
|
+
case WCO_RLS_MERGE_UPDATE_CHECK: return "WCO_RLS_MERGE_UPDATE_CHECK";
|
162
|
+
case WCO_RLS_MERGE_DELETE_CHECK: return "WCO_RLS_MERGE_DELETE_CHECK";
|
150
163
|
}
|
151
164
|
Assert(false);
|
152
165
|
return NULL;
|
@@ -218,9 +231,11 @@ _enumToStringObjectType(ObjectType value) {
|
|
218
231
|
case OBJECT_OPCLASS: return "OBJECT_OPCLASS";
|
219
232
|
case OBJECT_OPERATOR: return "OBJECT_OPERATOR";
|
220
233
|
case OBJECT_OPFAMILY: return "OBJECT_OPFAMILY";
|
234
|
+
case OBJECT_PARAMETER_ACL: return "OBJECT_PARAMETER_ACL";
|
221
235
|
case OBJECT_POLICY: return "OBJECT_POLICY";
|
222
236
|
case OBJECT_PROCEDURE: return "OBJECT_PROCEDURE";
|
223
237
|
case OBJECT_PUBLICATION: return "OBJECT_PUBLICATION";
|
238
|
+
case OBJECT_PUBLICATION_NAMESPACE: return "OBJECT_PUBLICATION_NAMESPACE";
|
224
239
|
case OBJECT_PUBLICATION_REL: return "OBJECT_PUBLICATION_REL";
|
225
240
|
case OBJECT_ROLE: return "OBJECT_ROLE";
|
226
241
|
case OBJECT_ROUTINE: return "OBJECT_ROUTINE";
|
@@ -272,6 +287,7 @@ _enumToStringAlterTableType(AlterTableType value) {
|
|
272
287
|
case AT_SetOptions: return "AT_SetOptions";
|
273
288
|
case AT_ResetOptions: return "AT_ResetOptions";
|
274
289
|
case AT_SetStorage: return "AT_SetStorage";
|
290
|
+
case AT_SetCompression: return "AT_SetCompression";
|
275
291
|
case AT_DropColumn: return "AT_DropColumn";
|
276
292
|
case AT_DropColumnRecurse: return "AT_DropColumnRecurse";
|
277
293
|
case AT_AddIndex: return "AT_AddIndex";
|
@@ -295,6 +311,7 @@ _enumToStringAlterTableType(AlterTableType value) {
|
|
295
311
|
case AT_SetLogged: return "AT_SetLogged";
|
296
312
|
case AT_SetUnLogged: return "AT_SetUnLogged";
|
297
313
|
case AT_DropOids: return "AT_DropOids";
|
314
|
+
case AT_SetAccessMethod: return "AT_SetAccessMethod";
|
298
315
|
case AT_SetTableSpace: return "AT_SetTableSpace";
|
299
316
|
case AT_SetRelOptions: return "AT_SetRelOptions";
|
300
317
|
case AT_ResetRelOptions: return "AT_ResetRelOptions";
|
@@ -323,9 +340,11 @@ _enumToStringAlterTableType(AlterTableType value) {
|
|
323
340
|
case AT_GenericOptions: return "AT_GenericOptions";
|
324
341
|
case AT_AttachPartition: return "AT_AttachPartition";
|
325
342
|
case AT_DetachPartition: return "AT_DetachPartition";
|
343
|
+
case AT_DetachPartitionFinalize: return "AT_DetachPartitionFinalize";
|
326
344
|
case AT_AddIdentity: return "AT_AddIdentity";
|
327
345
|
case AT_SetIdentity: return "AT_SetIdentity";
|
328
346
|
case AT_DropIdentity: return "AT_DropIdentity";
|
347
|
+
case AT_ReAddStatistics: return "AT_ReAddStatistics";
|
329
348
|
}
|
330
349
|
Assert(false);
|
331
350
|
return NULL;
|
@@ -420,6 +439,7 @@ _enumToStringFunctionParameterMode(FunctionParameterMode value) {
|
|
420
439
|
case FUNC_PARAM_INOUT: return "FUNC_PARAM_INOUT";
|
421
440
|
case FUNC_PARAM_VARIADIC: return "FUNC_PARAM_VARIADIC";
|
422
441
|
case FUNC_PARAM_TABLE: return "FUNC_PARAM_TABLE";
|
442
|
+
case FUNC_PARAM_DEFAULT: return "FUNC_PARAM_DEFAULT";
|
423
443
|
}
|
424
444
|
Assert(false);
|
425
445
|
return NULL;
|
@@ -454,16 +474,6 @@ _enumToStringViewCheckOption(ViewCheckOption value) {
|
|
454
474
|
return NULL;
|
455
475
|
}
|
456
476
|
|
457
|
-
static const char*
|
458
|
-
_enumToStringClusterOption(ClusterOption value) {
|
459
|
-
switch(value) {
|
460
|
-
case CLUOPT_RECHECK: return "CLUOPT_RECHECK";
|
461
|
-
case CLUOPT_VERBOSE: return "CLUOPT_VERBOSE";
|
462
|
-
}
|
463
|
-
Assert(false);
|
464
|
-
return NULL;
|
465
|
-
}
|
466
|
-
|
467
477
|
static const char*
|
468
478
|
_enumToStringDiscardMode(DiscardMode value) {
|
469
479
|
switch(value) {
|
@@ -502,14 +512,40 @@ _enumToStringAlterTSConfigType(AlterTSConfigType value) {
|
|
502
512
|
return NULL;
|
503
513
|
}
|
504
514
|
|
515
|
+
static const char*
|
516
|
+
_enumToStringPublicationObjSpecType(PublicationObjSpecType value) {
|
517
|
+
switch(value) {
|
518
|
+
case PUBLICATIONOBJ_TABLE: return "PUBLICATIONOBJ_TABLE";
|
519
|
+
case PUBLICATIONOBJ_TABLES_IN_SCHEMA: return "PUBLICATIONOBJ_TABLES_IN_SCHEMA";
|
520
|
+
case PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA: return "PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA";
|
521
|
+
case PUBLICATIONOBJ_CONTINUATION: return "PUBLICATIONOBJ_CONTINUATION";
|
522
|
+
}
|
523
|
+
Assert(false);
|
524
|
+
return NULL;
|
525
|
+
}
|
526
|
+
|
527
|
+
static const char*
|
528
|
+
_enumToStringAlterPublicationAction(AlterPublicationAction value) {
|
529
|
+
switch(value) {
|
530
|
+
case AP_AddObjects: return "AP_AddObjects";
|
531
|
+
case AP_DropObjects: return "AP_DropObjects";
|
532
|
+
case AP_SetObjects: return "AP_SetObjects";
|
533
|
+
}
|
534
|
+
Assert(false);
|
535
|
+
return NULL;
|
536
|
+
}
|
537
|
+
|
505
538
|
static const char*
|
506
539
|
_enumToStringAlterSubscriptionType(AlterSubscriptionType value) {
|
507
540
|
switch(value) {
|
508
541
|
case ALTER_SUBSCRIPTION_OPTIONS: return "ALTER_SUBSCRIPTION_OPTIONS";
|
509
542
|
case ALTER_SUBSCRIPTION_CONNECTION: return "ALTER_SUBSCRIPTION_CONNECTION";
|
510
|
-
case
|
543
|
+
case ALTER_SUBSCRIPTION_SET_PUBLICATION: return "ALTER_SUBSCRIPTION_SET_PUBLICATION";
|
544
|
+
case ALTER_SUBSCRIPTION_ADD_PUBLICATION: return "ALTER_SUBSCRIPTION_ADD_PUBLICATION";
|
545
|
+
case ALTER_SUBSCRIPTION_DROP_PUBLICATION: return "ALTER_SUBSCRIPTION_DROP_PUBLICATION";
|
511
546
|
case ALTER_SUBSCRIPTION_REFRESH: return "ALTER_SUBSCRIPTION_REFRESH";
|
512
547
|
case ALTER_SUBSCRIPTION_ENABLED: return "ALTER_SUBSCRIPTION_ENABLED";
|
548
|
+
case ALTER_SUBSCRIPTION_SKIP: return "ALTER_SUBSCRIPTION_SKIP";
|
513
549
|
}
|
514
550
|
Assert(false);
|
515
551
|
return NULL;
|
@@ -544,6 +580,7 @@ _enumToStringCoercionContext(CoercionContext value) {
|
|
544
580
|
switch(value) {
|
545
581
|
case COERCION_IMPLICIT: return "COERCION_IMPLICIT";
|
546
582
|
case COERCION_ASSIGNMENT: return "COERCION_ASSIGNMENT";
|
583
|
+
case COERCION_PLPGSQL: return "COERCION_PLPGSQL";
|
547
584
|
case COERCION_EXPLICIT: return "COERCION_EXPLICIT";
|
548
585
|
}
|
549
586
|
Assert(false);
|
@@ -556,6 +593,7 @@ _enumToStringCoercionForm(CoercionForm value) {
|
|
556
593
|
case COERCE_EXPLICIT_CALL: return "COERCE_EXPLICIT_CALL";
|
557
594
|
case COERCE_EXPLICIT_CAST: return "COERCE_EXPLICIT_CAST";
|
558
595
|
case COERCE_IMPLICIT_CAST: return "COERCE_IMPLICIT_CAST";
|
596
|
+
case COERCE_SQL_SYNTAX: return "COERCE_SQL_SYNTAX";
|
559
597
|
}
|
560
598
|
Assert(false);
|
561
599
|
return NULL;
|
@@ -693,6 +731,7 @@ _enumToStringCmdType(CmdType value) {
|
|
693
731
|
case CMD_UPDATE: return "CMD_UPDATE";
|
694
732
|
case CMD_INSERT: return "CMD_INSERT";
|
695
733
|
case CMD_DELETE: return "CMD_DELETE";
|
734
|
+
case CMD_MERGE: return "CMD_MERGE";
|
696
735
|
case CMD_UTILITY: return "CMD_UTILITY";
|
697
736
|
case CMD_NOTHING: return "CMD_NOTHING";
|
698
737
|
}
|
@@ -864,6 +903,17 @@ _enumToIntSortByNulls(SortByNulls value) {
|
|
864
903
|
return -1;
|
865
904
|
}
|
866
905
|
|
906
|
+
static int
|
907
|
+
_enumToIntSetQuantifier(SetQuantifier value) {
|
908
|
+
switch(value) {
|
909
|
+
case SET_QUANTIFIER_DEFAULT: return 1;
|
910
|
+
case SET_QUANTIFIER_ALL: return 2;
|
911
|
+
case SET_QUANTIFIER_DISTINCT: return 3;
|
912
|
+
}
|
913
|
+
Assert(false);
|
914
|
+
return -1;
|
915
|
+
}
|
916
|
+
|
867
917
|
static int
|
868
918
|
_enumToIntA_Expr_Kind(A_Expr_Kind value) {
|
869
919
|
switch(value) {
|
@@ -873,16 +923,14 @@ _enumToIntA_Expr_Kind(A_Expr_Kind value) {
|
|
873
923
|
case AEXPR_DISTINCT: return 4;
|
874
924
|
case AEXPR_NOT_DISTINCT: return 5;
|
875
925
|
case AEXPR_NULLIF: return 6;
|
876
|
-
case
|
877
|
-
case
|
878
|
-
case
|
879
|
-
case
|
880
|
-
case
|
881
|
-
case
|
882
|
-
case
|
883
|
-
case
|
884
|
-
case AEXPR_NOT_BETWEEN_SYM: return 15;
|
885
|
-
case AEXPR_PAREN: return 16;
|
926
|
+
case AEXPR_IN: return 7;
|
927
|
+
case AEXPR_LIKE: return 8;
|
928
|
+
case AEXPR_ILIKE: return 9;
|
929
|
+
case AEXPR_SIMILAR: return 10;
|
930
|
+
case AEXPR_BETWEEN: return 11;
|
931
|
+
case AEXPR_NOT_BETWEEN: return 12;
|
932
|
+
case AEXPR_BETWEEN_SYM: return 13;
|
933
|
+
case AEXPR_NOT_BETWEEN_SYM: return 14;
|
886
934
|
}
|
887
935
|
Assert(false);
|
888
936
|
return -1;
|
@@ -892,9 +940,10 @@ static int
|
|
892
940
|
_enumToIntRoleSpecType(RoleSpecType value) {
|
893
941
|
switch(value) {
|
894
942
|
case ROLESPEC_CSTRING: return 1;
|
895
|
-
case
|
896
|
-
case
|
897
|
-
case
|
943
|
+
case ROLESPEC_CURRENT_ROLE: return 2;
|
944
|
+
case ROLESPEC_CURRENT_USER: return 3;
|
945
|
+
case ROLESPEC_SESSION_USER: return 4;
|
946
|
+
case ROLESPEC_PUBLIC: return 5;
|
898
947
|
}
|
899
948
|
Assert(false);
|
900
949
|
return -1;
|
@@ -904,14 +953,15 @@ static int
|
|
904
953
|
_enumToIntTableLikeOption(TableLikeOption value) {
|
905
954
|
switch(value) {
|
906
955
|
case CREATE_TABLE_LIKE_COMMENTS: return 1;
|
907
|
-
case
|
908
|
-
case
|
909
|
-
case
|
910
|
-
case
|
911
|
-
case
|
912
|
-
case
|
913
|
-
case
|
914
|
-
case
|
956
|
+
case CREATE_TABLE_LIKE_COMPRESSION: return 2;
|
957
|
+
case CREATE_TABLE_LIKE_CONSTRAINTS: return 3;
|
958
|
+
case CREATE_TABLE_LIKE_DEFAULTS: return 4;
|
959
|
+
case CREATE_TABLE_LIKE_GENERATED: return 5;
|
960
|
+
case CREATE_TABLE_LIKE_IDENTITY: return 6;
|
961
|
+
case CREATE_TABLE_LIKE_INDEXES: return 7;
|
962
|
+
case CREATE_TABLE_LIKE_STATISTICS: return 8;
|
963
|
+
case CREATE_TABLE_LIKE_STORAGE: return 9;
|
964
|
+
case CREATE_TABLE_LIKE_ALL: return 10;
|
915
965
|
}
|
916
966
|
Assert(false);
|
917
967
|
return -1;
|
@@ -964,6 +1014,8 @@ _enumToIntWCOKind(WCOKind value) {
|
|
964
1014
|
case WCO_RLS_INSERT_CHECK: return 2;
|
965
1015
|
case WCO_RLS_UPDATE_CHECK: return 3;
|
966
1016
|
case WCO_RLS_CONFLICT_CHECK: return 4;
|
1017
|
+
case WCO_RLS_MERGE_UPDATE_CHECK: return 5;
|
1018
|
+
case WCO_RLS_MERGE_DELETE_CHECK: return 6;
|
967
1019
|
}
|
968
1020
|
Assert(false);
|
969
1021
|
return -1;
|
@@ -1035,29 +1087,31 @@ _enumToIntObjectType(ObjectType value) {
|
|
1035
1087
|
case OBJECT_OPCLASS: return 25;
|
1036
1088
|
case OBJECT_OPERATOR: return 26;
|
1037
1089
|
case OBJECT_OPFAMILY: return 27;
|
1038
|
-
case
|
1039
|
-
case
|
1040
|
-
case
|
1041
|
-
case
|
1042
|
-
case
|
1043
|
-
case
|
1044
|
-
case
|
1045
|
-
case
|
1046
|
-
case
|
1047
|
-
case
|
1048
|
-
case
|
1049
|
-
case
|
1050
|
-
case
|
1051
|
-
case
|
1052
|
-
case
|
1053
|
-
case
|
1054
|
-
case
|
1055
|
-
case
|
1056
|
-
case
|
1057
|
-
case
|
1058
|
-
case
|
1059
|
-
case
|
1060
|
-
case
|
1090
|
+
case OBJECT_PARAMETER_ACL: return 28;
|
1091
|
+
case OBJECT_POLICY: return 29;
|
1092
|
+
case OBJECT_PROCEDURE: return 30;
|
1093
|
+
case OBJECT_PUBLICATION: return 31;
|
1094
|
+
case OBJECT_PUBLICATION_NAMESPACE: return 32;
|
1095
|
+
case OBJECT_PUBLICATION_REL: return 33;
|
1096
|
+
case OBJECT_ROLE: return 34;
|
1097
|
+
case OBJECT_ROUTINE: return 35;
|
1098
|
+
case OBJECT_RULE: return 36;
|
1099
|
+
case OBJECT_SCHEMA: return 37;
|
1100
|
+
case OBJECT_SEQUENCE: return 38;
|
1101
|
+
case OBJECT_SUBSCRIPTION: return 39;
|
1102
|
+
case OBJECT_STATISTIC_EXT: return 40;
|
1103
|
+
case OBJECT_TABCONSTRAINT: return 41;
|
1104
|
+
case OBJECT_TABLE: return 42;
|
1105
|
+
case OBJECT_TABLESPACE: return 43;
|
1106
|
+
case OBJECT_TRANSFORM: return 44;
|
1107
|
+
case OBJECT_TRIGGER: return 45;
|
1108
|
+
case OBJECT_TSCONFIGURATION: return 46;
|
1109
|
+
case OBJECT_TSDICTIONARY: return 47;
|
1110
|
+
case OBJECT_TSPARSER: return 48;
|
1111
|
+
case OBJECT_TSTEMPLATE: return 49;
|
1112
|
+
case OBJECT_TYPE: return 50;
|
1113
|
+
case OBJECT_USER_MAPPING: return 51;
|
1114
|
+
case OBJECT_VIEW: return 52;
|
1061
1115
|
}
|
1062
1116
|
Assert(false);
|
1063
1117
|
return -1;
|
@@ -1089,60 +1143,64 @@ _enumToIntAlterTableType(AlterTableType value) {
|
|
1089
1143
|
case AT_SetOptions: return 11;
|
1090
1144
|
case AT_ResetOptions: return 12;
|
1091
1145
|
case AT_SetStorage: return 13;
|
1092
|
-
case
|
1093
|
-
case
|
1094
|
-
case
|
1095
|
-
case
|
1096
|
-
case
|
1097
|
-
case
|
1098
|
-
case
|
1099
|
-
case
|
1100
|
-
case
|
1101
|
-
case
|
1102
|
-
case
|
1103
|
-
case
|
1104
|
-
case
|
1105
|
-
case
|
1106
|
-
case
|
1107
|
-
case
|
1108
|
-
case
|
1109
|
-
case
|
1110
|
-
case
|
1111
|
-
case
|
1112
|
-
case
|
1113
|
-
case
|
1114
|
-
case
|
1115
|
-
case
|
1116
|
-
case
|
1117
|
-
case
|
1118
|
-
case
|
1119
|
-
case
|
1120
|
-
case
|
1121
|
-
case
|
1122
|
-
case
|
1123
|
-
case
|
1124
|
-
case
|
1125
|
-
case
|
1126
|
-
case
|
1127
|
-
case
|
1128
|
-
case
|
1129
|
-
case
|
1130
|
-
case
|
1131
|
-
case
|
1132
|
-
case
|
1133
|
-
case
|
1134
|
-
case
|
1135
|
-
case
|
1136
|
-
case
|
1137
|
-
case
|
1138
|
-
case
|
1139
|
-
case
|
1140
|
-
case
|
1141
|
-
case
|
1142
|
-
case
|
1143
|
-
case
|
1144
|
-
case
|
1145
|
-
case
|
1146
|
+
case AT_SetCompression: return 14;
|
1147
|
+
case AT_DropColumn: return 15;
|
1148
|
+
case AT_DropColumnRecurse: return 16;
|
1149
|
+
case AT_AddIndex: return 17;
|
1150
|
+
case AT_ReAddIndex: return 18;
|
1151
|
+
case AT_AddConstraint: return 19;
|
1152
|
+
case AT_AddConstraintRecurse: return 20;
|
1153
|
+
case AT_ReAddConstraint: return 21;
|
1154
|
+
case AT_ReAddDomainConstraint: return 22;
|
1155
|
+
case AT_AlterConstraint: return 23;
|
1156
|
+
case AT_ValidateConstraint: return 24;
|
1157
|
+
case AT_ValidateConstraintRecurse: return 25;
|
1158
|
+
case AT_AddIndexConstraint: return 26;
|
1159
|
+
case AT_DropConstraint: return 27;
|
1160
|
+
case AT_DropConstraintRecurse: return 28;
|
1161
|
+
case AT_ReAddComment: return 29;
|
1162
|
+
case AT_AlterColumnType: return 30;
|
1163
|
+
case AT_AlterColumnGenericOptions: return 31;
|
1164
|
+
case AT_ChangeOwner: return 32;
|
1165
|
+
case AT_ClusterOn: return 33;
|
1166
|
+
case AT_DropCluster: return 34;
|
1167
|
+
case AT_SetLogged: return 35;
|
1168
|
+
case AT_SetUnLogged: return 36;
|
1169
|
+
case AT_DropOids: return 37;
|
1170
|
+
case AT_SetAccessMethod: return 38;
|
1171
|
+
case AT_SetTableSpace: return 39;
|
1172
|
+
case AT_SetRelOptions: return 40;
|
1173
|
+
case AT_ResetRelOptions: return 41;
|
1174
|
+
case AT_ReplaceRelOptions: return 42;
|
1175
|
+
case AT_EnableTrig: return 43;
|
1176
|
+
case AT_EnableAlwaysTrig: return 44;
|
1177
|
+
case AT_EnableReplicaTrig: return 45;
|
1178
|
+
case AT_DisableTrig: return 46;
|
1179
|
+
case AT_EnableTrigAll: return 47;
|
1180
|
+
case AT_DisableTrigAll: return 48;
|
1181
|
+
case AT_EnableTrigUser: return 49;
|
1182
|
+
case AT_DisableTrigUser: return 50;
|
1183
|
+
case AT_EnableRule: return 51;
|
1184
|
+
case AT_EnableAlwaysRule: return 52;
|
1185
|
+
case AT_EnableReplicaRule: return 53;
|
1186
|
+
case AT_DisableRule: return 54;
|
1187
|
+
case AT_AddInherit: return 55;
|
1188
|
+
case AT_DropInherit: return 56;
|
1189
|
+
case AT_AddOf: return 57;
|
1190
|
+
case AT_DropOf: return 58;
|
1191
|
+
case AT_ReplicaIdentity: return 59;
|
1192
|
+
case AT_EnableRowSecurity: return 60;
|
1193
|
+
case AT_DisableRowSecurity: return 61;
|
1194
|
+
case AT_ForceRowSecurity: return 62;
|
1195
|
+
case AT_NoForceRowSecurity: return 63;
|
1196
|
+
case AT_GenericOptions: return 64;
|
1197
|
+
case AT_AttachPartition: return 65;
|
1198
|
+
case AT_DetachPartition: return 66;
|
1199
|
+
case AT_DetachPartitionFinalize: return 67;
|
1200
|
+
case AT_AddIdentity: return 68;
|
1201
|
+
case AT_SetIdentity: return 69;
|
1202
|
+
case AT_DropIdentity: return 70;
|
1203
|
+
case AT_ReAddStatistics: return 71;
|
1146
1204
|
}
|
1147
1205
|
Assert(false);
|
1148
1206
|
return -1;
|
@@ -1237,6 +1295,7 @@ _enumToIntFunctionParameterMode(FunctionParameterMode value) {
|
|
1237
1295
|
case FUNC_PARAM_INOUT: return 3;
|
1238
1296
|
case FUNC_PARAM_VARIADIC: return 4;
|
1239
1297
|
case FUNC_PARAM_TABLE: return 5;
|
1298
|
+
case FUNC_PARAM_DEFAULT: return 6;
|
1240
1299
|
}
|
1241
1300
|
Assert(false);
|
1242
1301
|
return -1;
|
@@ -1271,16 +1330,6 @@ _enumToIntViewCheckOption(ViewCheckOption value) {
|
|
1271
1330
|
return -1;
|
1272
1331
|
}
|
1273
1332
|
|
1274
|
-
static int
|
1275
|
-
_enumToIntClusterOption(ClusterOption value) {
|
1276
|
-
switch(value) {
|
1277
|
-
case CLUOPT_RECHECK: return 1;
|
1278
|
-
case CLUOPT_VERBOSE: return 2;
|
1279
|
-
}
|
1280
|
-
Assert(false);
|
1281
|
-
return -1;
|
1282
|
-
}
|
1283
|
-
|
1284
1333
|
static int
|
1285
1334
|
_enumToIntDiscardMode(DiscardMode value) {
|
1286
1335
|
switch(value) {
|
@@ -1319,14 +1368,40 @@ _enumToIntAlterTSConfigType(AlterTSConfigType value) {
|
|
1319
1368
|
return -1;
|
1320
1369
|
}
|
1321
1370
|
|
1371
|
+
static int
|
1372
|
+
_enumToIntPublicationObjSpecType(PublicationObjSpecType value) {
|
1373
|
+
switch(value) {
|
1374
|
+
case PUBLICATIONOBJ_TABLE: return 1;
|
1375
|
+
case PUBLICATIONOBJ_TABLES_IN_SCHEMA: return 2;
|
1376
|
+
case PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA: return 3;
|
1377
|
+
case PUBLICATIONOBJ_CONTINUATION: return 4;
|
1378
|
+
}
|
1379
|
+
Assert(false);
|
1380
|
+
return -1;
|
1381
|
+
}
|
1382
|
+
|
1383
|
+
static int
|
1384
|
+
_enumToIntAlterPublicationAction(AlterPublicationAction value) {
|
1385
|
+
switch(value) {
|
1386
|
+
case AP_AddObjects: return 1;
|
1387
|
+
case AP_DropObjects: return 2;
|
1388
|
+
case AP_SetObjects: return 3;
|
1389
|
+
}
|
1390
|
+
Assert(false);
|
1391
|
+
return -1;
|
1392
|
+
}
|
1393
|
+
|
1322
1394
|
static int
|
1323
1395
|
_enumToIntAlterSubscriptionType(AlterSubscriptionType value) {
|
1324
1396
|
switch(value) {
|
1325
1397
|
case ALTER_SUBSCRIPTION_OPTIONS: return 1;
|
1326
1398
|
case ALTER_SUBSCRIPTION_CONNECTION: return 2;
|
1327
|
-
case
|
1328
|
-
case
|
1329
|
-
case
|
1399
|
+
case ALTER_SUBSCRIPTION_SET_PUBLICATION: return 3;
|
1400
|
+
case ALTER_SUBSCRIPTION_ADD_PUBLICATION: return 4;
|
1401
|
+
case ALTER_SUBSCRIPTION_DROP_PUBLICATION: return 5;
|
1402
|
+
case ALTER_SUBSCRIPTION_REFRESH: return 6;
|
1403
|
+
case ALTER_SUBSCRIPTION_ENABLED: return 7;
|
1404
|
+
case ALTER_SUBSCRIPTION_SKIP: return 8;
|
1330
1405
|
}
|
1331
1406
|
Assert(false);
|
1332
1407
|
return -1;
|
@@ -1361,7 +1436,8 @@ _enumToIntCoercionContext(CoercionContext value) {
|
|
1361
1436
|
switch(value) {
|
1362
1437
|
case COERCION_IMPLICIT: return 1;
|
1363
1438
|
case COERCION_ASSIGNMENT: return 2;
|
1364
|
-
case
|
1439
|
+
case COERCION_PLPGSQL: return 3;
|
1440
|
+
case COERCION_EXPLICIT: return 4;
|
1365
1441
|
}
|
1366
1442
|
Assert(false);
|
1367
1443
|
return -1;
|
@@ -1373,6 +1449,7 @@ _enumToIntCoercionForm(CoercionForm value) {
|
|
1373
1449
|
case COERCE_EXPLICIT_CALL: return 1;
|
1374
1450
|
case COERCE_EXPLICIT_CAST: return 2;
|
1375
1451
|
case COERCE_IMPLICIT_CAST: return 3;
|
1452
|
+
case COERCE_SQL_SYNTAX: return 4;
|
1376
1453
|
}
|
1377
1454
|
Assert(false);
|
1378
1455
|
return -1;
|
@@ -1510,8 +1587,9 @@ _enumToIntCmdType(CmdType value) {
|
|
1510
1587
|
case CMD_UPDATE: return 3;
|
1511
1588
|
case CMD_INSERT: return 4;
|
1512
1589
|
case CMD_DELETE: return 5;
|
1513
|
-
case
|
1514
|
-
case
|
1590
|
+
case CMD_MERGE: return 6;
|
1591
|
+
case CMD_UTILITY: return 7;
|
1592
|
+
case CMD_NOTHING: return 8;
|
1515
1593
|
}
|
1516
1594
|
Assert(false);
|
1517
1595
|
return -1;
|
@@ -1681,6 +1759,17 @@ _intToEnumSortByNulls(int value) {
|
|
1681
1759
|
return SORTBY_NULLS_DEFAULT;
|
1682
1760
|
}
|
1683
1761
|
|
1762
|
+
static SetQuantifier
|
1763
|
+
_intToEnumSetQuantifier(int value) {
|
1764
|
+
switch(value) {
|
1765
|
+
case 1: return SET_QUANTIFIER_DEFAULT;
|
1766
|
+
case 2: return SET_QUANTIFIER_ALL;
|
1767
|
+
case 3: return SET_QUANTIFIER_DISTINCT;
|
1768
|
+
}
|
1769
|
+
Assert(false);
|
1770
|
+
return SET_QUANTIFIER_DEFAULT;
|
1771
|
+
}
|
1772
|
+
|
1684
1773
|
static A_Expr_Kind
|
1685
1774
|
_intToEnumA_Expr_Kind(int value) {
|
1686
1775
|
switch(value) {
|
@@ -1690,16 +1779,14 @@ _intToEnumA_Expr_Kind(int value) {
|
|
1690
1779
|
case 4: return AEXPR_DISTINCT;
|
1691
1780
|
case 5: return AEXPR_NOT_DISTINCT;
|
1692
1781
|
case 6: return AEXPR_NULLIF;
|
1693
|
-
case 7: return
|
1694
|
-
case 8: return
|
1695
|
-
case 9: return
|
1696
|
-
case 10: return
|
1697
|
-
case 11: return
|
1698
|
-
case 12: return
|
1699
|
-
case 13: return
|
1700
|
-
case 14: return
|
1701
|
-
case 15: return AEXPR_NOT_BETWEEN_SYM;
|
1702
|
-
case 16: return AEXPR_PAREN;
|
1782
|
+
case 7: return AEXPR_IN;
|
1783
|
+
case 8: return AEXPR_LIKE;
|
1784
|
+
case 9: return AEXPR_ILIKE;
|
1785
|
+
case 10: return AEXPR_SIMILAR;
|
1786
|
+
case 11: return AEXPR_BETWEEN;
|
1787
|
+
case 12: return AEXPR_NOT_BETWEEN;
|
1788
|
+
case 13: return AEXPR_BETWEEN_SYM;
|
1789
|
+
case 14: return AEXPR_NOT_BETWEEN_SYM;
|
1703
1790
|
}
|
1704
1791
|
Assert(false);
|
1705
1792
|
return AEXPR_OP;
|
@@ -1709,9 +1796,10 @@ static RoleSpecType
|
|
1709
1796
|
_intToEnumRoleSpecType(int value) {
|
1710
1797
|
switch(value) {
|
1711
1798
|
case 1: return ROLESPEC_CSTRING;
|
1712
|
-
case 2: return
|
1713
|
-
case 3: return
|
1714
|
-
case 4: return
|
1799
|
+
case 2: return ROLESPEC_CURRENT_ROLE;
|
1800
|
+
case 3: return ROLESPEC_CURRENT_USER;
|
1801
|
+
case 4: return ROLESPEC_SESSION_USER;
|
1802
|
+
case 5: return ROLESPEC_PUBLIC;
|
1715
1803
|
}
|
1716
1804
|
Assert(false);
|
1717
1805
|
return ROLESPEC_CSTRING;
|
@@ -1721,14 +1809,15 @@ static TableLikeOption
|
|
1721
1809
|
_intToEnumTableLikeOption(int value) {
|
1722
1810
|
switch(value) {
|
1723
1811
|
case 1: return CREATE_TABLE_LIKE_COMMENTS;
|
1724
|
-
case 2: return
|
1725
|
-
case 3: return
|
1726
|
-
case 4: return
|
1727
|
-
case 5: return
|
1728
|
-
case 6: return
|
1729
|
-
case 7: return
|
1730
|
-
case 8: return
|
1731
|
-
case 9: return
|
1812
|
+
case 2: return CREATE_TABLE_LIKE_COMPRESSION;
|
1813
|
+
case 3: return CREATE_TABLE_LIKE_CONSTRAINTS;
|
1814
|
+
case 4: return CREATE_TABLE_LIKE_DEFAULTS;
|
1815
|
+
case 5: return CREATE_TABLE_LIKE_GENERATED;
|
1816
|
+
case 6: return CREATE_TABLE_LIKE_IDENTITY;
|
1817
|
+
case 7: return CREATE_TABLE_LIKE_INDEXES;
|
1818
|
+
case 8: return CREATE_TABLE_LIKE_STATISTICS;
|
1819
|
+
case 9: return CREATE_TABLE_LIKE_STORAGE;
|
1820
|
+
case 10: return CREATE_TABLE_LIKE_ALL;
|
1732
1821
|
}
|
1733
1822
|
Assert(false);
|
1734
1823
|
return CREATE_TABLE_LIKE_COMMENTS;
|
@@ -1781,6 +1870,8 @@ _intToEnumWCOKind(int value) {
|
|
1781
1870
|
case 2: return WCO_RLS_INSERT_CHECK;
|
1782
1871
|
case 3: return WCO_RLS_UPDATE_CHECK;
|
1783
1872
|
case 4: return WCO_RLS_CONFLICT_CHECK;
|
1873
|
+
case 5: return WCO_RLS_MERGE_UPDATE_CHECK;
|
1874
|
+
case 6: return WCO_RLS_MERGE_DELETE_CHECK;
|
1784
1875
|
}
|
1785
1876
|
Assert(false);
|
1786
1877
|
return WCO_VIEW_CHECK;
|
@@ -1852,29 +1943,31 @@ _intToEnumObjectType(int value) {
|
|
1852
1943
|
case 25: return OBJECT_OPCLASS;
|
1853
1944
|
case 26: return OBJECT_OPERATOR;
|
1854
1945
|
case 27: return OBJECT_OPFAMILY;
|
1855
|
-
case 28: return
|
1856
|
-
case 29: return
|
1857
|
-
case 30: return
|
1858
|
-
case 31: return
|
1859
|
-
case 32: return
|
1860
|
-
case 33: return
|
1861
|
-
case 34: return
|
1862
|
-
case 35: return
|
1863
|
-
case 36: return
|
1864
|
-
case 37: return
|
1865
|
-
case 38: return
|
1866
|
-
case 39: return
|
1867
|
-
case 40: return
|
1868
|
-
case 41: return
|
1869
|
-
case 42: return
|
1870
|
-
case 43: return
|
1871
|
-
case 44: return
|
1872
|
-
case 45: return
|
1873
|
-
case 46: return
|
1874
|
-
case 47: return
|
1875
|
-
case 48: return
|
1876
|
-
case 49: return
|
1877
|
-
case 50: return
|
1946
|
+
case 28: return OBJECT_PARAMETER_ACL;
|
1947
|
+
case 29: return OBJECT_POLICY;
|
1948
|
+
case 30: return OBJECT_PROCEDURE;
|
1949
|
+
case 31: return OBJECT_PUBLICATION;
|
1950
|
+
case 32: return OBJECT_PUBLICATION_NAMESPACE;
|
1951
|
+
case 33: return OBJECT_PUBLICATION_REL;
|
1952
|
+
case 34: return OBJECT_ROLE;
|
1953
|
+
case 35: return OBJECT_ROUTINE;
|
1954
|
+
case 36: return OBJECT_RULE;
|
1955
|
+
case 37: return OBJECT_SCHEMA;
|
1956
|
+
case 38: return OBJECT_SEQUENCE;
|
1957
|
+
case 39: return OBJECT_SUBSCRIPTION;
|
1958
|
+
case 40: return OBJECT_STATISTIC_EXT;
|
1959
|
+
case 41: return OBJECT_TABCONSTRAINT;
|
1960
|
+
case 42: return OBJECT_TABLE;
|
1961
|
+
case 43: return OBJECT_TABLESPACE;
|
1962
|
+
case 44: return OBJECT_TRANSFORM;
|
1963
|
+
case 45: return OBJECT_TRIGGER;
|
1964
|
+
case 46: return OBJECT_TSCONFIGURATION;
|
1965
|
+
case 47: return OBJECT_TSDICTIONARY;
|
1966
|
+
case 48: return OBJECT_TSPARSER;
|
1967
|
+
case 49: return OBJECT_TSTEMPLATE;
|
1968
|
+
case 50: return OBJECT_TYPE;
|
1969
|
+
case 51: return OBJECT_USER_MAPPING;
|
1970
|
+
case 52: return OBJECT_VIEW;
|
1878
1971
|
}
|
1879
1972
|
Assert(false);
|
1880
1973
|
return OBJECT_ACCESS_METHOD;
|
@@ -1906,60 +1999,64 @@ _intToEnumAlterTableType(int value) {
|
|
1906
1999
|
case 11: return AT_SetOptions;
|
1907
2000
|
case 12: return AT_ResetOptions;
|
1908
2001
|
case 13: return AT_SetStorage;
|
1909
|
-
case 14: return
|
1910
|
-
case 15: return
|
1911
|
-
case 16: return
|
1912
|
-
case 17: return
|
1913
|
-
case 18: return
|
1914
|
-
case 19: return
|
1915
|
-
case 20: return
|
1916
|
-
case 21: return
|
1917
|
-
case 22: return
|
1918
|
-
case 23: return
|
1919
|
-
case 24: return
|
1920
|
-
case 25: return
|
1921
|
-
case 26: return
|
1922
|
-
case 27: return
|
1923
|
-
case 28: return
|
1924
|
-
case 29: return
|
1925
|
-
case 30: return
|
1926
|
-
case 31: return
|
1927
|
-
case 32: return
|
1928
|
-
case 33: return
|
1929
|
-
case 34: return
|
1930
|
-
case 35: return
|
1931
|
-
case 36: return
|
1932
|
-
case 37: return
|
1933
|
-
case 38: return
|
1934
|
-
case 39: return
|
1935
|
-
case 40: return
|
1936
|
-
case 41: return
|
1937
|
-
case 42: return
|
1938
|
-
case 43: return
|
1939
|
-
case 44: return
|
1940
|
-
case 45: return
|
1941
|
-
case 46: return
|
1942
|
-
case 47: return
|
1943
|
-
case 48: return
|
1944
|
-
case 49: return
|
1945
|
-
case 50: return
|
1946
|
-
case 51: return
|
1947
|
-
case 52: return
|
1948
|
-
case 53: return
|
1949
|
-
case 54: return
|
1950
|
-
case 55: return
|
1951
|
-
case 56: return
|
1952
|
-
case 57: return
|
1953
|
-
case 58: return
|
1954
|
-
case 59: return
|
1955
|
-
case 60: return
|
1956
|
-
case 61: return
|
1957
|
-
case 62: return
|
1958
|
-
case 63: return
|
1959
|
-
case 64: return
|
1960
|
-
case 65: return
|
1961
|
-
case 66: return
|
1962
|
-
case 67: return
|
2002
|
+
case 14: return AT_SetCompression;
|
2003
|
+
case 15: return AT_DropColumn;
|
2004
|
+
case 16: return AT_DropColumnRecurse;
|
2005
|
+
case 17: return AT_AddIndex;
|
2006
|
+
case 18: return AT_ReAddIndex;
|
2007
|
+
case 19: return AT_AddConstraint;
|
2008
|
+
case 20: return AT_AddConstraintRecurse;
|
2009
|
+
case 21: return AT_ReAddConstraint;
|
2010
|
+
case 22: return AT_ReAddDomainConstraint;
|
2011
|
+
case 23: return AT_AlterConstraint;
|
2012
|
+
case 24: return AT_ValidateConstraint;
|
2013
|
+
case 25: return AT_ValidateConstraintRecurse;
|
2014
|
+
case 26: return AT_AddIndexConstraint;
|
2015
|
+
case 27: return AT_DropConstraint;
|
2016
|
+
case 28: return AT_DropConstraintRecurse;
|
2017
|
+
case 29: return AT_ReAddComment;
|
2018
|
+
case 30: return AT_AlterColumnType;
|
2019
|
+
case 31: return AT_AlterColumnGenericOptions;
|
2020
|
+
case 32: return AT_ChangeOwner;
|
2021
|
+
case 33: return AT_ClusterOn;
|
2022
|
+
case 34: return AT_DropCluster;
|
2023
|
+
case 35: return AT_SetLogged;
|
2024
|
+
case 36: return AT_SetUnLogged;
|
2025
|
+
case 37: return AT_DropOids;
|
2026
|
+
case 38: return AT_SetAccessMethod;
|
2027
|
+
case 39: return AT_SetTableSpace;
|
2028
|
+
case 40: return AT_SetRelOptions;
|
2029
|
+
case 41: return AT_ResetRelOptions;
|
2030
|
+
case 42: return AT_ReplaceRelOptions;
|
2031
|
+
case 43: return AT_EnableTrig;
|
2032
|
+
case 44: return AT_EnableAlwaysTrig;
|
2033
|
+
case 45: return AT_EnableReplicaTrig;
|
2034
|
+
case 46: return AT_DisableTrig;
|
2035
|
+
case 47: return AT_EnableTrigAll;
|
2036
|
+
case 48: return AT_DisableTrigAll;
|
2037
|
+
case 49: return AT_EnableTrigUser;
|
2038
|
+
case 50: return AT_DisableTrigUser;
|
2039
|
+
case 51: return AT_EnableRule;
|
2040
|
+
case 52: return AT_EnableAlwaysRule;
|
2041
|
+
case 53: return AT_EnableReplicaRule;
|
2042
|
+
case 54: return AT_DisableRule;
|
2043
|
+
case 55: return AT_AddInherit;
|
2044
|
+
case 56: return AT_DropInherit;
|
2045
|
+
case 57: return AT_AddOf;
|
2046
|
+
case 58: return AT_DropOf;
|
2047
|
+
case 59: return AT_ReplicaIdentity;
|
2048
|
+
case 60: return AT_EnableRowSecurity;
|
2049
|
+
case 61: return AT_DisableRowSecurity;
|
2050
|
+
case 62: return AT_ForceRowSecurity;
|
2051
|
+
case 63: return AT_NoForceRowSecurity;
|
2052
|
+
case 64: return AT_GenericOptions;
|
2053
|
+
case 65: return AT_AttachPartition;
|
2054
|
+
case 66: return AT_DetachPartition;
|
2055
|
+
case 67: return AT_DetachPartitionFinalize;
|
2056
|
+
case 68: return AT_AddIdentity;
|
2057
|
+
case 69: return AT_SetIdentity;
|
2058
|
+
case 70: return AT_DropIdentity;
|
2059
|
+
case 71: return AT_ReAddStatistics;
|
1963
2060
|
}
|
1964
2061
|
Assert(false);
|
1965
2062
|
return AT_AddColumn;
|
@@ -2054,6 +2151,7 @@ _intToEnumFunctionParameterMode(int value) {
|
|
2054
2151
|
case 3: return FUNC_PARAM_INOUT;
|
2055
2152
|
case 4: return FUNC_PARAM_VARIADIC;
|
2056
2153
|
case 5: return FUNC_PARAM_TABLE;
|
2154
|
+
case 6: return FUNC_PARAM_DEFAULT;
|
2057
2155
|
}
|
2058
2156
|
Assert(false);
|
2059
2157
|
return FUNC_PARAM_IN;
|
@@ -2088,16 +2186,6 @@ _intToEnumViewCheckOption(int value) {
|
|
2088
2186
|
return NO_CHECK_OPTION;
|
2089
2187
|
}
|
2090
2188
|
|
2091
|
-
static ClusterOption
|
2092
|
-
_intToEnumClusterOption(int value) {
|
2093
|
-
switch(value) {
|
2094
|
-
case 1: return CLUOPT_RECHECK;
|
2095
|
-
case 2: return CLUOPT_VERBOSE;
|
2096
|
-
}
|
2097
|
-
Assert(false);
|
2098
|
-
return CLUOPT_RECHECK;
|
2099
|
-
}
|
2100
|
-
|
2101
2189
|
static DiscardMode
|
2102
2190
|
_intToEnumDiscardMode(int value) {
|
2103
2191
|
switch(value) {
|
@@ -2136,14 +2224,40 @@ _intToEnumAlterTSConfigType(int value) {
|
|
2136
2224
|
return ALTER_TSCONFIG_ADD_MAPPING;
|
2137
2225
|
}
|
2138
2226
|
|
2227
|
+
static PublicationObjSpecType
|
2228
|
+
_intToEnumPublicationObjSpecType(int value) {
|
2229
|
+
switch(value) {
|
2230
|
+
case 1: return PUBLICATIONOBJ_TABLE;
|
2231
|
+
case 2: return PUBLICATIONOBJ_TABLES_IN_SCHEMA;
|
2232
|
+
case 3: return PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA;
|
2233
|
+
case 4: return PUBLICATIONOBJ_CONTINUATION;
|
2234
|
+
}
|
2235
|
+
Assert(false);
|
2236
|
+
return PUBLICATIONOBJ_TABLE;
|
2237
|
+
}
|
2238
|
+
|
2239
|
+
static AlterPublicationAction
|
2240
|
+
_intToEnumAlterPublicationAction(int value) {
|
2241
|
+
switch(value) {
|
2242
|
+
case 1: return AP_AddObjects;
|
2243
|
+
case 2: return AP_DropObjects;
|
2244
|
+
case 3: return AP_SetObjects;
|
2245
|
+
}
|
2246
|
+
Assert(false);
|
2247
|
+
return AP_AddObjects;
|
2248
|
+
}
|
2249
|
+
|
2139
2250
|
static AlterSubscriptionType
|
2140
2251
|
_intToEnumAlterSubscriptionType(int value) {
|
2141
2252
|
switch(value) {
|
2142
2253
|
case 1: return ALTER_SUBSCRIPTION_OPTIONS;
|
2143
2254
|
case 2: return ALTER_SUBSCRIPTION_CONNECTION;
|
2144
|
-
case 3: return
|
2145
|
-
case 4: return
|
2146
|
-
case 5: return
|
2255
|
+
case 3: return ALTER_SUBSCRIPTION_SET_PUBLICATION;
|
2256
|
+
case 4: return ALTER_SUBSCRIPTION_ADD_PUBLICATION;
|
2257
|
+
case 5: return ALTER_SUBSCRIPTION_DROP_PUBLICATION;
|
2258
|
+
case 6: return ALTER_SUBSCRIPTION_REFRESH;
|
2259
|
+
case 7: return ALTER_SUBSCRIPTION_ENABLED;
|
2260
|
+
case 8: return ALTER_SUBSCRIPTION_SKIP;
|
2147
2261
|
}
|
2148
2262
|
Assert(false);
|
2149
2263
|
return ALTER_SUBSCRIPTION_OPTIONS;
|
@@ -2178,7 +2292,8 @@ _intToEnumCoercionContext(int value) {
|
|
2178
2292
|
switch(value) {
|
2179
2293
|
case 1: return COERCION_IMPLICIT;
|
2180
2294
|
case 2: return COERCION_ASSIGNMENT;
|
2181
|
-
case 3: return
|
2295
|
+
case 3: return COERCION_PLPGSQL;
|
2296
|
+
case 4: return COERCION_EXPLICIT;
|
2182
2297
|
}
|
2183
2298
|
Assert(false);
|
2184
2299
|
return COERCION_IMPLICIT;
|
@@ -2190,6 +2305,7 @@ _intToEnumCoercionForm(int value) {
|
|
2190
2305
|
case 1: return COERCE_EXPLICIT_CALL;
|
2191
2306
|
case 2: return COERCE_EXPLICIT_CAST;
|
2192
2307
|
case 3: return COERCE_IMPLICIT_CAST;
|
2308
|
+
case 4: return COERCE_SQL_SYNTAX;
|
2193
2309
|
}
|
2194
2310
|
Assert(false);
|
2195
2311
|
return COERCE_EXPLICIT_CALL;
|
@@ -2327,8 +2443,9 @@ _intToEnumCmdType(int value) {
|
|
2327
2443
|
case 3: return CMD_UPDATE;
|
2328
2444
|
case 4: return CMD_INSERT;
|
2329
2445
|
case 5: return CMD_DELETE;
|
2330
|
-
case 6: return
|
2331
|
-
case 7: return
|
2446
|
+
case 6: return CMD_MERGE;
|
2447
|
+
case 7: return CMD_UTILITY;
|
2448
|
+
case 8: return CMD_NOTHING;
|
2332
2449
|
}
|
2333
2450
|
Assert(false);
|
2334
2451
|
return CMD_UNKNOWN;
|