pg_query 2.2.1 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Rakefile +2 -2
- data/ext/pg_query/include/access/amapi.h +45 -1
- data/ext/pg_query/include/access/attmap.h +1 -1
- data/ext/pg_query/include/access/attnum.h +2 -2
- data/ext/pg_query/include/access/clog.h +4 -2
- data/ext/pg_query/include/access/commit_ts.h +6 -9
- data/ext/pg_query/include/access/detoast.h +1 -11
- data/ext/pg_query/include/access/genam.h +15 -12
- data/ext/pg_query/include/access/gin.h +2 -2
- data/ext/pg_query/include/access/htup.h +1 -1
- data/ext/pg_query/include/access/htup_details.h +75 -87
- data/ext/pg_query/include/access/itup.h +7 -1
- data/ext/pg_query/include/access/parallel.h +2 -2
- data/ext/pg_query/include/access/printtup.h +1 -1
- data/ext/pg_query/include/access/relation.h +1 -1
- data/ext/pg_query/include/access/relscan.h +17 -2
- data/ext/pg_query/include/access/rmgr.h +30 -3
- data/ext/pg_query/include/access/rmgrlist.h +23 -23
- data/ext/pg_query/include/access/sdir.h +1 -1
- data/ext/pg_query/include/access/skey.h +1 -1
- data/ext/pg_query/include/access/stratnum.h +4 -2
- data/ext/pg_query/include/access/sysattr.h +1 -1
- data/ext/pg_query/include/access/table.h +2 -1
- data/ext/pg_query/include/access/tableam.h +272 -20
- data/ext/pg_query/include/access/toast_compression.h +73 -0
- data/ext/pg_query/include/access/transam.h +123 -13
- data/ext/pg_query/include/access/tupconvert.h +1 -1
- data/ext/pg_query/include/access/tupdesc.h +1 -1
- data/ext/pg_query/include/access/tupmacs.h +3 -3
- data/ext/pg_query/include/access/twophase.h +3 -1
- data/ext/pg_query/include/access/xact.h +73 -19
- data/ext/pg_query/include/access/xlog.h +60 -155
- data/ext/pg_query/include/access/xlog_internal.h +40 -13
- data/ext/pg_query/include/access/xlogdefs.h +8 -16
- data/ext/pg_query/include/access/xlogprefetcher.h +55 -0
- data/ext/pg_query/include/access/xlogreader.h +145 -39
- data/ext/pg_query/include/access/xlogrecord.h +18 -9
- data/ext/pg_query/include/access/xlogrecovery.h +157 -0
- data/ext/pg_query/include/c.h +101 -44
- data/ext/pg_query/include/catalog/catalog.h +3 -1
- data/ext/pg_query/include/catalog/catversion.h +2 -2
- data/ext/pg_query/include/catalog/dependency.h +8 -16
- data/ext/pg_query/include/catalog/genbki.h +83 -5
- data/ext/pg_query/include/catalog/index.h +18 -3
- data/ext/pg_query/include/catalog/indexing.h +12 -324
- data/ext/pg_query/include/catalog/namespace.h +4 -2
- data/ext/pg_query/include/catalog/objectaccess.h +70 -2
- data/ext/pg_query/include/catalog/objectaddress.h +11 -6
- data/ext/pg_query/include/catalog/pg_aggregate.h +14 -10
- data/ext/pg_query/include/catalog/pg_aggregate_d.h +2 -1
- data/ext/pg_query/include/catalog/pg_am.h +4 -1
- data/ext/pg_query/include/catalog/pg_am_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_attribute.h +27 -10
- data/ext/pg_query/include/catalog/pg_attribute_d.h +21 -18
- data/ext/pg_query/include/catalog/pg_authid.h +7 -2
- data/ext/pg_query/include/catalog/pg_authid_d.h +17 -9
- data/ext/pg_query/include/catalog/pg_class.h +44 -14
- data/ext/pg_query/include/catalog/pg_class_d.h +30 -1
- data/ext/pg_query/include/catalog/pg_collation.h +33 -8
- data/ext/pg_query/include/catalog/pg_collation_d.h +20 -3
- data/ext/pg_query/include/catalog/pg_constraint.h +38 -12
- data/ext/pg_query/include/catalog/pg_constraint_d.h +10 -4
- data/ext/pg_query/include/catalog/pg_control.h +3 -5
- data/ext/pg_query/include/catalog/pg_conversion.h +7 -4
- data/ext/pg_query/include/catalog/pg_conversion_d.h +4 -1
- data/ext/pg_query/include/catalog/pg_depend.h +11 -7
- data/ext/pg_query/include/catalog/pg_depend_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_event_trigger.h +9 -3
- data/ext/pg_query/include/catalog/pg_event_trigger_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_index.h +17 -7
- data/ext/pg_query/include/catalog/pg_index_d.h +20 -17
- data/ext/pg_query/include/catalog/pg_language.h +10 -5
- data/ext/pg_query/include/catalog/pg_language_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_namespace.h +7 -2
- data/ext/pg_query/include/catalog/pg_namespace_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_opclass.h +8 -5
- data/ext/pg_query/include/catalog/pg_opclass_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_operator.h +18 -15
- data/ext/pg_query/include/catalog/pg_operator_d.h +37 -1
- data/ext/pg_query/include/catalog/pg_opfamily.h +6 -3
- data/ext/pg_query/include/catalog/pg_opfamily_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_parameter_acl.h +60 -0
- data/ext/pg_query/include/catalog/pg_parameter_acl_d.h +34 -0
- data/ext/pg_query/include/catalog/pg_partitioned_table.h +20 -9
- data/ext/pg_query/include/catalog/pg_partitioned_table_d.h +2 -1
- data/ext/pg_query/include/catalog/pg_proc.h +20 -11
- data/ext/pg_query/include/catalog/pg_proc_d.h +10 -8
- data/ext/pg_query/include/catalog/pg_publication.h +50 -7
- data/ext/pg_query/include/catalog/pg_publication_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_replication_origin.h +6 -1
- data/ext/pg_query/include/catalog/pg_replication_origin_d.h +5 -1
- data/ext/pg_query/include/catalog/pg_statistic.h +19 -12
- data/ext/pg_query/include/catalog/pg_statistic_d.h +2 -1
- data/ext/pg_query/include/catalog/pg_statistic_ext.h +19 -5
- data/ext/pg_query/include/catalog/pg_statistic_ext_d.h +7 -2
- data/ext/pg_query/include/catalog/pg_transform.h +8 -5
- data/ext/pg_query/include/catalog/pg_transform_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_trigger.h +24 -8
- data/ext/pg_query/include/catalog/pg_trigger_d.h +4 -1
- data/ext/pg_query/include/catalog/pg_ts_config.h +6 -3
- data/ext/pg_query/include/catalog/pg_ts_config_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_ts_dict.h +8 -3
- data/ext/pg_query/include/catalog/pg_ts_dict_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_ts_parser.h +6 -3
- data/ext/pg_query/include/catalog/pg_ts_parser_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_ts_template.h +6 -3
- data/ext/pg_query/include/catalog/pg_ts_template_d.h +3 -1
- data/ext/pg_query/include/catalog/pg_type.h +55 -24
- data/ext/pg_query/include/catalog/pg_type_d.h +70 -31
- data/ext/pg_query/include/catalog/storage.h +5 -3
- data/ext/pg_query/include/commands/async.h +3 -4
- data/ext/pg_query/include/commands/dbcommands.h +2 -1
- data/ext/pg_query/include/commands/defrem.h +11 -24
- data/ext/pg_query/include/commands/event_trigger.h +2 -2
- data/ext/pg_query/include/commands/explain.h +1 -1
- data/ext/pg_query/include/commands/prepare.h +1 -1
- data/ext/pg_query/include/commands/tablespace.h +2 -2
- data/ext/pg_query/include/commands/trigger.h +18 -16
- data/ext/pg_query/include/commands/user.h +2 -2
- data/ext/pg_query/include/commands/vacuum.h +88 -41
- data/ext/pg_query/include/commands/variable.h +1 -1
- data/ext/pg_query/include/common/file_perm.h +4 -4
- data/ext/pg_query/include/common/hashfn.h +1 -1
- data/ext/pg_query/include/common/ip.h +1 -7
- data/ext/pg_query/include/common/keywords.h +2 -6
- data/ext/pg_query/include/common/kwlookup.h +1 -1
- data/ext/pg_query/include/common/pg_prng.h +60 -0
- data/ext/pg_query/include/common/relpath.h +2 -2
- data/ext/pg_query/include/common/string.h +24 -1
- data/ext/pg_query/include/common/unicode_combining_table.h +114 -2
- data/ext/pg_query/include/common/unicode_east_asian_fw_table.h +125 -0
- data/ext/pg_query/include/datatype/timestamp.h +40 -1
- data/ext/pg_query/include/executor/execdesc.h +1 -1
- data/ext/pg_query/include/executor/executor.h +65 -22
- data/ext/pg_query/include/executor/functions.h +17 -3
- data/ext/pg_query/include/executor/instrument.h +33 -16
- data/ext/pg_query/include/executor/spi.h +41 -3
- data/ext/pg_query/include/executor/tablefunc.h +1 -1
- data/ext/pg_query/include/executor/tuptable.h +1 -1
- data/ext/pg_query/include/fmgr.h +13 -7
- data/ext/pg_query/include/funcapi.h +16 -4
- data/ext/pg_query/include/getaddrinfo.h +1 -1
- data/ext/pg_query/include/jit/jit.h +11 -11
- data/ext/pg_query/include/kwlist_d.h +517 -494
- data/ext/pg_query/include/lib/dshash.h +112 -0
- data/ext/pg_query/include/lib/ilist.h +20 -1
- data/ext/pg_query/include/lib/pairingheap.h +1 -1
- data/ext/pg_query/include/lib/simplehash.h +140 -15
- data/ext/pg_query/include/lib/sort_template.h +432 -0
- data/ext/pg_query/include/lib/stringinfo.h +1 -1
- data/ext/pg_query/include/libpq/auth.h +6 -4
- data/ext/pg_query/include/libpq/crypt.h +5 -4
- data/ext/pg_query/include/libpq/hba.h +43 -4
- data/ext/pg_query/include/libpq/libpq-be.h +23 -6
- data/ext/pg_query/include/libpq/libpq.h +30 -20
- data/ext/pg_query/include/libpq/pqcomm.h +17 -31
- data/ext/pg_query/include/libpq/pqformat.h +1 -1
- data/ext/pg_query/include/libpq/pqsignal.h +4 -4
- data/ext/pg_query/include/mb/pg_wchar.h +105 -23
- data/ext/pg_query/include/mb/stringinfo_mb.h +1 -1
- data/ext/pg_query/include/miscadmin.h +47 -41
- data/ext/pg_query/include/nodes/bitmapset.h +1 -1
- data/ext/pg_query/include/nodes/execnodes.h +270 -78
- data/ext/pg_query/include/nodes/extensible.h +4 -2
- data/ext/pg_query/include/nodes/lockoptions.h +1 -1
- data/ext/pg_query/include/nodes/makefuncs.h +7 -6
- data/ext/pg_query/include/nodes/memnodes.h +5 -3
- data/ext/pg_query/include/nodes/nodeFuncs.h +1 -1
- data/ext/pg_query/include/nodes/nodes.h +30 -11
- data/ext/pg_query/include/nodes/params.h +1 -1
- data/ext/pg_query/include/nodes/parsenodes.h +322 -90
- data/ext/pg_query/include/nodes/pathnodes.h +243 -66
- data/ext/pg_query/include/nodes/pg_list.h +75 -69
- data/ext/pg_query/include/nodes/plannodes.h +111 -28
- data/ext/pg_query/include/nodes/primnodes.h +99 -47
- data/ext/pg_query/include/nodes/print.h +1 -1
- data/ext/pg_query/include/nodes/tidbitmap.h +1 -1
- data/ext/pg_query/include/nodes/value.h +58 -39
- data/ext/pg_query/include/optimizer/cost.h +9 -2
- data/ext/pg_query/include/optimizer/geqo.h +9 -7
- data/ext/pg_query/include/optimizer/geqo_gene.h +1 -1
- data/ext/pg_query/include/optimizer/optimizer.h +25 -17
- data/ext/pg_query/include/optimizer/paths.h +6 -6
- data/ext/pg_query/include/optimizer/planmain.h +15 -14
- data/ext/pg_query/include/parser/analyze.h +19 -5
- data/ext/pg_query/include/parser/gram.h +947 -913
- data/ext/pg_query/include/parser/gramparse.h +1 -1
- data/ext/pg_query/include/parser/kwlist.h +463 -453
- data/ext/pg_query/include/parser/parse_agg.h +2 -7
- data/ext/pg_query/include/parser/parse_coerce.h +3 -1
- data/ext/pg_query/include/parser/parse_expr.h +2 -3
- data/ext/pg_query/include/parser/parse_func.h +2 -1
- data/ext/pg_query/include/parser/parse_node.h +21 -9
- data/ext/pg_query/include/parser/parse_oper.h +1 -3
- data/ext/pg_query/include/parser/parse_relation.h +5 -4
- data/ext/pg_query/include/parser/parse_type.h +1 -1
- data/ext/pg_query/include/parser/parser.h +31 -4
- data/ext/pg_query/include/parser/parsetree.h +1 -1
- data/ext/pg_query/include/parser/scanner.h +1 -1
- data/ext/pg_query/include/parser/scansup.h +2 -5
- data/ext/pg_query/include/partitioning/partdefs.h +1 -1
- data/ext/pg_query/include/pg_config.h +83 -41
- data/ext/pg_query/include/pg_config_manual.h +74 -21
- data/ext/pg_query/include/pg_getopt.h +6 -6
- data/ext/pg_query/include/pg_query.h +5 -4
- data/ext/pg_query/include/pg_query_enum_defs.c +358 -241
- data/ext/pg_query/include/pg_query_fingerprint_conds.c +44 -7
- data/ext/pg_query/include/pg_query_fingerprint_defs.c +939 -113
- data/ext/pg_query/include/pg_query_outfuncs_conds.c +43 -13
- data/ext/pg_query/include/pg_query_outfuncs_defs.c +151 -26
- data/ext/pg_query/include/pg_query_readfuncs_conds.c +11 -2
- data/ext/pg_query/include/pg_query_readfuncs_defs.c +173 -30
- data/ext/pg_query/include/pg_trace.h +1 -1
- data/ext/pg_query/include/pgstat.h +449 -1238
- data/ext/pg_query/include/pgtime.h +14 -4
- data/ext/pg_query/include/pl_gram.h +126 -128
- data/ext/pg_query/include/pl_reserved_kwlist.h +1 -1
- data/ext/pg_query/include/pl_reserved_kwlist_d.h +10 -10
- data/ext/pg_query/include/pl_unreserved_kwlist.h +2 -3
- data/ext/pg_query/include/pl_unreserved_kwlist_d.h +54 -56
- data/ext/pg_query/include/plerrcodes.h +9 -1
- data/ext/pg_query/include/plpgsql.h +52 -54
- data/ext/pg_query/include/port/atomics/arch-arm.h +7 -1
- data/ext/pg_query/include/port/atomics/arch-ppc.h +1 -1
- data/ext/pg_query/include/port/atomics/arch-x86.h +1 -1
- data/ext/pg_query/include/port/atomics/fallback.h +1 -1
- data/ext/pg_query/include/port/atomics/generic-gcc.h +3 -3
- data/ext/pg_query/include/port/atomics/generic.h +1 -1
- data/ext/pg_query/include/port/atomics.h +1 -1
- data/ext/pg_query/include/port/pg_bitutils.h +40 -10
- data/ext/pg_query/include/port/pg_bswap.h +1 -1
- data/ext/pg_query/include/port/pg_crc32c.h +1 -1
- data/ext/pg_query/include/port.h +71 -46
- data/ext/pg_query/include/portability/instr_time.h +1 -1
- data/ext/pg_query/include/postgres.h +60 -16
- data/ext/pg_query/include/postmaster/autovacuum.h +17 -17
- data/ext/pg_query/include/postmaster/auxprocess.h +20 -0
- data/ext/pg_query/include/postmaster/bgworker.h +2 -1
- data/ext/pg_query/include/postmaster/bgworker_internals.h +2 -2
- data/ext/pg_query/include/postmaster/bgwriter.h +5 -5
- data/ext/pg_query/include/postmaster/fork_process.h +1 -1
- data/ext/pg_query/include/postmaster/interrupt.h +1 -1
- data/ext/pg_query/include/postmaster/pgarch.h +42 -8
- data/ext/pg_query/include/postmaster/postmaster.h +18 -17
- data/ext/pg_query/include/postmaster/startup.h +39 -0
- data/ext/pg_query/include/postmaster/syslogger.h +15 -10
- data/ext/pg_query/include/postmaster/walwriter.h +3 -3
- data/ext/pg_query/include/protobuf/pg_query.pb-c.h +1419 -914
- data/ext/pg_query/include/protobuf/pg_query.pb.h +43678 -32769
- data/ext/pg_query/include/regex/regex.h +18 -16
- data/ext/pg_query/include/replication/logicallauncher.h +3 -5
- data/ext/pg_query/include/replication/logicalproto.h +161 -17
- data/ext/pg_query/include/replication/logicalworker.h +1 -1
- data/ext/pg_query/include/replication/origin.h +7 -7
- data/ext/pg_query/include/replication/reorderbuffer.h +259 -42
- data/ext/pg_query/include/replication/slot.h +22 -11
- data/ext/pg_query/include/replication/syncrep.h +5 -5
- data/ext/pg_query/include/replication/walreceiver.h +145 -13
- data/ext/pg_query/include/replication/walsender.h +8 -8
- data/ext/pg_query/include/rewrite/prs2lock.h +1 -1
- data/ext/pg_query/include/rewrite/rewriteHandler.h +1 -3
- data/ext/pg_query/include/rewrite/rewriteManip.h +1 -1
- data/ext/pg_query/include/rewrite/rewriteSupport.h +1 -1
- data/ext/pg_query/include/storage/backendid.h +3 -3
- data/ext/pg_query/include/storage/block.h +4 -10
- data/ext/pg_query/include/storage/buf.h +1 -1
- data/ext/pg_query/include/storage/bufmgr.h +19 -14
- data/ext/pg_query/include/storage/bufpage.h +6 -8
- data/ext/pg_query/include/storage/condition_variable.h +13 -2
- data/ext/pg_query/include/storage/dsm.h +4 -1
- data/ext/pg_query/include/storage/dsm_impl.h +3 -2
- data/ext/pg_query/include/storage/fd.h +33 -3
- data/ext/pg_query/include/storage/fileset.h +40 -0
- data/ext/pg_query/include/storage/ipc.h +4 -1
- data/ext/pg_query/include/storage/item.h +1 -1
- data/ext/pg_query/include/storage/itemid.h +1 -1
- data/ext/pg_query/include/storage/itemptr.h +3 -1
- data/ext/pg_query/include/storage/large_object.h +2 -2
- data/ext/pg_query/include/storage/latch.h +9 -13
- data/ext/pg_query/include/storage/lmgr.h +2 -1
- data/ext/pg_query/include/storage/lock.h +11 -8
- data/ext/pg_query/include/storage/lockdefs.h +2 -2
- data/ext/pg_query/include/storage/lwlock.h +5 -32
- data/ext/pg_query/include/storage/lwlocknames.h +0 -1
- data/ext/pg_query/include/storage/off.h +1 -1
- data/ext/pg_query/include/storage/pg_sema.h +1 -1
- data/ext/pg_query/include/storage/pg_shmem.h +9 -7
- data/ext/pg_query/include/storage/pmsignal.h +15 -4
- data/ext/pg_query/include/storage/predicate.h +4 -4
- data/ext/pg_query/include/storage/proc.h +173 -59
- data/ext/pg_query/include/storage/procarray.h +98 -0
- data/ext/pg_query/include/storage/proclist_types.h +1 -1
- data/ext/pg_query/include/storage/procsignal.h +3 -7
- data/ext/pg_query/include/storage/relfilenode.h +1 -1
- data/ext/pg_query/include/storage/s_lock.h +60 -21
- data/ext/pg_query/include/storage/sharedfileset.h +3 -11
- data/ext/pg_query/include/storage/shm_mq.h +5 -4
- data/ext/pg_query/include/storage/shm_toc.h +1 -1
- data/ext/pg_query/include/storage/shmem.h +1 -1
- data/ext/pg_query/include/storage/sinval.h +3 -3
- data/ext/pg_query/include/storage/sinvaladt.h +1 -1
- data/ext/pg_query/include/storage/smgr.h +10 -8
- data/ext/pg_query/include/storage/spin.h +2 -2
- data/ext/pg_query/include/storage/standby.h +13 -6
- data/ext/pg_query/include/storage/standbydefs.h +2 -2
- data/ext/pg_query/include/storage/sync.h +7 -3
- data/ext/pg_query/include/tcop/cmdtag.h +1 -1
- data/ext/pg_query/include/tcop/cmdtaglist.h +3 -2
- data/ext/pg_query/include/tcop/deparse_utility.h +1 -1
- data/ext/pg_query/include/tcop/dest.h +1 -1
- data/ext/pg_query/include/tcop/fastpath.h +1 -2
- data/ext/pg_query/include/tcop/pquery.h +1 -1
- data/ext/pg_query/include/tcop/tcopprot.h +19 -11
- data/ext/pg_query/include/tcop/utility.h +7 -3
- data/ext/pg_query/include/tsearch/ts_cache.h +2 -2
- data/ext/pg_query/include/utils/acl.h +24 -3
- data/ext/pg_query/include/utils/aclchk_internal.h +1 -1
- data/ext/pg_query/include/utils/array.h +7 -2
- data/ext/pg_query/include/utils/backend_progress.h +44 -0
- data/ext/pg_query/include/utils/backend_status.h +321 -0
- data/ext/pg_query/include/utils/builtins.h +10 -11
- data/ext/pg_query/include/utils/bytea.h +3 -2
- data/ext/pg_query/include/utils/catcache.h +1 -1
- data/ext/pg_query/include/utils/date.h +1 -1
- data/ext/pg_query/include/utils/datetime.h +8 -7
- data/ext/pg_query/include/utils/datum.h +9 -1
- data/ext/pg_query/include/utils/dsa.h +1 -1
- data/ext/pg_query/include/utils/dynahash.h +4 -3
- data/ext/pg_query/include/utils/elog.h +52 -21
- data/ext/pg_query/include/utils/errcodes.h +2 -0
- data/ext/pg_query/include/utils/expandeddatum.h +1 -1
- data/ext/pg_query/include/utils/expandedrecord.h +1 -1
- data/ext/pg_query/include/utils/float.h +7 -7
- data/ext/pg_query/include/utils/fmgroids.h +1300 -696
- data/ext/pg_query/include/utils/fmgrprotos.h +199 -16
- data/ext/pg_query/include/utils/fmgrtab.h +6 -5
- data/ext/pg_query/include/utils/guc.h +69 -43
- data/ext/pg_query/include/utils/guc_tables.h +23 -19
- data/ext/pg_query/include/utils/hsearch.h +15 -11
- data/ext/pg_query/include/utils/inval.h +4 -1
- data/ext/pg_query/include/utils/lsyscache.h +11 -1
- data/ext/pg_query/include/utils/memdebug.h +1 -1
- data/ext/pg_query/include/utils/memutils.h +8 -3
- data/ext/pg_query/include/utils/numeric.h +19 -5
- data/ext/pg_query/include/utils/palloc.h +25 -3
- data/ext/pg_query/include/utils/partcache.h +1 -1
- data/ext/pg_query/include/utils/pg_locale.h +17 -9
- data/ext/pg_query/include/utils/pg_lsn.h +1 -1
- data/ext/pg_query/include/utils/pgstat_internal.h +784 -0
- data/ext/pg_query/include/utils/pidfile.h +1 -1
- data/ext/pg_query/include/utils/plancache.h +6 -5
- data/ext/pg_query/include/utils/portal.h +10 -12
- data/ext/pg_query/include/utils/ps_status.h +1 -1
- data/ext/pg_query/include/utils/queryenvironment.h +1 -1
- data/ext/pg_query/include/utils/queryjumble.h +88 -0
- data/ext/pg_query/include/utils/regproc.h +14 -3
- data/ext/pg_query/include/utils/rel.h +71 -19
- data/ext/pg_query/include/utils/relcache.h +8 -5
- data/ext/pg_query/include/utils/reltrigger.h +1 -1
- data/ext/pg_query/include/utils/resowner.h +1 -1
- data/ext/pg_query/include/utils/rls.h +2 -2
- data/ext/pg_query/include/utils/ruleutils.h +4 -1
- data/ext/pg_query/include/utils/sharedtuplestore.h +1 -1
- data/ext/pg_query/include/utils/snapmgr.h +34 -14
- data/ext/pg_query/include/utils/snapshot.h +14 -1
- data/ext/pg_query/include/utils/sortsupport.h +117 -2
- data/ext/pg_query/include/utils/syscache.h +6 -1
- data/ext/pg_query/include/utils/timeout.h +11 -4
- data/ext/pg_query/include/utils/timestamp.h +6 -5
- data/ext/pg_query/include/utils/tuplesort.h +25 -11
- data/ext/pg_query/include/utils/tuplestore.h +2 -2
- data/ext/pg_query/include/utils/typcache.h +24 -17
- data/ext/pg_query/include/utils/tzparser.h +1 -1
- data/ext/pg_query/include/utils/varlena.h +5 -3
- data/ext/pg_query/include/utils/wait_event.h +289 -0
- data/ext/pg_query/include/utils/xml.h +4 -4
- data/ext/pg_query/pg_query.pb-c.c +4302 -2304
- data/ext/pg_query/pg_query_deparse.c +986 -301
- data/ext/pg_query/pg_query_fingerprint.c +30 -10
- data/ext/pg_query/pg_query_json_plpgsql.c +0 -25
- data/ext/pg_query/pg_query_normalize.c +1 -1
- data/ext/pg_query/pg_query_outfuncs_json.c +54 -16
- data/ext/pg_query/pg_query_outfuncs_protobuf.c +70 -10
- data/ext/pg_query/pg_query_parse.c +1 -1
- data/ext/pg_query/pg_query_readfuncs_protobuf.c +42 -8
- data/ext/pg_query/pg_query_scan.c +2 -1
- data/ext/pg_query/pg_query_split.c +3 -2
- data/ext/pg_query/src_backend_catalog_namespace.c +20 -9
- data/ext/pg_query/src_backend_catalog_pg_proc.c +4 -1
- data/ext/pg_query/src_backend_commands_define.c +11 -1
- data/ext/pg_query/src_backend_nodes_bitmapset.c +3 -1
- data/ext/pg_query/src_backend_nodes_copyfuncs.c +401 -76
- data/ext/pg_query/src_backend_nodes_equalfuncs.c +290 -46
- data/ext/pg_query/src_backend_nodes_extensible.c +1 -1
- data/ext/pg_query/src_backend_nodes_list.c +74 -11
- data/ext/pg_query/src_backend_nodes_makefuncs.c +5 -4
- data/ext/pg_query/src_backend_nodes_nodeFuncs.c +55 -12
- data/ext/pg_query/src_backend_nodes_value.c +28 -19
- data/ext/pg_query/src_backend_parser_gram.c +33874 -31261
- data/ext/pg_query/src_backend_parser_parser.c +26 -7
- data/ext/pg_query/src_backend_parser_scan.c +172 -209
- data/ext/pg_query/src_backend_parser_scansup.c +4 -28
- data/ext/pg_query/src_backend_postmaster_postmaster.c +77 -106
- data/ext/pg_query/src_backend_storage_ipc_ipc.c +13 -4
- data/ext/pg_query/src_backend_storage_lmgr_s_lock.c +5 -4
- data/ext/pg_query/src_backend_tcop_postgres.c +62 -23
- data/ext/pg_query/src_backend_utils_activity_pgstat_database.c +140 -0
- data/ext/pg_query/src_backend_utils_adt_datum.c +13 -1
- data/ext/pg_query/src_backend_utils_adt_expandeddatum.c +1 -1
- data/ext/pg_query/src_backend_utils_adt_format_type.c +6 -2
- data/ext/pg_query/src_backend_utils_adt_ruleutils.c +71 -5
- data/ext/pg_query/src_backend_utils_error_assert.c +16 -14
- data/ext/pg_query/src_backend_utils_error_elog.c +172 -99
- data/ext/pg_query/src_backend_utils_fmgr_fmgr.c +12 -17
- data/ext/pg_query/src_backend_utils_hash_dynahash.c +40 -10
- data/ext/pg_query/src_backend_utils_init_globals.c +5 -5
- data/ext/pg_query/src_backend_utils_mb_mbutils.c +55 -66
- data/ext/pg_query/src_backend_utils_misc_guc.c +206 -45
- data/ext/pg_query/src_backend_utils_mmgr_aset.c +7 -5
- data/ext/pg_query/src_backend_utils_mmgr_mcxt.c +123 -35
- data/ext/pg_query/src_common_encnames.c +1 -1
- data/ext/pg_query/src_common_hashfn.c +3 -3
- data/ext/pg_query/src_common_keywords.c +15 -2
- data/ext/pg_query/src_common_kwlist_d.h +517 -494
- data/ext/pg_query/src_common_kwlookup.c +1 -1
- data/ext/pg_query/src_common_pg_prng.c +152 -0
- data/ext/pg_query/src_common_psprintf.c +1 -1
- data/ext/pg_query/src_common_string.c +7 -1
- data/ext/pg_query/src_common_stringinfo.c +1 -1
- data/ext/pg_query/src_common_wchar.c +701 -109
- data/ext/pg_query/src_pl_plpgsql_src_pl_comp.c +45 -20
- data/ext/pg_query/src_pl_plpgsql_src_pl_funcs.c +1 -18
- data/ext/pg_query/src_pl_plpgsql_src_pl_gram.c +1233 -1259
- data/ext/pg_query/src_pl_plpgsql_src_pl_handler.c +1 -1
- data/ext/pg_query/src_pl_plpgsql_src_pl_reserved_kwlist_d.h +10 -10
- data/ext/pg_query/src_pl_plpgsql_src_pl_scanner.c +2 -2
- data/ext/pg_query/src_pl_plpgsql_src_pl_unreserved_kwlist_d.h +54 -56
- data/ext/pg_query/src_port_pg_bitutils.c +41 -31
- data/ext/pg_query/src_port_pgsleep.c +1 -1
- data/ext/pg_query/src_port_pgstrcasecmp.c +1 -1
- data/ext/pg_query/src_port_qsort.c +12 -224
- data/ext/pg_query/src_port_snprintf.c +37 -13
- data/ext/pg_query/src_port_strerror.c +9 -19
- data/ext/pg_query/src_port_strnlen.c +1 -1
- data/lib/pg_query/filter_columns.rb +1 -1
- data/lib/pg_query/fingerprint.rb +5 -1
- data/lib/pg_query/node.rb +2 -2
- data/lib/pg_query/param_refs.rb +1 -1
- data/lib/pg_query/parse.rb +8 -7
- data/lib/pg_query/pg_query_pb.rb +1108 -942
- data/lib/pg_query/truncate.rb +1 -1
- data/lib/pg_query/version.rb +1 -1
- metadata +23 -13
- data/ext/pg_query/include/access/xloginsert.h +0 -64
- data/ext/pg_query/include/bootstrap/bootstrap.h +0 -62
- data/ext/pg_query/include/parser/parse_clause.h +0 -54
- data/ext/pg_query/include/parser/parse_collate.h +0 -27
- data/ext/pg_query/include/parser/parse_target.h +0 -46
- data/ext/pg_query/pg_query_ruby_freebsd.sym +0 -2
- data/ext/pg_query/src_backend_libpq_pqcomm.c +0 -659
- data/ext/pg_query/src_backend_parser_parse_expr.c +0 -313
- data/ext/pg_query/src_port_erand48.c +0 -127
- data/ext/pg_query/src_port_random.c +0 -31
@@ -23,6 +23,7 @@
|
|
23
23
|
* - _copyBitmapIndexScan
|
24
24
|
* - _copyBitmapHeapScan
|
25
25
|
* - _copyTidScan
|
26
|
+
* - _copyTidRangeScan
|
26
27
|
* - _copySubqueryScan
|
27
28
|
* - _copyFunctionScan
|
28
29
|
* - _copyTableFuncScan
|
@@ -38,6 +39,7 @@
|
|
38
39
|
* - _copyMergeJoin
|
39
40
|
* - _copyHashJoin
|
40
41
|
* - _copyMaterial
|
42
|
+
* - _copyMemoize
|
41
43
|
* - _copySort
|
42
44
|
* - CopySortFields
|
43
45
|
* - _copyIncrementalSort
|
@@ -113,15 +115,22 @@
|
|
113
115
|
* - _copySpecialJoinInfo
|
114
116
|
* - _copyAppendRelInfo
|
115
117
|
* - _copyPlaceHolderInfo
|
116
|
-
* -
|
118
|
+
* - _copyInteger
|
119
|
+
* - _copyFloat
|
120
|
+
* - _copyBoolean
|
121
|
+
* - _copyString
|
122
|
+
* - _copyBitString
|
117
123
|
* - _copyExtensibleNode
|
118
124
|
* - _copyQuery
|
119
125
|
* - _copyRawStmt
|
120
126
|
* - _copyInsertStmt
|
121
127
|
* - _copyDeleteStmt
|
122
128
|
* - _copyUpdateStmt
|
129
|
+
* - _copyMergeStmt
|
123
130
|
* - _copySelectStmt
|
124
131
|
* - _copySetOperationStmt
|
132
|
+
* - _copyReturnStmt
|
133
|
+
* - _copyPLAssignStmt
|
125
134
|
* - _copyAlterTableStmt
|
126
135
|
* - _copyAlterTableCmd
|
127
136
|
* - _copyAlterCollationStmt
|
@@ -174,6 +183,7 @@
|
|
174
183
|
* - _copyAlterOpFamilyStmt
|
175
184
|
* - _copyCreatedbStmt
|
176
185
|
* - _copyAlterDatabaseStmt
|
186
|
+
* - _copyAlterDatabaseRefreshCollStmt
|
177
187
|
* - _copyAlterDatabaseSetStmt
|
178
188
|
* - _copyDropdbStmt
|
179
189
|
* - _copyVacuumStmt
|
@@ -234,13 +244,13 @@
|
|
234
244
|
* - _copyCreateSubscriptionStmt
|
235
245
|
* - _copyAlterSubscriptionStmt
|
236
246
|
* - _copyDropSubscriptionStmt
|
237
|
-
* -
|
247
|
+
* - _copyA_Expr
|
238
248
|
* - _copyColumnRef
|
239
249
|
* - _copyParamRef
|
240
|
-
* -
|
250
|
+
* - _copyA_Const
|
241
251
|
* - _copyFuncCall
|
242
|
-
* -
|
243
|
-
* -
|
252
|
+
* - _copyA_Star
|
253
|
+
* - _copyA_Indices
|
244
254
|
* - _copyA_Indirection
|
245
255
|
* - _copyA_ArrayExpr
|
246
256
|
* - _copyResTarget
|
@@ -256,6 +266,7 @@
|
|
256
266
|
* - _copyRangeTableFuncCol
|
257
267
|
* - _copyTypeName
|
258
268
|
* - _copyIndexElem
|
269
|
+
* - _copyStatsElem
|
259
270
|
* - _copyColumnDef
|
260
271
|
* - _copyConstraint
|
261
272
|
* - _copyDefElem
|
@@ -271,7 +282,11 @@
|
|
271
282
|
* - _copyWithClause
|
272
283
|
* - _copyInferClause
|
273
284
|
* - _copyOnConflictClause
|
285
|
+
* - _copyCTESearchClause
|
286
|
+
* - _copyCTECycleClause
|
274
287
|
* - _copyCommonTableExpr
|
288
|
+
* - _copyMergeWhenClause
|
289
|
+
* - _copyMergeAction
|
275
290
|
* - _copyObjectWithArgs
|
276
291
|
* - _copyAccessPriv
|
277
292
|
* - _copyXmlSerialize
|
@@ -282,6 +297,8 @@
|
|
282
297
|
* - _copyPartitionBoundSpec
|
283
298
|
* - _copyPartitionRangeDatum
|
284
299
|
* - _copyPartitionCmd
|
300
|
+
* - _copyPublicationObject
|
301
|
+
* - _copyPublicationTable
|
285
302
|
* - _copyForeignKeyCacheInfo
|
286
303
|
*--------------------------------------------------------------------
|
287
304
|
*/
|
@@ -299,7 +316,7 @@
|
|
299
316
|
* be handled easily in a simple depth-first traversal.
|
300
317
|
*
|
301
318
|
*
|
302
|
-
* Portions Copyright (c) 1996-
|
319
|
+
* Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
|
303
320
|
* Portions Copyright (c) 1994, Regents of the University of California
|
304
321
|
*
|
305
322
|
* IDENTIFICATION
|
@@ -341,6 +358,10 @@
|
|
341
358
|
#define COPY_STRING_FIELD(fldname) \
|
342
359
|
(newnode->fldname = from->fldname ? pstrdup(from->fldname) : (char *) NULL)
|
343
360
|
|
361
|
+
/* Copy a field that is an inline array */
|
362
|
+
#define COPY_ARRAY_FIELD(fldname) \
|
363
|
+
memcpy(newnode->fldname, from->fldname, sizeof(newnode->fldname))
|
364
|
+
|
344
365
|
/* Copy a field that is a pointer to a simple palloc'd object of size sz */
|
345
366
|
#define COPY_POINTER_FIELD(fldname, sz) \
|
346
367
|
do { \
|
@@ -382,7 +403,6 @@ _copyPlannedStmt(const PlannedStmt *from)
|
|
382
403
|
COPY_NODE_FIELD(planTree);
|
383
404
|
COPY_NODE_FIELD(rtable);
|
384
405
|
COPY_NODE_FIELD(resultRelations);
|
385
|
-
COPY_NODE_FIELD(rootResultRelations);
|
386
406
|
COPY_NODE_FIELD(appendRelations);
|
387
407
|
COPY_NODE_FIELD(subplans);
|
388
408
|
COPY_BITMAPSET_FIELD(rewindPlanIDs);
|
@@ -412,6 +432,7 @@ CopyPlanFields(const Plan *from, Plan *newnode)
|
|
412
432
|
COPY_SCALAR_FIELD(plan_width);
|
413
433
|
COPY_SCALAR_FIELD(parallel_aware);
|
414
434
|
COPY_SCALAR_FIELD(parallel_safe);
|
435
|
+
COPY_SCALAR_FIELD(async_capable);
|
415
436
|
COPY_SCALAR_FIELD(plan_node_id);
|
416
437
|
COPY_NODE_FIELD(targetlist);
|
417
438
|
COPY_NODE_FIELD(qual);
|
@@ -498,9 +519,7 @@ _copyModifyTable(const ModifyTable *from)
|
|
498
519
|
COPY_SCALAR_FIELD(rootRelation);
|
499
520
|
COPY_SCALAR_FIELD(partColsUpdated);
|
500
521
|
COPY_NODE_FIELD(resultRelations);
|
501
|
-
|
502
|
-
COPY_SCALAR_FIELD(rootResultRelIndex);
|
503
|
-
COPY_NODE_FIELD(plans);
|
522
|
+
COPY_NODE_FIELD(updateColnosLists);
|
504
523
|
COPY_NODE_FIELD(withCheckOptionLists);
|
505
524
|
COPY_NODE_FIELD(returningLists);
|
506
525
|
COPY_NODE_FIELD(fdwPrivLists);
|
@@ -510,9 +529,11 @@ _copyModifyTable(const ModifyTable *from)
|
|
510
529
|
COPY_SCALAR_FIELD(onConflictAction);
|
511
530
|
COPY_NODE_FIELD(arbiterIndexes);
|
512
531
|
COPY_NODE_FIELD(onConflictSet);
|
532
|
+
COPY_NODE_FIELD(onConflictCols);
|
513
533
|
COPY_NODE_FIELD(onConflictWhere);
|
514
534
|
COPY_SCALAR_FIELD(exclRelRTI);
|
515
535
|
COPY_NODE_FIELD(exclRelTlist);
|
536
|
+
COPY_NODE_FIELD(mergeActionLists);
|
516
537
|
|
517
538
|
return newnode;
|
518
539
|
}
|
@@ -535,6 +556,7 @@ _copyAppend(const Append *from)
|
|
535
556
|
*/
|
536
557
|
COPY_BITMAPSET_FIELD(apprelids);
|
537
558
|
COPY_NODE_FIELD(appendplans);
|
559
|
+
COPY_SCALAR_FIELD(nasyncplans);
|
538
560
|
COPY_SCALAR_FIELD(first_partial_plan);
|
539
561
|
COPY_NODE_FIELD(part_prune_info);
|
540
562
|
|
@@ -877,6 +899,27 @@ _copyTidScan(const TidScan *from)
|
|
877
899
|
return newnode;
|
878
900
|
}
|
879
901
|
|
902
|
+
/*
|
903
|
+
* _copyTidRangeScan
|
904
|
+
*/
|
905
|
+
static TidRangeScan *
|
906
|
+
_copyTidRangeScan(const TidRangeScan *from)
|
907
|
+
{
|
908
|
+
TidRangeScan *newnode = makeNode(TidRangeScan);
|
909
|
+
|
910
|
+
/*
|
911
|
+
* copy node superclass fields
|
912
|
+
*/
|
913
|
+
CopyScanFields((const Scan *) from, (Scan *) newnode);
|
914
|
+
|
915
|
+
/*
|
916
|
+
* copy remainder of node
|
917
|
+
*/
|
918
|
+
COPY_NODE_FIELD(tidrangequals);
|
919
|
+
|
920
|
+
return newnode;
|
921
|
+
}
|
922
|
+
|
880
923
|
/*
|
881
924
|
* _copySubqueryScan
|
882
925
|
*/
|
@@ -894,6 +937,7 @@ _copySubqueryScan(const SubqueryScan *from)
|
|
894
937
|
* copy remainder of node
|
895
938
|
*/
|
896
939
|
COPY_NODE_FIELD(subplan);
|
940
|
+
COPY_SCALAR_FIELD(scanstatus);
|
897
941
|
|
898
942
|
return newnode;
|
899
943
|
}
|
@@ -1043,6 +1087,7 @@ _copyForeignScan(const ForeignScan *from)
|
|
1043
1087
|
* copy remainder of node
|
1044
1088
|
*/
|
1045
1089
|
COPY_SCALAR_FIELD(operation);
|
1090
|
+
COPY_SCALAR_FIELD(resultRelation);
|
1046
1091
|
COPY_SCALAR_FIELD(fs_server);
|
1047
1092
|
COPY_NODE_FIELD(fdw_exprs);
|
1048
1093
|
COPY_NODE_FIELD(fdw_private);
|
@@ -1213,6 +1258,35 @@ _copyMaterial(const Material *from)
|
|
1213
1258
|
}
|
1214
1259
|
|
1215
1260
|
|
1261
|
+
/*
|
1262
|
+
* _copyMemoize
|
1263
|
+
*/
|
1264
|
+
static Memoize *
|
1265
|
+
_copyMemoize(const Memoize *from)
|
1266
|
+
{
|
1267
|
+
Memoize *newnode = makeNode(Memoize);
|
1268
|
+
|
1269
|
+
/*
|
1270
|
+
* copy node superclass fields
|
1271
|
+
*/
|
1272
|
+
CopyPlanFields((const Plan *) from, (Plan *) newnode);
|
1273
|
+
|
1274
|
+
/*
|
1275
|
+
* copy remainder of node
|
1276
|
+
*/
|
1277
|
+
COPY_SCALAR_FIELD(numKeys);
|
1278
|
+
COPY_POINTER_FIELD(hashOperators, sizeof(Oid) * from->numKeys);
|
1279
|
+
COPY_POINTER_FIELD(collations, sizeof(Oid) * from->numKeys);
|
1280
|
+
COPY_NODE_FIELD(param_exprs);
|
1281
|
+
COPY_SCALAR_FIELD(singlerow);
|
1282
|
+
COPY_SCALAR_FIELD(binary_mode);
|
1283
|
+
COPY_SCALAR_FIELD(est_entries);
|
1284
|
+
COPY_BITMAPSET_FIELD(keyparamids);
|
1285
|
+
|
1286
|
+
return newnode;
|
1287
|
+
}
|
1288
|
+
|
1289
|
+
|
1216
1290
|
/*
|
1217
1291
|
* CopySortFields
|
1218
1292
|
*
|
@@ -1335,11 +1409,14 @@ _copyWindowAgg(const WindowAgg *from)
|
|
1335
1409
|
COPY_SCALAR_FIELD(frameOptions);
|
1336
1410
|
COPY_NODE_FIELD(startOffset);
|
1337
1411
|
COPY_NODE_FIELD(endOffset);
|
1412
|
+
COPY_NODE_FIELD(runCondition);
|
1413
|
+
COPY_NODE_FIELD(runConditionOrig);
|
1338
1414
|
COPY_SCALAR_FIELD(startInRangeFunc);
|
1339
1415
|
COPY_SCALAR_FIELD(endInRangeFunc);
|
1340
1416
|
COPY_SCALAR_FIELD(inRangeColl);
|
1341
1417
|
COPY_SCALAR_FIELD(inRangeAsc);
|
1342
1418
|
COPY_SCALAR_FIELD(inRangeNullsFirst);
|
1419
|
+
COPY_SCALAR_FIELD(topWindow);
|
1343
1420
|
|
1344
1421
|
return newnode;
|
1345
1422
|
}
|
@@ -1771,6 +1848,8 @@ _copyAggref(const Aggref *from)
|
|
1771
1848
|
COPY_SCALAR_FIELD(aggkind);
|
1772
1849
|
COPY_SCALAR_FIELD(agglevelsup);
|
1773
1850
|
COPY_SCALAR_FIELD(aggsplit);
|
1851
|
+
COPY_SCALAR_FIELD(aggno);
|
1852
|
+
COPY_SCALAR_FIELD(aggtransno);
|
1774
1853
|
COPY_LOCATION_FIELD(location);
|
1775
1854
|
|
1776
1855
|
return newnode;
|
@@ -1825,6 +1904,7 @@ _copySubscriptingRef(const SubscriptingRef *from)
|
|
1825
1904
|
|
1826
1905
|
COPY_SCALAR_FIELD(refcontainertype);
|
1827
1906
|
COPY_SCALAR_FIELD(refelemtype);
|
1907
|
+
COPY_SCALAR_FIELD(refrestype);
|
1828
1908
|
COPY_SCALAR_FIELD(reftypmod);
|
1829
1909
|
COPY_SCALAR_FIELD(refcollid);
|
1830
1910
|
COPY_NODE_FIELD(refupperindexpr);
|
@@ -1942,6 +2022,8 @@ _copyScalarArrayOpExpr(const ScalarArrayOpExpr *from)
|
|
1942
2022
|
|
1943
2023
|
COPY_SCALAR_FIELD(opno);
|
1944
2024
|
COPY_SCALAR_FIELD(opfuncid);
|
2025
|
+
COPY_SCALAR_FIELD(hashfuncid);
|
2026
|
+
COPY_SCALAR_FIELD(negfuncid);
|
1945
2027
|
COPY_SCALAR_FIELD(useOr);
|
1946
2028
|
COPY_SCALAR_FIELD(inputcollid);
|
1947
2029
|
COPY_NODE_FIELD(args);
|
@@ -2484,6 +2566,7 @@ _copyJoinExpr(const JoinExpr *from)
|
|
2484
2566
|
COPY_NODE_FIELD(larg);
|
2485
2567
|
COPY_NODE_FIELD(rarg);
|
2486
2568
|
COPY_NODE_FIELD(usingClause);
|
2569
|
+
COPY_NODE_FIELD(join_using_alias);
|
2487
2570
|
COPY_NODE_FIELD(quals);
|
2488
2571
|
COPY_NODE_FIELD(alias);
|
2489
2572
|
COPY_SCALAR_FIELD(rtindex);
|
@@ -2564,6 +2647,7 @@ _copyRestrictInfo(const RestrictInfo *from)
|
|
2564
2647
|
COPY_SCALAR_FIELD(can_join);
|
2565
2648
|
COPY_SCALAR_FIELD(pseudoconstant);
|
2566
2649
|
COPY_SCALAR_FIELD(leakproof);
|
2650
|
+
COPY_SCALAR_FIELD(has_volatile);
|
2567
2651
|
COPY_SCALAR_FIELD(security_level);
|
2568
2652
|
COPY_BITMAPSET_FIELD(clause_relids);
|
2569
2653
|
COPY_BITMAPSET_FIELD(required_relids);
|
@@ -2591,6 +2675,8 @@ _copyRestrictInfo(const RestrictInfo *from)
|
|
2591
2675
|
COPY_SCALAR_FIELD(right_bucketsize);
|
2592
2676
|
COPY_SCALAR_FIELD(left_mcvfreq);
|
2593
2677
|
COPY_SCALAR_FIELD(right_mcvfreq);
|
2678
|
+
COPY_SCALAR_FIELD(left_hasheqoperator);
|
2679
|
+
COPY_SCALAR_FIELD(right_hasheqoperator);
|
2594
2680
|
|
2595
2681
|
return newnode;
|
2596
2682
|
}
|
@@ -2694,6 +2780,7 @@ _copyRangeTblEntry(const RangeTblEntry *from)
|
|
2694
2780
|
COPY_NODE_FIELD(joinaliasvars);
|
2695
2781
|
COPY_NODE_FIELD(joinleftcols);
|
2696
2782
|
COPY_NODE_FIELD(joinrightcols);
|
2783
|
+
COPY_NODE_FIELD(join_using_alias);
|
2697
2784
|
COPY_NODE_FIELD(functions);
|
2698
2785
|
COPY_SCALAR_FIELD(funcordinality);
|
2699
2786
|
COPY_NODE_FIELD(tablefunc);
|
@@ -2802,6 +2889,7 @@ _copyWindowClause(const WindowClause *from)
|
|
2802
2889
|
COPY_SCALAR_FIELD(frameOptions);
|
2803
2890
|
COPY_NODE_FIELD(startOffset);
|
2804
2891
|
COPY_NODE_FIELD(endOffset);
|
2892
|
+
COPY_NODE_FIELD(runCondition);
|
2805
2893
|
COPY_SCALAR_FIELD(startInRangeFunc);
|
2806
2894
|
COPY_SCALAR_FIELD(endInRangeFunc);
|
2807
2895
|
COPY_SCALAR_FIELD(inRangeColl);
|
@@ -2865,6 +2953,38 @@ _copyOnConflictClause(const OnConflictClause *from)
|
|
2865
2953
|
return newnode;
|
2866
2954
|
}
|
2867
2955
|
|
2956
|
+
static CTESearchClause *
|
2957
|
+
_copyCTESearchClause(const CTESearchClause *from)
|
2958
|
+
{
|
2959
|
+
CTESearchClause *newnode = makeNode(CTESearchClause);
|
2960
|
+
|
2961
|
+
COPY_NODE_FIELD(search_col_list);
|
2962
|
+
COPY_SCALAR_FIELD(search_breadth_first);
|
2963
|
+
COPY_STRING_FIELD(search_seq_column);
|
2964
|
+
COPY_LOCATION_FIELD(location);
|
2965
|
+
|
2966
|
+
return newnode;
|
2967
|
+
}
|
2968
|
+
|
2969
|
+
static CTECycleClause *
|
2970
|
+
_copyCTECycleClause(const CTECycleClause *from)
|
2971
|
+
{
|
2972
|
+
CTECycleClause *newnode = makeNode(CTECycleClause);
|
2973
|
+
|
2974
|
+
COPY_NODE_FIELD(cycle_col_list);
|
2975
|
+
COPY_STRING_FIELD(cycle_mark_column);
|
2976
|
+
COPY_NODE_FIELD(cycle_mark_value);
|
2977
|
+
COPY_NODE_FIELD(cycle_mark_default);
|
2978
|
+
COPY_STRING_FIELD(cycle_path_column);
|
2979
|
+
COPY_LOCATION_FIELD(location);
|
2980
|
+
COPY_SCALAR_FIELD(cycle_mark_type);
|
2981
|
+
COPY_SCALAR_FIELD(cycle_mark_typmod);
|
2982
|
+
COPY_SCALAR_FIELD(cycle_mark_collation);
|
2983
|
+
COPY_SCALAR_FIELD(cycle_mark_neop);
|
2984
|
+
|
2985
|
+
return newnode;
|
2986
|
+
}
|
2987
|
+
|
2868
2988
|
static CommonTableExpr *
|
2869
2989
|
_copyCommonTableExpr(const CommonTableExpr *from)
|
2870
2990
|
{
|
@@ -2874,6 +2994,8 @@ _copyCommonTableExpr(const CommonTableExpr *from)
|
|
2874
2994
|
COPY_NODE_FIELD(aliascolnames);
|
2875
2995
|
COPY_SCALAR_FIELD(ctematerialized);
|
2876
2996
|
COPY_NODE_FIELD(ctequery);
|
2997
|
+
COPY_NODE_FIELD(search_clause);
|
2998
|
+
COPY_NODE_FIELD(cycle_clause);
|
2877
2999
|
COPY_LOCATION_FIELD(location);
|
2878
3000
|
COPY_SCALAR_FIELD(cterecursive);
|
2879
3001
|
COPY_SCALAR_FIELD(cterefcount);
|
@@ -2885,8 +3007,37 @@ _copyCommonTableExpr(const CommonTableExpr *from)
|
|
2885
3007
|
return newnode;
|
2886
3008
|
}
|
2887
3009
|
|
3010
|
+
static MergeWhenClause *
|
3011
|
+
_copyMergeWhenClause(const MergeWhenClause *from)
|
3012
|
+
{
|
3013
|
+
MergeWhenClause *newnode = makeNode(MergeWhenClause);
|
3014
|
+
|
3015
|
+
COPY_SCALAR_FIELD(matched);
|
3016
|
+
COPY_SCALAR_FIELD(commandType);
|
3017
|
+
COPY_SCALAR_FIELD(override);
|
3018
|
+
COPY_NODE_FIELD(condition);
|
3019
|
+
COPY_NODE_FIELD(targetList);
|
3020
|
+
COPY_NODE_FIELD(values);
|
3021
|
+
return newnode;
|
3022
|
+
}
|
3023
|
+
|
3024
|
+
static MergeAction *
|
3025
|
+
_copyMergeAction(const MergeAction *from)
|
3026
|
+
{
|
3027
|
+
MergeAction *newnode = makeNode(MergeAction);
|
3028
|
+
|
3029
|
+
COPY_SCALAR_FIELD(matched);
|
3030
|
+
COPY_SCALAR_FIELD(commandType);
|
3031
|
+
COPY_SCALAR_FIELD(override);
|
3032
|
+
COPY_NODE_FIELD(qual);
|
3033
|
+
COPY_NODE_FIELD(targetList);
|
3034
|
+
COPY_NODE_FIELD(updateColnos);
|
3035
|
+
|
3036
|
+
return newnode;
|
3037
|
+
}
|
3038
|
+
|
2888
3039
|
static A_Expr *
|
2889
|
-
|
3040
|
+
_copyA_Expr(const A_Expr *from)
|
2890
3041
|
{
|
2891
3042
|
A_Expr *newnode = makeNode(A_Expr);
|
2892
3043
|
|
@@ -2922,29 +3073,37 @@ _copyParamRef(const ParamRef *from)
|
|
2922
3073
|
}
|
2923
3074
|
|
2924
3075
|
static A_Const *
|
2925
|
-
|
3076
|
+
_copyA_Const(const A_Const *from)
|
2926
3077
|
{
|
2927
3078
|
A_Const *newnode = makeNode(A_Const);
|
2928
3079
|
|
2929
|
-
|
2930
|
-
|
2931
|
-
switch (from->val.type)
|
3080
|
+
COPY_SCALAR_FIELD(isnull);
|
3081
|
+
if (!from->isnull)
|
2932
3082
|
{
|
2933
|
-
|
2934
|
-
|
2935
|
-
|
2936
|
-
|
2937
|
-
|
2938
|
-
|
2939
|
-
|
2940
|
-
|
2941
|
-
|
2942
|
-
|
2943
|
-
|
2944
|
-
|
2945
|
-
|
2946
|
-
|
2947
|
-
|
3083
|
+
/* This part must duplicate other _copy*() functions. */
|
3084
|
+
COPY_SCALAR_FIELD(val.node.type);
|
3085
|
+
switch (nodeTag(&from->val))
|
3086
|
+
{
|
3087
|
+
case T_Integer:
|
3088
|
+
COPY_SCALAR_FIELD(val.ival.ival);
|
3089
|
+
break;
|
3090
|
+
case T_Float:
|
3091
|
+
COPY_STRING_FIELD(val.fval.fval);
|
3092
|
+
break;
|
3093
|
+
case T_Boolean:
|
3094
|
+
COPY_SCALAR_FIELD(val.boolval.boolval);
|
3095
|
+
break;
|
3096
|
+
case T_String:
|
3097
|
+
COPY_STRING_FIELD(val.sval.sval);
|
3098
|
+
break;
|
3099
|
+
case T_BitString:
|
3100
|
+
COPY_STRING_FIELD(val.bsval.bsval);
|
3101
|
+
break;
|
3102
|
+
default:
|
3103
|
+
elog(ERROR, "unrecognized node type: %d",
|
3104
|
+
(int) nodeTag(&from->val));
|
3105
|
+
break;
|
3106
|
+
}
|
2948
3107
|
}
|
2949
3108
|
|
2950
3109
|
COPY_LOCATION_FIELD(location);
|
@@ -2961,18 +3120,19 @@ _copyFuncCall(const FuncCall *from)
|
|
2961
3120
|
COPY_NODE_FIELD(args);
|
2962
3121
|
COPY_NODE_FIELD(agg_order);
|
2963
3122
|
COPY_NODE_FIELD(agg_filter);
|
3123
|
+
COPY_NODE_FIELD(over);
|
2964
3124
|
COPY_SCALAR_FIELD(agg_within_group);
|
2965
3125
|
COPY_SCALAR_FIELD(agg_star);
|
2966
3126
|
COPY_SCALAR_FIELD(agg_distinct);
|
2967
3127
|
COPY_SCALAR_FIELD(func_variadic);
|
2968
|
-
|
3128
|
+
COPY_SCALAR_FIELD(funcformat);
|
2969
3129
|
COPY_LOCATION_FIELD(location);
|
2970
3130
|
|
2971
3131
|
return newnode;
|
2972
3132
|
}
|
2973
3133
|
|
2974
3134
|
static A_Star *
|
2975
|
-
|
3135
|
+
_copyA_Star(const A_Star *from)
|
2976
3136
|
{
|
2977
3137
|
A_Star *newnode = makeNode(A_Star);
|
2978
3138
|
|
@@ -2980,7 +3140,7 @@ _copyAStar(const A_Star *from)
|
|
2980
3140
|
}
|
2981
3141
|
|
2982
3142
|
static A_Indices *
|
2983
|
-
|
3143
|
+
_copyA_Indices(const A_Indices *from)
|
2984
3144
|
{
|
2985
3145
|
A_Indices *newnode = makeNode(A_Indices);
|
2986
3146
|
|
@@ -3200,6 +3360,17 @@ _copyIndexElem(const IndexElem *from)
|
|
3200
3360
|
return newnode;
|
3201
3361
|
}
|
3202
3362
|
|
3363
|
+
static StatsElem *
|
3364
|
+
_copyStatsElem(const StatsElem *from)
|
3365
|
+
{
|
3366
|
+
StatsElem *newnode = makeNode(StatsElem);
|
3367
|
+
|
3368
|
+
COPY_STRING_FIELD(name);
|
3369
|
+
COPY_NODE_FIELD(expr);
|
3370
|
+
|
3371
|
+
return newnode;
|
3372
|
+
}
|
3373
|
+
|
3203
3374
|
static ColumnDef *
|
3204
3375
|
_copyColumnDef(const ColumnDef *from)
|
3205
3376
|
{
|
@@ -3207,6 +3378,7 @@ _copyColumnDef(const ColumnDef *from)
|
|
3207
3378
|
|
3208
3379
|
COPY_STRING_FIELD(colname);
|
3209
3380
|
COPY_NODE_FIELD(typeName);
|
3381
|
+
COPY_STRING_FIELD(compression);
|
3210
3382
|
COPY_SCALAR_FIELD(inhcount);
|
3211
3383
|
COPY_SCALAR_FIELD(is_local);
|
3212
3384
|
COPY_SCALAR_FIELD(is_not_null);
|
@@ -3240,6 +3412,7 @@ _copyConstraint(const Constraint *from)
|
|
3240
3412
|
COPY_NODE_FIELD(raw_expr);
|
3241
3413
|
COPY_STRING_FIELD(cooked_expr);
|
3242
3414
|
COPY_SCALAR_FIELD(generated_when);
|
3415
|
+
COPY_SCALAR_FIELD(nulls_not_distinct);
|
3243
3416
|
COPY_NODE_FIELD(keys);
|
3244
3417
|
COPY_NODE_FIELD(including);
|
3245
3418
|
COPY_NODE_FIELD(exclusions);
|
@@ -3255,6 +3428,7 @@ _copyConstraint(const Constraint *from)
|
|
3255
3428
|
COPY_SCALAR_FIELD(fk_matchtype);
|
3256
3429
|
COPY_SCALAR_FIELD(fk_upd_action);
|
3257
3430
|
COPY_SCALAR_FIELD(fk_del_action);
|
3431
|
+
COPY_NODE_FIELD(fk_del_set_cols);
|
3258
3432
|
COPY_NODE_FIELD(old_conpfeqop);
|
3259
3433
|
COPY_SCALAR_FIELD(old_pktable_oid);
|
3260
3434
|
COPY_SCALAR_FIELD(skip_validation);
|
@@ -3346,6 +3520,7 @@ _copyQuery(const Query *from)
|
|
3346
3520
|
COPY_SCALAR_FIELD(hasModifyingCTE);
|
3347
3521
|
COPY_SCALAR_FIELD(hasForUpdate);
|
3348
3522
|
COPY_SCALAR_FIELD(hasRowSecurity);
|
3523
|
+
COPY_SCALAR_FIELD(isReturn);
|
3349
3524
|
COPY_NODE_FIELD(cteList);
|
3350
3525
|
COPY_NODE_FIELD(rtable);
|
3351
3526
|
COPY_NODE_FIELD(jointree);
|
@@ -3354,6 +3529,7 @@ _copyQuery(const Query *from)
|
|
3354
3529
|
COPY_NODE_FIELD(onConflict);
|
3355
3530
|
COPY_NODE_FIELD(returningList);
|
3356
3531
|
COPY_NODE_FIELD(groupClause);
|
3532
|
+
COPY_SCALAR_FIELD(groupDistinct);
|
3357
3533
|
COPY_NODE_FIELD(groupingSets);
|
3358
3534
|
COPY_NODE_FIELD(havingQual);
|
3359
3535
|
COPY_NODE_FIELD(windowClause);
|
@@ -3366,6 +3542,8 @@ _copyQuery(const Query *from)
|
|
3366
3542
|
COPY_NODE_FIELD(setOperations);
|
3367
3543
|
COPY_NODE_FIELD(constraintDeps);
|
3368
3544
|
COPY_NODE_FIELD(withCheckOptions);
|
3545
|
+
COPY_NODE_FIELD(mergeActionList);
|
3546
|
+
COPY_SCALAR_FIELD(mergeUseOuterJoin);
|
3369
3547
|
COPY_LOCATION_FIELD(stmt_location);
|
3370
3548
|
COPY_SCALAR_FIELD(stmt_len);
|
3371
3549
|
|
@@ -3429,6 +3607,20 @@ _copyUpdateStmt(const UpdateStmt *from)
|
|
3429
3607
|
return newnode;
|
3430
3608
|
}
|
3431
3609
|
|
3610
|
+
static MergeStmt *
|
3611
|
+
_copyMergeStmt(const MergeStmt *from)
|
3612
|
+
{
|
3613
|
+
MergeStmt *newnode = makeNode(MergeStmt);
|
3614
|
+
|
3615
|
+
COPY_NODE_FIELD(relation);
|
3616
|
+
COPY_NODE_FIELD(sourceRelation);
|
3617
|
+
COPY_NODE_FIELD(joinCondition);
|
3618
|
+
COPY_NODE_FIELD(mergeWhenClauses);
|
3619
|
+
COPY_NODE_FIELD(withClause);
|
3620
|
+
|
3621
|
+
return newnode;
|
3622
|
+
}
|
3623
|
+
|
3432
3624
|
static SelectStmt *
|
3433
3625
|
_copySelectStmt(const SelectStmt *from)
|
3434
3626
|
{
|
@@ -3440,6 +3632,7 @@ _copySelectStmt(const SelectStmt *from)
|
|
3440
3632
|
COPY_NODE_FIELD(fromClause);
|
3441
3633
|
COPY_NODE_FIELD(whereClause);
|
3442
3634
|
COPY_NODE_FIELD(groupClause);
|
3635
|
+
COPY_SCALAR_FIELD(groupDistinct);
|
3443
3636
|
COPY_NODE_FIELD(havingClause);
|
3444
3637
|
COPY_NODE_FIELD(windowClause);
|
3445
3638
|
COPY_NODE_FIELD(valuesLists);
|
@@ -3474,6 +3667,30 @@ _copySetOperationStmt(const SetOperationStmt *from)
|
|
3474
3667
|
return newnode;
|
3475
3668
|
}
|
3476
3669
|
|
3670
|
+
static ReturnStmt *
|
3671
|
+
_copyReturnStmt(const ReturnStmt *from)
|
3672
|
+
{
|
3673
|
+
ReturnStmt *newnode = makeNode(ReturnStmt);
|
3674
|
+
|
3675
|
+
COPY_NODE_FIELD(returnval);
|
3676
|
+
|
3677
|
+
return newnode;
|
3678
|
+
}
|
3679
|
+
|
3680
|
+
static PLAssignStmt *
|
3681
|
+
_copyPLAssignStmt(const PLAssignStmt *from)
|
3682
|
+
{
|
3683
|
+
PLAssignStmt *newnode = makeNode(PLAssignStmt);
|
3684
|
+
|
3685
|
+
COPY_STRING_FIELD(name);
|
3686
|
+
COPY_NODE_FIELD(indirection);
|
3687
|
+
COPY_SCALAR_FIELD(nnames);
|
3688
|
+
COPY_NODE_FIELD(val);
|
3689
|
+
COPY_LOCATION_FIELD(location);
|
3690
|
+
|
3691
|
+
return newnode;
|
3692
|
+
}
|
3693
|
+
|
3477
3694
|
static AlterTableStmt *
|
3478
3695
|
_copyAlterTableStmt(const AlterTableStmt *from)
|
3479
3696
|
{
|
@@ -3481,7 +3698,7 @@ _copyAlterTableStmt(const AlterTableStmt *from)
|
|
3481
3698
|
|
3482
3699
|
COPY_NODE_FIELD(relation);
|
3483
3700
|
COPY_NODE_FIELD(cmds);
|
3484
|
-
COPY_SCALAR_FIELD(
|
3701
|
+
COPY_SCALAR_FIELD(objtype);
|
3485
3702
|
COPY_SCALAR_FIELD(missing_ok);
|
3486
3703
|
|
3487
3704
|
return newnode;
|
@@ -3541,6 +3758,7 @@ _copyGrantStmt(const GrantStmt *from)
|
|
3541
3758
|
COPY_NODE_FIELD(privileges);
|
3542
3759
|
COPY_NODE_FIELD(grantees);
|
3543
3760
|
COPY_SCALAR_FIELD(grant_option);
|
3761
|
+
COPY_NODE_FIELD(grantor);
|
3544
3762
|
COPY_SCALAR_FIELD(behavior);
|
3545
3763
|
|
3546
3764
|
return newnode;
|
@@ -3553,6 +3771,7 @@ _copyObjectWithArgs(const ObjectWithArgs *from)
|
|
3553
3771
|
|
3554
3772
|
COPY_NODE_FIELD(objname);
|
3555
3773
|
COPY_NODE_FIELD(objargs);
|
3774
|
+
COPY_NODE_FIELD(objfuncargs);
|
3556
3775
|
COPY_SCALAR_FIELD(args_unspecified);
|
3557
3776
|
|
3558
3777
|
return newnode;
|
@@ -3624,6 +3843,7 @@ _copyCallStmt(const CallStmt *from)
|
|
3624
3843
|
|
3625
3844
|
COPY_NODE_FIELD(funccall);
|
3626
3845
|
COPY_NODE_FIELD(funcexpr);
|
3846
|
+
COPY_NODE_FIELD(outargs);
|
3627
3847
|
|
3628
3848
|
return newnode;
|
3629
3849
|
}
|
@@ -3635,7 +3855,7 @@ _copyClusterStmt(const ClusterStmt *from)
|
|
3635
3855
|
|
3636
3856
|
COPY_NODE_FIELD(relation);
|
3637
3857
|
COPY_STRING_FIELD(indexname);
|
3638
|
-
|
3858
|
+
COPY_NODE_FIELD(params);
|
3639
3859
|
|
3640
3860
|
return newnode;
|
3641
3861
|
}
|
@@ -3802,6 +4022,7 @@ _copyIndexStmt(const IndexStmt *from)
|
|
3802
4022
|
COPY_SCALAR_FIELD(oldCreateSubid);
|
3803
4023
|
COPY_SCALAR_FIELD(oldFirstRelfilenodeSubid);
|
3804
4024
|
COPY_SCALAR_FIELD(unique);
|
4025
|
+
COPY_SCALAR_FIELD(nulls_not_distinct);
|
3805
4026
|
COPY_SCALAR_FIELD(primary);
|
3806
4027
|
COPY_SCALAR_FIELD(isconstraint);
|
3807
4028
|
COPY_SCALAR_FIELD(deferrable);
|
@@ -3824,6 +4045,7 @@ _copyCreateStatsStmt(const CreateStatsStmt *from)
|
|
3824
4045
|
COPY_NODE_FIELD(exprs);
|
3825
4046
|
COPY_NODE_FIELD(relations);
|
3826
4047
|
COPY_STRING_FIELD(stxcomment);
|
4048
|
+
COPY_SCALAR_FIELD(transformed);
|
3827
4049
|
COPY_SCALAR_FIELD(if_not_exists);
|
3828
4050
|
|
3829
4051
|
return newnode;
|
@@ -3852,6 +4074,7 @@ _copyCreateFunctionStmt(const CreateFunctionStmt *from)
|
|
3852
4074
|
COPY_NODE_FIELD(parameters);
|
3853
4075
|
COPY_NODE_FIELD(returnType);
|
3854
4076
|
COPY_NODE_FIELD(options);
|
4077
|
+
COPY_NODE_FIELD(sql_body);
|
3855
4078
|
|
3856
4079
|
return newnode;
|
3857
4080
|
}
|
@@ -4194,6 +4417,16 @@ _copyAlterDatabaseStmt(const AlterDatabaseStmt *from)
|
|
4194
4417
|
return newnode;
|
4195
4418
|
}
|
4196
4419
|
|
4420
|
+
static AlterDatabaseRefreshCollStmt *
|
4421
|
+
_copyAlterDatabaseRefreshCollStmt(const AlterDatabaseRefreshCollStmt *from)
|
4422
|
+
{
|
4423
|
+
AlterDatabaseRefreshCollStmt *newnode = makeNode(AlterDatabaseRefreshCollStmt);
|
4424
|
+
|
4425
|
+
COPY_STRING_FIELD(dbname);
|
4426
|
+
|
4427
|
+
return newnode;
|
4428
|
+
}
|
4429
|
+
|
4197
4430
|
static AlterDatabaseSetStmt *
|
4198
4431
|
_copyAlterDatabaseSetStmt(const AlterDatabaseSetStmt *from)
|
4199
4432
|
{
|
@@ -4259,7 +4492,7 @@ _copyCreateTableAsStmt(const CreateTableAsStmt *from)
|
|
4259
4492
|
|
4260
4493
|
COPY_NODE_FIELD(query);
|
4261
4494
|
COPY_NODE_FIELD(into);
|
4262
|
-
COPY_SCALAR_FIELD(
|
4495
|
+
COPY_SCALAR_FIELD(objtype);
|
4263
4496
|
COPY_SCALAR_FIELD(is_select_into);
|
4264
4497
|
COPY_SCALAR_FIELD(if_not_exists);
|
4265
4498
|
|
@@ -4593,6 +4826,8 @@ _copyCreateTrigStmt(const CreateTrigStmt *from)
|
|
4593
4826
|
{
|
4594
4827
|
CreateTrigStmt *newnode = makeNode(CreateTrigStmt);
|
4595
4828
|
|
4829
|
+
COPY_SCALAR_FIELD(replace);
|
4830
|
+
COPY_SCALAR_FIELD(isconstraint);
|
4596
4831
|
COPY_STRING_FIELD(trigname);
|
4597
4832
|
COPY_NODE_FIELD(relation);
|
4598
4833
|
COPY_NODE_FIELD(funcname);
|
@@ -4602,7 +4837,6 @@ _copyCreateTrigStmt(const CreateTrigStmt *from)
|
|
4602
4837
|
COPY_SCALAR_FIELD(events);
|
4603
4838
|
COPY_NODE_FIELD(columns);
|
4604
4839
|
COPY_NODE_FIELD(whenClause);
|
4605
|
-
COPY_SCALAR_FIELD(isconstraint);
|
4606
4840
|
COPY_NODE_FIELD(transitionRels);
|
4607
4841
|
COPY_SCALAR_FIELD(deferrable);
|
4608
4842
|
COPY_SCALAR_FIELD(initdeferred);
|
@@ -4728,8 +4962,7 @@ _copyReindexStmt(const ReindexStmt *from)
|
|
4728
4962
|
COPY_SCALAR_FIELD(kind);
|
4729
4963
|
COPY_NODE_FIELD(relation);
|
4730
4964
|
COPY_STRING_FIELD(name);
|
4731
|
-
|
4732
|
-
COPY_SCALAR_FIELD(concurrent);
|
4965
|
+
COPY_NODE_FIELD(params);
|
4733
4966
|
|
4734
4967
|
return newnode;
|
4735
4968
|
}
|
@@ -4949,6 +5182,32 @@ _copyPartitionCmd(const PartitionCmd *from)
|
|
4949
5182
|
|
4950
5183
|
COPY_NODE_FIELD(name);
|
4951
5184
|
COPY_NODE_FIELD(bound);
|
5185
|
+
COPY_SCALAR_FIELD(concurrent);
|
5186
|
+
|
5187
|
+
return newnode;
|
5188
|
+
}
|
5189
|
+
|
5190
|
+
static PublicationObjSpec *
|
5191
|
+
_copyPublicationObject(const PublicationObjSpec *from)
|
5192
|
+
{
|
5193
|
+
PublicationObjSpec *newnode = makeNode(PublicationObjSpec);
|
5194
|
+
|
5195
|
+
COPY_SCALAR_FIELD(pubobjtype);
|
5196
|
+
COPY_STRING_FIELD(name);
|
5197
|
+
COPY_NODE_FIELD(pubtable);
|
5198
|
+
COPY_LOCATION_FIELD(location);
|
5199
|
+
|
5200
|
+
return newnode;
|
5201
|
+
}
|
5202
|
+
|
5203
|
+
static PublicationTable *
|
5204
|
+
_copyPublicationTable(const PublicationTable *from)
|
5205
|
+
{
|
5206
|
+
PublicationTable *newnode = makeNode(PublicationTable);
|
5207
|
+
|
5208
|
+
COPY_NODE_FIELD(relation);
|
5209
|
+
COPY_NODE_FIELD(whereClause);
|
5210
|
+
COPY_NODE_FIELD(columns);
|
4952
5211
|
|
4953
5212
|
return newnode;
|
4954
5213
|
}
|
@@ -4960,7 +5219,7 @@ _copyCreatePublicationStmt(const CreatePublicationStmt *from)
|
|
4960
5219
|
|
4961
5220
|
COPY_STRING_FIELD(pubname);
|
4962
5221
|
COPY_NODE_FIELD(options);
|
4963
|
-
COPY_NODE_FIELD(
|
5222
|
+
COPY_NODE_FIELD(pubobjects);
|
4964
5223
|
COPY_SCALAR_FIELD(for_all_tables);
|
4965
5224
|
|
4966
5225
|
return newnode;
|
@@ -4973,9 +5232,9 @@ _copyAlterPublicationStmt(const AlterPublicationStmt *from)
|
|
4973
5232
|
|
4974
5233
|
COPY_STRING_FIELD(pubname);
|
4975
5234
|
COPY_NODE_FIELD(options);
|
4976
|
-
COPY_NODE_FIELD(
|
5235
|
+
COPY_NODE_FIELD(pubobjects);
|
4977
5236
|
COPY_SCALAR_FIELD(for_all_tables);
|
4978
|
-
COPY_SCALAR_FIELD(
|
5237
|
+
COPY_SCALAR_FIELD(action);
|
4979
5238
|
|
4980
5239
|
return newnode;
|
4981
5240
|
}
|
@@ -5044,32 +5303,53 @@ _copyExtensibleNode(const ExtensibleNode *from)
|
|
5044
5303
|
* value.h copy functions
|
5045
5304
|
* ****************************************************************
|
5046
5305
|
*/
|
5047
|
-
static
|
5048
|
-
|
5306
|
+
static Integer *
|
5307
|
+
_copyInteger(const Integer *from)
|
5049
5308
|
{
|
5050
|
-
|
5309
|
+
Integer *newnode = makeNode(Integer);
|
5051
5310
|
|
5052
|
-
|
5311
|
+
COPY_SCALAR_FIELD(ival);
|
5312
|
+
|
5313
|
+
return newnode;
|
5314
|
+
}
|
5315
|
+
|
5316
|
+
static Float *
|
5317
|
+
_copyFloat(const Float *from)
|
5318
|
+
{
|
5319
|
+
Float *newnode = makeNode(Float);
|
5320
|
+
|
5321
|
+
COPY_STRING_FIELD(fval);
|
5322
|
+
|
5323
|
+
return newnode;
|
5324
|
+
}
|
5325
|
+
|
5326
|
+
static Boolean *
|
5327
|
+
_copyBoolean(const Boolean *from)
|
5328
|
+
{
|
5329
|
+
Boolean *newnode = makeNode(Boolean);
|
5330
|
+
|
5331
|
+
COPY_SCALAR_FIELD(boolval);
|
5332
|
+
|
5333
|
+
return newnode;
|
5334
|
+
}
|
5335
|
+
|
5336
|
+
static String *
|
5337
|
+
_copyString(const String *from)
|
5338
|
+
{
|
5339
|
+
String *newnode = makeNode(String);
|
5340
|
+
|
5341
|
+
COPY_STRING_FIELD(sval);
|
5342
|
+
|
5343
|
+
return newnode;
|
5344
|
+
}
|
5345
|
+
|
5346
|
+
static BitString *
|
5347
|
+
_copyBitString(const BitString *from)
|
5348
|
+
{
|
5349
|
+
BitString *newnode = makeNode(BitString);
|
5350
|
+
|
5351
|
+
COPY_STRING_FIELD(bsval);
|
5053
5352
|
|
5054
|
-
COPY_SCALAR_FIELD(type);
|
5055
|
-
switch (from->type)
|
5056
|
-
{
|
5057
|
-
case T_Integer:
|
5058
|
-
COPY_SCALAR_FIELD(val.ival);
|
5059
|
-
break;
|
5060
|
-
case T_Float:
|
5061
|
-
case T_String:
|
5062
|
-
case T_BitString:
|
5063
|
-
COPY_STRING_FIELD(val.str);
|
5064
|
-
break;
|
5065
|
-
case T_Null:
|
5066
|
-
/* nothing to do */
|
5067
|
-
break;
|
5068
|
-
default:
|
5069
|
-
elog(ERROR, "unrecognized node type: %d",
|
5070
|
-
(int) from->type);
|
5071
|
-
break;
|
5072
|
-
}
|
5073
5353
|
return newnode;
|
5074
5354
|
}
|
5075
5355
|
|
@@ -5083,15 +5363,13 @@ _copyForeignKeyCacheInfo(const ForeignKeyCacheInfo *from)
|
|
5083
5363
|
COPY_SCALAR_FIELD(conrelid);
|
5084
5364
|
COPY_SCALAR_FIELD(confrelid);
|
5085
5365
|
COPY_SCALAR_FIELD(nkeys);
|
5086
|
-
|
5087
|
-
|
5088
|
-
|
5089
|
-
memcpy(newnode->conpfeqop, from->conpfeqop, sizeof(newnode->conpfeqop));
|
5366
|
+
COPY_ARRAY_FIELD(conkey);
|
5367
|
+
COPY_ARRAY_FIELD(confkey);
|
5368
|
+
COPY_ARRAY_FIELD(conpfeqop);
|
5090
5369
|
|
5091
5370
|
return newnode;
|
5092
5371
|
}
|
5093
5372
|
|
5094
|
-
|
5095
5373
|
/*
|
5096
5374
|
* copyObjectImpl -- implementation of copyObject(); see nodes/nodes.h
|
5097
5375
|
*
|
@@ -5174,6 +5452,9 @@ copyObjectImpl(const void *from)
|
|
5174
5452
|
case T_TidScan:
|
5175
5453
|
retval = _copyTidScan(from);
|
5176
5454
|
break;
|
5455
|
+
case T_TidRangeScan:
|
5456
|
+
retval = _copyTidRangeScan(from);
|
5457
|
+
break;
|
5177
5458
|
case T_SubqueryScan:
|
5178
5459
|
retval = _copySubqueryScan(from);
|
5179
5460
|
break;
|
@@ -5216,6 +5497,9 @@ copyObjectImpl(const void *from)
|
|
5216
5497
|
case T_Material:
|
5217
5498
|
retval = _copyMaterial(from);
|
5218
5499
|
break;
|
5500
|
+
case T_Memoize:
|
5501
|
+
retval = _copyMemoize(from);
|
5502
|
+
break;
|
5219
5503
|
case T_Sort:
|
5220
5504
|
retval = _copySort(from);
|
5221
5505
|
break;
|
@@ -5451,11 +5735,19 @@ copyObjectImpl(const void *from)
|
|
5451
5735
|
* VALUE NODES
|
5452
5736
|
*/
|
5453
5737
|
case T_Integer:
|
5738
|
+
retval = _copyInteger(from);
|
5739
|
+
break;
|
5454
5740
|
case T_Float:
|
5741
|
+
retval = _copyFloat(from);
|
5742
|
+
break;
|
5743
|
+
case T_Boolean:
|
5744
|
+
retval = _copyBoolean(from);
|
5745
|
+
break;
|
5455
5746
|
case T_String:
|
5747
|
+
retval = _copyString(from);
|
5748
|
+
break;
|
5456
5749
|
case T_BitString:
|
5457
|
-
|
5458
|
-
retval = _copyValue(from);
|
5750
|
+
retval = _copyBitString(from);
|
5459
5751
|
break;
|
5460
5752
|
|
5461
5753
|
/*
|
@@ -5499,12 +5791,21 @@ copyObjectImpl(const void *from)
|
|
5499
5791
|
case T_UpdateStmt:
|
5500
5792
|
retval = _copyUpdateStmt(from);
|
5501
5793
|
break;
|
5794
|
+
case T_MergeStmt:
|
5795
|
+
retval = _copyMergeStmt(from);
|
5796
|
+
break;
|
5502
5797
|
case T_SelectStmt:
|
5503
5798
|
retval = _copySelectStmt(from);
|
5504
5799
|
break;
|
5505
5800
|
case T_SetOperationStmt:
|
5506
5801
|
retval = _copySetOperationStmt(from);
|
5507
5802
|
break;
|
5803
|
+
case T_ReturnStmt:
|
5804
|
+
retval = _copyReturnStmt(from);
|
5805
|
+
break;
|
5806
|
+
case T_PLAssignStmt:
|
5807
|
+
retval = _copyPLAssignStmt(from);
|
5808
|
+
break;
|
5508
5809
|
case T_AlterTableStmt:
|
5509
5810
|
retval = _copyAlterTableStmt(from);
|
5510
5811
|
break;
|
@@ -5658,6 +5959,9 @@ copyObjectImpl(const void *from)
|
|
5658
5959
|
case T_AlterDatabaseStmt:
|
5659
5960
|
retval = _copyAlterDatabaseStmt(from);
|
5660
5961
|
break;
|
5962
|
+
case T_AlterDatabaseRefreshCollStmt:
|
5963
|
+
retval = _copyAlterDatabaseRefreshCollStmt(from);
|
5964
|
+
break;
|
5661
5965
|
case T_AlterDatabaseSetStmt:
|
5662
5966
|
retval = _copyAlterDatabaseSetStmt(from);
|
5663
5967
|
break;
|
@@ -5842,7 +6146,7 @@ copyObjectImpl(const void *from)
|
|
5842
6146
|
retval = _copyDropSubscriptionStmt(from);
|
5843
6147
|
break;
|
5844
6148
|
case T_A_Expr:
|
5845
|
-
retval =
|
6149
|
+
retval = _copyA_Expr(from);
|
5846
6150
|
break;
|
5847
6151
|
case T_ColumnRef:
|
5848
6152
|
retval = _copyColumnRef(from);
|
@@ -5851,16 +6155,16 @@ copyObjectImpl(const void *from)
|
|
5851
6155
|
retval = _copyParamRef(from);
|
5852
6156
|
break;
|
5853
6157
|
case T_A_Const:
|
5854
|
-
retval =
|
6158
|
+
retval = _copyA_Const(from);
|
5855
6159
|
break;
|
5856
6160
|
case T_FuncCall:
|
5857
6161
|
retval = _copyFuncCall(from);
|
5858
6162
|
break;
|
5859
6163
|
case T_A_Star:
|
5860
|
-
retval =
|
6164
|
+
retval = _copyA_Star(from);
|
5861
6165
|
break;
|
5862
6166
|
case T_A_Indices:
|
5863
|
-
retval =
|
6167
|
+
retval = _copyA_Indices(from);
|
5864
6168
|
break;
|
5865
6169
|
case T_A_Indirection:
|
5866
6170
|
retval = _copyA_Indirection(from);
|
@@ -5907,6 +6211,9 @@ copyObjectImpl(const void *from)
|
|
5907
6211
|
case T_IndexElem:
|
5908
6212
|
retval = _copyIndexElem(from);
|
5909
6213
|
break;
|
6214
|
+
case T_StatsElem:
|
6215
|
+
retval = _copyStatsElem(from);
|
6216
|
+
break;
|
5910
6217
|
case T_ColumnDef:
|
5911
6218
|
retval = _copyColumnDef(from);
|
5912
6219
|
break;
|
@@ -5952,9 +6259,21 @@ copyObjectImpl(const void *from)
|
|
5952
6259
|
case T_OnConflictClause:
|
5953
6260
|
retval = _copyOnConflictClause(from);
|
5954
6261
|
break;
|
6262
|
+
case T_CTESearchClause:
|
6263
|
+
retval = _copyCTESearchClause(from);
|
6264
|
+
break;
|
6265
|
+
case T_CTECycleClause:
|
6266
|
+
retval = _copyCTECycleClause(from);
|
6267
|
+
break;
|
5955
6268
|
case T_CommonTableExpr:
|
5956
6269
|
retval = _copyCommonTableExpr(from);
|
5957
6270
|
break;
|
6271
|
+
case T_MergeWhenClause:
|
6272
|
+
retval = _copyMergeWhenClause(from);
|
6273
|
+
break;
|
6274
|
+
case T_MergeAction:
|
6275
|
+
retval = _copyMergeAction(from);
|
6276
|
+
break;
|
5958
6277
|
case T_ObjectWithArgs:
|
5959
6278
|
retval = _copyObjectWithArgs(from);
|
5960
6279
|
break;
|
@@ -5985,6 +6304,12 @@ copyObjectImpl(const void *from)
|
|
5985
6304
|
case T_PartitionCmd:
|
5986
6305
|
retval = _copyPartitionCmd(from);
|
5987
6306
|
break;
|
6307
|
+
case T_PublicationObjSpec:
|
6308
|
+
retval = _copyPublicationObject(from);
|
6309
|
+
break;
|
6310
|
+
case T_PublicationTable:
|
6311
|
+
retval = _copyPublicationTable(from);
|
6312
|
+
break;
|
5988
6313
|
|
5989
6314
|
/*
|
5990
6315
|
* MISCELLANEOUS NODES
|