pg_query 1.1.0 → 2.0.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 +163 -52
- data/README.md +80 -69
- data/Rakefile +82 -1
- data/ext/pg_query/extconf.rb +3 -31
- data/ext/pg_query/guc-file.c +0 -0
- data/ext/pg_query/include/access/amapi.h +246 -0
- data/ext/pg_query/include/access/attmap.h +52 -0
- data/ext/pg_query/include/access/attnum.h +64 -0
- data/ext/pg_query/include/access/clog.h +61 -0
- data/ext/pg_query/include/access/commit_ts.h +77 -0
- data/ext/pg_query/include/access/detoast.h +92 -0
- data/ext/pg_query/include/access/genam.h +228 -0
- data/ext/pg_query/include/access/gin.h +78 -0
- data/ext/pg_query/include/access/htup.h +89 -0
- data/ext/pg_query/include/access/htup_details.h +819 -0
- data/ext/pg_query/include/access/itup.h +161 -0
- data/ext/pg_query/include/access/parallel.h +82 -0
- data/ext/pg_query/include/access/printtup.h +35 -0
- data/ext/pg_query/include/access/relation.h +28 -0
- data/ext/pg_query/include/access/relscan.h +176 -0
- data/ext/pg_query/include/access/rmgr.h +35 -0
- data/ext/pg_query/include/access/rmgrlist.h +49 -0
- data/ext/pg_query/include/access/sdir.h +58 -0
- data/ext/pg_query/include/access/skey.h +151 -0
- data/ext/pg_query/include/access/stratnum.h +83 -0
- data/ext/pg_query/include/access/sysattr.h +29 -0
- data/ext/pg_query/include/access/table.h +27 -0
- data/ext/pg_query/include/access/tableam.h +1825 -0
- data/ext/pg_query/include/access/transam.h +265 -0
- data/ext/pg_query/include/access/tupconvert.h +51 -0
- data/ext/pg_query/include/access/tupdesc.h +154 -0
- data/ext/pg_query/include/access/tupmacs.h +247 -0
- data/ext/pg_query/include/access/twophase.h +61 -0
- data/ext/pg_query/include/access/xact.h +463 -0
- data/ext/pg_query/include/access/xlog.h +398 -0
- data/ext/pg_query/include/access/xlog_internal.h +330 -0
- data/ext/pg_query/include/access/xlogdefs.h +109 -0
- data/ext/pg_query/include/access/xloginsert.h +64 -0
- data/ext/pg_query/include/access/xlogreader.h +327 -0
- data/ext/pg_query/include/access/xlogrecord.h +227 -0
- data/ext/pg_query/include/bootstrap/bootstrap.h +62 -0
- data/ext/pg_query/include/c.h +1322 -0
- data/ext/pg_query/include/catalog/catalog.h +42 -0
- data/ext/pg_query/include/catalog/catversion.h +58 -0
- data/ext/pg_query/include/catalog/dependency.h +275 -0
- data/ext/pg_query/include/catalog/genbki.h +64 -0
- data/ext/pg_query/include/catalog/index.h +199 -0
- data/ext/pg_query/include/catalog/indexing.h +366 -0
- data/ext/pg_query/include/catalog/namespace.h +188 -0
- data/ext/pg_query/include/catalog/objectaccess.h +197 -0
- data/ext/pg_query/include/catalog/objectaddress.h +84 -0
- data/ext/pg_query/include/catalog/pg_aggregate.h +176 -0
- data/ext/pg_query/include/catalog/pg_aggregate_d.h +77 -0
- data/ext/pg_query/include/catalog/pg_am.h +60 -0
- data/ext/pg_query/include/catalog/pg_am_d.h +45 -0
- data/ext/pg_query/include/catalog/pg_attribute.h +204 -0
- data/ext/pg_query/include/catalog/pg_attribute_d.h +59 -0
- data/ext/pg_query/include/catalog/pg_authid.h +58 -0
- data/ext/pg_query/include/catalog/pg_authid_d.h +49 -0
- data/ext/pg_query/include/catalog/pg_class.h +200 -0
- data/ext/pg_query/include/catalog/pg_class_d.h +103 -0
- data/ext/pg_query/include/catalog/pg_collation.h +73 -0
- data/ext/pg_query/include/catalog/pg_collation_d.h +45 -0
- data/ext/pg_query/include/catalog/pg_constraint.h +247 -0
- data/ext/pg_query/include/catalog/pg_constraint_d.h +67 -0
- data/ext/pg_query/include/catalog/pg_control.h +250 -0
- data/ext/pg_query/include/catalog/pg_conversion.h +72 -0
- data/ext/pg_query/include/catalog/pg_conversion_d.h +35 -0
- data/ext/pg_query/include/catalog/pg_depend.h +73 -0
- data/ext/pg_query/include/catalog/pg_depend_d.h +34 -0
- data/ext/pg_query/include/catalog/pg_event_trigger.h +51 -0
- data/ext/pg_query/include/catalog/pg_event_trigger_d.h +34 -0
- data/ext/pg_query/include/catalog/pg_index.h +80 -0
- data/ext/pg_query/include/catalog/pg_index_d.h +56 -0
- data/ext/pg_query/include/catalog/pg_language.h +67 -0
- data/ext/pg_query/include/catalog/pg_language_d.h +39 -0
- data/ext/pg_query/include/catalog/pg_namespace.h +59 -0
- data/ext/pg_query/include/catalog/pg_namespace_d.h +34 -0
- data/ext/pg_query/include/catalog/pg_opclass.h +85 -0
- data/ext/pg_query/include/catalog/pg_opclass_d.h +49 -0
- data/ext/pg_query/include/catalog/pg_operator.h +102 -0
- data/ext/pg_query/include/catalog/pg_operator_d.h +106 -0
- data/ext/pg_query/include/catalog/pg_opfamily.h +60 -0
- data/ext/pg_query/include/catalog/pg_opfamily_d.h +47 -0
- data/ext/pg_query/include/catalog/pg_partitioned_table.h +63 -0
- data/ext/pg_query/include/catalog/pg_partitioned_table_d.h +35 -0
- data/ext/pg_query/include/catalog/pg_proc.h +211 -0
- data/ext/pg_query/include/catalog/pg_proc_d.h +99 -0
- data/ext/pg_query/include/catalog/pg_publication.h +115 -0
- data/ext/pg_query/include/catalog/pg_publication_d.h +36 -0
- data/ext/pg_query/include/catalog/pg_replication_origin.h +57 -0
- data/ext/pg_query/include/catalog/pg_replication_origin_d.h +29 -0
- data/ext/pg_query/include/catalog/pg_statistic.h +275 -0
- data/ext/pg_query/include/catalog/pg_statistic_d.h +194 -0
- data/ext/pg_query/include/catalog/pg_statistic_ext.h +74 -0
- data/ext/pg_query/include/catalog/pg_statistic_ext_d.h +40 -0
- data/ext/pg_query/include/catalog/pg_transform.h +45 -0
- data/ext/pg_query/include/catalog/pg_transform_d.h +32 -0
- data/ext/pg_query/include/catalog/pg_trigger.h +137 -0
- data/ext/pg_query/include/catalog/pg_trigger_d.h +106 -0
- data/ext/pg_query/include/catalog/pg_ts_config.h +50 -0
- data/ext/pg_query/include/catalog/pg_ts_config_d.h +32 -0
- data/ext/pg_query/include/catalog/pg_ts_dict.h +54 -0
- data/ext/pg_query/include/catalog/pg_ts_dict_d.h +33 -0
- data/ext/pg_query/include/catalog/pg_ts_parser.h +57 -0
- data/ext/pg_query/include/catalog/pg_ts_parser_d.h +35 -0
- data/ext/pg_query/include/catalog/pg_ts_template.h +48 -0
- data/ext/pg_query/include/catalog/pg_ts_template_d.h +32 -0
- data/ext/pg_query/include/catalog/pg_type.h +372 -0
- data/ext/pg_query/include/catalog/pg_type_d.h +285 -0
- data/ext/pg_query/include/catalog/storage.h +48 -0
- data/ext/pg_query/include/commands/async.h +54 -0
- data/ext/pg_query/include/commands/dbcommands.h +35 -0
- data/ext/pg_query/include/commands/defrem.h +173 -0
- data/ext/pg_query/include/commands/event_trigger.h +88 -0
- data/ext/pg_query/include/commands/explain.h +127 -0
- data/ext/pg_query/include/commands/prepare.h +61 -0
- data/ext/pg_query/include/commands/tablespace.h +67 -0
- data/ext/pg_query/include/commands/trigger.h +277 -0
- data/ext/pg_query/include/commands/user.h +37 -0
- data/ext/pg_query/include/commands/vacuum.h +293 -0
- data/ext/pg_query/include/commands/variable.h +38 -0
- data/ext/pg_query/include/common/file_perm.h +56 -0
- data/ext/pg_query/include/common/hashfn.h +104 -0
- data/ext/pg_query/include/common/ip.h +37 -0
- data/ext/pg_query/include/common/keywords.h +33 -0
- data/ext/pg_query/include/common/kwlookup.h +44 -0
- data/ext/pg_query/include/common/relpath.h +90 -0
- data/ext/pg_query/include/common/string.h +19 -0
- data/ext/pg_query/include/common/unicode_combining_table.h +196 -0
- data/ext/pg_query/include/datatype/timestamp.h +197 -0
- data/ext/pg_query/include/executor/execdesc.h +70 -0
- data/ext/pg_query/include/executor/executor.h +614 -0
- data/ext/pg_query/include/executor/functions.h +41 -0
- data/ext/pg_query/include/executor/instrument.h +101 -0
- data/ext/pg_query/include/executor/spi.h +175 -0
- data/ext/pg_query/include/executor/tablefunc.h +67 -0
- data/ext/pg_query/include/executor/tuptable.h +487 -0
- data/ext/pg_query/include/fmgr.h +775 -0
- data/ext/pg_query/include/funcapi.h +348 -0
- data/ext/pg_query/include/getaddrinfo.h +162 -0
- data/ext/pg_query/include/jit/jit.h +105 -0
- data/ext/pg_query/include/kwlist_d.h +1072 -0
- data/ext/pg_query/include/lib/ilist.h +727 -0
- data/ext/pg_query/include/lib/pairingheap.h +102 -0
- data/ext/pg_query/include/lib/simplehash.h +1059 -0
- data/ext/pg_query/include/lib/stringinfo.h +161 -0
- data/ext/pg_query/include/libpq/auth.h +29 -0
- data/ext/pg_query/include/libpq/crypt.h +46 -0
- data/ext/pg_query/include/libpq/hba.h +140 -0
- data/ext/pg_query/include/libpq/libpq-be.h +326 -0
- data/ext/pg_query/include/libpq/libpq.h +133 -0
- data/ext/pg_query/include/libpq/pqcomm.h +208 -0
- data/ext/pg_query/include/libpq/pqformat.h +210 -0
- data/ext/pg_query/include/libpq/pqsignal.h +42 -0
- data/ext/pg_query/include/mb/pg_wchar.h +672 -0
- data/ext/pg_query/include/mb/stringinfo_mb.h +24 -0
- data/ext/pg_query/include/miscadmin.h +476 -0
- data/ext/pg_query/include/nodes/bitmapset.h +122 -0
- data/ext/pg_query/include/nodes/execnodes.h +2520 -0
- data/ext/pg_query/include/nodes/extensible.h +160 -0
- data/ext/pg_query/include/nodes/lockoptions.h +61 -0
- data/ext/pg_query/include/nodes/makefuncs.h +108 -0
- data/ext/pg_query/include/nodes/memnodes.h +108 -0
- data/ext/pg_query/include/nodes/nodeFuncs.h +162 -0
- data/ext/pg_query/include/nodes/nodes.h +842 -0
- data/ext/pg_query/include/nodes/params.h +170 -0
- data/ext/pg_query/include/nodes/parsenodes.h +3579 -0
- data/ext/pg_query/include/nodes/pathnodes.h +2556 -0
- data/ext/pg_query/include/nodes/pg_list.h +605 -0
- data/ext/pg_query/include/nodes/plannodes.h +1251 -0
- data/ext/pg_query/include/nodes/primnodes.h +1541 -0
- data/ext/pg_query/include/nodes/print.h +34 -0
- data/ext/pg_query/include/nodes/tidbitmap.h +75 -0
- data/ext/pg_query/include/nodes/value.h +61 -0
- data/ext/pg_query/include/optimizer/cost.h +206 -0
- data/ext/pg_query/include/optimizer/geqo.h +88 -0
- data/ext/pg_query/include/optimizer/geqo_gene.h +45 -0
- data/ext/pg_query/include/optimizer/optimizer.h +199 -0
- data/ext/pg_query/include/optimizer/paths.h +249 -0
- data/ext/pg_query/include/optimizer/planmain.h +119 -0
- data/ext/pg_query/include/parser/analyze.h +49 -0
- data/ext/pg_query/include/parser/gram.h +1067 -0
- data/ext/pg_query/include/parser/gramparse.h +75 -0
- data/ext/pg_query/include/parser/kwlist.h +477 -0
- data/ext/pg_query/include/parser/parse_agg.h +68 -0
- data/ext/pg_query/include/parser/parse_clause.h +54 -0
- data/ext/pg_query/include/parser/parse_coerce.h +97 -0
- data/ext/pg_query/include/parser/parse_collate.h +27 -0
- data/ext/pg_query/include/parser/parse_expr.h +26 -0
- data/ext/pg_query/include/parser/parse_func.h +73 -0
- data/ext/pg_query/include/parser/parse_node.h +327 -0
- data/ext/pg_query/include/parser/parse_oper.h +67 -0
- data/ext/pg_query/include/parser/parse_relation.h +123 -0
- data/ext/pg_query/include/parser/parse_target.h +46 -0
- data/ext/pg_query/include/parser/parse_type.h +60 -0
- data/ext/pg_query/include/parser/parser.h +41 -0
- data/ext/pg_query/include/parser/parsetree.h +61 -0
- data/ext/pg_query/include/parser/scanner.h +152 -0
- data/ext/pg_query/include/parser/scansup.h +30 -0
- data/ext/pg_query/include/partitioning/partdefs.h +26 -0
- data/ext/pg_query/include/pg_config.h +988 -0
- data/ext/pg_query/include/pg_config_ext.h +8 -0
- data/ext/pg_query/include/pg_config_manual.h +350 -0
- data/ext/pg_query/include/pg_config_os.h +8 -0
- data/ext/pg_query/include/pg_getopt.h +56 -0
- data/ext/pg_query/include/pg_query.h +121 -0
- data/ext/pg_query/include/pg_query_enum_defs.c +2454 -0
- data/ext/pg_query/include/pg_query_fingerprint_conds.c +875 -0
- data/ext/pg_query/include/pg_query_fingerprint_defs.c +12413 -0
- data/ext/pg_query/include/pg_query_json_helper.c +61 -0
- data/ext/pg_query/include/pg_query_outfuncs_conds.c +686 -0
- data/ext/pg_query/include/pg_query_outfuncs_defs.c +2437 -0
- data/ext/pg_query/include/pg_query_readfuncs_conds.c +222 -0
- data/ext/pg_query/include/pg_query_readfuncs_defs.c +2878 -0
- data/ext/pg_query/include/pg_trace.h +17 -0
- data/ext/pg_query/include/pgstat.h +1487 -0
- data/ext/pg_query/include/pgtime.h +84 -0
- data/ext/pg_query/include/pl_gram.h +385 -0
- data/ext/pg_query/include/pl_reserved_kwlist.h +52 -0
- data/ext/pg_query/include/pl_reserved_kwlist_d.h +114 -0
- data/ext/pg_query/include/pl_unreserved_kwlist.h +112 -0
- data/ext/pg_query/include/pl_unreserved_kwlist_d.h +246 -0
- data/ext/pg_query/include/plerrcodes.h +990 -0
- data/ext/pg_query/include/plpgsql.h +1347 -0
- data/ext/pg_query/include/port.h +524 -0
- data/ext/pg_query/include/port/atomics.h +524 -0
- data/ext/pg_query/include/port/atomics/arch-arm.h +26 -0
- data/ext/pg_query/include/port/atomics/arch-ppc.h +254 -0
- data/ext/pg_query/include/port/atomics/arch-x86.h +252 -0
- data/ext/pg_query/include/port/atomics/fallback.h +170 -0
- data/ext/pg_query/include/port/atomics/generic-gcc.h +286 -0
- data/ext/pg_query/include/port/atomics/generic.h +401 -0
- data/ext/pg_query/include/port/pg_bitutils.h +226 -0
- data/ext/pg_query/include/port/pg_bswap.h +161 -0
- data/ext/pg_query/include/port/pg_crc32c.h +101 -0
- data/ext/pg_query/include/portability/instr_time.h +256 -0
- data/ext/pg_query/include/postgres.h +764 -0
- data/ext/pg_query/include/postgres_ext.h +74 -0
- data/ext/pg_query/include/postmaster/autovacuum.h +83 -0
- data/ext/pg_query/include/postmaster/bgworker.h +161 -0
- data/ext/pg_query/include/postmaster/bgworker_internals.h +64 -0
- data/ext/pg_query/include/postmaster/bgwriter.h +45 -0
- data/ext/pg_query/include/postmaster/fork_process.h +17 -0
- data/ext/pg_query/include/postmaster/interrupt.h +32 -0
- data/ext/pg_query/include/postmaster/pgarch.h +39 -0
- data/ext/pg_query/include/postmaster/postmaster.h +77 -0
- data/ext/pg_query/include/postmaster/syslogger.h +98 -0
- data/ext/pg_query/include/postmaster/walwriter.h +21 -0
- data/ext/pg_query/include/protobuf-c.h +1106 -0
- data/ext/pg_query/include/protobuf-c/protobuf-c.h +1106 -0
- data/ext/pg_query/include/protobuf/pg_query.pb-c.h +10846 -0
- data/ext/pg_query/include/protobuf/pg_query.pb.h +124718 -0
- data/ext/pg_query/include/regex/regex.h +184 -0
- data/ext/pg_query/include/replication/logicallauncher.h +31 -0
- data/ext/pg_query/include/replication/logicalproto.h +110 -0
- data/ext/pg_query/include/replication/logicalworker.h +19 -0
- data/ext/pg_query/include/replication/origin.h +73 -0
- data/ext/pg_query/include/replication/reorderbuffer.h +467 -0
- data/ext/pg_query/include/replication/slot.h +219 -0
- data/ext/pg_query/include/replication/syncrep.h +115 -0
- data/ext/pg_query/include/replication/walreceiver.h +340 -0
- data/ext/pg_query/include/replication/walsender.h +74 -0
- data/ext/pg_query/include/rewrite/prs2lock.h +46 -0
- data/ext/pg_query/include/rewrite/rewriteHandler.h +40 -0
- data/ext/pg_query/include/rewrite/rewriteManip.h +87 -0
- data/ext/pg_query/include/rewrite/rewriteSupport.h +26 -0
- data/ext/pg_query/include/storage/backendid.h +37 -0
- data/ext/pg_query/include/storage/block.h +121 -0
- data/ext/pg_query/include/storage/buf.h +46 -0
- data/ext/pg_query/include/storage/bufmgr.h +292 -0
- data/ext/pg_query/include/storage/bufpage.h +459 -0
- data/ext/pg_query/include/storage/condition_variable.h +62 -0
- data/ext/pg_query/include/storage/dsm.h +61 -0
- data/ext/pg_query/include/storage/dsm_impl.h +75 -0
- data/ext/pg_query/include/storage/fd.h +168 -0
- data/ext/pg_query/include/storage/ipc.h +81 -0
- data/ext/pg_query/include/storage/item.h +19 -0
- data/ext/pg_query/include/storage/itemid.h +184 -0
- data/ext/pg_query/include/storage/itemptr.h +206 -0
- data/ext/pg_query/include/storage/large_object.h +100 -0
- data/ext/pg_query/include/storage/latch.h +190 -0
- data/ext/pg_query/include/storage/lmgr.h +114 -0
- data/ext/pg_query/include/storage/lock.h +612 -0
- data/ext/pg_query/include/storage/lockdefs.h +59 -0
- data/ext/pg_query/include/storage/lwlock.h +232 -0
- data/ext/pg_query/include/storage/lwlocknames.h +51 -0
- data/ext/pg_query/include/storage/off.h +57 -0
- data/ext/pg_query/include/storage/pg_sema.h +61 -0
- data/ext/pg_query/include/storage/pg_shmem.h +90 -0
- data/ext/pg_query/include/storage/pmsignal.h +94 -0
- data/ext/pg_query/include/storage/predicate.h +87 -0
- data/ext/pg_query/include/storage/proc.h +333 -0
- data/ext/pg_query/include/storage/proclist_types.h +51 -0
- data/ext/pg_query/include/storage/procsignal.h +75 -0
- data/ext/pg_query/include/storage/relfilenode.h +99 -0
- data/ext/pg_query/include/storage/s_lock.h +1047 -0
- data/ext/pg_query/include/storage/sharedfileset.h +45 -0
- data/ext/pg_query/include/storage/shm_mq.h +85 -0
- data/ext/pg_query/include/storage/shm_toc.h +58 -0
- data/ext/pg_query/include/storage/shmem.h +81 -0
- data/ext/pg_query/include/storage/sinval.h +153 -0
- data/ext/pg_query/include/storage/sinvaladt.h +43 -0
- data/ext/pg_query/include/storage/smgr.h +109 -0
- data/ext/pg_query/include/storage/spin.h +77 -0
- data/ext/pg_query/include/storage/standby.h +91 -0
- data/ext/pg_query/include/storage/standbydefs.h +74 -0
- data/ext/pg_query/include/storage/sync.h +62 -0
- data/ext/pg_query/include/tcop/cmdtag.h +58 -0
- data/ext/pg_query/include/tcop/cmdtaglist.h +217 -0
- data/ext/pg_query/include/tcop/deparse_utility.h +108 -0
- data/ext/pg_query/include/tcop/dest.h +149 -0
- data/ext/pg_query/include/tcop/fastpath.h +21 -0
- data/ext/pg_query/include/tcop/pquery.h +45 -0
- data/ext/pg_query/include/tcop/tcopprot.h +89 -0
- data/ext/pg_query/include/tcop/utility.h +108 -0
- data/ext/pg_query/include/tsearch/ts_cache.h +98 -0
- data/ext/pg_query/include/utils/acl.h +312 -0
- data/ext/pg_query/include/utils/aclchk_internal.h +45 -0
- data/ext/pg_query/include/utils/array.h +458 -0
- data/ext/pg_query/include/utils/builtins.h +127 -0
- data/ext/pg_query/include/utils/bytea.h +27 -0
- data/ext/pg_query/include/utils/catcache.h +231 -0
- data/ext/pg_query/include/utils/date.h +90 -0
- data/ext/pg_query/include/utils/datetime.h +343 -0
- data/ext/pg_query/include/utils/datum.h +68 -0
- data/ext/pg_query/include/utils/dsa.h +123 -0
- data/ext/pg_query/include/utils/dynahash.h +19 -0
- data/ext/pg_query/include/utils/elog.h +439 -0
- data/ext/pg_query/include/utils/errcodes.h +352 -0
- data/ext/pg_query/include/utils/expandeddatum.h +159 -0
- data/ext/pg_query/include/utils/expandedrecord.h +231 -0
- data/ext/pg_query/include/utils/float.h +356 -0
- data/ext/pg_query/include/utils/fmgroids.h +2657 -0
- data/ext/pg_query/include/utils/fmgrprotos.h +2646 -0
- data/ext/pg_query/include/utils/fmgrtab.h +48 -0
- data/ext/pg_query/include/utils/guc.h +443 -0
- data/ext/pg_query/include/utils/guc_tables.h +272 -0
- data/ext/pg_query/include/utils/hsearch.h +149 -0
- data/ext/pg_query/include/utils/inval.h +64 -0
- data/ext/pg_query/include/utils/lsyscache.h +197 -0
- data/ext/pg_query/include/utils/memdebug.h +82 -0
- data/ext/pg_query/include/utils/memutils.h +225 -0
- data/ext/pg_query/include/utils/numeric.h +76 -0
- data/ext/pg_query/include/utils/palloc.h +136 -0
- data/ext/pg_query/include/utils/partcache.h +102 -0
- data/ext/pg_query/include/utils/pg_locale.h +119 -0
- data/ext/pg_query/include/utils/pg_lsn.h +29 -0
- data/ext/pg_query/include/utils/pidfile.h +56 -0
- data/ext/pg_query/include/utils/plancache.h +235 -0
- data/ext/pg_query/include/utils/portal.h +241 -0
- data/ext/pg_query/include/utils/probes.h +114 -0
- data/ext/pg_query/include/utils/ps_status.h +25 -0
- data/ext/pg_query/include/utils/queryenvironment.h +74 -0
- data/ext/pg_query/include/utils/regproc.h +28 -0
- data/ext/pg_query/include/utils/rel.h +644 -0
- data/ext/pg_query/include/utils/relcache.h +151 -0
- data/ext/pg_query/include/utils/reltrigger.h +81 -0
- data/ext/pg_query/include/utils/resowner.h +86 -0
- data/ext/pg_query/include/utils/rls.h +50 -0
- data/ext/pg_query/include/utils/ruleutils.h +44 -0
- data/ext/pg_query/include/utils/sharedtuplestore.h +61 -0
- data/ext/pg_query/include/utils/snapmgr.h +158 -0
- data/ext/pg_query/include/utils/snapshot.h +206 -0
- data/ext/pg_query/include/utils/sortsupport.h +276 -0
- data/ext/pg_query/include/utils/syscache.h +219 -0
- data/ext/pg_query/include/utils/timeout.h +88 -0
- data/ext/pg_query/include/utils/timestamp.h +116 -0
- data/ext/pg_query/include/utils/tuplesort.h +277 -0
- data/ext/pg_query/include/utils/tuplestore.h +91 -0
- data/ext/pg_query/include/utils/typcache.h +202 -0
- data/ext/pg_query/include/utils/tzparser.h +39 -0
- data/ext/pg_query/include/utils/varlena.h +39 -0
- data/ext/pg_query/include/utils/xml.h +84 -0
- data/ext/pg_query/include/xxhash.h +5445 -0
- data/ext/pg_query/include/xxhash/xxhash.h +5445 -0
- data/ext/pg_query/pg_query.c +104 -0
- data/ext/pg_query/pg_query.pb-c.c +37628 -0
- data/ext/pg_query/pg_query_deparse.c +9953 -0
- data/ext/pg_query/pg_query_fingerprint.c +292 -0
- data/ext/pg_query/pg_query_fingerprint.h +8 -0
- data/ext/pg_query/pg_query_internal.h +24 -0
- data/ext/pg_query/pg_query_json_plpgsql.c +738 -0
- data/ext/pg_query/pg_query_json_plpgsql.h +9 -0
- data/ext/pg_query/pg_query_normalize.c +437 -0
- data/ext/pg_query/pg_query_outfuncs.h +10 -0
- data/ext/pg_query/pg_query_outfuncs_json.c +297 -0
- data/ext/pg_query/pg_query_outfuncs_protobuf.c +237 -0
- data/ext/pg_query/pg_query_parse.c +148 -0
- data/ext/pg_query/pg_query_parse_plpgsql.c +460 -0
- data/ext/pg_query/pg_query_readfuncs.h +11 -0
- data/ext/pg_query/pg_query_readfuncs_protobuf.c +142 -0
- data/ext/pg_query/pg_query_ruby.c +108 -12
- data/ext/pg_query/pg_query_scan.c +173 -0
- data/ext/pg_query/pg_query_split.c +221 -0
- data/ext/pg_query/protobuf-c.c +3660 -0
- data/ext/pg_query/src_backend_catalog_namespace.c +1051 -0
- data/ext/pg_query/src_backend_catalog_pg_proc.c +142 -0
- data/ext/pg_query/src_backend_commands_define.c +117 -0
- data/ext/pg_query/src_backend_libpq_pqcomm.c +651 -0
- data/ext/pg_query/src_backend_nodes_bitmapset.c +513 -0
- data/ext/pg_query/src_backend_nodes_copyfuncs.c +6013 -0
- data/ext/pg_query/src_backend_nodes_equalfuncs.c +4003 -0
- data/ext/pg_query/src_backend_nodes_extensible.c +99 -0
- data/ext/pg_query/src_backend_nodes_list.c +922 -0
- data/ext/pg_query/src_backend_nodes_makefuncs.c +417 -0
- data/ext/pg_query/src_backend_nodes_nodeFuncs.c +1363 -0
- data/ext/pg_query/src_backend_nodes_value.c +84 -0
- data/ext/pg_query/src_backend_parser_gram.c +47456 -0
- data/ext/pg_query/src_backend_parser_parse_expr.c +313 -0
- data/ext/pg_query/src_backend_parser_parser.c +497 -0
- data/ext/pg_query/src_backend_parser_scan.c +7091 -0
- data/ext/pg_query/src_backend_parser_scansup.c +160 -0
- data/ext/pg_query/src_backend_postmaster_postmaster.c +2230 -0
- data/ext/pg_query/src_backend_storage_ipc_ipc.c +192 -0
- data/ext/pg_query/src_backend_storage_lmgr_s_lock.c +370 -0
- data/ext/pg_query/src_backend_tcop_postgres.c +776 -0
- data/ext/pg_query/src_backend_utils_adt_datum.c +326 -0
- data/ext/pg_query/src_backend_utils_adt_expandeddatum.c +98 -0
- data/ext/pg_query/src_backend_utils_adt_format_type.c +136 -0
- data/ext/pg_query/src_backend_utils_adt_ruleutils.c +1683 -0
- data/ext/pg_query/src_backend_utils_error_assert.c +74 -0
- data/ext/pg_query/src_backend_utils_error_elog.c +1748 -0
- data/ext/pg_query/src_backend_utils_fmgr_fmgr.c +570 -0
- data/ext/pg_query/src_backend_utils_hash_dynahash.c +1086 -0
- data/ext/pg_query/src_backend_utils_init_globals.c +168 -0
- data/ext/pg_query/src_backend_utils_mb_mbutils.c +839 -0
- data/ext/pg_query/src_backend_utils_misc_guc.c +1831 -0
- data/ext/pg_query/src_backend_utils_mmgr_aset.c +1560 -0
- data/ext/pg_query/src_backend_utils_mmgr_mcxt.c +1006 -0
- data/ext/pg_query/src_common_encnames.c +158 -0
- data/ext/pg_query/src_common_keywords.c +39 -0
- data/ext/pg_query/src_common_kwlist_d.h +1081 -0
- data/ext/pg_query/src_common_kwlookup.c +91 -0
- data/ext/pg_query/src_common_psprintf.c +158 -0
- data/ext/pg_query/src_common_string.c +86 -0
- data/ext/pg_query/src_common_stringinfo.c +336 -0
- data/ext/pg_query/src_common_wchar.c +1651 -0
- data/ext/pg_query/src_pl_plpgsql_src_pl_comp.c +1133 -0
- data/ext/pg_query/src_pl_plpgsql_src_pl_funcs.c +877 -0
- data/ext/pg_query/src_pl_plpgsql_src_pl_gram.c +6533 -0
- data/ext/pg_query/src_pl_plpgsql_src_pl_handler.c +107 -0
- data/ext/pg_query/src_pl_plpgsql_src_pl_reserved_kwlist_d.h +123 -0
- data/ext/pg_query/src_pl_plpgsql_src_pl_scanner.c +671 -0
- data/ext/pg_query/src_pl_plpgsql_src_pl_unreserved_kwlist_d.h +255 -0
- data/ext/pg_query/src_port_erand48.c +127 -0
- data/ext/pg_query/src_port_pg_bitutils.c +246 -0
- data/ext/pg_query/src_port_pgsleep.c +69 -0
- data/ext/pg_query/src_port_pgstrcasecmp.c +83 -0
- data/ext/pg_query/src_port_qsort.c +240 -0
- data/ext/pg_query/src_port_random.c +31 -0
- data/ext/pg_query/src_port_snprintf.c +1449 -0
- data/ext/pg_query/src_port_strerror.c +324 -0
- data/ext/pg_query/src_port_strnlen.c +39 -0
- data/ext/pg_query/xxhash.c +43 -0
- data/lib/pg_query.rb +7 -4
- data/lib/pg_query/constants.rb +21 -0
- data/lib/pg_query/deparse.rb +16 -1117
- data/lib/pg_query/filter_columns.rb +86 -85
- data/lib/pg_query/fingerprint.rb +122 -87
- data/lib/pg_query/json_field_names.rb +1402 -0
- data/lib/pg_query/node.rb +31 -0
- data/lib/pg_query/param_refs.rb +42 -37
- data/lib/pg_query/parse.rb +220 -200
- data/lib/pg_query/parse_error.rb +1 -1
- data/lib/pg_query/pg_query_pb.rb +3211 -0
- data/lib/pg_query/scan.rb +23 -0
- data/lib/pg_query/treewalker.rb +24 -40
- data/lib/pg_query/truncate.rb +64 -43
- data/lib/pg_query/version.rb +2 -2
- metadata +473 -11
- data/ext/pg_query/pg_query_ruby.h +0 -10
- data/lib/pg_query/deep_dup.rb +0 -16
- data/lib/pg_query/deparse/alter_table.rb +0 -42
- data/lib/pg_query/deparse/interval.rb +0 -105
- data/lib/pg_query/legacy_parsetree.rb +0 -109
- data/lib/pg_query/node_types.rb +0 -284
@@ -0,0 +1,2454 @@
|
|
1
|
+
// This file is autogenerated by ./scripts/generate_protobuf_and_funcs.rb
|
2
|
+
|
3
|
+
static const char*
|
4
|
+
_enumToStringOverridingKind(OverridingKind value) {
|
5
|
+
switch(value) {
|
6
|
+
case OVERRIDING_NOT_SET: return "OVERRIDING_NOT_SET";
|
7
|
+
case OVERRIDING_USER_VALUE: return "OVERRIDING_USER_VALUE";
|
8
|
+
case OVERRIDING_SYSTEM_VALUE: return "OVERRIDING_SYSTEM_VALUE";
|
9
|
+
}
|
10
|
+
Assert(false);
|
11
|
+
return NULL;
|
12
|
+
}
|
13
|
+
|
14
|
+
static const char*
|
15
|
+
_enumToStringQuerySource(QuerySource value) {
|
16
|
+
switch(value) {
|
17
|
+
case QSRC_ORIGINAL: return "QSRC_ORIGINAL";
|
18
|
+
case QSRC_PARSER: return "QSRC_PARSER";
|
19
|
+
case QSRC_INSTEAD_RULE: return "QSRC_INSTEAD_RULE";
|
20
|
+
case QSRC_QUAL_INSTEAD_RULE: return "QSRC_QUAL_INSTEAD_RULE";
|
21
|
+
case QSRC_NON_INSTEAD_RULE: return "QSRC_NON_INSTEAD_RULE";
|
22
|
+
}
|
23
|
+
Assert(false);
|
24
|
+
return NULL;
|
25
|
+
}
|
26
|
+
|
27
|
+
static const char*
|
28
|
+
_enumToStringSortByDir(SortByDir value) {
|
29
|
+
switch(value) {
|
30
|
+
case SORTBY_DEFAULT: return "SORTBY_DEFAULT";
|
31
|
+
case SORTBY_ASC: return "SORTBY_ASC";
|
32
|
+
case SORTBY_DESC: return "SORTBY_DESC";
|
33
|
+
case SORTBY_USING: return "SORTBY_USING";
|
34
|
+
}
|
35
|
+
Assert(false);
|
36
|
+
return NULL;
|
37
|
+
}
|
38
|
+
|
39
|
+
static const char*
|
40
|
+
_enumToStringSortByNulls(SortByNulls value) {
|
41
|
+
switch(value) {
|
42
|
+
case SORTBY_NULLS_DEFAULT: return "SORTBY_NULLS_DEFAULT";
|
43
|
+
case SORTBY_NULLS_FIRST: return "SORTBY_NULLS_FIRST";
|
44
|
+
case SORTBY_NULLS_LAST: return "SORTBY_NULLS_LAST";
|
45
|
+
}
|
46
|
+
Assert(false);
|
47
|
+
return NULL;
|
48
|
+
}
|
49
|
+
|
50
|
+
static const char*
|
51
|
+
_enumToStringA_Expr_Kind(A_Expr_Kind value) {
|
52
|
+
switch(value) {
|
53
|
+
case AEXPR_OP: return "AEXPR_OP";
|
54
|
+
case AEXPR_OP_ANY: return "AEXPR_OP_ANY";
|
55
|
+
case AEXPR_OP_ALL: return "AEXPR_OP_ALL";
|
56
|
+
case AEXPR_DISTINCT: return "AEXPR_DISTINCT";
|
57
|
+
case AEXPR_NOT_DISTINCT: return "AEXPR_NOT_DISTINCT";
|
58
|
+
case AEXPR_NULLIF: return "AEXPR_NULLIF";
|
59
|
+
case AEXPR_OF: return "AEXPR_OF";
|
60
|
+
case AEXPR_IN: return "AEXPR_IN";
|
61
|
+
case AEXPR_LIKE: return "AEXPR_LIKE";
|
62
|
+
case AEXPR_ILIKE: return "AEXPR_ILIKE";
|
63
|
+
case AEXPR_SIMILAR: return "AEXPR_SIMILAR";
|
64
|
+
case AEXPR_BETWEEN: return "AEXPR_BETWEEN";
|
65
|
+
case AEXPR_NOT_BETWEEN: return "AEXPR_NOT_BETWEEN";
|
66
|
+
case AEXPR_BETWEEN_SYM: return "AEXPR_BETWEEN_SYM";
|
67
|
+
case AEXPR_NOT_BETWEEN_SYM: return "AEXPR_NOT_BETWEEN_SYM";
|
68
|
+
case AEXPR_PAREN: return "AEXPR_PAREN";
|
69
|
+
}
|
70
|
+
Assert(false);
|
71
|
+
return NULL;
|
72
|
+
}
|
73
|
+
|
74
|
+
static const char*
|
75
|
+
_enumToStringRoleSpecType(RoleSpecType value) {
|
76
|
+
switch(value) {
|
77
|
+
case ROLESPEC_CSTRING: return "ROLESPEC_CSTRING";
|
78
|
+
case ROLESPEC_CURRENT_USER: return "ROLESPEC_CURRENT_USER";
|
79
|
+
case ROLESPEC_SESSION_USER: return "ROLESPEC_SESSION_USER";
|
80
|
+
case ROLESPEC_PUBLIC: return "ROLESPEC_PUBLIC";
|
81
|
+
}
|
82
|
+
Assert(false);
|
83
|
+
return NULL;
|
84
|
+
}
|
85
|
+
|
86
|
+
static const char*
|
87
|
+
_enumToStringTableLikeOption(TableLikeOption value) {
|
88
|
+
switch(value) {
|
89
|
+
case CREATE_TABLE_LIKE_COMMENTS: return "CREATE_TABLE_LIKE_COMMENTS";
|
90
|
+
case CREATE_TABLE_LIKE_CONSTRAINTS: return "CREATE_TABLE_LIKE_CONSTRAINTS";
|
91
|
+
case CREATE_TABLE_LIKE_DEFAULTS: return "CREATE_TABLE_LIKE_DEFAULTS";
|
92
|
+
case CREATE_TABLE_LIKE_GENERATED: return "CREATE_TABLE_LIKE_GENERATED";
|
93
|
+
case CREATE_TABLE_LIKE_IDENTITY: return "CREATE_TABLE_LIKE_IDENTITY";
|
94
|
+
case CREATE_TABLE_LIKE_INDEXES: return "CREATE_TABLE_LIKE_INDEXES";
|
95
|
+
case CREATE_TABLE_LIKE_STATISTICS: return "CREATE_TABLE_LIKE_STATISTICS";
|
96
|
+
case CREATE_TABLE_LIKE_STORAGE: return "CREATE_TABLE_LIKE_STORAGE";
|
97
|
+
case CREATE_TABLE_LIKE_ALL: return "CREATE_TABLE_LIKE_ALL";
|
98
|
+
}
|
99
|
+
Assert(false);
|
100
|
+
return NULL;
|
101
|
+
}
|
102
|
+
|
103
|
+
static const char*
|
104
|
+
_enumToStringDefElemAction(DefElemAction value) {
|
105
|
+
switch(value) {
|
106
|
+
case DEFELEM_UNSPEC: return "DEFELEM_UNSPEC";
|
107
|
+
case DEFELEM_SET: return "DEFELEM_SET";
|
108
|
+
case DEFELEM_ADD: return "DEFELEM_ADD";
|
109
|
+
case DEFELEM_DROP: return "DEFELEM_DROP";
|
110
|
+
}
|
111
|
+
Assert(false);
|
112
|
+
return NULL;
|
113
|
+
}
|
114
|
+
|
115
|
+
static const char*
|
116
|
+
_enumToStringPartitionRangeDatumKind(PartitionRangeDatumKind value) {
|
117
|
+
switch(value) {
|
118
|
+
case PARTITION_RANGE_DATUM_MINVALUE: return "PARTITION_RANGE_DATUM_MINVALUE";
|
119
|
+
case PARTITION_RANGE_DATUM_VALUE: return "PARTITION_RANGE_DATUM_VALUE";
|
120
|
+
case PARTITION_RANGE_DATUM_MAXVALUE: return "PARTITION_RANGE_DATUM_MAXVALUE";
|
121
|
+
}
|
122
|
+
Assert(false);
|
123
|
+
return NULL;
|
124
|
+
}
|
125
|
+
|
126
|
+
static const char*
|
127
|
+
_enumToStringRTEKind(RTEKind value) {
|
128
|
+
switch(value) {
|
129
|
+
case RTE_RELATION: return "RTE_RELATION";
|
130
|
+
case RTE_SUBQUERY: return "RTE_SUBQUERY";
|
131
|
+
case RTE_JOIN: return "RTE_JOIN";
|
132
|
+
case RTE_FUNCTION: return "RTE_FUNCTION";
|
133
|
+
case RTE_TABLEFUNC: return "RTE_TABLEFUNC";
|
134
|
+
case RTE_VALUES: return "RTE_VALUES";
|
135
|
+
case RTE_CTE: return "RTE_CTE";
|
136
|
+
case RTE_NAMEDTUPLESTORE: return "RTE_NAMEDTUPLESTORE";
|
137
|
+
case RTE_RESULT: return "RTE_RESULT";
|
138
|
+
}
|
139
|
+
Assert(false);
|
140
|
+
return NULL;
|
141
|
+
}
|
142
|
+
|
143
|
+
static const char*
|
144
|
+
_enumToStringWCOKind(WCOKind value) {
|
145
|
+
switch(value) {
|
146
|
+
case WCO_VIEW_CHECK: return "WCO_VIEW_CHECK";
|
147
|
+
case WCO_RLS_INSERT_CHECK: return "WCO_RLS_INSERT_CHECK";
|
148
|
+
case WCO_RLS_UPDATE_CHECK: return "WCO_RLS_UPDATE_CHECK";
|
149
|
+
case WCO_RLS_CONFLICT_CHECK: return "WCO_RLS_CONFLICT_CHECK";
|
150
|
+
}
|
151
|
+
Assert(false);
|
152
|
+
return NULL;
|
153
|
+
}
|
154
|
+
|
155
|
+
static const char*
|
156
|
+
_enumToStringGroupingSetKind(GroupingSetKind value) {
|
157
|
+
switch(value) {
|
158
|
+
case GROUPING_SET_EMPTY: return "GROUPING_SET_EMPTY";
|
159
|
+
case GROUPING_SET_SIMPLE: return "GROUPING_SET_SIMPLE";
|
160
|
+
case GROUPING_SET_ROLLUP: return "GROUPING_SET_ROLLUP";
|
161
|
+
case GROUPING_SET_CUBE: return "GROUPING_SET_CUBE";
|
162
|
+
case GROUPING_SET_SETS: return "GROUPING_SET_SETS";
|
163
|
+
}
|
164
|
+
Assert(false);
|
165
|
+
return NULL;
|
166
|
+
}
|
167
|
+
|
168
|
+
static const char*
|
169
|
+
_enumToStringCTEMaterialize(CTEMaterialize value) {
|
170
|
+
switch(value) {
|
171
|
+
case CTEMaterializeDefault: return "CTEMaterializeDefault";
|
172
|
+
case CTEMaterializeAlways: return "CTEMaterializeAlways";
|
173
|
+
case CTEMaterializeNever: return "CTEMaterializeNever";
|
174
|
+
}
|
175
|
+
Assert(false);
|
176
|
+
return NULL;
|
177
|
+
}
|
178
|
+
|
179
|
+
static const char*
|
180
|
+
_enumToStringSetOperation(SetOperation value) {
|
181
|
+
switch(value) {
|
182
|
+
case SETOP_NONE: return "SETOP_NONE";
|
183
|
+
case SETOP_UNION: return "SETOP_UNION";
|
184
|
+
case SETOP_INTERSECT: return "SETOP_INTERSECT";
|
185
|
+
case SETOP_EXCEPT: return "SETOP_EXCEPT";
|
186
|
+
}
|
187
|
+
Assert(false);
|
188
|
+
return NULL;
|
189
|
+
}
|
190
|
+
|
191
|
+
static const char*
|
192
|
+
_enumToStringObjectType(ObjectType value) {
|
193
|
+
switch(value) {
|
194
|
+
case OBJECT_ACCESS_METHOD: return "OBJECT_ACCESS_METHOD";
|
195
|
+
case OBJECT_AGGREGATE: return "OBJECT_AGGREGATE";
|
196
|
+
case OBJECT_AMOP: return "OBJECT_AMOP";
|
197
|
+
case OBJECT_AMPROC: return "OBJECT_AMPROC";
|
198
|
+
case OBJECT_ATTRIBUTE: return "OBJECT_ATTRIBUTE";
|
199
|
+
case OBJECT_CAST: return "OBJECT_CAST";
|
200
|
+
case OBJECT_COLUMN: return "OBJECT_COLUMN";
|
201
|
+
case OBJECT_COLLATION: return "OBJECT_COLLATION";
|
202
|
+
case OBJECT_CONVERSION: return "OBJECT_CONVERSION";
|
203
|
+
case OBJECT_DATABASE: return "OBJECT_DATABASE";
|
204
|
+
case OBJECT_DEFAULT: return "OBJECT_DEFAULT";
|
205
|
+
case OBJECT_DEFACL: return "OBJECT_DEFACL";
|
206
|
+
case OBJECT_DOMAIN: return "OBJECT_DOMAIN";
|
207
|
+
case OBJECT_DOMCONSTRAINT: return "OBJECT_DOMCONSTRAINT";
|
208
|
+
case OBJECT_EVENT_TRIGGER: return "OBJECT_EVENT_TRIGGER";
|
209
|
+
case OBJECT_EXTENSION: return "OBJECT_EXTENSION";
|
210
|
+
case OBJECT_FDW: return "OBJECT_FDW";
|
211
|
+
case OBJECT_FOREIGN_SERVER: return "OBJECT_FOREIGN_SERVER";
|
212
|
+
case OBJECT_FOREIGN_TABLE: return "OBJECT_FOREIGN_TABLE";
|
213
|
+
case OBJECT_FUNCTION: return "OBJECT_FUNCTION";
|
214
|
+
case OBJECT_INDEX: return "OBJECT_INDEX";
|
215
|
+
case OBJECT_LANGUAGE: return "OBJECT_LANGUAGE";
|
216
|
+
case OBJECT_LARGEOBJECT: return "OBJECT_LARGEOBJECT";
|
217
|
+
case OBJECT_MATVIEW: return "OBJECT_MATVIEW";
|
218
|
+
case OBJECT_OPCLASS: return "OBJECT_OPCLASS";
|
219
|
+
case OBJECT_OPERATOR: return "OBJECT_OPERATOR";
|
220
|
+
case OBJECT_OPFAMILY: return "OBJECT_OPFAMILY";
|
221
|
+
case OBJECT_POLICY: return "OBJECT_POLICY";
|
222
|
+
case OBJECT_PROCEDURE: return "OBJECT_PROCEDURE";
|
223
|
+
case OBJECT_PUBLICATION: return "OBJECT_PUBLICATION";
|
224
|
+
case OBJECT_PUBLICATION_REL: return "OBJECT_PUBLICATION_REL";
|
225
|
+
case OBJECT_ROLE: return "OBJECT_ROLE";
|
226
|
+
case OBJECT_ROUTINE: return "OBJECT_ROUTINE";
|
227
|
+
case OBJECT_RULE: return "OBJECT_RULE";
|
228
|
+
case OBJECT_SCHEMA: return "OBJECT_SCHEMA";
|
229
|
+
case OBJECT_SEQUENCE: return "OBJECT_SEQUENCE";
|
230
|
+
case OBJECT_SUBSCRIPTION: return "OBJECT_SUBSCRIPTION";
|
231
|
+
case OBJECT_STATISTIC_EXT: return "OBJECT_STATISTIC_EXT";
|
232
|
+
case OBJECT_TABCONSTRAINT: return "OBJECT_TABCONSTRAINT";
|
233
|
+
case OBJECT_TABLE: return "OBJECT_TABLE";
|
234
|
+
case OBJECT_TABLESPACE: return "OBJECT_TABLESPACE";
|
235
|
+
case OBJECT_TRANSFORM: return "OBJECT_TRANSFORM";
|
236
|
+
case OBJECT_TRIGGER: return "OBJECT_TRIGGER";
|
237
|
+
case OBJECT_TSCONFIGURATION: return "OBJECT_TSCONFIGURATION";
|
238
|
+
case OBJECT_TSDICTIONARY: return "OBJECT_TSDICTIONARY";
|
239
|
+
case OBJECT_TSPARSER: return "OBJECT_TSPARSER";
|
240
|
+
case OBJECT_TSTEMPLATE: return "OBJECT_TSTEMPLATE";
|
241
|
+
case OBJECT_TYPE: return "OBJECT_TYPE";
|
242
|
+
case OBJECT_USER_MAPPING: return "OBJECT_USER_MAPPING";
|
243
|
+
case OBJECT_VIEW: return "OBJECT_VIEW";
|
244
|
+
}
|
245
|
+
Assert(false);
|
246
|
+
return NULL;
|
247
|
+
}
|
248
|
+
|
249
|
+
static const char*
|
250
|
+
_enumToStringDropBehavior(DropBehavior value) {
|
251
|
+
switch(value) {
|
252
|
+
case DROP_RESTRICT: return "DROP_RESTRICT";
|
253
|
+
case DROP_CASCADE: return "DROP_CASCADE";
|
254
|
+
}
|
255
|
+
Assert(false);
|
256
|
+
return NULL;
|
257
|
+
}
|
258
|
+
|
259
|
+
static const char*
|
260
|
+
_enumToStringAlterTableType(AlterTableType value) {
|
261
|
+
switch(value) {
|
262
|
+
case AT_AddColumn: return "AT_AddColumn";
|
263
|
+
case AT_AddColumnRecurse: return "AT_AddColumnRecurse";
|
264
|
+
case AT_AddColumnToView: return "AT_AddColumnToView";
|
265
|
+
case AT_ColumnDefault: return "AT_ColumnDefault";
|
266
|
+
case AT_CookedColumnDefault: return "AT_CookedColumnDefault";
|
267
|
+
case AT_DropNotNull: return "AT_DropNotNull";
|
268
|
+
case AT_SetNotNull: return "AT_SetNotNull";
|
269
|
+
case AT_DropExpression: return "AT_DropExpression";
|
270
|
+
case AT_CheckNotNull: return "AT_CheckNotNull";
|
271
|
+
case AT_SetStatistics: return "AT_SetStatistics";
|
272
|
+
case AT_SetOptions: return "AT_SetOptions";
|
273
|
+
case AT_ResetOptions: return "AT_ResetOptions";
|
274
|
+
case AT_SetStorage: return "AT_SetStorage";
|
275
|
+
case AT_DropColumn: return "AT_DropColumn";
|
276
|
+
case AT_DropColumnRecurse: return "AT_DropColumnRecurse";
|
277
|
+
case AT_AddIndex: return "AT_AddIndex";
|
278
|
+
case AT_ReAddIndex: return "AT_ReAddIndex";
|
279
|
+
case AT_AddConstraint: return "AT_AddConstraint";
|
280
|
+
case AT_AddConstraintRecurse: return "AT_AddConstraintRecurse";
|
281
|
+
case AT_ReAddConstraint: return "AT_ReAddConstraint";
|
282
|
+
case AT_ReAddDomainConstraint: return "AT_ReAddDomainConstraint";
|
283
|
+
case AT_AlterConstraint: return "AT_AlterConstraint";
|
284
|
+
case AT_ValidateConstraint: return "AT_ValidateConstraint";
|
285
|
+
case AT_ValidateConstraintRecurse: return "AT_ValidateConstraintRecurse";
|
286
|
+
case AT_AddIndexConstraint: return "AT_AddIndexConstraint";
|
287
|
+
case AT_DropConstraint: return "AT_DropConstraint";
|
288
|
+
case AT_DropConstraintRecurse: return "AT_DropConstraintRecurse";
|
289
|
+
case AT_ReAddComment: return "AT_ReAddComment";
|
290
|
+
case AT_AlterColumnType: return "AT_AlterColumnType";
|
291
|
+
case AT_AlterColumnGenericOptions: return "AT_AlterColumnGenericOptions";
|
292
|
+
case AT_ChangeOwner: return "AT_ChangeOwner";
|
293
|
+
case AT_ClusterOn: return "AT_ClusterOn";
|
294
|
+
case AT_DropCluster: return "AT_DropCluster";
|
295
|
+
case AT_SetLogged: return "AT_SetLogged";
|
296
|
+
case AT_SetUnLogged: return "AT_SetUnLogged";
|
297
|
+
case AT_DropOids: return "AT_DropOids";
|
298
|
+
case AT_SetTableSpace: return "AT_SetTableSpace";
|
299
|
+
case AT_SetRelOptions: return "AT_SetRelOptions";
|
300
|
+
case AT_ResetRelOptions: return "AT_ResetRelOptions";
|
301
|
+
case AT_ReplaceRelOptions: return "AT_ReplaceRelOptions";
|
302
|
+
case AT_EnableTrig: return "AT_EnableTrig";
|
303
|
+
case AT_EnableAlwaysTrig: return "AT_EnableAlwaysTrig";
|
304
|
+
case AT_EnableReplicaTrig: return "AT_EnableReplicaTrig";
|
305
|
+
case AT_DisableTrig: return "AT_DisableTrig";
|
306
|
+
case AT_EnableTrigAll: return "AT_EnableTrigAll";
|
307
|
+
case AT_DisableTrigAll: return "AT_DisableTrigAll";
|
308
|
+
case AT_EnableTrigUser: return "AT_EnableTrigUser";
|
309
|
+
case AT_DisableTrigUser: return "AT_DisableTrigUser";
|
310
|
+
case AT_EnableRule: return "AT_EnableRule";
|
311
|
+
case AT_EnableAlwaysRule: return "AT_EnableAlwaysRule";
|
312
|
+
case AT_EnableReplicaRule: return "AT_EnableReplicaRule";
|
313
|
+
case AT_DisableRule: return "AT_DisableRule";
|
314
|
+
case AT_AddInherit: return "AT_AddInherit";
|
315
|
+
case AT_DropInherit: return "AT_DropInherit";
|
316
|
+
case AT_AddOf: return "AT_AddOf";
|
317
|
+
case AT_DropOf: return "AT_DropOf";
|
318
|
+
case AT_ReplicaIdentity: return "AT_ReplicaIdentity";
|
319
|
+
case AT_EnableRowSecurity: return "AT_EnableRowSecurity";
|
320
|
+
case AT_DisableRowSecurity: return "AT_DisableRowSecurity";
|
321
|
+
case AT_ForceRowSecurity: return "AT_ForceRowSecurity";
|
322
|
+
case AT_NoForceRowSecurity: return "AT_NoForceRowSecurity";
|
323
|
+
case AT_GenericOptions: return "AT_GenericOptions";
|
324
|
+
case AT_AttachPartition: return "AT_AttachPartition";
|
325
|
+
case AT_DetachPartition: return "AT_DetachPartition";
|
326
|
+
case AT_AddIdentity: return "AT_AddIdentity";
|
327
|
+
case AT_SetIdentity: return "AT_SetIdentity";
|
328
|
+
case AT_DropIdentity: return "AT_DropIdentity";
|
329
|
+
}
|
330
|
+
Assert(false);
|
331
|
+
return NULL;
|
332
|
+
}
|
333
|
+
|
334
|
+
static const char*
|
335
|
+
_enumToStringGrantTargetType(GrantTargetType value) {
|
336
|
+
switch(value) {
|
337
|
+
case ACL_TARGET_OBJECT: return "ACL_TARGET_OBJECT";
|
338
|
+
case ACL_TARGET_ALL_IN_SCHEMA: return "ACL_TARGET_ALL_IN_SCHEMA";
|
339
|
+
case ACL_TARGET_DEFAULTS: return "ACL_TARGET_DEFAULTS";
|
340
|
+
}
|
341
|
+
Assert(false);
|
342
|
+
return NULL;
|
343
|
+
}
|
344
|
+
|
345
|
+
static const char*
|
346
|
+
_enumToStringVariableSetKind(VariableSetKind value) {
|
347
|
+
switch(value) {
|
348
|
+
case VAR_SET_VALUE: return "VAR_SET_VALUE";
|
349
|
+
case VAR_SET_DEFAULT: return "VAR_SET_DEFAULT";
|
350
|
+
case VAR_SET_CURRENT: return "VAR_SET_CURRENT";
|
351
|
+
case VAR_SET_MULTI: return "VAR_SET_MULTI";
|
352
|
+
case VAR_RESET: return "VAR_RESET";
|
353
|
+
case VAR_RESET_ALL: return "VAR_RESET_ALL";
|
354
|
+
}
|
355
|
+
Assert(false);
|
356
|
+
return NULL;
|
357
|
+
}
|
358
|
+
|
359
|
+
static const char*
|
360
|
+
_enumToStringConstrType(ConstrType value) {
|
361
|
+
switch(value) {
|
362
|
+
case CONSTR_NULL: return "CONSTR_NULL";
|
363
|
+
case CONSTR_NOTNULL: return "CONSTR_NOTNULL";
|
364
|
+
case CONSTR_DEFAULT: return "CONSTR_DEFAULT";
|
365
|
+
case CONSTR_IDENTITY: return "CONSTR_IDENTITY";
|
366
|
+
case CONSTR_GENERATED: return "CONSTR_GENERATED";
|
367
|
+
case CONSTR_CHECK: return "CONSTR_CHECK";
|
368
|
+
case CONSTR_PRIMARY: return "CONSTR_PRIMARY";
|
369
|
+
case CONSTR_UNIQUE: return "CONSTR_UNIQUE";
|
370
|
+
case CONSTR_EXCLUSION: return "CONSTR_EXCLUSION";
|
371
|
+
case CONSTR_FOREIGN: return "CONSTR_FOREIGN";
|
372
|
+
case CONSTR_ATTR_DEFERRABLE: return "CONSTR_ATTR_DEFERRABLE";
|
373
|
+
case CONSTR_ATTR_NOT_DEFERRABLE: return "CONSTR_ATTR_NOT_DEFERRABLE";
|
374
|
+
case CONSTR_ATTR_DEFERRED: return "CONSTR_ATTR_DEFERRED";
|
375
|
+
case CONSTR_ATTR_IMMEDIATE: return "CONSTR_ATTR_IMMEDIATE";
|
376
|
+
}
|
377
|
+
Assert(false);
|
378
|
+
return NULL;
|
379
|
+
}
|
380
|
+
|
381
|
+
static const char*
|
382
|
+
_enumToStringImportForeignSchemaType(ImportForeignSchemaType value) {
|
383
|
+
switch(value) {
|
384
|
+
case FDW_IMPORT_SCHEMA_ALL: return "FDW_IMPORT_SCHEMA_ALL";
|
385
|
+
case FDW_IMPORT_SCHEMA_LIMIT_TO: return "FDW_IMPORT_SCHEMA_LIMIT_TO";
|
386
|
+
case FDW_IMPORT_SCHEMA_EXCEPT: return "FDW_IMPORT_SCHEMA_EXCEPT";
|
387
|
+
}
|
388
|
+
Assert(false);
|
389
|
+
return NULL;
|
390
|
+
}
|
391
|
+
|
392
|
+
static const char*
|
393
|
+
_enumToStringRoleStmtType(RoleStmtType value) {
|
394
|
+
switch(value) {
|
395
|
+
case ROLESTMT_ROLE: return "ROLESTMT_ROLE";
|
396
|
+
case ROLESTMT_USER: return "ROLESTMT_USER";
|
397
|
+
case ROLESTMT_GROUP: return "ROLESTMT_GROUP";
|
398
|
+
}
|
399
|
+
Assert(false);
|
400
|
+
return NULL;
|
401
|
+
}
|
402
|
+
|
403
|
+
static const char*
|
404
|
+
_enumToStringFetchDirection(FetchDirection value) {
|
405
|
+
switch(value) {
|
406
|
+
case FETCH_FORWARD: return "FETCH_FORWARD";
|
407
|
+
case FETCH_BACKWARD: return "FETCH_BACKWARD";
|
408
|
+
case FETCH_ABSOLUTE: return "FETCH_ABSOLUTE";
|
409
|
+
case FETCH_RELATIVE: return "FETCH_RELATIVE";
|
410
|
+
}
|
411
|
+
Assert(false);
|
412
|
+
return NULL;
|
413
|
+
}
|
414
|
+
|
415
|
+
static const char*
|
416
|
+
_enumToStringFunctionParameterMode(FunctionParameterMode value) {
|
417
|
+
switch(value) {
|
418
|
+
case FUNC_PARAM_IN: return "FUNC_PARAM_IN";
|
419
|
+
case FUNC_PARAM_OUT: return "FUNC_PARAM_OUT";
|
420
|
+
case FUNC_PARAM_INOUT: return "FUNC_PARAM_INOUT";
|
421
|
+
case FUNC_PARAM_VARIADIC: return "FUNC_PARAM_VARIADIC";
|
422
|
+
case FUNC_PARAM_TABLE: return "FUNC_PARAM_TABLE";
|
423
|
+
}
|
424
|
+
Assert(false);
|
425
|
+
return NULL;
|
426
|
+
}
|
427
|
+
|
428
|
+
static const char*
|
429
|
+
_enumToStringTransactionStmtKind(TransactionStmtKind value) {
|
430
|
+
switch(value) {
|
431
|
+
case TRANS_STMT_BEGIN: return "TRANS_STMT_BEGIN";
|
432
|
+
case TRANS_STMT_START: return "TRANS_STMT_START";
|
433
|
+
case TRANS_STMT_COMMIT: return "TRANS_STMT_COMMIT";
|
434
|
+
case TRANS_STMT_ROLLBACK: return "TRANS_STMT_ROLLBACK";
|
435
|
+
case TRANS_STMT_SAVEPOINT: return "TRANS_STMT_SAVEPOINT";
|
436
|
+
case TRANS_STMT_RELEASE: return "TRANS_STMT_RELEASE";
|
437
|
+
case TRANS_STMT_ROLLBACK_TO: return "TRANS_STMT_ROLLBACK_TO";
|
438
|
+
case TRANS_STMT_PREPARE: return "TRANS_STMT_PREPARE";
|
439
|
+
case TRANS_STMT_COMMIT_PREPARED: return "TRANS_STMT_COMMIT_PREPARED";
|
440
|
+
case TRANS_STMT_ROLLBACK_PREPARED: return "TRANS_STMT_ROLLBACK_PREPARED";
|
441
|
+
}
|
442
|
+
Assert(false);
|
443
|
+
return NULL;
|
444
|
+
}
|
445
|
+
|
446
|
+
static const char*
|
447
|
+
_enumToStringViewCheckOption(ViewCheckOption value) {
|
448
|
+
switch(value) {
|
449
|
+
case NO_CHECK_OPTION: return "NO_CHECK_OPTION";
|
450
|
+
case LOCAL_CHECK_OPTION: return "LOCAL_CHECK_OPTION";
|
451
|
+
case CASCADED_CHECK_OPTION: return "CASCADED_CHECK_OPTION";
|
452
|
+
}
|
453
|
+
Assert(false);
|
454
|
+
return NULL;
|
455
|
+
}
|
456
|
+
|
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
|
+
static const char*
|
468
|
+
_enumToStringDiscardMode(DiscardMode value) {
|
469
|
+
switch(value) {
|
470
|
+
case DISCARD_ALL: return "DISCARD_ALL";
|
471
|
+
case DISCARD_PLANS: return "DISCARD_PLANS";
|
472
|
+
case DISCARD_SEQUENCES: return "DISCARD_SEQUENCES";
|
473
|
+
case DISCARD_TEMP: return "DISCARD_TEMP";
|
474
|
+
}
|
475
|
+
Assert(false);
|
476
|
+
return NULL;
|
477
|
+
}
|
478
|
+
|
479
|
+
static const char*
|
480
|
+
_enumToStringReindexObjectType(ReindexObjectType value) {
|
481
|
+
switch(value) {
|
482
|
+
case REINDEX_OBJECT_INDEX: return "REINDEX_OBJECT_INDEX";
|
483
|
+
case REINDEX_OBJECT_TABLE: return "REINDEX_OBJECT_TABLE";
|
484
|
+
case REINDEX_OBJECT_SCHEMA: return "REINDEX_OBJECT_SCHEMA";
|
485
|
+
case REINDEX_OBJECT_SYSTEM: return "REINDEX_OBJECT_SYSTEM";
|
486
|
+
case REINDEX_OBJECT_DATABASE: return "REINDEX_OBJECT_DATABASE";
|
487
|
+
}
|
488
|
+
Assert(false);
|
489
|
+
return NULL;
|
490
|
+
}
|
491
|
+
|
492
|
+
static const char*
|
493
|
+
_enumToStringAlterTSConfigType(AlterTSConfigType value) {
|
494
|
+
switch(value) {
|
495
|
+
case ALTER_TSCONFIG_ADD_MAPPING: return "ALTER_TSCONFIG_ADD_MAPPING";
|
496
|
+
case ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN: return "ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN";
|
497
|
+
case ALTER_TSCONFIG_REPLACE_DICT: return "ALTER_TSCONFIG_REPLACE_DICT";
|
498
|
+
case ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN: return "ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN";
|
499
|
+
case ALTER_TSCONFIG_DROP_MAPPING: return "ALTER_TSCONFIG_DROP_MAPPING";
|
500
|
+
}
|
501
|
+
Assert(false);
|
502
|
+
return NULL;
|
503
|
+
}
|
504
|
+
|
505
|
+
static const char*
|
506
|
+
_enumToStringAlterSubscriptionType(AlterSubscriptionType value) {
|
507
|
+
switch(value) {
|
508
|
+
case ALTER_SUBSCRIPTION_OPTIONS: return "ALTER_SUBSCRIPTION_OPTIONS";
|
509
|
+
case ALTER_SUBSCRIPTION_CONNECTION: return "ALTER_SUBSCRIPTION_CONNECTION";
|
510
|
+
case ALTER_SUBSCRIPTION_PUBLICATION: return "ALTER_SUBSCRIPTION_PUBLICATION";
|
511
|
+
case ALTER_SUBSCRIPTION_REFRESH: return "ALTER_SUBSCRIPTION_REFRESH";
|
512
|
+
case ALTER_SUBSCRIPTION_ENABLED: return "ALTER_SUBSCRIPTION_ENABLED";
|
513
|
+
}
|
514
|
+
Assert(false);
|
515
|
+
return NULL;
|
516
|
+
}
|
517
|
+
|
518
|
+
static const char*
|
519
|
+
_enumToStringOnCommitAction(OnCommitAction value) {
|
520
|
+
switch(value) {
|
521
|
+
case ONCOMMIT_NOOP: return "ONCOMMIT_NOOP";
|
522
|
+
case ONCOMMIT_PRESERVE_ROWS: return "ONCOMMIT_PRESERVE_ROWS";
|
523
|
+
case ONCOMMIT_DELETE_ROWS: return "ONCOMMIT_DELETE_ROWS";
|
524
|
+
case ONCOMMIT_DROP: return "ONCOMMIT_DROP";
|
525
|
+
}
|
526
|
+
Assert(false);
|
527
|
+
return NULL;
|
528
|
+
}
|
529
|
+
|
530
|
+
static const char*
|
531
|
+
_enumToStringParamKind(ParamKind value) {
|
532
|
+
switch(value) {
|
533
|
+
case PARAM_EXTERN: return "PARAM_EXTERN";
|
534
|
+
case PARAM_EXEC: return "PARAM_EXEC";
|
535
|
+
case PARAM_SUBLINK: return "PARAM_SUBLINK";
|
536
|
+
case PARAM_MULTIEXPR: return "PARAM_MULTIEXPR";
|
537
|
+
}
|
538
|
+
Assert(false);
|
539
|
+
return NULL;
|
540
|
+
}
|
541
|
+
|
542
|
+
static const char*
|
543
|
+
_enumToStringCoercionContext(CoercionContext value) {
|
544
|
+
switch(value) {
|
545
|
+
case COERCION_IMPLICIT: return "COERCION_IMPLICIT";
|
546
|
+
case COERCION_ASSIGNMENT: return "COERCION_ASSIGNMENT";
|
547
|
+
case COERCION_EXPLICIT: return "COERCION_EXPLICIT";
|
548
|
+
}
|
549
|
+
Assert(false);
|
550
|
+
return NULL;
|
551
|
+
}
|
552
|
+
|
553
|
+
static const char*
|
554
|
+
_enumToStringCoercionForm(CoercionForm value) {
|
555
|
+
switch(value) {
|
556
|
+
case COERCE_EXPLICIT_CALL: return "COERCE_EXPLICIT_CALL";
|
557
|
+
case COERCE_EXPLICIT_CAST: return "COERCE_EXPLICIT_CAST";
|
558
|
+
case COERCE_IMPLICIT_CAST: return "COERCE_IMPLICIT_CAST";
|
559
|
+
}
|
560
|
+
Assert(false);
|
561
|
+
return NULL;
|
562
|
+
}
|
563
|
+
|
564
|
+
static const char*
|
565
|
+
_enumToStringBoolExprType(BoolExprType value) {
|
566
|
+
switch(value) {
|
567
|
+
case AND_EXPR: return "AND_EXPR";
|
568
|
+
case OR_EXPR: return "OR_EXPR";
|
569
|
+
case NOT_EXPR: return "NOT_EXPR";
|
570
|
+
}
|
571
|
+
Assert(false);
|
572
|
+
return NULL;
|
573
|
+
}
|
574
|
+
|
575
|
+
static const char*
|
576
|
+
_enumToStringSubLinkType(SubLinkType value) {
|
577
|
+
switch(value) {
|
578
|
+
case EXISTS_SUBLINK: return "EXISTS_SUBLINK";
|
579
|
+
case ALL_SUBLINK: return "ALL_SUBLINK";
|
580
|
+
case ANY_SUBLINK: return "ANY_SUBLINK";
|
581
|
+
case ROWCOMPARE_SUBLINK: return "ROWCOMPARE_SUBLINK";
|
582
|
+
case EXPR_SUBLINK: return "EXPR_SUBLINK";
|
583
|
+
case MULTIEXPR_SUBLINK: return "MULTIEXPR_SUBLINK";
|
584
|
+
case ARRAY_SUBLINK: return "ARRAY_SUBLINK";
|
585
|
+
case CTE_SUBLINK: return "CTE_SUBLINK";
|
586
|
+
}
|
587
|
+
Assert(false);
|
588
|
+
return NULL;
|
589
|
+
}
|
590
|
+
|
591
|
+
static const char*
|
592
|
+
_enumToStringRowCompareType(RowCompareType value) {
|
593
|
+
switch(value) {
|
594
|
+
case ROWCOMPARE_LT: return "ROWCOMPARE_LT";
|
595
|
+
case ROWCOMPARE_LE: return "ROWCOMPARE_LE";
|
596
|
+
case ROWCOMPARE_EQ: return "ROWCOMPARE_EQ";
|
597
|
+
case ROWCOMPARE_GE: return "ROWCOMPARE_GE";
|
598
|
+
case ROWCOMPARE_GT: return "ROWCOMPARE_GT";
|
599
|
+
case ROWCOMPARE_NE: return "ROWCOMPARE_NE";
|
600
|
+
}
|
601
|
+
Assert(false);
|
602
|
+
return NULL;
|
603
|
+
}
|
604
|
+
|
605
|
+
static const char*
|
606
|
+
_enumToStringMinMaxOp(MinMaxOp value) {
|
607
|
+
switch(value) {
|
608
|
+
case IS_GREATEST: return "IS_GREATEST";
|
609
|
+
case IS_LEAST: return "IS_LEAST";
|
610
|
+
}
|
611
|
+
Assert(false);
|
612
|
+
return NULL;
|
613
|
+
}
|
614
|
+
|
615
|
+
static const char*
|
616
|
+
_enumToStringSQLValueFunctionOp(SQLValueFunctionOp value) {
|
617
|
+
switch(value) {
|
618
|
+
case SVFOP_CURRENT_DATE: return "SVFOP_CURRENT_DATE";
|
619
|
+
case SVFOP_CURRENT_TIME: return "SVFOP_CURRENT_TIME";
|
620
|
+
case SVFOP_CURRENT_TIME_N: return "SVFOP_CURRENT_TIME_N";
|
621
|
+
case SVFOP_CURRENT_TIMESTAMP: return "SVFOP_CURRENT_TIMESTAMP";
|
622
|
+
case SVFOP_CURRENT_TIMESTAMP_N: return "SVFOP_CURRENT_TIMESTAMP_N";
|
623
|
+
case SVFOP_LOCALTIME: return "SVFOP_LOCALTIME";
|
624
|
+
case SVFOP_LOCALTIME_N: return "SVFOP_LOCALTIME_N";
|
625
|
+
case SVFOP_LOCALTIMESTAMP: return "SVFOP_LOCALTIMESTAMP";
|
626
|
+
case SVFOP_LOCALTIMESTAMP_N: return "SVFOP_LOCALTIMESTAMP_N";
|
627
|
+
case SVFOP_CURRENT_ROLE: return "SVFOP_CURRENT_ROLE";
|
628
|
+
case SVFOP_CURRENT_USER: return "SVFOP_CURRENT_USER";
|
629
|
+
case SVFOP_USER: return "SVFOP_USER";
|
630
|
+
case SVFOP_SESSION_USER: return "SVFOP_SESSION_USER";
|
631
|
+
case SVFOP_CURRENT_CATALOG: return "SVFOP_CURRENT_CATALOG";
|
632
|
+
case SVFOP_CURRENT_SCHEMA: return "SVFOP_CURRENT_SCHEMA";
|
633
|
+
}
|
634
|
+
Assert(false);
|
635
|
+
return NULL;
|
636
|
+
}
|
637
|
+
|
638
|
+
static const char*
|
639
|
+
_enumToStringXmlExprOp(XmlExprOp value) {
|
640
|
+
switch(value) {
|
641
|
+
case IS_XMLCONCAT: return "IS_XMLCONCAT";
|
642
|
+
case IS_XMLELEMENT: return "IS_XMLELEMENT";
|
643
|
+
case IS_XMLFOREST: return "IS_XMLFOREST";
|
644
|
+
case IS_XMLPARSE: return "IS_XMLPARSE";
|
645
|
+
case IS_XMLPI: return "IS_XMLPI";
|
646
|
+
case IS_XMLROOT: return "IS_XMLROOT";
|
647
|
+
case IS_XMLSERIALIZE: return "IS_XMLSERIALIZE";
|
648
|
+
case IS_DOCUMENT: return "IS_DOCUMENT";
|
649
|
+
}
|
650
|
+
Assert(false);
|
651
|
+
return NULL;
|
652
|
+
}
|
653
|
+
|
654
|
+
static const char*
|
655
|
+
_enumToStringXmlOptionType(XmlOptionType value) {
|
656
|
+
switch(value) {
|
657
|
+
case XMLOPTION_DOCUMENT: return "XMLOPTION_DOCUMENT";
|
658
|
+
case XMLOPTION_CONTENT: return "XMLOPTION_CONTENT";
|
659
|
+
}
|
660
|
+
Assert(false);
|
661
|
+
return NULL;
|
662
|
+
}
|
663
|
+
|
664
|
+
static const char*
|
665
|
+
_enumToStringNullTestType(NullTestType value) {
|
666
|
+
switch(value) {
|
667
|
+
case IS_NULL: return "IS_NULL";
|
668
|
+
case IS_NOT_NULL: return "IS_NOT_NULL";
|
669
|
+
}
|
670
|
+
Assert(false);
|
671
|
+
return NULL;
|
672
|
+
}
|
673
|
+
|
674
|
+
static const char*
|
675
|
+
_enumToStringBoolTestType(BoolTestType value) {
|
676
|
+
switch(value) {
|
677
|
+
case IS_TRUE: return "IS_TRUE";
|
678
|
+
case IS_NOT_TRUE: return "IS_NOT_TRUE";
|
679
|
+
case IS_FALSE: return "IS_FALSE";
|
680
|
+
case IS_NOT_FALSE: return "IS_NOT_FALSE";
|
681
|
+
case IS_UNKNOWN: return "IS_UNKNOWN";
|
682
|
+
case IS_NOT_UNKNOWN: return "IS_NOT_UNKNOWN";
|
683
|
+
}
|
684
|
+
Assert(false);
|
685
|
+
return NULL;
|
686
|
+
}
|
687
|
+
|
688
|
+
static const char*
|
689
|
+
_enumToStringCmdType(CmdType value) {
|
690
|
+
switch(value) {
|
691
|
+
case CMD_UNKNOWN: return "CMD_UNKNOWN";
|
692
|
+
case CMD_SELECT: return "CMD_SELECT";
|
693
|
+
case CMD_UPDATE: return "CMD_UPDATE";
|
694
|
+
case CMD_INSERT: return "CMD_INSERT";
|
695
|
+
case CMD_DELETE: return "CMD_DELETE";
|
696
|
+
case CMD_UTILITY: return "CMD_UTILITY";
|
697
|
+
case CMD_NOTHING: return "CMD_NOTHING";
|
698
|
+
}
|
699
|
+
Assert(false);
|
700
|
+
return NULL;
|
701
|
+
}
|
702
|
+
|
703
|
+
static const char*
|
704
|
+
_enumToStringJoinType(JoinType value) {
|
705
|
+
switch(value) {
|
706
|
+
case JOIN_INNER: return "JOIN_INNER";
|
707
|
+
case JOIN_LEFT: return "JOIN_LEFT";
|
708
|
+
case JOIN_FULL: return "JOIN_FULL";
|
709
|
+
case JOIN_RIGHT: return "JOIN_RIGHT";
|
710
|
+
case JOIN_SEMI: return "JOIN_SEMI";
|
711
|
+
case JOIN_ANTI: return "JOIN_ANTI";
|
712
|
+
case JOIN_UNIQUE_OUTER: return "JOIN_UNIQUE_OUTER";
|
713
|
+
case JOIN_UNIQUE_INNER: return "JOIN_UNIQUE_INNER";
|
714
|
+
}
|
715
|
+
Assert(false);
|
716
|
+
return NULL;
|
717
|
+
}
|
718
|
+
|
719
|
+
static const char*
|
720
|
+
_enumToStringAggStrategy(AggStrategy value) {
|
721
|
+
switch(value) {
|
722
|
+
case AGG_PLAIN: return "AGG_PLAIN";
|
723
|
+
case AGG_SORTED: return "AGG_SORTED";
|
724
|
+
case AGG_HASHED: return "AGG_HASHED";
|
725
|
+
case AGG_MIXED: return "AGG_MIXED";
|
726
|
+
}
|
727
|
+
Assert(false);
|
728
|
+
return NULL;
|
729
|
+
}
|
730
|
+
|
731
|
+
static const char*
|
732
|
+
_enumToStringAggSplit(AggSplit value) {
|
733
|
+
switch(value) {
|
734
|
+
case AGGSPLIT_SIMPLE: return "AGGSPLIT_SIMPLE";
|
735
|
+
case AGGSPLIT_INITIAL_SERIAL: return "AGGSPLIT_INITIAL_SERIAL";
|
736
|
+
case AGGSPLIT_FINAL_DESERIAL: return "AGGSPLIT_FINAL_DESERIAL";
|
737
|
+
}
|
738
|
+
Assert(false);
|
739
|
+
return NULL;
|
740
|
+
}
|
741
|
+
|
742
|
+
static const char*
|
743
|
+
_enumToStringSetOpCmd(SetOpCmd value) {
|
744
|
+
switch(value) {
|
745
|
+
case SETOPCMD_INTERSECT: return "SETOPCMD_INTERSECT";
|
746
|
+
case SETOPCMD_INTERSECT_ALL: return "SETOPCMD_INTERSECT_ALL";
|
747
|
+
case SETOPCMD_EXCEPT: return "SETOPCMD_EXCEPT";
|
748
|
+
case SETOPCMD_EXCEPT_ALL: return "SETOPCMD_EXCEPT_ALL";
|
749
|
+
}
|
750
|
+
Assert(false);
|
751
|
+
return NULL;
|
752
|
+
}
|
753
|
+
|
754
|
+
static const char*
|
755
|
+
_enumToStringSetOpStrategy(SetOpStrategy value) {
|
756
|
+
switch(value) {
|
757
|
+
case SETOP_SORTED: return "SETOP_SORTED";
|
758
|
+
case SETOP_HASHED: return "SETOP_HASHED";
|
759
|
+
}
|
760
|
+
Assert(false);
|
761
|
+
return NULL;
|
762
|
+
}
|
763
|
+
|
764
|
+
static const char*
|
765
|
+
_enumToStringOnConflictAction(OnConflictAction value) {
|
766
|
+
switch(value) {
|
767
|
+
case ONCONFLICT_NONE: return "ONCONFLICT_NONE";
|
768
|
+
case ONCONFLICT_NOTHING: return "ONCONFLICT_NOTHING";
|
769
|
+
case ONCONFLICT_UPDATE: return "ONCONFLICT_UPDATE";
|
770
|
+
}
|
771
|
+
Assert(false);
|
772
|
+
return NULL;
|
773
|
+
}
|
774
|
+
|
775
|
+
static const char*
|
776
|
+
_enumToStringLimitOption(LimitOption value) {
|
777
|
+
switch(value) {
|
778
|
+
case LIMIT_OPTION_DEFAULT: return "LIMIT_OPTION_DEFAULT";
|
779
|
+
case LIMIT_OPTION_COUNT: return "LIMIT_OPTION_COUNT";
|
780
|
+
case LIMIT_OPTION_WITH_TIES: return "LIMIT_OPTION_WITH_TIES";
|
781
|
+
}
|
782
|
+
Assert(false);
|
783
|
+
return NULL;
|
784
|
+
}
|
785
|
+
|
786
|
+
static const char*
|
787
|
+
_enumToStringLockClauseStrength(LockClauseStrength value) {
|
788
|
+
switch(value) {
|
789
|
+
case LCS_NONE: return "LCS_NONE";
|
790
|
+
case LCS_FORKEYSHARE: return "LCS_FORKEYSHARE";
|
791
|
+
case LCS_FORSHARE: return "LCS_FORSHARE";
|
792
|
+
case LCS_FORNOKEYUPDATE: return "LCS_FORNOKEYUPDATE";
|
793
|
+
case LCS_FORUPDATE: return "LCS_FORUPDATE";
|
794
|
+
}
|
795
|
+
Assert(false);
|
796
|
+
return NULL;
|
797
|
+
}
|
798
|
+
|
799
|
+
static const char*
|
800
|
+
_enumToStringLockWaitPolicy(LockWaitPolicy value) {
|
801
|
+
switch(value) {
|
802
|
+
case LockWaitBlock: return "LockWaitBlock";
|
803
|
+
case LockWaitSkip: return "LockWaitSkip";
|
804
|
+
case LockWaitError: return "LockWaitError";
|
805
|
+
}
|
806
|
+
Assert(false);
|
807
|
+
return NULL;
|
808
|
+
}
|
809
|
+
|
810
|
+
static const char*
|
811
|
+
_enumToStringLockTupleMode(LockTupleMode value) {
|
812
|
+
switch(value) {
|
813
|
+
case LockTupleKeyShare: return "LockTupleKeyShare";
|
814
|
+
case LockTupleShare: return "LockTupleShare";
|
815
|
+
case LockTupleNoKeyExclusive: return "LockTupleNoKeyExclusive";
|
816
|
+
case LockTupleExclusive: return "LockTupleExclusive";
|
817
|
+
}
|
818
|
+
Assert(false);
|
819
|
+
return NULL;
|
820
|
+
}static int
|
821
|
+
_enumToIntOverridingKind(OverridingKind value) {
|
822
|
+
switch(value) {
|
823
|
+
case OVERRIDING_NOT_SET: return 1;
|
824
|
+
case OVERRIDING_USER_VALUE: return 2;
|
825
|
+
case OVERRIDING_SYSTEM_VALUE: return 3;
|
826
|
+
}
|
827
|
+
Assert(false);
|
828
|
+
return -1;
|
829
|
+
}
|
830
|
+
|
831
|
+
static int
|
832
|
+
_enumToIntQuerySource(QuerySource value) {
|
833
|
+
switch(value) {
|
834
|
+
case QSRC_ORIGINAL: return 1;
|
835
|
+
case QSRC_PARSER: return 2;
|
836
|
+
case QSRC_INSTEAD_RULE: return 3;
|
837
|
+
case QSRC_QUAL_INSTEAD_RULE: return 4;
|
838
|
+
case QSRC_NON_INSTEAD_RULE: return 5;
|
839
|
+
}
|
840
|
+
Assert(false);
|
841
|
+
return -1;
|
842
|
+
}
|
843
|
+
|
844
|
+
static int
|
845
|
+
_enumToIntSortByDir(SortByDir value) {
|
846
|
+
switch(value) {
|
847
|
+
case SORTBY_DEFAULT: return 1;
|
848
|
+
case SORTBY_ASC: return 2;
|
849
|
+
case SORTBY_DESC: return 3;
|
850
|
+
case SORTBY_USING: return 4;
|
851
|
+
}
|
852
|
+
Assert(false);
|
853
|
+
return -1;
|
854
|
+
}
|
855
|
+
|
856
|
+
static int
|
857
|
+
_enumToIntSortByNulls(SortByNulls value) {
|
858
|
+
switch(value) {
|
859
|
+
case SORTBY_NULLS_DEFAULT: return 1;
|
860
|
+
case SORTBY_NULLS_FIRST: return 2;
|
861
|
+
case SORTBY_NULLS_LAST: return 3;
|
862
|
+
}
|
863
|
+
Assert(false);
|
864
|
+
return -1;
|
865
|
+
}
|
866
|
+
|
867
|
+
static int
|
868
|
+
_enumToIntA_Expr_Kind(A_Expr_Kind value) {
|
869
|
+
switch(value) {
|
870
|
+
case AEXPR_OP: return 1;
|
871
|
+
case AEXPR_OP_ANY: return 2;
|
872
|
+
case AEXPR_OP_ALL: return 3;
|
873
|
+
case AEXPR_DISTINCT: return 4;
|
874
|
+
case AEXPR_NOT_DISTINCT: return 5;
|
875
|
+
case AEXPR_NULLIF: return 6;
|
876
|
+
case AEXPR_OF: return 7;
|
877
|
+
case AEXPR_IN: return 8;
|
878
|
+
case AEXPR_LIKE: return 9;
|
879
|
+
case AEXPR_ILIKE: return 10;
|
880
|
+
case AEXPR_SIMILAR: return 11;
|
881
|
+
case AEXPR_BETWEEN: return 12;
|
882
|
+
case AEXPR_NOT_BETWEEN: return 13;
|
883
|
+
case AEXPR_BETWEEN_SYM: return 14;
|
884
|
+
case AEXPR_NOT_BETWEEN_SYM: return 15;
|
885
|
+
case AEXPR_PAREN: return 16;
|
886
|
+
}
|
887
|
+
Assert(false);
|
888
|
+
return -1;
|
889
|
+
}
|
890
|
+
|
891
|
+
static int
|
892
|
+
_enumToIntRoleSpecType(RoleSpecType value) {
|
893
|
+
switch(value) {
|
894
|
+
case ROLESPEC_CSTRING: return 1;
|
895
|
+
case ROLESPEC_CURRENT_USER: return 2;
|
896
|
+
case ROLESPEC_SESSION_USER: return 3;
|
897
|
+
case ROLESPEC_PUBLIC: return 4;
|
898
|
+
}
|
899
|
+
Assert(false);
|
900
|
+
return -1;
|
901
|
+
}
|
902
|
+
|
903
|
+
static int
|
904
|
+
_enumToIntTableLikeOption(TableLikeOption value) {
|
905
|
+
switch(value) {
|
906
|
+
case CREATE_TABLE_LIKE_COMMENTS: return 1;
|
907
|
+
case CREATE_TABLE_LIKE_CONSTRAINTS: return 2;
|
908
|
+
case CREATE_TABLE_LIKE_DEFAULTS: return 3;
|
909
|
+
case CREATE_TABLE_LIKE_GENERATED: return 4;
|
910
|
+
case CREATE_TABLE_LIKE_IDENTITY: return 5;
|
911
|
+
case CREATE_TABLE_LIKE_INDEXES: return 6;
|
912
|
+
case CREATE_TABLE_LIKE_STATISTICS: return 7;
|
913
|
+
case CREATE_TABLE_LIKE_STORAGE: return 8;
|
914
|
+
case CREATE_TABLE_LIKE_ALL: return 9;
|
915
|
+
}
|
916
|
+
Assert(false);
|
917
|
+
return -1;
|
918
|
+
}
|
919
|
+
|
920
|
+
static int
|
921
|
+
_enumToIntDefElemAction(DefElemAction value) {
|
922
|
+
switch(value) {
|
923
|
+
case DEFELEM_UNSPEC: return 1;
|
924
|
+
case DEFELEM_SET: return 2;
|
925
|
+
case DEFELEM_ADD: return 3;
|
926
|
+
case DEFELEM_DROP: return 4;
|
927
|
+
}
|
928
|
+
Assert(false);
|
929
|
+
return -1;
|
930
|
+
}
|
931
|
+
|
932
|
+
static int
|
933
|
+
_enumToIntPartitionRangeDatumKind(PartitionRangeDatumKind value) {
|
934
|
+
switch(value) {
|
935
|
+
case PARTITION_RANGE_DATUM_MINVALUE: return 1;
|
936
|
+
case PARTITION_RANGE_DATUM_VALUE: return 2;
|
937
|
+
case PARTITION_RANGE_DATUM_MAXVALUE: return 3;
|
938
|
+
}
|
939
|
+
Assert(false);
|
940
|
+
return -1;
|
941
|
+
}
|
942
|
+
|
943
|
+
static int
|
944
|
+
_enumToIntRTEKind(RTEKind value) {
|
945
|
+
switch(value) {
|
946
|
+
case RTE_RELATION: return 1;
|
947
|
+
case RTE_SUBQUERY: return 2;
|
948
|
+
case RTE_JOIN: return 3;
|
949
|
+
case RTE_FUNCTION: return 4;
|
950
|
+
case RTE_TABLEFUNC: return 5;
|
951
|
+
case RTE_VALUES: return 6;
|
952
|
+
case RTE_CTE: return 7;
|
953
|
+
case RTE_NAMEDTUPLESTORE: return 8;
|
954
|
+
case RTE_RESULT: return 9;
|
955
|
+
}
|
956
|
+
Assert(false);
|
957
|
+
return -1;
|
958
|
+
}
|
959
|
+
|
960
|
+
static int
|
961
|
+
_enumToIntWCOKind(WCOKind value) {
|
962
|
+
switch(value) {
|
963
|
+
case WCO_VIEW_CHECK: return 1;
|
964
|
+
case WCO_RLS_INSERT_CHECK: return 2;
|
965
|
+
case WCO_RLS_UPDATE_CHECK: return 3;
|
966
|
+
case WCO_RLS_CONFLICT_CHECK: return 4;
|
967
|
+
}
|
968
|
+
Assert(false);
|
969
|
+
return -1;
|
970
|
+
}
|
971
|
+
|
972
|
+
static int
|
973
|
+
_enumToIntGroupingSetKind(GroupingSetKind value) {
|
974
|
+
switch(value) {
|
975
|
+
case GROUPING_SET_EMPTY: return 1;
|
976
|
+
case GROUPING_SET_SIMPLE: return 2;
|
977
|
+
case GROUPING_SET_ROLLUP: return 3;
|
978
|
+
case GROUPING_SET_CUBE: return 4;
|
979
|
+
case GROUPING_SET_SETS: return 5;
|
980
|
+
}
|
981
|
+
Assert(false);
|
982
|
+
return -1;
|
983
|
+
}
|
984
|
+
|
985
|
+
static int
|
986
|
+
_enumToIntCTEMaterialize(CTEMaterialize value) {
|
987
|
+
switch(value) {
|
988
|
+
case CTEMaterializeDefault: return 1;
|
989
|
+
case CTEMaterializeAlways: return 2;
|
990
|
+
case CTEMaterializeNever: return 3;
|
991
|
+
}
|
992
|
+
Assert(false);
|
993
|
+
return -1;
|
994
|
+
}
|
995
|
+
|
996
|
+
static int
|
997
|
+
_enumToIntSetOperation(SetOperation value) {
|
998
|
+
switch(value) {
|
999
|
+
case SETOP_NONE: return 1;
|
1000
|
+
case SETOP_UNION: return 2;
|
1001
|
+
case SETOP_INTERSECT: return 3;
|
1002
|
+
case SETOP_EXCEPT: return 4;
|
1003
|
+
}
|
1004
|
+
Assert(false);
|
1005
|
+
return -1;
|
1006
|
+
}
|
1007
|
+
|
1008
|
+
static int
|
1009
|
+
_enumToIntObjectType(ObjectType value) {
|
1010
|
+
switch(value) {
|
1011
|
+
case OBJECT_ACCESS_METHOD: return 1;
|
1012
|
+
case OBJECT_AGGREGATE: return 2;
|
1013
|
+
case OBJECT_AMOP: return 3;
|
1014
|
+
case OBJECT_AMPROC: return 4;
|
1015
|
+
case OBJECT_ATTRIBUTE: return 5;
|
1016
|
+
case OBJECT_CAST: return 6;
|
1017
|
+
case OBJECT_COLUMN: return 7;
|
1018
|
+
case OBJECT_COLLATION: return 8;
|
1019
|
+
case OBJECT_CONVERSION: return 9;
|
1020
|
+
case OBJECT_DATABASE: return 10;
|
1021
|
+
case OBJECT_DEFAULT: return 11;
|
1022
|
+
case OBJECT_DEFACL: return 12;
|
1023
|
+
case OBJECT_DOMAIN: return 13;
|
1024
|
+
case OBJECT_DOMCONSTRAINT: return 14;
|
1025
|
+
case OBJECT_EVENT_TRIGGER: return 15;
|
1026
|
+
case OBJECT_EXTENSION: return 16;
|
1027
|
+
case OBJECT_FDW: return 17;
|
1028
|
+
case OBJECT_FOREIGN_SERVER: return 18;
|
1029
|
+
case OBJECT_FOREIGN_TABLE: return 19;
|
1030
|
+
case OBJECT_FUNCTION: return 20;
|
1031
|
+
case OBJECT_INDEX: return 21;
|
1032
|
+
case OBJECT_LANGUAGE: return 22;
|
1033
|
+
case OBJECT_LARGEOBJECT: return 23;
|
1034
|
+
case OBJECT_MATVIEW: return 24;
|
1035
|
+
case OBJECT_OPCLASS: return 25;
|
1036
|
+
case OBJECT_OPERATOR: return 26;
|
1037
|
+
case OBJECT_OPFAMILY: return 27;
|
1038
|
+
case OBJECT_POLICY: return 28;
|
1039
|
+
case OBJECT_PROCEDURE: return 29;
|
1040
|
+
case OBJECT_PUBLICATION: return 30;
|
1041
|
+
case OBJECT_PUBLICATION_REL: return 31;
|
1042
|
+
case OBJECT_ROLE: return 32;
|
1043
|
+
case OBJECT_ROUTINE: return 33;
|
1044
|
+
case OBJECT_RULE: return 34;
|
1045
|
+
case OBJECT_SCHEMA: return 35;
|
1046
|
+
case OBJECT_SEQUENCE: return 36;
|
1047
|
+
case OBJECT_SUBSCRIPTION: return 37;
|
1048
|
+
case OBJECT_STATISTIC_EXT: return 38;
|
1049
|
+
case OBJECT_TABCONSTRAINT: return 39;
|
1050
|
+
case OBJECT_TABLE: return 40;
|
1051
|
+
case OBJECT_TABLESPACE: return 41;
|
1052
|
+
case OBJECT_TRANSFORM: return 42;
|
1053
|
+
case OBJECT_TRIGGER: return 43;
|
1054
|
+
case OBJECT_TSCONFIGURATION: return 44;
|
1055
|
+
case OBJECT_TSDICTIONARY: return 45;
|
1056
|
+
case OBJECT_TSPARSER: return 46;
|
1057
|
+
case OBJECT_TSTEMPLATE: return 47;
|
1058
|
+
case OBJECT_TYPE: return 48;
|
1059
|
+
case OBJECT_USER_MAPPING: return 49;
|
1060
|
+
case OBJECT_VIEW: return 50;
|
1061
|
+
}
|
1062
|
+
Assert(false);
|
1063
|
+
return -1;
|
1064
|
+
}
|
1065
|
+
|
1066
|
+
static int
|
1067
|
+
_enumToIntDropBehavior(DropBehavior value) {
|
1068
|
+
switch(value) {
|
1069
|
+
case DROP_RESTRICT: return 1;
|
1070
|
+
case DROP_CASCADE: return 2;
|
1071
|
+
}
|
1072
|
+
Assert(false);
|
1073
|
+
return -1;
|
1074
|
+
}
|
1075
|
+
|
1076
|
+
static int
|
1077
|
+
_enumToIntAlterTableType(AlterTableType value) {
|
1078
|
+
switch(value) {
|
1079
|
+
case AT_AddColumn: return 1;
|
1080
|
+
case AT_AddColumnRecurse: return 2;
|
1081
|
+
case AT_AddColumnToView: return 3;
|
1082
|
+
case AT_ColumnDefault: return 4;
|
1083
|
+
case AT_CookedColumnDefault: return 5;
|
1084
|
+
case AT_DropNotNull: return 6;
|
1085
|
+
case AT_SetNotNull: return 7;
|
1086
|
+
case AT_DropExpression: return 8;
|
1087
|
+
case AT_CheckNotNull: return 9;
|
1088
|
+
case AT_SetStatistics: return 10;
|
1089
|
+
case AT_SetOptions: return 11;
|
1090
|
+
case AT_ResetOptions: return 12;
|
1091
|
+
case AT_SetStorage: return 13;
|
1092
|
+
case AT_DropColumn: return 14;
|
1093
|
+
case AT_DropColumnRecurse: return 15;
|
1094
|
+
case AT_AddIndex: return 16;
|
1095
|
+
case AT_ReAddIndex: return 17;
|
1096
|
+
case AT_AddConstraint: return 18;
|
1097
|
+
case AT_AddConstraintRecurse: return 19;
|
1098
|
+
case AT_ReAddConstraint: return 20;
|
1099
|
+
case AT_ReAddDomainConstraint: return 21;
|
1100
|
+
case AT_AlterConstraint: return 22;
|
1101
|
+
case AT_ValidateConstraint: return 23;
|
1102
|
+
case AT_ValidateConstraintRecurse: return 24;
|
1103
|
+
case AT_AddIndexConstraint: return 25;
|
1104
|
+
case AT_DropConstraint: return 26;
|
1105
|
+
case AT_DropConstraintRecurse: return 27;
|
1106
|
+
case AT_ReAddComment: return 28;
|
1107
|
+
case AT_AlterColumnType: return 29;
|
1108
|
+
case AT_AlterColumnGenericOptions: return 30;
|
1109
|
+
case AT_ChangeOwner: return 31;
|
1110
|
+
case AT_ClusterOn: return 32;
|
1111
|
+
case AT_DropCluster: return 33;
|
1112
|
+
case AT_SetLogged: return 34;
|
1113
|
+
case AT_SetUnLogged: return 35;
|
1114
|
+
case AT_DropOids: return 36;
|
1115
|
+
case AT_SetTableSpace: return 37;
|
1116
|
+
case AT_SetRelOptions: return 38;
|
1117
|
+
case AT_ResetRelOptions: return 39;
|
1118
|
+
case AT_ReplaceRelOptions: return 40;
|
1119
|
+
case AT_EnableTrig: return 41;
|
1120
|
+
case AT_EnableAlwaysTrig: return 42;
|
1121
|
+
case AT_EnableReplicaTrig: return 43;
|
1122
|
+
case AT_DisableTrig: return 44;
|
1123
|
+
case AT_EnableTrigAll: return 45;
|
1124
|
+
case AT_DisableTrigAll: return 46;
|
1125
|
+
case AT_EnableTrigUser: return 47;
|
1126
|
+
case AT_DisableTrigUser: return 48;
|
1127
|
+
case AT_EnableRule: return 49;
|
1128
|
+
case AT_EnableAlwaysRule: return 50;
|
1129
|
+
case AT_EnableReplicaRule: return 51;
|
1130
|
+
case AT_DisableRule: return 52;
|
1131
|
+
case AT_AddInherit: return 53;
|
1132
|
+
case AT_DropInherit: return 54;
|
1133
|
+
case AT_AddOf: return 55;
|
1134
|
+
case AT_DropOf: return 56;
|
1135
|
+
case AT_ReplicaIdentity: return 57;
|
1136
|
+
case AT_EnableRowSecurity: return 58;
|
1137
|
+
case AT_DisableRowSecurity: return 59;
|
1138
|
+
case AT_ForceRowSecurity: return 60;
|
1139
|
+
case AT_NoForceRowSecurity: return 61;
|
1140
|
+
case AT_GenericOptions: return 62;
|
1141
|
+
case AT_AttachPartition: return 63;
|
1142
|
+
case AT_DetachPartition: return 64;
|
1143
|
+
case AT_AddIdentity: return 65;
|
1144
|
+
case AT_SetIdentity: return 66;
|
1145
|
+
case AT_DropIdentity: return 67;
|
1146
|
+
}
|
1147
|
+
Assert(false);
|
1148
|
+
return -1;
|
1149
|
+
}
|
1150
|
+
|
1151
|
+
static int
|
1152
|
+
_enumToIntGrantTargetType(GrantTargetType value) {
|
1153
|
+
switch(value) {
|
1154
|
+
case ACL_TARGET_OBJECT: return 1;
|
1155
|
+
case ACL_TARGET_ALL_IN_SCHEMA: return 2;
|
1156
|
+
case ACL_TARGET_DEFAULTS: return 3;
|
1157
|
+
}
|
1158
|
+
Assert(false);
|
1159
|
+
return -1;
|
1160
|
+
}
|
1161
|
+
|
1162
|
+
static int
|
1163
|
+
_enumToIntVariableSetKind(VariableSetKind value) {
|
1164
|
+
switch(value) {
|
1165
|
+
case VAR_SET_VALUE: return 1;
|
1166
|
+
case VAR_SET_DEFAULT: return 2;
|
1167
|
+
case VAR_SET_CURRENT: return 3;
|
1168
|
+
case VAR_SET_MULTI: return 4;
|
1169
|
+
case VAR_RESET: return 5;
|
1170
|
+
case VAR_RESET_ALL: return 6;
|
1171
|
+
}
|
1172
|
+
Assert(false);
|
1173
|
+
return -1;
|
1174
|
+
}
|
1175
|
+
|
1176
|
+
static int
|
1177
|
+
_enumToIntConstrType(ConstrType value) {
|
1178
|
+
switch(value) {
|
1179
|
+
case CONSTR_NULL: return 1;
|
1180
|
+
case CONSTR_NOTNULL: return 2;
|
1181
|
+
case CONSTR_DEFAULT: return 3;
|
1182
|
+
case CONSTR_IDENTITY: return 4;
|
1183
|
+
case CONSTR_GENERATED: return 5;
|
1184
|
+
case CONSTR_CHECK: return 6;
|
1185
|
+
case CONSTR_PRIMARY: return 7;
|
1186
|
+
case CONSTR_UNIQUE: return 8;
|
1187
|
+
case CONSTR_EXCLUSION: return 9;
|
1188
|
+
case CONSTR_FOREIGN: return 10;
|
1189
|
+
case CONSTR_ATTR_DEFERRABLE: return 11;
|
1190
|
+
case CONSTR_ATTR_NOT_DEFERRABLE: return 12;
|
1191
|
+
case CONSTR_ATTR_DEFERRED: return 13;
|
1192
|
+
case CONSTR_ATTR_IMMEDIATE: return 14;
|
1193
|
+
}
|
1194
|
+
Assert(false);
|
1195
|
+
return -1;
|
1196
|
+
}
|
1197
|
+
|
1198
|
+
static int
|
1199
|
+
_enumToIntImportForeignSchemaType(ImportForeignSchemaType value) {
|
1200
|
+
switch(value) {
|
1201
|
+
case FDW_IMPORT_SCHEMA_ALL: return 1;
|
1202
|
+
case FDW_IMPORT_SCHEMA_LIMIT_TO: return 2;
|
1203
|
+
case FDW_IMPORT_SCHEMA_EXCEPT: return 3;
|
1204
|
+
}
|
1205
|
+
Assert(false);
|
1206
|
+
return -1;
|
1207
|
+
}
|
1208
|
+
|
1209
|
+
static int
|
1210
|
+
_enumToIntRoleStmtType(RoleStmtType value) {
|
1211
|
+
switch(value) {
|
1212
|
+
case ROLESTMT_ROLE: return 1;
|
1213
|
+
case ROLESTMT_USER: return 2;
|
1214
|
+
case ROLESTMT_GROUP: return 3;
|
1215
|
+
}
|
1216
|
+
Assert(false);
|
1217
|
+
return -1;
|
1218
|
+
}
|
1219
|
+
|
1220
|
+
static int
|
1221
|
+
_enumToIntFetchDirection(FetchDirection value) {
|
1222
|
+
switch(value) {
|
1223
|
+
case FETCH_FORWARD: return 1;
|
1224
|
+
case FETCH_BACKWARD: return 2;
|
1225
|
+
case FETCH_ABSOLUTE: return 3;
|
1226
|
+
case FETCH_RELATIVE: return 4;
|
1227
|
+
}
|
1228
|
+
Assert(false);
|
1229
|
+
return -1;
|
1230
|
+
}
|
1231
|
+
|
1232
|
+
static int
|
1233
|
+
_enumToIntFunctionParameterMode(FunctionParameterMode value) {
|
1234
|
+
switch(value) {
|
1235
|
+
case FUNC_PARAM_IN: return 1;
|
1236
|
+
case FUNC_PARAM_OUT: return 2;
|
1237
|
+
case FUNC_PARAM_INOUT: return 3;
|
1238
|
+
case FUNC_PARAM_VARIADIC: return 4;
|
1239
|
+
case FUNC_PARAM_TABLE: return 5;
|
1240
|
+
}
|
1241
|
+
Assert(false);
|
1242
|
+
return -1;
|
1243
|
+
}
|
1244
|
+
|
1245
|
+
static int
|
1246
|
+
_enumToIntTransactionStmtKind(TransactionStmtKind value) {
|
1247
|
+
switch(value) {
|
1248
|
+
case TRANS_STMT_BEGIN: return 1;
|
1249
|
+
case TRANS_STMT_START: return 2;
|
1250
|
+
case TRANS_STMT_COMMIT: return 3;
|
1251
|
+
case TRANS_STMT_ROLLBACK: return 4;
|
1252
|
+
case TRANS_STMT_SAVEPOINT: return 5;
|
1253
|
+
case TRANS_STMT_RELEASE: return 6;
|
1254
|
+
case TRANS_STMT_ROLLBACK_TO: return 7;
|
1255
|
+
case TRANS_STMT_PREPARE: return 8;
|
1256
|
+
case TRANS_STMT_COMMIT_PREPARED: return 9;
|
1257
|
+
case TRANS_STMT_ROLLBACK_PREPARED: return 10;
|
1258
|
+
}
|
1259
|
+
Assert(false);
|
1260
|
+
return -1;
|
1261
|
+
}
|
1262
|
+
|
1263
|
+
static int
|
1264
|
+
_enumToIntViewCheckOption(ViewCheckOption value) {
|
1265
|
+
switch(value) {
|
1266
|
+
case NO_CHECK_OPTION: return 1;
|
1267
|
+
case LOCAL_CHECK_OPTION: return 2;
|
1268
|
+
case CASCADED_CHECK_OPTION: return 3;
|
1269
|
+
}
|
1270
|
+
Assert(false);
|
1271
|
+
return -1;
|
1272
|
+
}
|
1273
|
+
|
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
|
+
static int
|
1285
|
+
_enumToIntDiscardMode(DiscardMode value) {
|
1286
|
+
switch(value) {
|
1287
|
+
case DISCARD_ALL: return 1;
|
1288
|
+
case DISCARD_PLANS: return 2;
|
1289
|
+
case DISCARD_SEQUENCES: return 3;
|
1290
|
+
case DISCARD_TEMP: return 4;
|
1291
|
+
}
|
1292
|
+
Assert(false);
|
1293
|
+
return -1;
|
1294
|
+
}
|
1295
|
+
|
1296
|
+
static int
|
1297
|
+
_enumToIntReindexObjectType(ReindexObjectType value) {
|
1298
|
+
switch(value) {
|
1299
|
+
case REINDEX_OBJECT_INDEX: return 1;
|
1300
|
+
case REINDEX_OBJECT_TABLE: return 2;
|
1301
|
+
case REINDEX_OBJECT_SCHEMA: return 3;
|
1302
|
+
case REINDEX_OBJECT_SYSTEM: return 4;
|
1303
|
+
case REINDEX_OBJECT_DATABASE: return 5;
|
1304
|
+
}
|
1305
|
+
Assert(false);
|
1306
|
+
return -1;
|
1307
|
+
}
|
1308
|
+
|
1309
|
+
static int
|
1310
|
+
_enumToIntAlterTSConfigType(AlterTSConfigType value) {
|
1311
|
+
switch(value) {
|
1312
|
+
case ALTER_TSCONFIG_ADD_MAPPING: return 1;
|
1313
|
+
case ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN: return 2;
|
1314
|
+
case ALTER_TSCONFIG_REPLACE_DICT: return 3;
|
1315
|
+
case ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN: return 4;
|
1316
|
+
case ALTER_TSCONFIG_DROP_MAPPING: return 5;
|
1317
|
+
}
|
1318
|
+
Assert(false);
|
1319
|
+
return -1;
|
1320
|
+
}
|
1321
|
+
|
1322
|
+
static int
|
1323
|
+
_enumToIntAlterSubscriptionType(AlterSubscriptionType value) {
|
1324
|
+
switch(value) {
|
1325
|
+
case ALTER_SUBSCRIPTION_OPTIONS: return 1;
|
1326
|
+
case ALTER_SUBSCRIPTION_CONNECTION: return 2;
|
1327
|
+
case ALTER_SUBSCRIPTION_PUBLICATION: return 3;
|
1328
|
+
case ALTER_SUBSCRIPTION_REFRESH: return 4;
|
1329
|
+
case ALTER_SUBSCRIPTION_ENABLED: return 5;
|
1330
|
+
}
|
1331
|
+
Assert(false);
|
1332
|
+
return -1;
|
1333
|
+
}
|
1334
|
+
|
1335
|
+
static int
|
1336
|
+
_enumToIntOnCommitAction(OnCommitAction value) {
|
1337
|
+
switch(value) {
|
1338
|
+
case ONCOMMIT_NOOP: return 1;
|
1339
|
+
case ONCOMMIT_PRESERVE_ROWS: return 2;
|
1340
|
+
case ONCOMMIT_DELETE_ROWS: return 3;
|
1341
|
+
case ONCOMMIT_DROP: return 4;
|
1342
|
+
}
|
1343
|
+
Assert(false);
|
1344
|
+
return -1;
|
1345
|
+
}
|
1346
|
+
|
1347
|
+
static int
|
1348
|
+
_enumToIntParamKind(ParamKind value) {
|
1349
|
+
switch(value) {
|
1350
|
+
case PARAM_EXTERN: return 1;
|
1351
|
+
case PARAM_EXEC: return 2;
|
1352
|
+
case PARAM_SUBLINK: return 3;
|
1353
|
+
case PARAM_MULTIEXPR: return 4;
|
1354
|
+
}
|
1355
|
+
Assert(false);
|
1356
|
+
return -1;
|
1357
|
+
}
|
1358
|
+
|
1359
|
+
static int
|
1360
|
+
_enumToIntCoercionContext(CoercionContext value) {
|
1361
|
+
switch(value) {
|
1362
|
+
case COERCION_IMPLICIT: return 1;
|
1363
|
+
case COERCION_ASSIGNMENT: return 2;
|
1364
|
+
case COERCION_EXPLICIT: return 3;
|
1365
|
+
}
|
1366
|
+
Assert(false);
|
1367
|
+
return -1;
|
1368
|
+
}
|
1369
|
+
|
1370
|
+
static int
|
1371
|
+
_enumToIntCoercionForm(CoercionForm value) {
|
1372
|
+
switch(value) {
|
1373
|
+
case COERCE_EXPLICIT_CALL: return 1;
|
1374
|
+
case COERCE_EXPLICIT_CAST: return 2;
|
1375
|
+
case COERCE_IMPLICIT_CAST: return 3;
|
1376
|
+
}
|
1377
|
+
Assert(false);
|
1378
|
+
return -1;
|
1379
|
+
}
|
1380
|
+
|
1381
|
+
static int
|
1382
|
+
_enumToIntBoolExprType(BoolExprType value) {
|
1383
|
+
switch(value) {
|
1384
|
+
case AND_EXPR: return 1;
|
1385
|
+
case OR_EXPR: return 2;
|
1386
|
+
case NOT_EXPR: return 3;
|
1387
|
+
}
|
1388
|
+
Assert(false);
|
1389
|
+
return -1;
|
1390
|
+
}
|
1391
|
+
|
1392
|
+
static int
|
1393
|
+
_enumToIntSubLinkType(SubLinkType value) {
|
1394
|
+
switch(value) {
|
1395
|
+
case EXISTS_SUBLINK: return 1;
|
1396
|
+
case ALL_SUBLINK: return 2;
|
1397
|
+
case ANY_SUBLINK: return 3;
|
1398
|
+
case ROWCOMPARE_SUBLINK: return 4;
|
1399
|
+
case EXPR_SUBLINK: return 5;
|
1400
|
+
case MULTIEXPR_SUBLINK: return 6;
|
1401
|
+
case ARRAY_SUBLINK: return 7;
|
1402
|
+
case CTE_SUBLINK: return 8;
|
1403
|
+
}
|
1404
|
+
Assert(false);
|
1405
|
+
return -1;
|
1406
|
+
}
|
1407
|
+
|
1408
|
+
static int
|
1409
|
+
_enumToIntRowCompareType(RowCompareType value) {
|
1410
|
+
switch(value) {
|
1411
|
+
case ROWCOMPARE_LT: return 1;
|
1412
|
+
case ROWCOMPARE_LE: return 2;
|
1413
|
+
case ROWCOMPARE_EQ: return 3;
|
1414
|
+
case ROWCOMPARE_GE: return 4;
|
1415
|
+
case ROWCOMPARE_GT: return 5;
|
1416
|
+
case ROWCOMPARE_NE: return 6;
|
1417
|
+
}
|
1418
|
+
Assert(false);
|
1419
|
+
return -1;
|
1420
|
+
}
|
1421
|
+
|
1422
|
+
static int
|
1423
|
+
_enumToIntMinMaxOp(MinMaxOp value) {
|
1424
|
+
switch(value) {
|
1425
|
+
case IS_GREATEST: return 1;
|
1426
|
+
case IS_LEAST: return 2;
|
1427
|
+
}
|
1428
|
+
Assert(false);
|
1429
|
+
return -1;
|
1430
|
+
}
|
1431
|
+
|
1432
|
+
static int
|
1433
|
+
_enumToIntSQLValueFunctionOp(SQLValueFunctionOp value) {
|
1434
|
+
switch(value) {
|
1435
|
+
case SVFOP_CURRENT_DATE: return 1;
|
1436
|
+
case SVFOP_CURRENT_TIME: return 2;
|
1437
|
+
case SVFOP_CURRENT_TIME_N: return 3;
|
1438
|
+
case SVFOP_CURRENT_TIMESTAMP: return 4;
|
1439
|
+
case SVFOP_CURRENT_TIMESTAMP_N: return 5;
|
1440
|
+
case SVFOP_LOCALTIME: return 6;
|
1441
|
+
case SVFOP_LOCALTIME_N: return 7;
|
1442
|
+
case SVFOP_LOCALTIMESTAMP: return 8;
|
1443
|
+
case SVFOP_LOCALTIMESTAMP_N: return 9;
|
1444
|
+
case SVFOP_CURRENT_ROLE: return 10;
|
1445
|
+
case SVFOP_CURRENT_USER: return 11;
|
1446
|
+
case SVFOP_USER: return 12;
|
1447
|
+
case SVFOP_SESSION_USER: return 13;
|
1448
|
+
case SVFOP_CURRENT_CATALOG: return 14;
|
1449
|
+
case SVFOP_CURRENT_SCHEMA: return 15;
|
1450
|
+
}
|
1451
|
+
Assert(false);
|
1452
|
+
return -1;
|
1453
|
+
}
|
1454
|
+
|
1455
|
+
static int
|
1456
|
+
_enumToIntXmlExprOp(XmlExprOp value) {
|
1457
|
+
switch(value) {
|
1458
|
+
case IS_XMLCONCAT: return 1;
|
1459
|
+
case IS_XMLELEMENT: return 2;
|
1460
|
+
case IS_XMLFOREST: return 3;
|
1461
|
+
case IS_XMLPARSE: return 4;
|
1462
|
+
case IS_XMLPI: return 5;
|
1463
|
+
case IS_XMLROOT: return 6;
|
1464
|
+
case IS_XMLSERIALIZE: return 7;
|
1465
|
+
case IS_DOCUMENT: return 8;
|
1466
|
+
}
|
1467
|
+
Assert(false);
|
1468
|
+
return -1;
|
1469
|
+
}
|
1470
|
+
|
1471
|
+
static int
|
1472
|
+
_enumToIntXmlOptionType(XmlOptionType value) {
|
1473
|
+
switch(value) {
|
1474
|
+
case XMLOPTION_DOCUMENT: return 1;
|
1475
|
+
case XMLOPTION_CONTENT: return 2;
|
1476
|
+
}
|
1477
|
+
Assert(false);
|
1478
|
+
return -1;
|
1479
|
+
}
|
1480
|
+
|
1481
|
+
static int
|
1482
|
+
_enumToIntNullTestType(NullTestType value) {
|
1483
|
+
switch(value) {
|
1484
|
+
case IS_NULL: return 1;
|
1485
|
+
case IS_NOT_NULL: return 2;
|
1486
|
+
}
|
1487
|
+
Assert(false);
|
1488
|
+
return -1;
|
1489
|
+
}
|
1490
|
+
|
1491
|
+
static int
|
1492
|
+
_enumToIntBoolTestType(BoolTestType value) {
|
1493
|
+
switch(value) {
|
1494
|
+
case IS_TRUE: return 1;
|
1495
|
+
case IS_NOT_TRUE: return 2;
|
1496
|
+
case IS_FALSE: return 3;
|
1497
|
+
case IS_NOT_FALSE: return 4;
|
1498
|
+
case IS_UNKNOWN: return 5;
|
1499
|
+
case IS_NOT_UNKNOWN: return 6;
|
1500
|
+
}
|
1501
|
+
Assert(false);
|
1502
|
+
return -1;
|
1503
|
+
}
|
1504
|
+
|
1505
|
+
static int
|
1506
|
+
_enumToIntCmdType(CmdType value) {
|
1507
|
+
switch(value) {
|
1508
|
+
case CMD_UNKNOWN: return 1;
|
1509
|
+
case CMD_SELECT: return 2;
|
1510
|
+
case CMD_UPDATE: return 3;
|
1511
|
+
case CMD_INSERT: return 4;
|
1512
|
+
case CMD_DELETE: return 5;
|
1513
|
+
case CMD_UTILITY: return 6;
|
1514
|
+
case CMD_NOTHING: return 7;
|
1515
|
+
}
|
1516
|
+
Assert(false);
|
1517
|
+
return -1;
|
1518
|
+
}
|
1519
|
+
|
1520
|
+
static int
|
1521
|
+
_enumToIntJoinType(JoinType value) {
|
1522
|
+
switch(value) {
|
1523
|
+
case JOIN_INNER: return 1;
|
1524
|
+
case JOIN_LEFT: return 2;
|
1525
|
+
case JOIN_FULL: return 3;
|
1526
|
+
case JOIN_RIGHT: return 4;
|
1527
|
+
case JOIN_SEMI: return 5;
|
1528
|
+
case JOIN_ANTI: return 6;
|
1529
|
+
case JOIN_UNIQUE_OUTER: return 7;
|
1530
|
+
case JOIN_UNIQUE_INNER: return 8;
|
1531
|
+
}
|
1532
|
+
Assert(false);
|
1533
|
+
return -1;
|
1534
|
+
}
|
1535
|
+
|
1536
|
+
static int
|
1537
|
+
_enumToIntAggStrategy(AggStrategy value) {
|
1538
|
+
switch(value) {
|
1539
|
+
case AGG_PLAIN: return 1;
|
1540
|
+
case AGG_SORTED: return 2;
|
1541
|
+
case AGG_HASHED: return 3;
|
1542
|
+
case AGG_MIXED: return 4;
|
1543
|
+
}
|
1544
|
+
Assert(false);
|
1545
|
+
return -1;
|
1546
|
+
}
|
1547
|
+
|
1548
|
+
static int
|
1549
|
+
_enumToIntAggSplit(AggSplit value) {
|
1550
|
+
switch(value) {
|
1551
|
+
case AGGSPLIT_SIMPLE: return 1;
|
1552
|
+
case AGGSPLIT_INITIAL_SERIAL: return 2;
|
1553
|
+
case AGGSPLIT_FINAL_DESERIAL: return 3;
|
1554
|
+
}
|
1555
|
+
Assert(false);
|
1556
|
+
return -1;
|
1557
|
+
}
|
1558
|
+
|
1559
|
+
static int
|
1560
|
+
_enumToIntSetOpCmd(SetOpCmd value) {
|
1561
|
+
switch(value) {
|
1562
|
+
case SETOPCMD_INTERSECT: return 1;
|
1563
|
+
case SETOPCMD_INTERSECT_ALL: return 2;
|
1564
|
+
case SETOPCMD_EXCEPT: return 3;
|
1565
|
+
case SETOPCMD_EXCEPT_ALL: return 4;
|
1566
|
+
}
|
1567
|
+
Assert(false);
|
1568
|
+
return -1;
|
1569
|
+
}
|
1570
|
+
|
1571
|
+
static int
|
1572
|
+
_enumToIntSetOpStrategy(SetOpStrategy value) {
|
1573
|
+
switch(value) {
|
1574
|
+
case SETOP_SORTED: return 1;
|
1575
|
+
case SETOP_HASHED: return 2;
|
1576
|
+
}
|
1577
|
+
Assert(false);
|
1578
|
+
return -1;
|
1579
|
+
}
|
1580
|
+
|
1581
|
+
static int
|
1582
|
+
_enumToIntOnConflictAction(OnConflictAction value) {
|
1583
|
+
switch(value) {
|
1584
|
+
case ONCONFLICT_NONE: return 1;
|
1585
|
+
case ONCONFLICT_NOTHING: return 2;
|
1586
|
+
case ONCONFLICT_UPDATE: return 3;
|
1587
|
+
}
|
1588
|
+
Assert(false);
|
1589
|
+
return -1;
|
1590
|
+
}
|
1591
|
+
|
1592
|
+
static int
|
1593
|
+
_enumToIntLimitOption(LimitOption value) {
|
1594
|
+
switch(value) {
|
1595
|
+
case LIMIT_OPTION_DEFAULT: return 1;
|
1596
|
+
case LIMIT_OPTION_COUNT: return 2;
|
1597
|
+
case LIMIT_OPTION_WITH_TIES: return 3;
|
1598
|
+
}
|
1599
|
+
Assert(false);
|
1600
|
+
return -1;
|
1601
|
+
}
|
1602
|
+
|
1603
|
+
static int
|
1604
|
+
_enumToIntLockClauseStrength(LockClauseStrength value) {
|
1605
|
+
switch(value) {
|
1606
|
+
case LCS_NONE: return 1;
|
1607
|
+
case LCS_FORKEYSHARE: return 2;
|
1608
|
+
case LCS_FORSHARE: return 3;
|
1609
|
+
case LCS_FORNOKEYUPDATE: return 4;
|
1610
|
+
case LCS_FORUPDATE: return 5;
|
1611
|
+
}
|
1612
|
+
Assert(false);
|
1613
|
+
return -1;
|
1614
|
+
}
|
1615
|
+
|
1616
|
+
static int
|
1617
|
+
_enumToIntLockWaitPolicy(LockWaitPolicy value) {
|
1618
|
+
switch(value) {
|
1619
|
+
case LockWaitBlock: return 1;
|
1620
|
+
case LockWaitSkip: return 2;
|
1621
|
+
case LockWaitError: return 3;
|
1622
|
+
}
|
1623
|
+
Assert(false);
|
1624
|
+
return -1;
|
1625
|
+
}
|
1626
|
+
|
1627
|
+
static int
|
1628
|
+
_enumToIntLockTupleMode(LockTupleMode value) {
|
1629
|
+
switch(value) {
|
1630
|
+
case LockTupleKeyShare: return 1;
|
1631
|
+
case LockTupleShare: return 2;
|
1632
|
+
case LockTupleNoKeyExclusive: return 3;
|
1633
|
+
case LockTupleExclusive: return 4;
|
1634
|
+
}
|
1635
|
+
Assert(false);
|
1636
|
+
return -1;
|
1637
|
+
}static OverridingKind
|
1638
|
+
_intToEnumOverridingKind(int value) {
|
1639
|
+
switch(value) {
|
1640
|
+
case 1: return OVERRIDING_NOT_SET;
|
1641
|
+
case 2: return OVERRIDING_USER_VALUE;
|
1642
|
+
case 3: return OVERRIDING_SYSTEM_VALUE;
|
1643
|
+
}
|
1644
|
+
Assert(false);
|
1645
|
+
return OVERRIDING_NOT_SET;
|
1646
|
+
}
|
1647
|
+
|
1648
|
+
static QuerySource
|
1649
|
+
_intToEnumQuerySource(int value) {
|
1650
|
+
switch(value) {
|
1651
|
+
case 1: return QSRC_ORIGINAL;
|
1652
|
+
case 2: return QSRC_PARSER;
|
1653
|
+
case 3: return QSRC_INSTEAD_RULE;
|
1654
|
+
case 4: return QSRC_QUAL_INSTEAD_RULE;
|
1655
|
+
case 5: return QSRC_NON_INSTEAD_RULE;
|
1656
|
+
}
|
1657
|
+
Assert(false);
|
1658
|
+
return QSRC_ORIGINAL;
|
1659
|
+
}
|
1660
|
+
|
1661
|
+
static SortByDir
|
1662
|
+
_intToEnumSortByDir(int value) {
|
1663
|
+
switch(value) {
|
1664
|
+
case 1: return SORTBY_DEFAULT;
|
1665
|
+
case 2: return SORTBY_ASC;
|
1666
|
+
case 3: return SORTBY_DESC;
|
1667
|
+
case 4: return SORTBY_USING;
|
1668
|
+
}
|
1669
|
+
Assert(false);
|
1670
|
+
return SORTBY_DEFAULT;
|
1671
|
+
}
|
1672
|
+
|
1673
|
+
static SortByNulls
|
1674
|
+
_intToEnumSortByNulls(int value) {
|
1675
|
+
switch(value) {
|
1676
|
+
case 1: return SORTBY_NULLS_DEFAULT;
|
1677
|
+
case 2: return SORTBY_NULLS_FIRST;
|
1678
|
+
case 3: return SORTBY_NULLS_LAST;
|
1679
|
+
}
|
1680
|
+
Assert(false);
|
1681
|
+
return SORTBY_NULLS_DEFAULT;
|
1682
|
+
}
|
1683
|
+
|
1684
|
+
static A_Expr_Kind
|
1685
|
+
_intToEnumA_Expr_Kind(int value) {
|
1686
|
+
switch(value) {
|
1687
|
+
case 1: return AEXPR_OP;
|
1688
|
+
case 2: return AEXPR_OP_ANY;
|
1689
|
+
case 3: return AEXPR_OP_ALL;
|
1690
|
+
case 4: return AEXPR_DISTINCT;
|
1691
|
+
case 5: return AEXPR_NOT_DISTINCT;
|
1692
|
+
case 6: return AEXPR_NULLIF;
|
1693
|
+
case 7: return AEXPR_OF;
|
1694
|
+
case 8: return AEXPR_IN;
|
1695
|
+
case 9: return AEXPR_LIKE;
|
1696
|
+
case 10: return AEXPR_ILIKE;
|
1697
|
+
case 11: return AEXPR_SIMILAR;
|
1698
|
+
case 12: return AEXPR_BETWEEN;
|
1699
|
+
case 13: return AEXPR_NOT_BETWEEN;
|
1700
|
+
case 14: return AEXPR_BETWEEN_SYM;
|
1701
|
+
case 15: return AEXPR_NOT_BETWEEN_SYM;
|
1702
|
+
case 16: return AEXPR_PAREN;
|
1703
|
+
}
|
1704
|
+
Assert(false);
|
1705
|
+
return AEXPR_OP;
|
1706
|
+
}
|
1707
|
+
|
1708
|
+
static RoleSpecType
|
1709
|
+
_intToEnumRoleSpecType(int value) {
|
1710
|
+
switch(value) {
|
1711
|
+
case 1: return ROLESPEC_CSTRING;
|
1712
|
+
case 2: return ROLESPEC_CURRENT_USER;
|
1713
|
+
case 3: return ROLESPEC_SESSION_USER;
|
1714
|
+
case 4: return ROLESPEC_PUBLIC;
|
1715
|
+
}
|
1716
|
+
Assert(false);
|
1717
|
+
return ROLESPEC_CSTRING;
|
1718
|
+
}
|
1719
|
+
|
1720
|
+
static TableLikeOption
|
1721
|
+
_intToEnumTableLikeOption(int value) {
|
1722
|
+
switch(value) {
|
1723
|
+
case 1: return CREATE_TABLE_LIKE_COMMENTS;
|
1724
|
+
case 2: return CREATE_TABLE_LIKE_CONSTRAINTS;
|
1725
|
+
case 3: return CREATE_TABLE_LIKE_DEFAULTS;
|
1726
|
+
case 4: return CREATE_TABLE_LIKE_GENERATED;
|
1727
|
+
case 5: return CREATE_TABLE_LIKE_IDENTITY;
|
1728
|
+
case 6: return CREATE_TABLE_LIKE_INDEXES;
|
1729
|
+
case 7: return CREATE_TABLE_LIKE_STATISTICS;
|
1730
|
+
case 8: return CREATE_TABLE_LIKE_STORAGE;
|
1731
|
+
case 9: return CREATE_TABLE_LIKE_ALL;
|
1732
|
+
}
|
1733
|
+
Assert(false);
|
1734
|
+
return CREATE_TABLE_LIKE_COMMENTS;
|
1735
|
+
}
|
1736
|
+
|
1737
|
+
static DefElemAction
|
1738
|
+
_intToEnumDefElemAction(int value) {
|
1739
|
+
switch(value) {
|
1740
|
+
case 1: return DEFELEM_UNSPEC;
|
1741
|
+
case 2: return DEFELEM_SET;
|
1742
|
+
case 3: return DEFELEM_ADD;
|
1743
|
+
case 4: return DEFELEM_DROP;
|
1744
|
+
}
|
1745
|
+
Assert(false);
|
1746
|
+
return DEFELEM_UNSPEC;
|
1747
|
+
}
|
1748
|
+
|
1749
|
+
static PartitionRangeDatumKind
|
1750
|
+
_intToEnumPartitionRangeDatumKind(int value) {
|
1751
|
+
switch(value) {
|
1752
|
+
case 1: return PARTITION_RANGE_DATUM_MINVALUE;
|
1753
|
+
case 2: return PARTITION_RANGE_DATUM_VALUE;
|
1754
|
+
case 3: return PARTITION_RANGE_DATUM_MAXVALUE;
|
1755
|
+
}
|
1756
|
+
Assert(false);
|
1757
|
+
return PARTITION_RANGE_DATUM_MINVALUE;
|
1758
|
+
}
|
1759
|
+
|
1760
|
+
static RTEKind
|
1761
|
+
_intToEnumRTEKind(int value) {
|
1762
|
+
switch(value) {
|
1763
|
+
case 1: return RTE_RELATION;
|
1764
|
+
case 2: return RTE_SUBQUERY;
|
1765
|
+
case 3: return RTE_JOIN;
|
1766
|
+
case 4: return RTE_FUNCTION;
|
1767
|
+
case 5: return RTE_TABLEFUNC;
|
1768
|
+
case 6: return RTE_VALUES;
|
1769
|
+
case 7: return RTE_CTE;
|
1770
|
+
case 8: return RTE_NAMEDTUPLESTORE;
|
1771
|
+
case 9: return RTE_RESULT;
|
1772
|
+
}
|
1773
|
+
Assert(false);
|
1774
|
+
return RTE_RELATION;
|
1775
|
+
}
|
1776
|
+
|
1777
|
+
static WCOKind
|
1778
|
+
_intToEnumWCOKind(int value) {
|
1779
|
+
switch(value) {
|
1780
|
+
case 1: return WCO_VIEW_CHECK;
|
1781
|
+
case 2: return WCO_RLS_INSERT_CHECK;
|
1782
|
+
case 3: return WCO_RLS_UPDATE_CHECK;
|
1783
|
+
case 4: return WCO_RLS_CONFLICT_CHECK;
|
1784
|
+
}
|
1785
|
+
Assert(false);
|
1786
|
+
return WCO_VIEW_CHECK;
|
1787
|
+
}
|
1788
|
+
|
1789
|
+
static GroupingSetKind
|
1790
|
+
_intToEnumGroupingSetKind(int value) {
|
1791
|
+
switch(value) {
|
1792
|
+
case 1: return GROUPING_SET_EMPTY;
|
1793
|
+
case 2: return GROUPING_SET_SIMPLE;
|
1794
|
+
case 3: return GROUPING_SET_ROLLUP;
|
1795
|
+
case 4: return GROUPING_SET_CUBE;
|
1796
|
+
case 5: return GROUPING_SET_SETS;
|
1797
|
+
}
|
1798
|
+
Assert(false);
|
1799
|
+
return GROUPING_SET_EMPTY;
|
1800
|
+
}
|
1801
|
+
|
1802
|
+
static CTEMaterialize
|
1803
|
+
_intToEnumCTEMaterialize(int value) {
|
1804
|
+
switch(value) {
|
1805
|
+
case 1: return CTEMaterializeDefault;
|
1806
|
+
case 2: return CTEMaterializeAlways;
|
1807
|
+
case 3: return CTEMaterializeNever;
|
1808
|
+
}
|
1809
|
+
Assert(false);
|
1810
|
+
return CTEMaterializeDefault;
|
1811
|
+
}
|
1812
|
+
|
1813
|
+
static SetOperation
|
1814
|
+
_intToEnumSetOperation(int value) {
|
1815
|
+
switch(value) {
|
1816
|
+
case 1: return SETOP_NONE;
|
1817
|
+
case 2: return SETOP_UNION;
|
1818
|
+
case 3: return SETOP_INTERSECT;
|
1819
|
+
case 4: return SETOP_EXCEPT;
|
1820
|
+
}
|
1821
|
+
Assert(false);
|
1822
|
+
return SETOP_NONE;
|
1823
|
+
}
|
1824
|
+
|
1825
|
+
static ObjectType
|
1826
|
+
_intToEnumObjectType(int value) {
|
1827
|
+
switch(value) {
|
1828
|
+
case 1: return OBJECT_ACCESS_METHOD;
|
1829
|
+
case 2: return OBJECT_AGGREGATE;
|
1830
|
+
case 3: return OBJECT_AMOP;
|
1831
|
+
case 4: return OBJECT_AMPROC;
|
1832
|
+
case 5: return OBJECT_ATTRIBUTE;
|
1833
|
+
case 6: return OBJECT_CAST;
|
1834
|
+
case 7: return OBJECT_COLUMN;
|
1835
|
+
case 8: return OBJECT_COLLATION;
|
1836
|
+
case 9: return OBJECT_CONVERSION;
|
1837
|
+
case 10: return OBJECT_DATABASE;
|
1838
|
+
case 11: return OBJECT_DEFAULT;
|
1839
|
+
case 12: return OBJECT_DEFACL;
|
1840
|
+
case 13: return OBJECT_DOMAIN;
|
1841
|
+
case 14: return OBJECT_DOMCONSTRAINT;
|
1842
|
+
case 15: return OBJECT_EVENT_TRIGGER;
|
1843
|
+
case 16: return OBJECT_EXTENSION;
|
1844
|
+
case 17: return OBJECT_FDW;
|
1845
|
+
case 18: return OBJECT_FOREIGN_SERVER;
|
1846
|
+
case 19: return OBJECT_FOREIGN_TABLE;
|
1847
|
+
case 20: return OBJECT_FUNCTION;
|
1848
|
+
case 21: return OBJECT_INDEX;
|
1849
|
+
case 22: return OBJECT_LANGUAGE;
|
1850
|
+
case 23: return OBJECT_LARGEOBJECT;
|
1851
|
+
case 24: return OBJECT_MATVIEW;
|
1852
|
+
case 25: return OBJECT_OPCLASS;
|
1853
|
+
case 26: return OBJECT_OPERATOR;
|
1854
|
+
case 27: return OBJECT_OPFAMILY;
|
1855
|
+
case 28: return OBJECT_POLICY;
|
1856
|
+
case 29: return OBJECT_PROCEDURE;
|
1857
|
+
case 30: return OBJECT_PUBLICATION;
|
1858
|
+
case 31: return OBJECT_PUBLICATION_REL;
|
1859
|
+
case 32: return OBJECT_ROLE;
|
1860
|
+
case 33: return OBJECT_ROUTINE;
|
1861
|
+
case 34: return OBJECT_RULE;
|
1862
|
+
case 35: return OBJECT_SCHEMA;
|
1863
|
+
case 36: return OBJECT_SEQUENCE;
|
1864
|
+
case 37: return OBJECT_SUBSCRIPTION;
|
1865
|
+
case 38: return OBJECT_STATISTIC_EXT;
|
1866
|
+
case 39: return OBJECT_TABCONSTRAINT;
|
1867
|
+
case 40: return OBJECT_TABLE;
|
1868
|
+
case 41: return OBJECT_TABLESPACE;
|
1869
|
+
case 42: return OBJECT_TRANSFORM;
|
1870
|
+
case 43: return OBJECT_TRIGGER;
|
1871
|
+
case 44: return OBJECT_TSCONFIGURATION;
|
1872
|
+
case 45: return OBJECT_TSDICTIONARY;
|
1873
|
+
case 46: return OBJECT_TSPARSER;
|
1874
|
+
case 47: return OBJECT_TSTEMPLATE;
|
1875
|
+
case 48: return OBJECT_TYPE;
|
1876
|
+
case 49: return OBJECT_USER_MAPPING;
|
1877
|
+
case 50: return OBJECT_VIEW;
|
1878
|
+
}
|
1879
|
+
Assert(false);
|
1880
|
+
return OBJECT_ACCESS_METHOD;
|
1881
|
+
}
|
1882
|
+
|
1883
|
+
static DropBehavior
|
1884
|
+
_intToEnumDropBehavior(int value) {
|
1885
|
+
switch(value) {
|
1886
|
+
case 1: return DROP_RESTRICT;
|
1887
|
+
case 2: return DROP_CASCADE;
|
1888
|
+
}
|
1889
|
+
Assert(false);
|
1890
|
+
return DROP_RESTRICT;
|
1891
|
+
}
|
1892
|
+
|
1893
|
+
static AlterTableType
|
1894
|
+
_intToEnumAlterTableType(int value) {
|
1895
|
+
switch(value) {
|
1896
|
+
case 1: return AT_AddColumn;
|
1897
|
+
case 2: return AT_AddColumnRecurse;
|
1898
|
+
case 3: return AT_AddColumnToView;
|
1899
|
+
case 4: return AT_ColumnDefault;
|
1900
|
+
case 5: return AT_CookedColumnDefault;
|
1901
|
+
case 6: return AT_DropNotNull;
|
1902
|
+
case 7: return AT_SetNotNull;
|
1903
|
+
case 8: return AT_DropExpression;
|
1904
|
+
case 9: return AT_CheckNotNull;
|
1905
|
+
case 10: return AT_SetStatistics;
|
1906
|
+
case 11: return AT_SetOptions;
|
1907
|
+
case 12: return AT_ResetOptions;
|
1908
|
+
case 13: return AT_SetStorage;
|
1909
|
+
case 14: return AT_DropColumn;
|
1910
|
+
case 15: return AT_DropColumnRecurse;
|
1911
|
+
case 16: return AT_AddIndex;
|
1912
|
+
case 17: return AT_ReAddIndex;
|
1913
|
+
case 18: return AT_AddConstraint;
|
1914
|
+
case 19: return AT_AddConstraintRecurse;
|
1915
|
+
case 20: return AT_ReAddConstraint;
|
1916
|
+
case 21: return AT_ReAddDomainConstraint;
|
1917
|
+
case 22: return AT_AlterConstraint;
|
1918
|
+
case 23: return AT_ValidateConstraint;
|
1919
|
+
case 24: return AT_ValidateConstraintRecurse;
|
1920
|
+
case 25: return AT_AddIndexConstraint;
|
1921
|
+
case 26: return AT_DropConstraint;
|
1922
|
+
case 27: return AT_DropConstraintRecurse;
|
1923
|
+
case 28: return AT_ReAddComment;
|
1924
|
+
case 29: return AT_AlterColumnType;
|
1925
|
+
case 30: return AT_AlterColumnGenericOptions;
|
1926
|
+
case 31: return AT_ChangeOwner;
|
1927
|
+
case 32: return AT_ClusterOn;
|
1928
|
+
case 33: return AT_DropCluster;
|
1929
|
+
case 34: return AT_SetLogged;
|
1930
|
+
case 35: return AT_SetUnLogged;
|
1931
|
+
case 36: return AT_DropOids;
|
1932
|
+
case 37: return AT_SetTableSpace;
|
1933
|
+
case 38: return AT_SetRelOptions;
|
1934
|
+
case 39: return AT_ResetRelOptions;
|
1935
|
+
case 40: return AT_ReplaceRelOptions;
|
1936
|
+
case 41: return AT_EnableTrig;
|
1937
|
+
case 42: return AT_EnableAlwaysTrig;
|
1938
|
+
case 43: return AT_EnableReplicaTrig;
|
1939
|
+
case 44: return AT_DisableTrig;
|
1940
|
+
case 45: return AT_EnableTrigAll;
|
1941
|
+
case 46: return AT_DisableTrigAll;
|
1942
|
+
case 47: return AT_EnableTrigUser;
|
1943
|
+
case 48: return AT_DisableTrigUser;
|
1944
|
+
case 49: return AT_EnableRule;
|
1945
|
+
case 50: return AT_EnableAlwaysRule;
|
1946
|
+
case 51: return AT_EnableReplicaRule;
|
1947
|
+
case 52: return AT_DisableRule;
|
1948
|
+
case 53: return AT_AddInherit;
|
1949
|
+
case 54: return AT_DropInherit;
|
1950
|
+
case 55: return AT_AddOf;
|
1951
|
+
case 56: return AT_DropOf;
|
1952
|
+
case 57: return AT_ReplicaIdentity;
|
1953
|
+
case 58: return AT_EnableRowSecurity;
|
1954
|
+
case 59: return AT_DisableRowSecurity;
|
1955
|
+
case 60: return AT_ForceRowSecurity;
|
1956
|
+
case 61: return AT_NoForceRowSecurity;
|
1957
|
+
case 62: return AT_GenericOptions;
|
1958
|
+
case 63: return AT_AttachPartition;
|
1959
|
+
case 64: return AT_DetachPartition;
|
1960
|
+
case 65: return AT_AddIdentity;
|
1961
|
+
case 66: return AT_SetIdentity;
|
1962
|
+
case 67: return AT_DropIdentity;
|
1963
|
+
}
|
1964
|
+
Assert(false);
|
1965
|
+
return AT_AddColumn;
|
1966
|
+
}
|
1967
|
+
|
1968
|
+
static GrantTargetType
|
1969
|
+
_intToEnumGrantTargetType(int value) {
|
1970
|
+
switch(value) {
|
1971
|
+
case 1: return ACL_TARGET_OBJECT;
|
1972
|
+
case 2: return ACL_TARGET_ALL_IN_SCHEMA;
|
1973
|
+
case 3: return ACL_TARGET_DEFAULTS;
|
1974
|
+
}
|
1975
|
+
Assert(false);
|
1976
|
+
return ACL_TARGET_OBJECT;
|
1977
|
+
}
|
1978
|
+
|
1979
|
+
static VariableSetKind
|
1980
|
+
_intToEnumVariableSetKind(int value) {
|
1981
|
+
switch(value) {
|
1982
|
+
case 1: return VAR_SET_VALUE;
|
1983
|
+
case 2: return VAR_SET_DEFAULT;
|
1984
|
+
case 3: return VAR_SET_CURRENT;
|
1985
|
+
case 4: return VAR_SET_MULTI;
|
1986
|
+
case 5: return VAR_RESET;
|
1987
|
+
case 6: return VAR_RESET_ALL;
|
1988
|
+
}
|
1989
|
+
Assert(false);
|
1990
|
+
return VAR_SET_VALUE;
|
1991
|
+
}
|
1992
|
+
|
1993
|
+
static ConstrType
|
1994
|
+
_intToEnumConstrType(int value) {
|
1995
|
+
switch(value) {
|
1996
|
+
case 1: return CONSTR_NULL;
|
1997
|
+
case 2: return CONSTR_NOTNULL;
|
1998
|
+
case 3: return CONSTR_DEFAULT;
|
1999
|
+
case 4: return CONSTR_IDENTITY;
|
2000
|
+
case 5: return CONSTR_GENERATED;
|
2001
|
+
case 6: return CONSTR_CHECK;
|
2002
|
+
case 7: return CONSTR_PRIMARY;
|
2003
|
+
case 8: return CONSTR_UNIQUE;
|
2004
|
+
case 9: return CONSTR_EXCLUSION;
|
2005
|
+
case 10: return CONSTR_FOREIGN;
|
2006
|
+
case 11: return CONSTR_ATTR_DEFERRABLE;
|
2007
|
+
case 12: return CONSTR_ATTR_NOT_DEFERRABLE;
|
2008
|
+
case 13: return CONSTR_ATTR_DEFERRED;
|
2009
|
+
case 14: return CONSTR_ATTR_IMMEDIATE;
|
2010
|
+
}
|
2011
|
+
Assert(false);
|
2012
|
+
return CONSTR_NULL;
|
2013
|
+
}
|
2014
|
+
|
2015
|
+
static ImportForeignSchemaType
|
2016
|
+
_intToEnumImportForeignSchemaType(int value) {
|
2017
|
+
switch(value) {
|
2018
|
+
case 1: return FDW_IMPORT_SCHEMA_ALL;
|
2019
|
+
case 2: return FDW_IMPORT_SCHEMA_LIMIT_TO;
|
2020
|
+
case 3: return FDW_IMPORT_SCHEMA_EXCEPT;
|
2021
|
+
}
|
2022
|
+
Assert(false);
|
2023
|
+
return FDW_IMPORT_SCHEMA_ALL;
|
2024
|
+
}
|
2025
|
+
|
2026
|
+
static RoleStmtType
|
2027
|
+
_intToEnumRoleStmtType(int value) {
|
2028
|
+
switch(value) {
|
2029
|
+
case 1: return ROLESTMT_ROLE;
|
2030
|
+
case 2: return ROLESTMT_USER;
|
2031
|
+
case 3: return ROLESTMT_GROUP;
|
2032
|
+
}
|
2033
|
+
Assert(false);
|
2034
|
+
return ROLESTMT_ROLE;
|
2035
|
+
}
|
2036
|
+
|
2037
|
+
static FetchDirection
|
2038
|
+
_intToEnumFetchDirection(int value) {
|
2039
|
+
switch(value) {
|
2040
|
+
case 1: return FETCH_FORWARD;
|
2041
|
+
case 2: return FETCH_BACKWARD;
|
2042
|
+
case 3: return FETCH_ABSOLUTE;
|
2043
|
+
case 4: return FETCH_RELATIVE;
|
2044
|
+
}
|
2045
|
+
Assert(false);
|
2046
|
+
return FETCH_FORWARD;
|
2047
|
+
}
|
2048
|
+
|
2049
|
+
static FunctionParameterMode
|
2050
|
+
_intToEnumFunctionParameterMode(int value) {
|
2051
|
+
switch(value) {
|
2052
|
+
case 1: return FUNC_PARAM_IN;
|
2053
|
+
case 2: return FUNC_PARAM_OUT;
|
2054
|
+
case 3: return FUNC_PARAM_INOUT;
|
2055
|
+
case 4: return FUNC_PARAM_VARIADIC;
|
2056
|
+
case 5: return FUNC_PARAM_TABLE;
|
2057
|
+
}
|
2058
|
+
Assert(false);
|
2059
|
+
return FUNC_PARAM_IN;
|
2060
|
+
}
|
2061
|
+
|
2062
|
+
static TransactionStmtKind
|
2063
|
+
_intToEnumTransactionStmtKind(int value) {
|
2064
|
+
switch(value) {
|
2065
|
+
case 1: return TRANS_STMT_BEGIN;
|
2066
|
+
case 2: return TRANS_STMT_START;
|
2067
|
+
case 3: return TRANS_STMT_COMMIT;
|
2068
|
+
case 4: return TRANS_STMT_ROLLBACK;
|
2069
|
+
case 5: return TRANS_STMT_SAVEPOINT;
|
2070
|
+
case 6: return TRANS_STMT_RELEASE;
|
2071
|
+
case 7: return TRANS_STMT_ROLLBACK_TO;
|
2072
|
+
case 8: return TRANS_STMT_PREPARE;
|
2073
|
+
case 9: return TRANS_STMT_COMMIT_PREPARED;
|
2074
|
+
case 10: return TRANS_STMT_ROLLBACK_PREPARED;
|
2075
|
+
}
|
2076
|
+
Assert(false);
|
2077
|
+
return TRANS_STMT_BEGIN;
|
2078
|
+
}
|
2079
|
+
|
2080
|
+
static ViewCheckOption
|
2081
|
+
_intToEnumViewCheckOption(int value) {
|
2082
|
+
switch(value) {
|
2083
|
+
case 1: return NO_CHECK_OPTION;
|
2084
|
+
case 2: return LOCAL_CHECK_OPTION;
|
2085
|
+
case 3: return CASCADED_CHECK_OPTION;
|
2086
|
+
}
|
2087
|
+
Assert(false);
|
2088
|
+
return NO_CHECK_OPTION;
|
2089
|
+
}
|
2090
|
+
|
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
|
+
static DiscardMode
|
2102
|
+
_intToEnumDiscardMode(int value) {
|
2103
|
+
switch(value) {
|
2104
|
+
case 1: return DISCARD_ALL;
|
2105
|
+
case 2: return DISCARD_PLANS;
|
2106
|
+
case 3: return DISCARD_SEQUENCES;
|
2107
|
+
case 4: return DISCARD_TEMP;
|
2108
|
+
}
|
2109
|
+
Assert(false);
|
2110
|
+
return DISCARD_ALL;
|
2111
|
+
}
|
2112
|
+
|
2113
|
+
static ReindexObjectType
|
2114
|
+
_intToEnumReindexObjectType(int value) {
|
2115
|
+
switch(value) {
|
2116
|
+
case 1: return REINDEX_OBJECT_INDEX;
|
2117
|
+
case 2: return REINDEX_OBJECT_TABLE;
|
2118
|
+
case 3: return REINDEX_OBJECT_SCHEMA;
|
2119
|
+
case 4: return REINDEX_OBJECT_SYSTEM;
|
2120
|
+
case 5: return REINDEX_OBJECT_DATABASE;
|
2121
|
+
}
|
2122
|
+
Assert(false);
|
2123
|
+
return REINDEX_OBJECT_INDEX;
|
2124
|
+
}
|
2125
|
+
|
2126
|
+
static AlterTSConfigType
|
2127
|
+
_intToEnumAlterTSConfigType(int value) {
|
2128
|
+
switch(value) {
|
2129
|
+
case 1: return ALTER_TSCONFIG_ADD_MAPPING;
|
2130
|
+
case 2: return ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN;
|
2131
|
+
case 3: return ALTER_TSCONFIG_REPLACE_DICT;
|
2132
|
+
case 4: return ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN;
|
2133
|
+
case 5: return ALTER_TSCONFIG_DROP_MAPPING;
|
2134
|
+
}
|
2135
|
+
Assert(false);
|
2136
|
+
return ALTER_TSCONFIG_ADD_MAPPING;
|
2137
|
+
}
|
2138
|
+
|
2139
|
+
static AlterSubscriptionType
|
2140
|
+
_intToEnumAlterSubscriptionType(int value) {
|
2141
|
+
switch(value) {
|
2142
|
+
case 1: return ALTER_SUBSCRIPTION_OPTIONS;
|
2143
|
+
case 2: return ALTER_SUBSCRIPTION_CONNECTION;
|
2144
|
+
case 3: return ALTER_SUBSCRIPTION_PUBLICATION;
|
2145
|
+
case 4: return ALTER_SUBSCRIPTION_REFRESH;
|
2146
|
+
case 5: return ALTER_SUBSCRIPTION_ENABLED;
|
2147
|
+
}
|
2148
|
+
Assert(false);
|
2149
|
+
return ALTER_SUBSCRIPTION_OPTIONS;
|
2150
|
+
}
|
2151
|
+
|
2152
|
+
static OnCommitAction
|
2153
|
+
_intToEnumOnCommitAction(int value) {
|
2154
|
+
switch(value) {
|
2155
|
+
case 1: return ONCOMMIT_NOOP;
|
2156
|
+
case 2: return ONCOMMIT_PRESERVE_ROWS;
|
2157
|
+
case 3: return ONCOMMIT_DELETE_ROWS;
|
2158
|
+
case 4: return ONCOMMIT_DROP;
|
2159
|
+
}
|
2160
|
+
Assert(false);
|
2161
|
+
return ONCOMMIT_NOOP;
|
2162
|
+
}
|
2163
|
+
|
2164
|
+
static ParamKind
|
2165
|
+
_intToEnumParamKind(int value) {
|
2166
|
+
switch(value) {
|
2167
|
+
case 1: return PARAM_EXTERN;
|
2168
|
+
case 2: return PARAM_EXEC;
|
2169
|
+
case 3: return PARAM_SUBLINK;
|
2170
|
+
case 4: return PARAM_MULTIEXPR;
|
2171
|
+
}
|
2172
|
+
Assert(false);
|
2173
|
+
return PARAM_EXTERN;
|
2174
|
+
}
|
2175
|
+
|
2176
|
+
static CoercionContext
|
2177
|
+
_intToEnumCoercionContext(int value) {
|
2178
|
+
switch(value) {
|
2179
|
+
case 1: return COERCION_IMPLICIT;
|
2180
|
+
case 2: return COERCION_ASSIGNMENT;
|
2181
|
+
case 3: return COERCION_EXPLICIT;
|
2182
|
+
}
|
2183
|
+
Assert(false);
|
2184
|
+
return COERCION_IMPLICIT;
|
2185
|
+
}
|
2186
|
+
|
2187
|
+
static CoercionForm
|
2188
|
+
_intToEnumCoercionForm(int value) {
|
2189
|
+
switch(value) {
|
2190
|
+
case 1: return COERCE_EXPLICIT_CALL;
|
2191
|
+
case 2: return COERCE_EXPLICIT_CAST;
|
2192
|
+
case 3: return COERCE_IMPLICIT_CAST;
|
2193
|
+
}
|
2194
|
+
Assert(false);
|
2195
|
+
return COERCE_EXPLICIT_CALL;
|
2196
|
+
}
|
2197
|
+
|
2198
|
+
static BoolExprType
|
2199
|
+
_intToEnumBoolExprType(int value) {
|
2200
|
+
switch(value) {
|
2201
|
+
case 1: return AND_EXPR;
|
2202
|
+
case 2: return OR_EXPR;
|
2203
|
+
case 3: return NOT_EXPR;
|
2204
|
+
}
|
2205
|
+
Assert(false);
|
2206
|
+
return AND_EXPR;
|
2207
|
+
}
|
2208
|
+
|
2209
|
+
static SubLinkType
|
2210
|
+
_intToEnumSubLinkType(int value) {
|
2211
|
+
switch(value) {
|
2212
|
+
case 1: return EXISTS_SUBLINK;
|
2213
|
+
case 2: return ALL_SUBLINK;
|
2214
|
+
case 3: return ANY_SUBLINK;
|
2215
|
+
case 4: return ROWCOMPARE_SUBLINK;
|
2216
|
+
case 5: return EXPR_SUBLINK;
|
2217
|
+
case 6: return MULTIEXPR_SUBLINK;
|
2218
|
+
case 7: return ARRAY_SUBLINK;
|
2219
|
+
case 8: return CTE_SUBLINK;
|
2220
|
+
}
|
2221
|
+
Assert(false);
|
2222
|
+
return EXISTS_SUBLINK;
|
2223
|
+
}
|
2224
|
+
|
2225
|
+
static RowCompareType
|
2226
|
+
_intToEnumRowCompareType(int value) {
|
2227
|
+
switch(value) {
|
2228
|
+
case 1: return ROWCOMPARE_LT;
|
2229
|
+
case 2: return ROWCOMPARE_LE;
|
2230
|
+
case 3: return ROWCOMPARE_EQ;
|
2231
|
+
case 4: return ROWCOMPARE_GE;
|
2232
|
+
case 5: return ROWCOMPARE_GT;
|
2233
|
+
case 6: return ROWCOMPARE_NE;
|
2234
|
+
}
|
2235
|
+
Assert(false);
|
2236
|
+
return ROWCOMPARE_LT;
|
2237
|
+
}
|
2238
|
+
|
2239
|
+
static MinMaxOp
|
2240
|
+
_intToEnumMinMaxOp(int value) {
|
2241
|
+
switch(value) {
|
2242
|
+
case 1: return IS_GREATEST;
|
2243
|
+
case 2: return IS_LEAST;
|
2244
|
+
}
|
2245
|
+
Assert(false);
|
2246
|
+
return IS_GREATEST;
|
2247
|
+
}
|
2248
|
+
|
2249
|
+
static SQLValueFunctionOp
|
2250
|
+
_intToEnumSQLValueFunctionOp(int value) {
|
2251
|
+
switch(value) {
|
2252
|
+
case 1: return SVFOP_CURRENT_DATE;
|
2253
|
+
case 2: return SVFOP_CURRENT_TIME;
|
2254
|
+
case 3: return SVFOP_CURRENT_TIME_N;
|
2255
|
+
case 4: return SVFOP_CURRENT_TIMESTAMP;
|
2256
|
+
case 5: return SVFOP_CURRENT_TIMESTAMP_N;
|
2257
|
+
case 6: return SVFOP_LOCALTIME;
|
2258
|
+
case 7: return SVFOP_LOCALTIME_N;
|
2259
|
+
case 8: return SVFOP_LOCALTIMESTAMP;
|
2260
|
+
case 9: return SVFOP_LOCALTIMESTAMP_N;
|
2261
|
+
case 10: return SVFOP_CURRENT_ROLE;
|
2262
|
+
case 11: return SVFOP_CURRENT_USER;
|
2263
|
+
case 12: return SVFOP_USER;
|
2264
|
+
case 13: return SVFOP_SESSION_USER;
|
2265
|
+
case 14: return SVFOP_CURRENT_CATALOG;
|
2266
|
+
case 15: return SVFOP_CURRENT_SCHEMA;
|
2267
|
+
}
|
2268
|
+
Assert(false);
|
2269
|
+
return SVFOP_CURRENT_DATE;
|
2270
|
+
}
|
2271
|
+
|
2272
|
+
static XmlExprOp
|
2273
|
+
_intToEnumXmlExprOp(int value) {
|
2274
|
+
switch(value) {
|
2275
|
+
case 1: return IS_XMLCONCAT;
|
2276
|
+
case 2: return IS_XMLELEMENT;
|
2277
|
+
case 3: return IS_XMLFOREST;
|
2278
|
+
case 4: return IS_XMLPARSE;
|
2279
|
+
case 5: return IS_XMLPI;
|
2280
|
+
case 6: return IS_XMLROOT;
|
2281
|
+
case 7: return IS_XMLSERIALIZE;
|
2282
|
+
case 8: return IS_DOCUMENT;
|
2283
|
+
}
|
2284
|
+
Assert(false);
|
2285
|
+
return IS_XMLCONCAT;
|
2286
|
+
}
|
2287
|
+
|
2288
|
+
static XmlOptionType
|
2289
|
+
_intToEnumXmlOptionType(int value) {
|
2290
|
+
switch(value) {
|
2291
|
+
case 1: return XMLOPTION_DOCUMENT;
|
2292
|
+
case 2: return XMLOPTION_CONTENT;
|
2293
|
+
}
|
2294
|
+
Assert(false);
|
2295
|
+
return XMLOPTION_DOCUMENT;
|
2296
|
+
}
|
2297
|
+
|
2298
|
+
static NullTestType
|
2299
|
+
_intToEnumNullTestType(int value) {
|
2300
|
+
switch(value) {
|
2301
|
+
case 1: return IS_NULL;
|
2302
|
+
case 2: return IS_NOT_NULL;
|
2303
|
+
}
|
2304
|
+
Assert(false);
|
2305
|
+
return IS_NULL;
|
2306
|
+
}
|
2307
|
+
|
2308
|
+
static BoolTestType
|
2309
|
+
_intToEnumBoolTestType(int value) {
|
2310
|
+
switch(value) {
|
2311
|
+
case 1: return IS_TRUE;
|
2312
|
+
case 2: return IS_NOT_TRUE;
|
2313
|
+
case 3: return IS_FALSE;
|
2314
|
+
case 4: return IS_NOT_FALSE;
|
2315
|
+
case 5: return IS_UNKNOWN;
|
2316
|
+
case 6: return IS_NOT_UNKNOWN;
|
2317
|
+
}
|
2318
|
+
Assert(false);
|
2319
|
+
return IS_TRUE;
|
2320
|
+
}
|
2321
|
+
|
2322
|
+
static CmdType
|
2323
|
+
_intToEnumCmdType(int value) {
|
2324
|
+
switch(value) {
|
2325
|
+
case 1: return CMD_UNKNOWN;
|
2326
|
+
case 2: return CMD_SELECT;
|
2327
|
+
case 3: return CMD_UPDATE;
|
2328
|
+
case 4: return CMD_INSERT;
|
2329
|
+
case 5: return CMD_DELETE;
|
2330
|
+
case 6: return CMD_UTILITY;
|
2331
|
+
case 7: return CMD_NOTHING;
|
2332
|
+
}
|
2333
|
+
Assert(false);
|
2334
|
+
return CMD_UNKNOWN;
|
2335
|
+
}
|
2336
|
+
|
2337
|
+
static JoinType
|
2338
|
+
_intToEnumJoinType(int value) {
|
2339
|
+
switch(value) {
|
2340
|
+
case 1: return JOIN_INNER;
|
2341
|
+
case 2: return JOIN_LEFT;
|
2342
|
+
case 3: return JOIN_FULL;
|
2343
|
+
case 4: return JOIN_RIGHT;
|
2344
|
+
case 5: return JOIN_SEMI;
|
2345
|
+
case 6: return JOIN_ANTI;
|
2346
|
+
case 7: return JOIN_UNIQUE_OUTER;
|
2347
|
+
case 8: return JOIN_UNIQUE_INNER;
|
2348
|
+
}
|
2349
|
+
Assert(false);
|
2350
|
+
return JOIN_INNER;
|
2351
|
+
}
|
2352
|
+
|
2353
|
+
static AggStrategy
|
2354
|
+
_intToEnumAggStrategy(int value) {
|
2355
|
+
switch(value) {
|
2356
|
+
case 1: return AGG_PLAIN;
|
2357
|
+
case 2: return AGG_SORTED;
|
2358
|
+
case 3: return AGG_HASHED;
|
2359
|
+
case 4: return AGG_MIXED;
|
2360
|
+
}
|
2361
|
+
Assert(false);
|
2362
|
+
return AGG_PLAIN;
|
2363
|
+
}
|
2364
|
+
|
2365
|
+
static AggSplit
|
2366
|
+
_intToEnumAggSplit(int value) {
|
2367
|
+
switch(value) {
|
2368
|
+
case 1: return AGGSPLIT_SIMPLE;
|
2369
|
+
case 2: return AGGSPLIT_INITIAL_SERIAL;
|
2370
|
+
case 3: return AGGSPLIT_FINAL_DESERIAL;
|
2371
|
+
}
|
2372
|
+
Assert(false);
|
2373
|
+
return AGGSPLIT_SIMPLE;
|
2374
|
+
}
|
2375
|
+
|
2376
|
+
static SetOpCmd
|
2377
|
+
_intToEnumSetOpCmd(int value) {
|
2378
|
+
switch(value) {
|
2379
|
+
case 1: return SETOPCMD_INTERSECT;
|
2380
|
+
case 2: return SETOPCMD_INTERSECT_ALL;
|
2381
|
+
case 3: return SETOPCMD_EXCEPT;
|
2382
|
+
case 4: return SETOPCMD_EXCEPT_ALL;
|
2383
|
+
}
|
2384
|
+
Assert(false);
|
2385
|
+
return SETOPCMD_INTERSECT;
|
2386
|
+
}
|
2387
|
+
|
2388
|
+
static SetOpStrategy
|
2389
|
+
_intToEnumSetOpStrategy(int value) {
|
2390
|
+
switch(value) {
|
2391
|
+
case 1: return SETOP_SORTED;
|
2392
|
+
case 2: return SETOP_HASHED;
|
2393
|
+
}
|
2394
|
+
Assert(false);
|
2395
|
+
return SETOP_SORTED;
|
2396
|
+
}
|
2397
|
+
|
2398
|
+
static OnConflictAction
|
2399
|
+
_intToEnumOnConflictAction(int value) {
|
2400
|
+
switch(value) {
|
2401
|
+
case 1: return ONCONFLICT_NONE;
|
2402
|
+
case 2: return ONCONFLICT_NOTHING;
|
2403
|
+
case 3: return ONCONFLICT_UPDATE;
|
2404
|
+
}
|
2405
|
+
Assert(false);
|
2406
|
+
return ONCONFLICT_NONE;
|
2407
|
+
}
|
2408
|
+
|
2409
|
+
static LimitOption
|
2410
|
+
_intToEnumLimitOption(int value) {
|
2411
|
+
switch(value) {
|
2412
|
+
case 1: return LIMIT_OPTION_DEFAULT;
|
2413
|
+
case 2: return LIMIT_OPTION_COUNT;
|
2414
|
+
case 3: return LIMIT_OPTION_WITH_TIES;
|
2415
|
+
}
|
2416
|
+
Assert(false);
|
2417
|
+
return LIMIT_OPTION_DEFAULT;
|
2418
|
+
}
|
2419
|
+
|
2420
|
+
static LockClauseStrength
|
2421
|
+
_intToEnumLockClauseStrength(int value) {
|
2422
|
+
switch(value) {
|
2423
|
+
case 1: return LCS_NONE;
|
2424
|
+
case 2: return LCS_FORKEYSHARE;
|
2425
|
+
case 3: return LCS_FORSHARE;
|
2426
|
+
case 4: return LCS_FORNOKEYUPDATE;
|
2427
|
+
case 5: return LCS_FORUPDATE;
|
2428
|
+
}
|
2429
|
+
Assert(false);
|
2430
|
+
return LCS_NONE;
|
2431
|
+
}
|
2432
|
+
|
2433
|
+
static LockWaitPolicy
|
2434
|
+
_intToEnumLockWaitPolicy(int value) {
|
2435
|
+
switch(value) {
|
2436
|
+
case 1: return LockWaitBlock;
|
2437
|
+
case 2: return LockWaitSkip;
|
2438
|
+
case 3: return LockWaitError;
|
2439
|
+
}
|
2440
|
+
Assert(false);
|
2441
|
+
return LockWaitBlock;
|
2442
|
+
}
|
2443
|
+
|
2444
|
+
static LockTupleMode
|
2445
|
+
_intToEnumLockTupleMode(int value) {
|
2446
|
+
switch(value) {
|
2447
|
+
case 1: return LockTupleKeyShare;
|
2448
|
+
case 2: return LockTupleShare;
|
2449
|
+
case 3: return LockTupleNoKeyExclusive;
|
2450
|
+
case 4: return LockTupleExclusive;
|
2451
|
+
}
|
2452
|
+
Assert(false);
|
2453
|
+
return LockTupleKeyShare;
|
2454
|
+
}
|