pg_query 5.0.0 → 6.0.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 +27 -0
- data/README.md +1 -1
- data/Rakefile +3 -4
- data/ext/pg_query/extconf.rb +14 -4
- data/ext/pg_query/include/pg_query.h +4 -3
- data/ext/pg_query/include/pg_query_enum_defs.c +424 -154
- data/ext/pg_query/include/pg_query_fingerprint_conds.c +68 -4
- data/ext/pg_query/include/pg_query_fingerprint_defs.c +2901 -1794
- data/ext/pg_query/include/pg_query_outfuncs_conds.c +51 -3
- data/ext/pg_query/include/pg_query_outfuncs_defs.c +211 -24
- data/ext/pg_query/include/pg_query_readfuncs_conds.c +17 -1
- data/ext/pg_query/include/pg_query_readfuncs_defs.c +272 -53
- data/ext/pg_query/include/postgres/access/amapi.h +299 -0
- data/ext/pg_query/include/postgres/access/attmap.h +54 -0
- data/ext/pg_query/include/postgres/access/attnum.h +64 -0
- data/ext/pg_query/include/postgres/access/brin_internal.h +116 -0
- data/ext/pg_query/include/postgres/access/brin_tuple.h +112 -0
- data/ext/pg_query/include/postgres/access/clog.h +62 -0
- data/ext/pg_query/include/postgres/access/commit_ts.h +73 -0
- data/ext/pg_query/include/postgres/access/detoast.h +82 -0
- data/ext/pg_query/include/postgres/access/genam.h +237 -0
- data/ext/pg_query/include/postgres/access/gin.h +91 -0
- data/ext/pg_query/include/postgres/access/htup.h +89 -0
- data/ext/pg_query/include/postgres/access/htup_details.h +811 -0
- data/ext/pg_query/include/postgres/access/itup.h +170 -0
- data/ext/pg_query/include/postgres/access/parallel.h +81 -0
- data/ext/pg_query/include/postgres/access/printtup.h +35 -0
- data/ext/pg_query/include/postgres/access/relation.h +28 -0
- data/ext/pg_query/include/postgres/access/relscan.h +191 -0
- data/ext/pg_query/include/postgres/access/rmgrlist.h +49 -0
- data/ext/pg_query/include/postgres/access/sdir.h +67 -0
- data/ext/pg_query/include/postgres/access/skey.h +151 -0
- data/ext/pg_query/include/postgres/access/slru.h +221 -0
- data/ext/pg_query/include/postgres/access/stratnum.h +85 -0
- data/ext/pg_query/include/postgres/access/sysattr.h +29 -0
- data/ext/pg_query/include/postgres/access/table.h +28 -0
- data/ext/pg_query/include/postgres/access/tableam.h +2109 -0
- data/ext/pg_query/include/postgres/access/tidstore.h +50 -0
- data/ext/pg_query/include/postgres/access/toast_compression.h +73 -0
- data/ext/pg_query/include/postgres/access/transam.h +375 -0
- data/ext/pg_query/include/postgres/access/tsmapi.h +82 -0
- data/ext/pg_query/include/postgres/access/tupconvert.h +54 -0
- data/ext/pg_query/include/postgres/access/tupdesc.h +154 -0
- data/ext/pg_query/include/postgres/access/tupmacs.h +207 -0
- data/ext/pg_query/include/postgres/access/twophase.h +65 -0
- data/ext/pg_query/include/postgres/access/xact.h +530 -0
- data/ext/pg_query/include/postgres/access/xlog.h +310 -0
- data/ext/pg_query/include/postgres/access/xlog_internal.h +405 -0
- data/ext/pg_query/include/postgres/access/xlogbackup.h +43 -0
- data/ext/pg_query/include/postgres/access/xlogdefs.h +82 -0
- data/ext/pg_query/include/postgres/access/xlogprefetcher.h +55 -0
- data/ext/pg_query/include/postgres/access/xlogreader.h +444 -0
- data/ext/pg_query/include/postgres/access/xlogrecord.h +248 -0
- data/ext/pg_query/include/postgres/access/xlogrecovery.h +158 -0
- data/ext/pg_query/include/postgres/archive/archive_module.h +67 -0
- data/ext/pg_query/include/postgres/c.h +1374 -0
- data/ext/pg_query/include/postgres/catalog/catalog.h +47 -0
- data/ext/pg_query/include/postgres/catalog/catversion.h +62 -0
- data/ext/pg_query/include/postgres/catalog/dependency.h +228 -0
- data/ext/pg_query/include/postgres/catalog/genbki.h +149 -0
- data/ext/pg_query/include/postgres/catalog/index.h +218 -0
- data/ext/pg_query/include/postgres/catalog/indexing.h +54 -0
- data/ext/pg_query/include/postgres/catalog/namespace.h +189 -0
- data/ext/pg_query/include/postgres/catalog/objectaccess.h +267 -0
- data/ext/pg_query/include/postgres/catalog/objectaddress.h +89 -0
- data/ext/pg_query/include/postgres/catalog/pg_aggregate.h +182 -0
- data/ext/pg_query/include/postgres/catalog/pg_aggregate_d.h +78 -0
- data/ext/pg_query/include/postgres/catalog/pg_am.h +66 -0
- data/ext/pg_query/include/postgres/catalog/pg_am_d.h +47 -0
- data/ext/pg_query/include/postgres/catalog/pg_attribute.h +240 -0
- data/ext/pg_query/include/postgres/catalog/pg_attribute_d.h +62 -0
- data/ext/pg_query/include/postgres/catalog/pg_authid.h +66 -0
- data/ext/pg_query/include/postgres/catalog/pg_authid_d.h +60 -0
- data/ext/pg_query/include/postgres/catalog/pg_class.h +235 -0
- data/ext/pg_query/include/postgres/catalog/pg_class_d.h +134 -0
- data/ext/pg_query/include/postgres/catalog/pg_collation.h +106 -0
- data/ext/pg_query/include/postgres/catalog/pg_collation_d.h +66 -0
- data/ext/pg_query/include/postgres/catalog/pg_constraint.h +278 -0
- data/ext/pg_query/include/postgres/catalog/pg_constraint_d.h +74 -0
- data/ext/pg_query/include/postgres/catalog/pg_control.h +260 -0
- data/ext/pg_query/include/postgres/catalog/pg_conversion.h +79 -0
- data/ext/pg_query/include/postgres/catalog/pg_conversion_d.h +38 -0
- data/ext/pg_query/include/postgres/catalog/pg_database.h +129 -0
- data/ext/pg_query/include/postgres/catalog/pg_database_d.h +53 -0
- data/ext/pg_query/include/postgres/catalog/pg_depend.h +77 -0
- data/ext/pg_query/include/postgres/catalog/pg_depend_d.h +36 -0
- data/ext/pg_query/include/postgres/catalog/pg_event_trigger.h +60 -0
- data/ext/pg_query/include/postgres/catalog/pg_event_trigger_d.h +36 -0
- data/ext/pg_query/include/postgres/catalog/pg_index.h +92 -0
- data/ext/pg_query/include/postgres/catalog/pg_index_d.h +59 -0
- data/ext/pg_query/include/postgres/catalog/pg_language.h +75 -0
- data/ext/pg_query/include/postgres/catalog/pg_language_d.h +41 -0
- data/ext/pg_query/include/postgres/catalog/pg_namespace.h +67 -0
- data/ext/pg_query/include/postgres/catalog/pg_namespace_d.h +36 -0
- data/ext/pg_query/include/postgres/catalog/pg_opclass.h +91 -0
- data/ext/pg_query/include/postgres/catalog/pg_opclass_d.h +51 -0
- data/ext/pg_query/include/postgres/catalog/pg_operator.h +124 -0
- data/ext/pg_query/include/postgres/catalog/pg_operator_d.h +142 -0
- data/ext/pg_query/include/postgres/catalog/pg_opfamily.h +67 -0
- data/ext/pg_query/include/postgres/catalog/pg_opfamily_d.h +51 -0
- data/ext/pg_query/include/postgres/catalog/pg_partitioned_table.h +76 -0
- data/ext/pg_query/include/postgres/catalog/pg_partitioned_table_d.h +36 -0
- data/ext/pg_query/include/postgres/catalog/pg_proc.h +223 -0
- data/ext/pg_query/include/postgres/catalog/pg_proc_d.h +101 -0
- data/ext/pg_query/include/postgres/catalog/pg_publication.h +161 -0
- data/ext/pg_query/include/postgres/catalog/pg_publication_d.h +38 -0
- data/ext/pg_query/include/postgres/catalog/pg_replication_origin.h +65 -0
- data/ext/pg_query/include/postgres/catalog/pg_replication_origin_d.h +33 -0
- data/ext/pg_query/include/postgres/catalog/pg_statistic.h +288 -0
- data/ext/pg_query/include/postgres/catalog/pg_statistic_d.h +199 -0
- data/ext/pg_query/include/postgres/catalog/pg_statistic_ext.h +91 -0
- data/ext/pg_query/include/postgres/catalog/pg_statistic_ext_d.h +45 -0
- data/ext/pg_query/include/postgres/catalog/pg_transform.h +51 -0
- data/ext/pg_query/include/postgres/catalog/pg_transform_d.h +34 -0
- data/ext/pg_query/include/postgres/catalog/pg_trigger.h +153 -0
- data/ext/pg_query/include/postgres/catalog/pg_trigger_d.h +109 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_config.h +56 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_config_d.h +34 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_dict.h +62 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_dict_d.h +35 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_parser.h +63 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_parser_d.h +37 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_template.h +54 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_template_d.h +34 -0
- data/ext/pg_query/include/postgres/catalog/pg_type.h +407 -0
- data/ext/pg_query/include/postgres/catalog/pg_type_d.h +324 -0
- data/ext/pg_query/include/postgres/catalog/storage.h +50 -0
- data/ext/pg_query/include/postgres/catalog/syscache_ids.h +104 -0
- data/ext/pg_query/include/postgres/commands/async.h +49 -0
- data/ext/pg_query/include/postgres/commands/dbcommands.h +37 -0
- data/ext/pg_query/include/postgres/commands/defrem.h +161 -0
- data/ext/pg_query/include/postgres/commands/event_trigger.h +91 -0
- data/ext/pg_query/include/postgres/commands/explain.h +145 -0
- data/ext/pg_query/include/postgres/commands/prepare.h +61 -0
- data/ext/pg_query/include/postgres/commands/tablespace.h +69 -0
- data/ext/pg_query/include/postgres/commands/trigger.h +288 -0
- data/ext/pg_query/include/postgres/commands/vacuum.h +388 -0
- data/ext/pg_query/include/postgres/common/cryptohash.h +39 -0
- data/ext/pg_query/include/postgres/common/file_perm.h +56 -0
- data/ext/pg_query/include/postgres/common/file_utils.h +65 -0
- data/ext/pg_query/include/postgres/common/hashfn.h +119 -0
- data/ext/pg_query/include/postgres/common/hashfn_unstable.h +453 -0
- data/ext/pg_query/include/postgres/common/int.h +512 -0
- data/ext/pg_query/include/postgres/common/keywords.h +29 -0
- data/ext/pg_query/include/postgres/common/kwlookup.h +44 -0
- data/ext/pg_query/include/postgres/common/pg_prng.h +62 -0
- data/ext/pg_query/include/postgres/common/relpath.h +97 -0
- data/ext/pg_query/include/postgres/common/scram-common.h +70 -0
- data/ext/pg_query/include/postgres/common/sha2.h +32 -0
- data/ext/pg_query/include/postgres/common/string.h +44 -0
- data/ext/pg_query/include/postgres/common/unicode_east_asian_fw_table.h +124 -0
- data/ext/pg_query/include/postgres/copyfuncs.funcs.c +5261 -0
- data/ext/pg_query/include/postgres/copyfuncs.switch.c +989 -0
- data/ext/pg_query/include/postgres/datatype/timestamp.h +269 -0
- data/ext/pg_query/include/postgres/equalfuncs.funcs.c +3310 -0
- data/ext/pg_query/include/postgres/equalfuncs.switch.c +836 -0
- data/ext/pg_query/include/postgres/executor/execdesc.h +70 -0
- data/ext/pg_query/include/postgres/executor/executor.h +681 -0
- data/ext/pg_query/include/postgres/executor/functions.h +56 -0
- data/ext/pg_query/include/postgres/executor/instrument.h +120 -0
- data/ext/pg_query/include/postgres/executor/spi.h +207 -0
- data/ext/pg_query/include/postgres/executor/tablefunc.h +67 -0
- data/ext/pg_query/include/postgres/executor/tuptable.h +523 -0
- data/ext/pg_query/include/postgres/fmgr.h +800 -0
- data/ext/pg_query/include/postgres/foreign/fdwapi.h +294 -0
- data/ext/pg_query/include/postgres/funcapi.h +360 -0
- data/ext/pg_query/include/postgres/gram.h +1168 -0
- data/ext/pg_query/include/postgres/gramparse.h +75 -0
- data/ext/pg_query/include/postgres/jit/jit.h +106 -0
- data/ext/pg_query/include/postgres/kwlist_d.h +1164 -0
- data/ext/pg_query/include/postgres/lib/dshash.h +130 -0
- data/ext/pg_query/include/postgres/lib/ilist.h +1159 -0
- data/ext/pg_query/include/postgres/lib/pairingheap.h +102 -0
- data/ext/pg_query/include/postgres/lib/simplehash.h +1206 -0
- data/ext/pg_query/include/postgres/lib/sort_template.h +445 -0
- data/ext/pg_query/include/postgres/lib/stringinfo.h +243 -0
- data/ext/pg_query/include/postgres/libpq/auth.h +37 -0
- data/ext/pg_query/include/postgres/libpq/crypt.h +47 -0
- data/ext/pg_query/include/postgres/libpq/hba.h +186 -0
- data/ext/pg_query/include/postgres/libpq/libpq-be.h +358 -0
- data/ext/pg_query/include/postgres/libpq/libpq.h +143 -0
- data/ext/pg_query/include/postgres/libpq/pqcomm.h +169 -0
- data/ext/pg_query/include/postgres/libpq/pqformat.h +209 -0
- data/ext/pg_query/include/postgres/libpq/pqsignal.h +54 -0
- data/ext/pg_query/include/postgres/libpq/protocol.h +89 -0
- data/ext/pg_query/include/postgres/libpq/sasl.h +136 -0
- data/ext/pg_query/include/postgres/libpq/scram.h +37 -0
- data/ext/pg_query/include/postgres/mb/pg_wchar.h +792 -0
- data/ext/pg_query/include/postgres/mb/stringinfo_mb.h +24 -0
- data/ext/pg_query/include/postgres/miscadmin.h +519 -0
- data/ext/pg_query/include/postgres/nodes/bitmapset.h +140 -0
- data/ext/pg_query/include/postgres/nodes/execnodes.h +2852 -0
- data/ext/pg_query/include/postgres/nodes/extensible.h +164 -0
- data/ext/pg_query/include/postgres/nodes/lockoptions.h +61 -0
- data/ext/pg_query/include/postgres/nodes/makefuncs.h +127 -0
- data/ext/pg_query/include/postgres/nodes/memnodes.h +152 -0
- data/ext/pg_query/include/postgres/nodes/miscnodes.h +56 -0
- data/ext/pg_query/include/postgres/nodes/nodeFuncs.h +222 -0
- data/ext/pg_query/include/postgres/nodes/nodes.h +435 -0
- data/ext/pg_query/include/postgres/nodes/nodetags.h +491 -0
- data/ext/pg_query/include/postgres/nodes/params.h +170 -0
- data/ext/pg_query/include/postgres/nodes/parsenodes.h +4233 -0
- data/ext/pg_query/include/postgres/nodes/pathnodes.h +3435 -0
- data/ext/pg_query/include/postgres/nodes/pg_list.h +686 -0
- data/ext/pg_query/include/postgres/nodes/plannodes.h +1593 -0
- data/ext/pg_query/include/postgres/nodes/primnodes.h +2335 -0
- data/ext/pg_query/include/postgres/nodes/print.h +34 -0
- data/ext/pg_query/include/postgres/nodes/queryjumble.h +86 -0
- data/ext/pg_query/include/postgres/nodes/replnodes.h +132 -0
- data/ext/pg_query/include/postgres/nodes/supportnodes.h +346 -0
- data/ext/pg_query/include/postgres/nodes/tidbitmap.h +75 -0
- data/ext/pg_query/include/postgres/nodes/value.h +90 -0
- data/ext/pg_query/include/postgres/optimizer/cost.h +216 -0
- data/ext/pg_query/include/postgres/optimizer/geqo.h +90 -0
- data/ext/pg_query/include/postgres/optimizer/geqo_gene.h +45 -0
- data/ext/pg_query/include/postgres/optimizer/optimizer.h +205 -0
- data/ext/pg_query/include/postgres/optimizer/paths.h +271 -0
- data/ext/pg_query/include/postgres/optimizer/planmain.h +123 -0
- data/ext/pg_query/include/postgres/parser/analyze.h +66 -0
- data/ext/pg_query/include/postgres/parser/kwlist.h +518 -0
- data/ext/pg_query/include/postgres/parser/parse_agg.h +65 -0
- data/ext/pg_query/include/postgres/parser/parse_coerce.h +102 -0
- data/ext/pg_query/include/postgres/parser/parse_expr.h +25 -0
- data/ext/pg_query/include/postgres/parser/parse_func.h +74 -0
- data/ext/pg_query/include/postgres/parser/parse_node.h +358 -0
- data/ext/pg_query/include/postgres/parser/parse_oper.h +68 -0
- data/ext/pg_query/include/postgres/parser/parse_relation.h +129 -0
- data/ext/pg_query/include/postgres/parser/parse_type.h +61 -0
- data/ext/pg_query/include/postgres/parser/parser.h +68 -0
- data/ext/pg_query/include/postgres/parser/parsetree.h +61 -0
- data/ext/pg_query/include/postgres/parser/scanner.h +152 -0
- data/ext/pg_query/include/postgres/parser/scansup.h +27 -0
- data/ext/pg_query/include/postgres/partitioning/partdefs.h +26 -0
- data/ext/pg_query/include/postgres/pg_config.h +977 -0
- data/ext/pg_query/include/postgres/pg_config_manual.h +385 -0
- data/ext/pg_query/include/postgres/pg_config_os.h +8 -0
- data/ext/pg_query/include/postgres/pg_getopt.h +56 -0
- data/ext/pg_query/include/postgres/pg_trace.h +17 -0
- data/ext/pg_query/include/postgres/pgstat.h +780 -0
- data/ext/pg_query/include/postgres/pgtime.h +94 -0
- data/ext/pg_query/include/postgres/pl_gram.h +385 -0
- data/ext/pg_query/include/postgres/pl_reserved_kwlist.h +52 -0
- data/ext/pg_query/include/postgres/pl_reserved_kwlist_d.h +114 -0
- data/ext/pg_query/include/postgres/pl_unreserved_kwlist.h +112 -0
- data/ext/pg_query/include/postgres/pl_unreserved_kwlist_d.h +246 -0
- data/ext/pg_query/include/postgres/plerrcodes.h +998 -0
- data/ext/pg_query/include/postgres/plpgsql.h +1342 -0
- data/ext/pg_query/include/postgres/port/atomics/arch-arm.h +32 -0
- data/ext/pg_query/include/postgres/port/atomics/arch-hppa.h +17 -0
- data/ext/pg_query/include/postgres/port/atomics/arch-ppc.h +256 -0
- data/ext/pg_query/include/postgres/port/atomics/arch-x86.h +254 -0
- data/ext/pg_query/include/postgres/port/atomics/fallback.h +170 -0
- data/ext/pg_query/include/postgres/port/atomics/generic-gcc.h +323 -0
- data/ext/pg_query/include/postgres/port/atomics/generic-msvc.h +119 -0
- data/ext/pg_query/include/postgres/port/atomics/generic-sunpro.h +121 -0
- data/ext/pg_query/include/postgres/port/atomics/generic.h +437 -0
- data/ext/pg_query/include/postgres/port/atomics.h +606 -0
- data/ext/pg_query/include/postgres/port/pg_bitutils.h +421 -0
- data/ext/pg_query/include/postgres/port/pg_bswap.h +161 -0
- data/ext/pg_query/include/postgres/port/pg_crc32c.h +110 -0
- data/ext/pg_query/include/postgres/port/pg_iovec.h +117 -0
- data/ext/pg_query/include/postgres/port/simd.h +422 -0
- data/ext/pg_query/include/postgres/port/win32/arpa/inet.h +3 -0
- data/ext/pg_query/include/postgres/port/win32/dlfcn.h +1 -0
- data/ext/pg_query/include/postgres/port/win32/grp.h +1 -0
- data/ext/pg_query/include/postgres/port/win32/netdb.h +7 -0
- data/ext/pg_query/include/postgres/port/win32/netinet/in.h +3 -0
- data/ext/pg_query/include/postgres/port/win32/netinet/tcp.h +7 -0
- data/ext/pg_query/include/postgres/port/win32/pwd.h +3 -0
- data/ext/pg_query/include/postgres/port/win32/sys/resource.h +20 -0
- data/ext/pg_query/include/postgres/port/win32/sys/select.h +3 -0
- data/ext/pg_query/include/postgres/port/win32/sys/socket.h +34 -0
- data/ext/pg_query/include/postgres/port/win32/sys/un.h +17 -0
- data/ext/pg_query/include/postgres/port/win32/sys/wait.h +3 -0
- data/ext/pg_query/include/postgres/port/win32.h +59 -0
- data/ext/pg_query/include/postgres/port/win32_msvc/dirent.h +34 -0
- data/ext/pg_query/include/postgres/port/win32_msvc/sys/file.h +1 -0
- data/ext/pg_query/include/postgres/port/win32_msvc/sys/param.h +1 -0
- data/ext/pg_query/include/postgres/port/win32_msvc/sys/time.h +1 -0
- data/ext/pg_query/include/postgres/port/win32_msvc/unistd.h +9 -0
- data/ext/pg_query/include/postgres/port/win32_msvc/utime.h +3 -0
- data/ext/pg_query/include/postgres/port/win32_port.h +584 -0
- data/ext/pg_query/include/postgres/port.h +524 -0
- data/ext/pg_query/include/postgres/portability/instr_time.h +197 -0
- data/ext/pg_query/include/postgres/postgres.h +579 -0
- data/ext/pg_query/include/postgres/postmaster/autovacuum.h +69 -0
- data/ext/pg_query/include/postgres/postmaster/bgworker.h +164 -0
- data/ext/pg_query/include/postgres/postmaster/bgworker_internals.h +60 -0
- data/ext/pg_query/include/postgres/postmaster/bgwriter.h +45 -0
- data/ext/pg_query/include/postgres/postmaster/interrupt.h +32 -0
- data/ext/pg_query/include/postgres/postmaster/pgarch.h +36 -0
- data/ext/pg_query/include/postgres/postmaster/postmaster.h +101 -0
- data/ext/pg_query/include/postgres/postmaster/startup.h +41 -0
- data/ext/pg_query/include/postgres/postmaster/syslogger.h +101 -0
- data/ext/pg_query/include/postgres/postmaster/walsummarizer.h +35 -0
- data/ext/pg_query/include/postgres/postmaster/walwriter.h +23 -0
- data/ext/pg_query/include/postgres/regex/regex.h +272 -0
- data/ext/pg_query/include/postgres/replication/logicallauncher.h +34 -0
- data/ext/pg_query/include/postgres/replication/logicalproto.h +274 -0
- data/ext/pg_query/include/postgres/replication/logicalworker.h +33 -0
- data/ext/pg_query/include/postgres/replication/origin.h +73 -0
- data/ext/pg_query/include/postgres/replication/reorderbuffer.h +743 -0
- data/ext/pg_query/include/postgres/replication/slot.h +285 -0
- data/ext/pg_query/include/postgres/replication/slotsync.h +38 -0
- data/ext/pg_query/include/postgres/replication/syncrep.h +109 -0
- data/ext/pg_query/include/postgres/replication/walreceiver.h +504 -0
- data/ext/pg_query/include/postgres/replication/walsender.h +76 -0
- data/ext/pg_query/include/postgres/rewrite/prs2lock.h +46 -0
- data/ext/pg_query/include/postgres/rewrite/rewriteHandler.h +41 -0
- data/ext/pg_query/include/postgres/rewrite/rewriteManip.h +96 -0
- data/ext/pg_query/include/postgres/rewrite/rewriteSupport.h +26 -0
- data/ext/pg_query/include/postgres/storage/block.h +108 -0
- data/ext/pg_query/include/postgres/storage/buf.h +46 -0
- data/ext/pg_query/include/postgres/storage/bufmgr.h +411 -0
- data/ext/pg_query/include/postgres/storage/bufpage.h +510 -0
- data/ext/pg_query/include/postgres/storage/condition_variable.h +73 -0
- data/ext/pg_query/include/postgres/storage/dsm.h +61 -0
- data/ext/pg_query/include/postgres/storage/dsm_impl.h +79 -0
- data/ext/pg_query/include/postgres/storage/fd.h +219 -0
- data/ext/pg_query/include/postgres/storage/fileset.h +40 -0
- data/ext/pg_query/include/postgres/storage/ipc.h +87 -0
- data/ext/pg_query/include/postgres/storage/item.h +19 -0
- data/ext/pg_query/include/postgres/storage/itemid.h +184 -0
- data/ext/pg_query/include/postgres/storage/itemptr.h +245 -0
- data/ext/pg_query/include/postgres/storage/large_object.h +100 -0
- data/ext/pg_query/include/postgres/storage/latch.h +196 -0
- data/ext/pg_query/include/postgres/storage/lmgr.h +126 -0
- data/ext/pg_query/include/postgres/storage/lock.h +624 -0
- data/ext/pg_query/include/postgres/storage/lockdefs.h +59 -0
- data/ext/pg_query/include/postgres/storage/lwlock.h +228 -0
- data/ext/pg_query/include/postgres/storage/lwlocknames.h +47 -0
- data/ext/pg_query/include/postgres/storage/off.h +57 -0
- data/ext/pg_query/include/postgres/storage/pg_sema.h +61 -0
- data/ext/pg_query/include/postgres/storage/pg_shmem.h +93 -0
- data/ext/pg_query/include/postgres/storage/pmsignal.h +105 -0
- data/ext/pg_query/include/postgres/storage/predicate.h +83 -0
- data/ext/pg_query/include/postgres/storage/proc.h +491 -0
- data/ext/pg_query/include/postgres/storage/procarray.h +103 -0
- data/ext/pg_query/include/postgres/storage/proclist_types.h +53 -0
- data/ext/pg_query/include/postgres/storage/procnumber.h +43 -0
- data/ext/pg_query/include/postgres/storage/procsignal.h +75 -0
- data/ext/pg_query/include/postgres/storage/read_stream.h +65 -0
- data/ext/pg_query/include/postgres/storage/relfilelocator.h +100 -0
- data/ext/pg_query/include/postgres/storage/s_lock.h +847 -0
- data/ext/pg_query/include/postgres/storage/sharedfileset.h +37 -0
- data/ext/pg_query/include/postgres/storage/shm_mq.h +86 -0
- data/ext/pg_query/include/postgres/storage/shm_toc.h +58 -0
- data/ext/pg_query/include/postgres/storage/shmem.h +59 -0
- data/ext/pg_query/include/postgres/storage/sinval.h +153 -0
- data/ext/pg_query/include/postgres/storage/smgr.h +127 -0
- data/ext/pg_query/include/postgres/storage/spin.h +77 -0
- data/ext/pg_query/include/postgres/storage/standby.h +109 -0
- data/ext/pg_query/include/postgres/storage/standbydefs.h +74 -0
- data/ext/pg_query/include/postgres/storage/sync.h +66 -0
- data/ext/pg_query/include/postgres/tcop/cmdtag.h +62 -0
- data/ext/pg_query/include/postgres/tcop/cmdtaglist.h +219 -0
- data/ext/pg_query/include/postgres/tcop/deparse_utility.h +108 -0
- data/ext/pg_query/include/postgres/tcop/dest.h +148 -0
- data/ext/pg_query/include/postgres/tcop/fastpath.h +20 -0
- data/ext/pg_query/include/postgres/tcop/pquery.h +51 -0
- data/ext/pg_query/include/postgres/tcop/tcopprot.h +98 -0
- data/ext/pg_query/include/postgres/tcop/utility.h +112 -0
- data/ext/pg_query/include/postgres/tsearch/ts_cache.h +96 -0
- data/ext/pg_query/include/postgres/utils/acl.h +290 -0
- data/ext/pg_query/include/postgres/utils/aclchk_internal.h +45 -0
- data/ext/pg_query/include/postgres/utils/array.h +481 -0
- data/ext/pg_query/include/postgres/utils/ascii.h +84 -0
- data/ext/pg_query/include/postgres/utils/backend_progress.h +46 -0
- data/ext/pg_query/include/postgres/utils/backend_status.h +340 -0
- data/ext/pg_query/include/postgres/utils/builtins.h +139 -0
- data/ext/pg_query/include/postgres/utils/bytea.h +28 -0
- data/ext/pg_query/include/postgres/utils/catcache.h +230 -0
- data/ext/pg_query/include/postgres/utils/date.h +118 -0
- data/ext/pg_query/include/postgres/utils/datetime.h +367 -0
- data/ext/pg_query/include/postgres/utils/datum.h +76 -0
- data/ext/pg_query/include/postgres/utils/dsa.h +166 -0
- data/ext/pg_query/include/postgres/utils/elog.h +540 -0
- data/ext/pg_query/include/postgres/utils/errcodes.h +352 -0
- data/ext/pg_query/include/postgres/utils/expandeddatum.h +170 -0
- data/ext/pg_query/include/postgres/utils/expandedrecord.h +241 -0
- data/ext/pg_query/include/postgres/utils/float.h +357 -0
- data/ext/pg_query/include/postgres/utils/fmgroids.h +3347 -0
- data/ext/pg_query/include/postgres/utils/fmgrprotos.h +2904 -0
- data/ext/pg_query/include/postgres/utils/fmgrtab.h +49 -0
- data/ext/pg_query/include/postgres/utils/guc.h +456 -0
- data/ext/pg_query/include/postgres/utils/guc_hooks.h +184 -0
- data/ext/pg_query/include/postgres/utils/guc_tables.h +323 -0
- data/ext/pg_query/include/postgres/utils/hsearch.h +153 -0
- data/ext/pg_query/include/postgres/utils/injection_point.h +44 -0
- data/ext/pg_query/include/postgres/utils/inval.h +68 -0
- data/ext/pg_query/include/postgres/utils/logtape.h +77 -0
- data/ext/pg_query/include/postgres/utils/lsyscache.h +215 -0
- data/ext/pg_query/include/postgres/utils/memdebug.h +82 -0
- data/ext/pg_query/include/postgres/utils/memutils.h +193 -0
- data/ext/pg_query/include/postgres/utils/memutils_internal.h +176 -0
- data/ext/pg_query/include/postgres/utils/memutils_memorychunk.h +253 -0
- data/ext/pg_query/include/postgres/utils/numeric.h +110 -0
- data/ext/pg_query/include/postgres/utils/palloc.h +151 -0
- data/ext/pg_query/include/postgres/utils/partcache.h +103 -0
- data/ext/pg_query/include/postgres/utils/pg_locale.h +136 -0
- data/ext/pg_query/include/postgres/utils/pgstat_internal.h +808 -0
- data/ext/pg_query/include/postgres/utils/plancache.h +238 -0
- data/ext/pg_query/include/postgres/utils/portal.h +252 -0
- data/ext/pg_query/include/postgres/utils/queryenvironment.h +74 -0
- data/ext/pg_query/include/postgres/utils/regproc.h +39 -0
- data/ext/pg_query/include/postgres/utils/rel.h +711 -0
- data/ext/pg_query/include/postgres/utils/relcache.h +155 -0
- data/ext/pg_query/include/postgres/utils/reltrigger.h +81 -0
- data/ext/pg_query/include/postgres/utils/resowner.h +167 -0
- data/ext/pg_query/include/postgres/utils/ruleutils.h +52 -0
- data/ext/pg_query/include/postgres/utils/sharedtuplestore.h +61 -0
- data/ext/pg_query/include/postgres/utils/snapmgr.h +130 -0
- data/ext/pg_query/include/postgres/utils/snapshot.h +219 -0
- data/ext/pg_query/include/postgres/utils/sortsupport.h +391 -0
- data/ext/pg_query/include/postgres/utils/syscache.h +131 -0
- data/ext/pg_query/include/postgres/utils/timeout.h +96 -0
- data/ext/pg_query/include/postgres/utils/timestamp.h +147 -0
- data/ext/pg_query/include/postgres/utils/tuplesort.h +472 -0
- data/ext/pg_query/include/postgres/utils/tuplestore.h +88 -0
- data/ext/pg_query/include/postgres/utils/typcache.h +210 -0
- data/ext/pg_query/include/postgres/utils/varlena.h +53 -0
- data/ext/pg_query/include/postgres/utils/wait_event.h +108 -0
- data/ext/pg_query/include/postgres/utils/wait_event_types.h +218 -0
- data/ext/pg_query/include/postgres/utils/xml.h +94 -0
- data/ext/pg_query/include/postgres/varatt.h +358 -0
- data/ext/pg_query/include/protobuf/pg_query.pb-c.h +1546 -792
- data/ext/pg_query/include/protobuf/pg_query.pb.h +58365 -46595
- data/ext/pg_query/pg_query.c +9 -0
- data/ext/pg_query/pg_query.pb-c.c +6598 -3739
- data/ext/pg_query/pg_query_fingerprint.c +4 -5
- data/ext/pg_query/pg_query_normalize.c +42 -1
- data/ext/pg_query/pg_query_outfuncs_json.c +9 -1
- data/ext/pg_query/pg_query_outfuncs_protobuf.c +1 -0
- data/ext/pg_query/pg_query_parse.c +1 -1
- data/ext/pg_query/pg_query_parse_plpgsql.c +18 -17
- data/ext/pg_query/pg_query_readfuncs_protobuf.c +3 -2
- data/ext/pg_query/pg_query_ruby.c +5 -0
- data/ext/pg_query/pg_query_ruby_freebsd.sym +0 -1
- data/ext/pg_query/pg_query_scan.c +1 -1
- data/ext/pg_query/pg_query_split.c +1 -1
- data/ext/pg_query/postgres_deparse.c +409 -21
- data/ext/pg_query/src_backend_catalog_namespace.c +241 -66
- data/ext/pg_query/src_backend_catalog_pg_proc.c +1 -3
- data/ext/pg_query/src_backend_commands_define.c +2 -3
- data/ext/pg_query/src_backend_nodes_bitmapset.c +137 -94
- data/ext/pg_query/src_backend_nodes_copyfuncs.c +1 -1
- data/ext/pg_query/src_backend_nodes_equalfuncs.c +1 -1
- data/ext/pg_query/src_backend_nodes_extensible.c +1 -1
- data/ext/pg_query/src_backend_nodes_list.c +3 -7
- data/ext/pg_query/src_backend_nodes_makefuncs.c +59 -20
- data/ext/pg_query/src_backend_nodes_nodeFuncs.c +109 -2
- data/ext/pg_query/src_backend_nodes_value.c +1 -1
- data/ext/pg_query/src_backend_parser_gram.c +34490 -32135
- data/ext/pg_query/src_backend_parser_parser.c +8 -8
- data/ext/pg_query/src_backend_parser_scan.c +5637 -3028
- data/ext/pg_query/src_backend_parser_scansup.c +2 -1
- data/ext/pg_query/src_backend_storage_ipc_ipc.c +1 -1
- data/ext/pg_query/src_backend_tcop_postgres.c +34 -10
- data/ext/pg_query/src_backend_utils_activity_pgstat_database.c +2 -2
- data/ext/pg_query/src_backend_utils_adt_datum.c +8 -6
- data/ext/pg_query/src_backend_utils_adt_expandeddatum.c +1 -1
- data/ext/pg_query/src_backend_utils_adt_format_type.c +1 -1
- data/ext/pg_query/src_backend_utils_adt_numutils.c +4 -5
- data/ext/pg_query/src_backend_utils_adt_ruleutils.c +101 -28
- data/ext/pg_query/src_backend_utils_error_assert.c +1 -1
- data/ext/pg_query/src_backend_utils_error_elog.c +60 -190
- data/ext/pg_query/src_backend_utils_fmgr_fmgr.c +4 -2
- data/ext/pg_query/src_backend_utils_init_globals.c +16 -4
- data/ext/pg_query/src_backend_utils_mb_mbutils.c +19 -81
- data/ext/pg_query/src_backend_utils_misc_guc_tables.c +16 -8
- data/ext/pg_query/src_backend_utils_mmgr_alignedalloc.c +8 -5
- data/ext/pg_query/src_backend_utils_mmgr_aset.c +308 -238
- data/ext/pg_query/src_backend_utils_mmgr_bump.c +728 -0
- data/ext/pg_query/src_backend_utils_mmgr_generation.c +273 -197
- data/ext/pg_query/src_backend_utils_mmgr_mcxt.c +270 -215
- data/ext/pg_query/src_backend_utils_mmgr_slab.c +154 -96
- data/ext/pg_query/src_common_encnames.c +43 -44
- data/ext/pg_query/src_common_hashfn.c +1 -1
- data/ext/pg_query/src_common_keywords.c +1 -1
- data/ext/pg_query/src_common_kwlist_d.h +511 -466
- data/ext/pg_query/src_common_kwlookup.c +1 -1
- data/ext/pg_query/src_common_psprintf.c +3 -3
- data/ext/pg_query/src_common_stringinfo.c +18 -1
- data/ext/pg_query/src_common_wchar.c +45 -108
- data/ext/pg_query/src_pl_plpgsql_src_pl_comp.c +99 -5
- data/ext/pg_query/src_pl_plpgsql_src_pl_funcs.c +1 -1
- data/ext/pg_query/src_pl_plpgsql_src_pl_gram.c +242 -143
- 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 +1 -1
- data/ext/pg_query/src_pl_plpgsql_src_pl_scanner.c +19 -1
- data/ext/pg_query/src_pl_plpgsql_src_pl_unreserved_kwlist_d.h +1 -1
- data/ext/pg_query/src_port_pg_bitutils.c +251 -32
- data/ext/pg_query/src_port_pgstrcasecmp.c +29 -1
- data/ext/pg_query/src_port_snprintf.c +4 -4
- data/ext/pg_query/src_port_strerror.c +1 -3
- data/ext/pg_query/src_port_strlcpy.c +79 -0
- data/lib/pg_query/fingerprint.rb +2 -3
- data/lib/pg_query/node.rb +16 -11
- data/lib/pg_query/param_refs.rb +1 -1
- data/lib/pg_query/parse.rb +1 -1
- data/lib/pg_query/pg_query_pb.rb +26 -3
- data/lib/pg_query/treewalker.rb +52 -12
- data/lib/pg_query/truncate.rb +1 -1
- data/lib/pg_query/version.rb +1 -1
- metadata +444 -400
- data/ext/pg_query/guc-file.c +0 -0
- data/ext/pg_query/include/access/amapi.h +0 -292
- data/ext/pg_query/include/access/attmap.h +0 -54
- data/ext/pg_query/include/access/attnum.h +0 -64
- data/ext/pg_query/include/access/clog.h +0 -63
- data/ext/pg_query/include/access/commit_ts.h +0 -74
- data/ext/pg_query/include/access/detoast.h +0 -82
- data/ext/pg_query/include/access/genam.h +0 -233
- data/ext/pg_query/include/access/gin.h +0 -91
- data/ext/pg_query/include/access/htup.h +0 -89
- data/ext/pg_query/include/access/htup_details.h +0 -811
- data/ext/pg_query/include/access/itup.h +0 -170
- data/ext/pg_query/include/access/parallel.h +0 -82
- data/ext/pg_query/include/access/printtup.h +0 -35
- data/ext/pg_query/include/access/relation.h +0 -28
- data/ext/pg_query/include/access/relscan.h +0 -191
- data/ext/pg_query/include/access/rmgrlist.h +0 -49
- data/ext/pg_query/include/access/sdir.h +0 -67
- data/ext/pg_query/include/access/skey.h +0 -151
- data/ext/pg_query/include/access/stratnum.h +0 -85
- data/ext/pg_query/include/access/sysattr.h +0 -29
- data/ext/pg_query/include/access/table.h +0 -28
- data/ext/pg_query/include/access/tableam.h +0 -2100
- data/ext/pg_query/include/access/toast_compression.h +0 -73
- data/ext/pg_query/include/access/transam.h +0 -375
- data/ext/pg_query/include/access/tsmapi.h +0 -82
- data/ext/pg_query/include/access/tupconvert.h +0 -54
- data/ext/pg_query/include/access/tupdesc.h +0 -154
- data/ext/pg_query/include/access/tupmacs.h +0 -207
- data/ext/pg_query/include/access/twophase.h +0 -65
- data/ext/pg_query/include/access/xact.h +0 -530
- data/ext/pg_query/include/access/xlog.h +0 -302
- data/ext/pg_query/include/access/xlog_internal.h +0 -404
- data/ext/pg_query/include/access/xlogbackup.h +0 -41
- data/ext/pg_query/include/access/xlogdefs.h +0 -82
- data/ext/pg_query/include/access/xlogprefetcher.h +0 -55
- data/ext/pg_query/include/access/xlogreader.h +0 -444
- data/ext/pg_query/include/access/xlogrecord.h +0 -248
- data/ext/pg_query/include/access/xlogrecovery.h +0 -158
- data/ext/pg_query/include/archive/archive_module.h +0 -59
- data/ext/pg_query/include/c.h +0 -1379
- data/ext/pg_query/include/catalog/catalog.h +0 -45
- data/ext/pg_query/include/catalog/catversion.h +0 -62
- data/ext/pg_query/include/catalog/dependency.h +0 -270
- data/ext/pg_query/include/catalog/genbki.h +0 -143
- data/ext/pg_query/include/catalog/index.h +0 -214
- data/ext/pg_query/include/catalog/indexing.h +0 -54
- data/ext/pg_query/include/catalog/namespace.h +0 -190
- data/ext/pg_query/include/catalog/objectaccess.h +0 -267
- data/ext/pg_query/include/catalog/objectaddress.h +0 -89
- data/ext/pg_query/include/catalog/pg_aggregate.h +0 -180
- data/ext/pg_query/include/catalog/pg_aggregate_d.h +0 -78
- data/ext/pg_query/include/catalog/pg_am.h +0 -63
- data/ext/pg_query/include/catalog/pg_am_d.h +0 -47
- data/ext/pg_query/include/catalog/pg_attribute.h +0 -223
- data/ext/pg_query/include/catalog/pg_attribute_d.h +0 -62
- data/ext/pg_query/include/catalog/pg_authid.h +0 -63
- data/ext/pg_query/include/catalog/pg_authid_d.h +0 -59
- data/ext/pg_query/include/catalog/pg_class.h +0 -230
- data/ext/pg_query/include/catalog/pg_class_d.h +0 -132
- data/ext/pg_query/include/catalog/pg_collation.h +0 -100
- data/ext/pg_query/include/catalog/pg_collation_d.h +0 -63
- data/ext/pg_query/include/catalog/pg_constraint.h +0 -273
- data/ext/pg_query/include/catalog/pg_constraint_d.h +0 -73
- data/ext/pg_query/include/catalog/pg_control.h +0 -258
- data/ext/pg_query/include/catalog/pg_conversion.h +0 -75
- data/ext/pg_query/include/catalog/pg_conversion_d.h +0 -38
- data/ext/pg_query/include/catalog/pg_database.h +0 -124
- data/ext/pg_query/include/catalog/pg_database_d.h +0 -52
- data/ext/pg_query/include/catalog/pg_depend.h +0 -77
- data/ext/pg_query/include/catalog/pg_depend_d.h +0 -36
- data/ext/pg_query/include/catalog/pg_event_trigger.h +0 -57
- data/ext/pg_query/include/catalog/pg_event_trigger_d.h +0 -36
- data/ext/pg_query/include/catalog/pg_index.h +0 -90
- data/ext/pg_query/include/catalog/pg_index_d.h +0 -59
- data/ext/pg_query/include/catalog/pg_language.h +0 -72
- data/ext/pg_query/include/catalog/pg_language_d.h +0 -41
- data/ext/pg_query/include/catalog/pg_namespace.h +0 -64
- data/ext/pg_query/include/catalog/pg_namespace_d.h +0 -36
- data/ext/pg_query/include/catalog/pg_opclass.h +0 -88
- data/ext/pg_query/include/catalog/pg_opclass_d.h +0 -51
- data/ext/pg_query/include/catalog/pg_operator.h +0 -107
- data/ext/pg_query/include/catalog/pg_operator_d.h +0 -142
- data/ext/pg_query/include/catalog/pg_opfamily.h +0 -64
- data/ext/pg_query/include/catalog/pg_opfamily_d.h +0 -51
- data/ext/pg_query/include/catalog/pg_partitioned_table.h +0 -74
- data/ext/pg_query/include/catalog/pg_partitioned_table_d.h +0 -36
- data/ext/pg_query/include/catalog/pg_proc.h +0 -220
- data/ext/pg_query/include/catalog/pg_proc_d.h +0 -101
- data/ext/pg_query/include/catalog/pg_publication.h +0 -158
- data/ext/pg_query/include/catalog/pg_publication_d.h +0 -38
- data/ext/pg_query/include/catalog/pg_replication_origin.h +0 -62
- data/ext/pg_query/include/catalog/pg_replication_origin_d.h +0 -33
- data/ext/pg_query/include/catalog/pg_statistic.h +0 -282
- data/ext/pg_query/include/catalog/pg_statistic_d.h +0 -195
- data/ext/pg_query/include/catalog/pg_statistic_ext.h +0 -88
- data/ext/pg_query/include/catalog/pg_statistic_ext_d.h +0 -45
- data/ext/pg_query/include/catalog/pg_transform.h +0 -48
- data/ext/pg_query/include/catalog/pg_transform_d.h +0 -34
- data/ext/pg_query/include/catalog/pg_trigger.h +0 -153
- data/ext/pg_query/include/catalog/pg_trigger_d.h +0 -109
- data/ext/pg_query/include/catalog/pg_ts_config.h +0 -53
- data/ext/pg_query/include/catalog/pg_ts_config_d.h +0 -34
- data/ext/pg_query/include/catalog/pg_ts_dict.h +0 -59
- data/ext/pg_query/include/catalog/pg_ts_dict_d.h +0 -35
- data/ext/pg_query/include/catalog/pg_ts_parser.h +0 -60
- data/ext/pg_query/include/catalog/pg_ts_parser_d.h +0 -37
- data/ext/pg_query/include/catalog/pg_ts_template.h +0 -51
- data/ext/pg_query/include/catalog/pg_ts_template_d.h +0 -34
- data/ext/pg_query/include/catalog/pg_type.h +0 -404
- data/ext/pg_query/include/catalog/pg_type_d.h +0 -324
- data/ext/pg_query/include/catalog/storage.h +0 -50
- data/ext/pg_query/include/commands/async.h +0 -53
- data/ext/pg_query/include/commands/dbcommands.h +0 -37
- data/ext/pg_query/include/commands/defrem.h +0 -161
- data/ext/pg_query/include/commands/event_trigger.h +0 -88
- data/ext/pg_query/include/commands/explain.h +0 -129
- data/ext/pg_query/include/commands/prepare.h +0 -61
- data/ext/pg_query/include/commands/tablespace.h +0 -69
- data/ext/pg_query/include/commands/trigger.h +0 -288
- data/ext/pg_query/include/commands/vacuum.h +0 -386
- data/ext/pg_query/include/common/cryptohash.h +0 -39
- data/ext/pg_query/include/common/file_perm.h +0 -56
- data/ext/pg_query/include/common/hashfn.h +0 -104
- data/ext/pg_query/include/common/int.h +0 -437
- data/ext/pg_query/include/common/ip.h +0 -33
- data/ext/pg_query/include/common/keywords.h +0 -29
- data/ext/pg_query/include/common/kwlookup.h +0 -44
- data/ext/pg_query/include/common/pg_prng.h +0 -61
- data/ext/pg_query/include/common/relpath.h +0 -97
- data/ext/pg_query/include/common/scram-common.h +0 -70
- data/ext/pg_query/include/common/sha2.h +0 -32
- data/ext/pg_query/include/common/string.h +0 -44
- data/ext/pg_query/include/common/unicode_east_asian_fw_table.h +0 -125
- data/ext/pg_query/include/copyfuncs.funcs.c +0 -5013
- data/ext/pg_query/include/copyfuncs.switch.c +0 -938
- data/ext/pg_query/include/datatype/timestamp.h +0 -243
- data/ext/pg_query/include/equalfuncs.funcs.c +0 -3097
- data/ext/pg_query/include/equalfuncs.switch.c +0 -785
- data/ext/pg_query/include/executor/execdesc.h +0 -70
- data/ext/pg_query/include/executor/executor.h +0 -680
- data/ext/pg_query/include/executor/functions.h +0 -55
- data/ext/pg_query/include/executor/instrument.h +0 -118
- data/ext/pg_query/include/executor/spi.h +0 -213
- data/ext/pg_query/include/executor/tablefunc.h +0 -67
- data/ext/pg_query/include/executor/tuptable.h +0 -494
- data/ext/pg_query/include/fmgr.h +0 -800
- data/ext/pg_query/include/foreign/fdwapi.h +0 -294
- data/ext/pg_query/include/funcapi.h +0 -360
- data/ext/pg_query/include/gram.h +0 -1127
- data/ext/pg_query/include/gramparse.h +0 -75
- data/ext/pg_query/include/jit/jit.h +0 -105
- data/ext/pg_query/include/kwlist_d.h +0 -1119
- data/ext/pg_query/include/lib/dshash.h +0 -115
- data/ext/pg_query/include/lib/ilist.h +0 -1159
- data/ext/pg_query/include/lib/pairingheap.h +0 -102
- data/ext/pg_query/include/lib/simplehash.h +0 -1184
- data/ext/pg_query/include/lib/sort_template.h +0 -432
- data/ext/pg_query/include/lib/stringinfo.h +0 -161
- data/ext/pg_query/include/libpq/auth.h +0 -37
- data/ext/pg_query/include/libpq/crypt.h +0 -47
- data/ext/pg_query/include/libpq/hba.h +0 -186
- data/ext/pg_query/include/libpq/libpq-be.h +0 -354
- data/ext/pg_query/include/libpq/libpq.h +0 -144
- data/ext/pg_query/include/libpq/pqcomm.h +0 -163
- data/ext/pg_query/include/libpq/pqformat.h +0 -210
- data/ext/pg_query/include/libpq/pqsignal.h +0 -54
- data/ext/pg_query/include/libpq/sasl.h +0 -136
- data/ext/pg_query/include/libpq/scram.h +0 -37
- data/ext/pg_query/include/mb/pg_wchar.h +0 -772
- data/ext/pg_query/include/mb/stringinfo_mb.h +0 -24
- data/ext/pg_query/include/miscadmin.h +0 -507
- data/ext/pg_query/include/nodes/bitmapset.h +0 -126
- data/ext/pg_query/include/nodes/execnodes.h +0 -2768
- data/ext/pg_query/include/nodes/extensible.h +0 -164
- data/ext/pg_query/include/nodes/lockoptions.h +0 -61
- data/ext/pg_query/include/nodes/makefuncs.h +0 -121
- data/ext/pg_query/include/nodes/memnodes.h +0 -113
- data/ext/pg_query/include/nodes/miscnodes.h +0 -56
- data/ext/pg_query/include/nodes/nodeFuncs.h +0 -222
- data/ext/pg_query/include/nodes/nodes.h +0 -446
- data/ext/pg_query/include/nodes/nodetags.h +0 -471
- data/ext/pg_query/include/nodes/params.h +0 -170
- data/ext/pg_query/include/nodes/parsenodes.h +0 -4050
- data/ext/pg_query/include/nodes/pathnodes.h +0 -3384
- data/ext/pg_query/include/nodes/pg_list.h +0 -635
- data/ext/pg_query/include/nodes/plannodes.h +0 -1592
- data/ext/pg_query/include/nodes/primnodes.h +0 -2041
- data/ext/pg_query/include/nodes/print.h +0 -34
- data/ext/pg_query/include/nodes/queryjumble.h +0 -86
- data/ext/pg_query/include/nodes/replnodes.h +0 -111
- data/ext/pg_query/include/nodes/supportnodes.h +0 -346
- data/ext/pg_query/include/nodes/tidbitmap.h +0 -75
- data/ext/pg_query/include/nodes/value.h +0 -90
- data/ext/pg_query/include/optimizer/cost.h +0 -215
- data/ext/pg_query/include/optimizer/geqo.h +0 -90
- data/ext/pg_query/include/optimizer/geqo_gene.h +0 -45
- data/ext/pg_query/include/optimizer/optimizer.h +0 -202
- data/ext/pg_query/include/optimizer/paths.h +0 -266
- data/ext/pg_query/include/optimizer/planmain.h +0 -117
- data/ext/pg_query/include/parser/analyze.h +0 -64
- data/ext/pg_query/include/parser/kwlist.h +0 -498
- data/ext/pg_query/include/parser/parse_agg.h +0 -65
- data/ext/pg_query/include/parser/parse_coerce.h +0 -102
- data/ext/pg_query/include/parser/parse_expr.h +0 -25
- data/ext/pg_query/include/parser/parse_func.h +0 -74
- data/ext/pg_query/include/parser/parse_node.h +0 -357
- data/ext/pg_query/include/parser/parse_oper.h +0 -65
- data/ext/pg_query/include/parser/parse_relation.h +0 -129
- data/ext/pg_query/include/parser/parse_type.h +0 -61
- data/ext/pg_query/include/parser/parser.h +0 -68
- data/ext/pg_query/include/parser/parsetree.h +0 -61
- data/ext/pg_query/include/parser/scanner.h +0 -152
- data/ext/pg_query/include/parser/scansup.h +0 -27
- data/ext/pg_query/include/partitioning/partdefs.h +0 -26
- data/ext/pg_query/include/pg_config.h +0 -843
- data/ext/pg_query/include/pg_config_manual.h +0 -372
- data/ext/pg_query/include/pg_config_os.h +0 -8
- data/ext/pg_query/include/pg_getopt.h +0 -56
- data/ext/pg_query/include/pg_trace.h +0 -17
- data/ext/pg_query/include/pgstat.h +0 -778
- data/ext/pg_query/include/pgtime.h +0 -94
- data/ext/pg_query/include/pl_gram.h +0 -385
- data/ext/pg_query/include/pl_reserved_kwlist.h +0 -52
- data/ext/pg_query/include/pl_reserved_kwlist_d.h +0 -114
- data/ext/pg_query/include/pl_unreserved_kwlist.h +0 -112
- data/ext/pg_query/include/pl_unreserved_kwlist_d.h +0 -246
- data/ext/pg_query/include/plerrcodes.h +0 -998
- data/ext/pg_query/include/plpgsql.h +0 -1340
- data/ext/pg_query/include/port/atomics/arch-arm.h +0 -32
- data/ext/pg_query/include/port/atomics/arch-ppc.h +0 -254
- data/ext/pg_query/include/port/atomics/arch-x86.h +0 -252
- data/ext/pg_query/include/port/atomics/fallback.h +0 -170
- data/ext/pg_query/include/port/atomics/generic-gcc.h +0 -286
- data/ext/pg_query/include/port/atomics/generic.h +0 -401
- data/ext/pg_query/include/port/atomics.h +0 -519
- data/ext/pg_query/include/port/pg_bitutils.h +0 -339
- data/ext/pg_query/include/port/pg_bswap.h +0 -161
- data/ext/pg_query/include/port/pg_crc32c.h +0 -101
- data/ext/pg_query/include/port/simd.h +0 -375
- data/ext/pg_query/include/port.h +0 -520
- data/ext/pg_query/include/portability/instr_time.h +0 -197
- data/ext/pg_query/include/postgres.h +0 -579
- data/ext/pg_query/include/postmaster/autovacuum.h +0 -80
- data/ext/pg_query/include/postmaster/auxprocess.h +0 -20
- data/ext/pg_query/include/postmaster/bgworker.h +0 -162
- data/ext/pg_query/include/postmaster/bgworker_internals.h +0 -64
- data/ext/pg_query/include/postmaster/bgwriter.h +0 -45
- data/ext/pg_query/include/postmaster/fork_process.h +0 -17
- data/ext/pg_query/include/postmaster/interrupt.h +0 -32
- data/ext/pg_query/include/postmaster/pgarch.h +0 -36
- data/ext/pg_query/include/postmaster/postmaster.h +0 -81
- data/ext/pg_query/include/postmaster/startup.h +0 -41
- data/ext/pg_query/include/postmaster/syslogger.h +0 -103
- data/ext/pg_query/include/postmaster/walwriter.h +0 -23
- data/ext/pg_query/include/regex/regex.h +0 -189
- data/ext/pg_query/include/replication/logicallauncher.h +0 -34
- data/ext/pg_query/include/replication/logicalproto.h +0 -274
- data/ext/pg_query/include/replication/logicalworker.h +0 -32
- data/ext/pg_query/include/replication/origin.h +0 -73
- data/ext/pg_query/include/replication/reorderbuffer.h +0 -753
- data/ext/pg_query/include/replication/slot.h +0 -249
- data/ext/pg_query/include/replication/syncrep.h +0 -109
- data/ext/pg_query/include/replication/walreceiver.h +0 -478
- data/ext/pg_query/include/replication/walsender.h +0 -74
- data/ext/pg_query/include/rewrite/prs2lock.h +0 -46
- data/ext/pg_query/include/rewrite/rewriteHandler.h +0 -35
- data/ext/pg_query/include/rewrite/rewriteManip.h +0 -96
- data/ext/pg_query/include/rewrite/rewriteSupport.h +0 -26
- data/ext/pg_query/include/src_backend_nodes_copyfuncs.funcs.c +0 -5321
- data/ext/pg_query/include/src_backend_nodes_equalfuncs.funcs.c +0 -3354
- data/ext/pg_query/include/storage/backendid.h +0 -37
- data/ext/pg_query/include/storage/block.h +0 -108
- data/ext/pg_query/include/storage/buf.h +0 -46
- data/ext/pg_query/include/storage/bufmgr.h +0 -393
- data/ext/pg_query/include/storage/bufpage.h +0 -510
- data/ext/pg_query/include/storage/condition_variable.h +0 -73
- data/ext/pg_query/include/storage/dsm.h +0 -61
- data/ext/pg_query/include/storage/dsm_impl.h +0 -79
- data/ext/pg_query/include/storage/fd.h +0 -202
- data/ext/pg_query/include/storage/fileset.h +0 -40
- data/ext/pg_query/include/storage/ipc.h +0 -84
- data/ext/pg_query/include/storage/item.h +0 -19
- data/ext/pg_query/include/storage/itemid.h +0 -184
- data/ext/pg_query/include/storage/itemptr.h +0 -245
- data/ext/pg_query/include/storage/large_object.h +0 -100
- data/ext/pg_query/include/storage/latch.h +0 -194
- data/ext/pg_query/include/storage/lmgr.h +0 -120
- data/ext/pg_query/include/storage/lock.h +0 -624
- data/ext/pg_query/include/storage/lockdefs.h +0 -59
- data/ext/pg_query/include/storage/lwlock.h +0 -220
- data/ext/pg_query/include/storage/lwlocknames.h +0 -50
- data/ext/pg_query/include/storage/off.h +0 -57
- data/ext/pg_query/include/storage/pg_sema.h +0 -61
- data/ext/pg_query/include/storage/pg_shmem.h +0 -92
- data/ext/pg_query/include/storage/pmsignal.h +0 -105
- data/ext/pg_query/include/storage/predicate.h +0 -87
- data/ext/pg_query/include/storage/proc.h +0 -466
- data/ext/pg_query/include/storage/procarray.h +0 -99
- data/ext/pg_query/include/storage/proclist_types.h +0 -51
- data/ext/pg_query/include/storage/procsignal.h +0 -73
- data/ext/pg_query/include/storage/relfilelocator.h +0 -99
- data/ext/pg_query/include/storage/s_lock.h +0 -867
- data/ext/pg_query/include/storage/sharedfileset.h +0 -37
- data/ext/pg_query/include/storage/shm_mq.h +0 -86
- data/ext/pg_query/include/storage/shm_toc.h +0 -58
- data/ext/pg_query/include/storage/shmem.h +0 -59
- data/ext/pg_query/include/storage/sinval.h +0 -153
- data/ext/pg_query/include/storage/sinvaladt.h +0 -45
- data/ext/pg_query/include/storage/smgr.h +0 -113
- data/ext/pg_query/include/storage/spin.h +0 -77
- data/ext/pg_query/include/storage/standby.h +0 -99
- data/ext/pg_query/include/storage/standbydefs.h +0 -74
- data/ext/pg_query/include/storage/sync.h +0 -66
- data/ext/pg_query/include/tcop/cmdtag.h +0 -63
- data/ext/pg_query/include/tcop/cmdtaglist.h +0 -218
- data/ext/pg_query/include/tcop/deparse_utility.h +0 -108
- data/ext/pg_query/include/tcop/dest.h +0 -147
- data/ext/pg_query/include/tcop/fastpath.h +0 -20
- data/ext/pg_query/include/tcop/pquery.h +0 -51
- data/ext/pg_query/include/tcop/tcopprot.h +0 -94
- data/ext/pg_query/include/tcop/utility.h +0 -112
- data/ext/pg_query/include/tsearch/ts_cache.h +0 -96
- data/ext/pg_query/include/utils/acl.h +0 -278
- data/ext/pg_query/include/utils/aclchk_internal.h +0 -45
- data/ext/pg_query/include/utils/array.h +0 -482
- data/ext/pg_query/include/utils/backend_progress.h +0 -45
- data/ext/pg_query/include/utils/backend_status.h +0 -342
- data/ext/pg_query/include/utils/builtins.h +0 -136
- data/ext/pg_query/include/utils/bytea.h +0 -28
- data/ext/pg_query/include/utils/catcache.h +0 -231
- data/ext/pg_query/include/utils/date.h +0 -118
- data/ext/pg_query/include/utils/datetime.h +0 -364
- data/ext/pg_query/include/utils/datum.h +0 -76
- data/ext/pg_query/include/utils/dsa.h +0 -127
- data/ext/pg_query/include/utils/elog.h +0 -545
- data/ext/pg_query/include/utils/errcodes.h +0 -354
- data/ext/pg_query/include/utils/expandeddatum.h +0 -170
- data/ext/pg_query/include/utils/expandedrecord.h +0 -241
- data/ext/pg_query/include/utils/float.h +0 -357
- data/ext/pg_query/include/utils/fmgroids.h +0 -3314
- data/ext/pg_query/include/utils/fmgrprotos.h +0 -2871
- data/ext/pg_query/include/utils/fmgrtab.h +0 -49
- data/ext/pg_query/include/utils/guc.h +0 -442
- data/ext/pg_query/include/utils/guc_hooks.h +0 -163
- data/ext/pg_query/include/utils/guc_tables.h +0 -322
- data/ext/pg_query/include/utils/hsearch.h +0 -153
- data/ext/pg_query/include/utils/inval.h +0 -68
- data/ext/pg_query/include/utils/logtape.h +0 -77
- data/ext/pg_query/include/utils/lsyscache.h +0 -212
- data/ext/pg_query/include/utils/memdebug.h +0 -82
- data/ext/pg_query/include/utils/memutils.h +0 -186
- data/ext/pg_query/include/utils/memutils_internal.h +0 -136
- data/ext/pg_query/include/utils/memutils_memorychunk.h +0 -237
- data/ext/pg_query/include/utils/numeric.h +0 -105
- data/ext/pg_query/include/utils/palloc.h +0 -165
- data/ext/pg_query/include/utils/partcache.h +0 -103
- data/ext/pg_query/include/utils/pg_locale.h +0 -135
- data/ext/pg_query/include/utils/pgstat_internal.h +0 -814
- data/ext/pg_query/include/utils/pidfile.h +0 -56
- data/ext/pg_query/include/utils/plancache.h +0 -236
- data/ext/pg_query/include/utils/portal.h +0 -252
- data/ext/pg_query/include/utils/queryenvironment.h +0 -74
- data/ext/pg_query/include/utils/regproc.h +0 -39
- data/ext/pg_query/include/utils/rel.h +0 -712
- data/ext/pg_query/include/utils/relcache.h +0 -158
- data/ext/pg_query/include/utils/reltrigger.h +0 -81
- data/ext/pg_query/include/utils/resowner.h +0 -86
- data/ext/pg_query/include/utils/ruleutils.h +0 -52
- data/ext/pg_query/include/utils/sharedtuplestore.h +0 -61
- data/ext/pg_query/include/utils/snapmgr.h +0 -181
- data/ext/pg_query/include/utils/snapshot.h +0 -219
- data/ext/pg_query/include/utils/sortsupport.h +0 -391
- data/ext/pg_query/include/utils/syscache.h +0 -227
- data/ext/pg_query/include/utils/timeout.h +0 -95
- data/ext/pg_query/include/utils/timestamp.h +0 -147
- data/ext/pg_query/include/utils/tuplesort.h +0 -445
- data/ext/pg_query/include/utils/tuplestore.h +0 -91
- data/ext/pg_query/include/utils/typcache.h +0 -209
- data/ext/pg_query/include/utils/varlena.h +0 -53
- data/ext/pg_query/include/utils/wait_event.h +0 -294
- data/ext/pg_query/include/utils/xml.h +0 -94
- data/ext/pg_query/include/varatt.h +0 -358
- data/ext/pg_query/src_backend_postmaster_postmaster.c +0 -2220
- data/ext/pg_query/src_port_strnlen.c +0 -39
- /data/ext/pg_query/include/{access → postgres/access}/rmgr.h +0 -0
- /data/ext/pg_query/include/{commands → postgres/commands}/user.h +0 -0
- /data/ext/pg_query/include/{common → postgres/common}/unicode_nonspacing_table.h +0 -0
- /data/ext/pg_query/include/{pg_config_ext.h → postgres/pg_config_ext.h} +0 -0
- /data/ext/pg_query/include/{postgres_ext.h → postgres/postgres_ext.h} +0 -0
- /data/ext/pg_query/include/{utils → postgres/utils}/probes.h +0 -0
- /data/ext/pg_query/include/{utils → postgres/utils}/ps_status.h +0 -0
@@ -1,5013 +0,0 @@
|
|
1
|
-
/*-------------------------------------------------------------------------
|
2
|
-
*
|
3
|
-
* copyfuncs.funcs.c
|
4
|
-
* Generated node infrastructure code
|
5
|
-
*
|
6
|
-
* Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
|
7
|
-
* Portions Copyright (c) 1994, Regents of the University of California
|
8
|
-
*
|
9
|
-
* NOTES
|
10
|
-
* ******************************
|
11
|
-
* *** DO NOT EDIT THIS FILE! ***
|
12
|
-
* ******************************
|
13
|
-
*
|
14
|
-
* It has been GENERATED by src/backend/nodes/gen_node_support.pl
|
15
|
-
*
|
16
|
-
*-------------------------------------------------------------------------
|
17
|
-
*/
|
18
|
-
#include "access/amapi.h"
|
19
|
-
#include "access/sdir.h"
|
20
|
-
#include "access/tableam.h"
|
21
|
-
#include "access/tsmapi.h"
|
22
|
-
#include "commands/event_trigger.h"
|
23
|
-
#include "commands/trigger.h"
|
24
|
-
#include "executor/tuptable.h"
|
25
|
-
#include "foreign/fdwapi.h"
|
26
|
-
#include "nodes/bitmapset.h"
|
27
|
-
#include "nodes/execnodes.h"
|
28
|
-
#include "nodes/extensible.h"
|
29
|
-
#include "nodes/lockoptions.h"
|
30
|
-
#include "nodes/miscnodes.h"
|
31
|
-
#include "nodes/nodes.h"
|
32
|
-
#include "nodes/parsenodes.h"
|
33
|
-
#include "nodes/pathnodes.h"
|
34
|
-
#include "nodes/plannodes.h"
|
35
|
-
#include "nodes/primnodes.h"
|
36
|
-
#include "nodes/replnodes.h"
|
37
|
-
#include "nodes/supportnodes.h"
|
38
|
-
#include "nodes/value.h"
|
39
|
-
#include "utils/rel.h"
|
40
|
-
|
41
|
-
static Alias *
|
42
|
-
_copyAlias(const Alias *from)
|
43
|
-
{
|
44
|
-
Alias *newnode = makeNode(Alias);
|
45
|
-
|
46
|
-
COPY_STRING_FIELD(aliasname);
|
47
|
-
COPY_NODE_FIELD(colnames);
|
48
|
-
|
49
|
-
return newnode;
|
50
|
-
}
|
51
|
-
|
52
|
-
static RangeVar *
|
53
|
-
_copyRangeVar(const RangeVar *from)
|
54
|
-
{
|
55
|
-
RangeVar *newnode = makeNode(RangeVar);
|
56
|
-
|
57
|
-
COPY_STRING_FIELD(catalogname);
|
58
|
-
COPY_STRING_FIELD(schemaname);
|
59
|
-
COPY_STRING_FIELD(relname);
|
60
|
-
COPY_SCALAR_FIELD(inh);
|
61
|
-
COPY_SCALAR_FIELD(relpersistence);
|
62
|
-
COPY_NODE_FIELD(alias);
|
63
|
-
COPY_LOCATION_FIELD(location);
|
64
|
-
|
65
|
-
return newnode;
|
66
|
-
}
|
67
|
-
|
68
|
-
static TableFunc *
|
69
|
-
_copyTableFunc(const TableFunc *from)
|
70
|
-
{
|
71
|
-
TableFunc *newnode = makeNode(TableFunc);
|
72
|
-
|
73
|
-
COPY_NODE_FIELD(ns_uris);
|
74
|
-
COPY_NODE_FIELD(ns_names);
|
75
|
-
COPY_NODE_FIELD(docexpr);
|
76
|
-
COPY_NODE_FIELD(rowexpr);
|
77
|
-
COPY_NODE_FIELD(colnames);
|
78
|
-
COPY_NODE_FIELD(coltypes);
|
79
|
-
COPY_NODE_FIELD(coltypmods);
|
80
|
-
COPY_NODE_FIELD(colcollations);
|
81
|
-
COPY_NODE_FIELD(colexprs);
|
82
|
-
COPY_NODE_FIELD(coldefexprs);
|
83
|
-
COPY_BITMAPSET_FIELD(notnulls);
|
84
|
-
COPY_SCALAR_FIELD(ordinalitycol);
|
85
|
-
COPY_LOCATION_FIELD(location);
|
86
|
-
|
87
|
-
return newnode;
|
88
|
-
}
|
89
|
-
|
90
|
-
static IntoClause *
|
91
|
-
_copyIntoClause(const IntoClause *from)
|
92
|
-
{
|
93
|
-
IntoClause *newnode = makeNode(IntoClause);
|
94
|
-
|
95
|
-
COPY_NODE_FIELD(rel);
|
96
|
-
COPY_NODE_FIELD(colNames);
|
97
|
-
COPY_STRING_FIELD(accessMethod);
|
98
|
-
COPY_NODE_FIELD(options);
|
99
|
-
COPY_SCALAR_FIELD(onCommit);
|
100
|
-
COPY_STRING_FIELD(tableSpaceName);
|
101
|
-
COPY_NODE_FIELD(viewQuery);
|
102
|
-
COPY_SCALAR_FIELD(skipData);
|
103
|
-
|
104
|
-
return newnode;
|
105
|
-
}
|
106
|
-
|
107
|
-
static Var *
|
108
|
-
_copyVar(const Var *from)
|
109
|
-
{
|
110
|
-
Var *newnode = makeNode(Var);
|
111
|
-
|
112
|
-
COPY_SCALAR_FIELD(varno);
|
113
|
-
COPY_SCALAR_FIELD(varattno);
|
114
|
-
COPY_SCALAR_FIELD(vartype);
|
115
|
-
COPY_SCALAR_FIELD(vartypmod);
|
116
|
-
COPY_SCALAR_FIELD(varcollid);
|
117
|
-
COPY_BITMAPSET_FIELD(varnullingrels);
|
118
|
-
COPY_SCALAR_FIELD(varlevelsup);
|
119
|
-
COPY_SCALAR_FIELD(varnosyn);
|
120
|
-
COPY_SCALAR_FIELD(varattnosyn);
|
121
|
-
COPY_LOCATION_FIELD(location);
|
122
|
-
|
123
|
-
return newnode;
|
124
|
-
}
|
125
|
-
|
126
|
-
static Param *
|
127
|
-
_copyParam(const Param *from)
|
128
|
-
{
|
129
|
-
Param *newnode = makeNode(Param);
|
130
|
-
|
131
|
-
COPY_SCALAR_FIELD(paramkind);
|
132
|
-
COPY_SCALAR_FIELD(paramid);
|
133
|
-
COPY_SCALAR_FIELD(paramtype);
|
134
|
-
COPY_SCALAR_FIELD(paramtypmod);
|
135
|
-
COPY_SCALAR_FIELD(paramcollid);
|
136
|
-
COPY_LOCATION_FIELD(location);
|
137
|
-
|
138
|
-
return newnode;
|
139
|
-
}
|
140
|
-
|
141
|
-
static Aggref *
|
142
|
-
_copyAggref(const Aggref *from)
|
143
|
-
{
|
144
|
-
Aggref *newnode = makeNode(Aggref);
|
145
|
-
|
146
|
-
COPY_SCALAR_FIELD(aggfnoid);
|
147
|
-
COPY_SCALAR_FIELD(aggtype);
|
148
|
-
COPY_SCALAR_FIELD(aggcollid);
|
149
|
-
COPY_SCALAR_FIELD(inputcollid);
|
150
|
-
COPY_SCALAR_FIELD(aggtranstype);
|
151
|
-
COPY_NODE_FIELD(aggargtypes);
|
152
|
-
COPY_NODE_FIELD(aggdirectargs);
|
153
|
-
COPY_NODE_FIELD(args);
|
154
|
-
COPY_NODE_FIELD(aggorder);
|
155
|
-
COPY_NODE_FIELD(aggdistinct);
|
156
|
-
COPY_NODE_FIELD(aggfilter);
|
157
|
-
COPY_SCALAR_FIELD(aggstar);
|
158
|
-
COPY_SCALAR_FIELD(aggvariadic);
|
159
|
-
COPY_SCALAR_FIELD(aggkind);
|
160
|
-
COPY_SCALAR_FIELD(aggpresorted);
|
161
|
-
COPY_SCALAR_FIELD(agglevelsup);
|
162
|
-
COPY_SCALAR_FIELD(aggsplit);
|
163
|
-
COPY_SCALAR_FIELD(aggno);
|
164
|
-
COPY_SCALAR_FIELD(aggtransno);
|
165
|
-
COPY_LOCATION_FIELD(location);
|
166
|
-
|
167
|
-
return newnode;
|
168
|
-
}
|
169
|
-
|
170
|
-
static GroupingFunc *
|
171
|
-
_copyGroupingFunc(const GroupingFunc *from)
|
172
|
-
{
|
173
|
-
GroupingFunc *newnode = makeNode(GroupingFunc);
|
174
|
-
|
175
|
-
COPY_NODE_FIELD(args);
|
176
|
-
COPY_NODE_FIELD(refs);
|
177
|
-
COPY_NODE_FIELD(cols);
|
178
|
-
COPY_SCALAR_FIELD(agglevelsup);
|
179
|
-
COPY_LOCATION_FIELD(location);
|
180
|
-
|
181
|
-
return newnode;
|
182
|
-
}
|
183
|
-
|
184
|
-
static WindowFunc *
|
185
|
-
_copyWindowFunc(const WindowFunc *from)
|
186
|
-
{
|
187
|
-
WindowFunc *newnode = makeNode(WindowFunc);
|
188
|
-
|
189
|
-
COPY_SCALAR_FIELD(winfnoid);
|
190
|
-
COPY_SCALAR_FIELD(wintype);
|
191
|
-
COPY_SCALAR_FIELD(wincollid);
|
192
|
-
COPY_SCALAR_FIELD(inputcollid);
|
193
|
-
COPY_NODE_FIELD(args);
|
194
|
-
COPY_NODE_FIELD(aggfilter);
|
195
|
-
COPY_SCALAR_FIELD(winref);
|
196
|
-
COPY_SCALAR_FIELD(winstar);
|
197
|
-
COPY_SCALAR_FIELD(winagg);
|
198
|
-
COPY_LOCATION_FIELD(location);
|
199
|
-
|
200
|
-
return newnode;
|
201
|
-
}
|
202
|
-
|
203
|
-
static SubscriptingRef *
|
204
|
-
_copySubscriptingRef(const SubscriptingRef *from)
|
205
|
-
{
|
206
|
-
SubscriptingRef *newnode = makeNode(SubscriptingRef);
|
207
|
-
|
208
|
-
COPY_SCALAR_FIELD(refcontainertype);
|
209
|
-
COPY_SCALAR_FIELD(refelemtype);
|
210
|
-
COPY_SCALAR_FIELD(refrestype);
|
211
|
-
COPY_SCALAR_FIELD(reftypmod);
|
212
|
-
COPY_SCALAR_FIELD(refcollid);
|
213
|
-
COPY_NODE_FIELD(refupperindexpr);
|
214
|
-
COPY_NODE_FIELD(reflowerindexpr);
|
215
|
-
COPY_NODE_FIELD(refexpr);
|
216
|
-
COPY_NODE_FIELD(refassgnexpr);
|
217
|
-
|
218
|
-
return newnode;
|
219
|
-
}
|
220
|
-
|
221
|
-
static FuncExpr *
|
222
|
-
_copyFuncExpr(const FuncExpr *from)
|
223
|
-
{
|
224
|
-
FuncExpr *newnode = makeNode(FuncExpr);
|
225
|
-
|
226
|
-
COPY_SCALAR_FIELD(funcid);
|
227
|
-
COPY_SCALAR_FIELD(funcresulttype);
|
228
|
-
COPY_SCALAR_FIELD(funcretset);
|
229
|
-
COPY_SCALAR_FIELD(funcvariadic);
|
230
|
-
COPY_SCALAR_FIELD(funcformat);
|
231
|
-
COPY_SCALAR_FIELD(funccollid);
|
232
|
-
COPY_SCALAR_FIELD(inputcollid);
|
233
|
-
COPY_NODE_FIELD(args);
|
234
|
-
COPY_LOCATION_FIELD(location);
|
235
|
-
|
236
|
-
return newnode;
|
237
|
-
}
|
238
|
-
|
239
|
-
static NamedArgExpr *
|
240
|
-
_copyNamedArgExpr(const NamedArgExpr *from)
|
241
|
-
{
|
242
|
-
NamedArgExpr *newnode = makeNode(NamedArgExpr);
|
243
|
-
|
244
|
-
COPY_NODE_FIELD(arg);
|
245
|
-
COPY_STRING_FIELD(name);
|
246
|
-
COPY_SCALAR_FIELD(argnumber);
|
247
|
-
COPY_LOCATION_FIELD(location);
|
248
|
-
|
249
|
-
return newnode;
|
250
|
-
}
|
251
|
-
|
252
|
-
static OpExpr *
|
253
|
-
_copyOpExpr(const OpExpr *from)
|
254
|
-
{
|
255
|
-
OpExpr *newnode = makeNode(OpExpr);
|
256
|
-
|
257
|
-
COPY_SCALAR_FIELD(opno);
|
258
|
-
COPY_SCALAR_FIELD(opfuncid);
|
259
|
-
COPY_SCALAR_FIELD(opresulttype);
|
260
|
-
COPY_SCALAR_FIELD(opretset);
|
261
|
-
COPY_SCALAR_FIELD(opcollid);
|
262
|
-
COPY_SCALAR_FIELD(inputcollid);
|
263
|
-
COPY_NODE_FIELD(args);
|
264
|
-
COPY_LOCATION_FIELD(location);
|
265
|
-
|
266
|
-
return newnode;
|
267
|
-
}
|
268
|
-
|
269
|
-
static DistinctExpr *
|
270
|
-
_copyDistinctExpr(const DistinctExpr *from)
|
271
|
-
{
|
272
|
-
DistinctExpr *newnode = makeNode(DistinctExpr);
|
273
|
-
|
274
|
-
COPY_SCALAR_FIELD(opno);
|
275
|
-
COPY_SCALAR_FIELD(opfuncid);
|
276
|
-
COPY_SCALAR_FIELD(opresulttype);
|
277
|
-
COPY_SCALAR_FIELD(opretset);
|
278
|
-
COPY_SCALAR_FIELD(opcollid);
|
279
|
-
COPY_SCALAR_FIELD(inputcollid);
|
280
|
-
COPY_NODE_FIELD(args);
|
281
|
-
COPY_LOCATION_FIELD(location);
|
282
|
-
|
283
|
-
return newnode;
|
284
|
-
}
|
285
|
-
|
286
|
-
static NullIfExpr *
|
287
|
-
_copyNullIfExpr(const NullIfExpr *from)
|
288
|
-
{
|
289
|
-
NullIfExpr *newnode = makeNode(NullIfExpr);
|
290
|
-
|
291
|
-
COPY_SCALAR_FIELD(opno);
|
292
|
-
COPY_SCALAR_FIELD(opfuncid);
|
293
|
-
COPY_SCALAR_FIELD(opresulttype);
|
294
|
-
COPY_SCALAR_FIELD(opretset);
|
295
|
-
COPY_SCALAR_FIELD(opcollid);
|
296
|
-
COPY_SCALAR_FIELD(inputcollid);
|
297
|
-
COPY_NODE_FIELD(args);
|
298
|
-
COPY_LOCATION_FIELD(location);
|
299
|
-
|
300
|
-
return newnode;
|
301
|
-
}
|
302
|
-
|
303
|
-
static ScalarArrayOpExpr *
|
304
|
-
_copyScalarArrayOpExpr(const ScalarArrayOpExpr *from)
|
305
|
-
{
|
306
|
-
ScalarArrayOpExpr *newnode = makeNode(ScalarArrayOpExpr);
|
307
|
-
|
308
|
-
COPY_SCALAR_FIELD(opno);
|
309
|
-
COPY_SCALAR_FIELD(opfuncid);
|
310
|
-
COPY_SCALAR_FIELD(hashfuncid);
|
311
|
-
COPY_SCALAR_FIELD(negfuncid);
|
312
|
-
COPY_SCALAR_FIELD(useOr);
|
313
|
-
COPY_SCALAR_FIELD(inputcollid);
|
314
|
-
COPY_NODE_FIELD(args);
|
315
|
-
COPY_LOCATION_FIELD(location);
|
316
|
-
|
317
|
-
return newnode;
|
318
|
-
}
|
319
|
-
|
320
|
-
static BoolExpr *
|
321
|
-
_copyBoolExpr(const BoolExpr *from)
|
322
|
-
{
|
323
|
-
BoolExpr *newnode = makeNode(BoolExpr);
|
324
|
-
|
325
|
-
COPY_SCALAR_FIELD(boolop);
|
326
|
-
COPY_NODE_FIELD(args);
|
327
|
-
COPY_LOCATION_FIELD(location);
|
328
|
-
|
329
|
-
return newnode;
|
330
|
-
}
|
331
|
-
|
332
|
-
static SubLink *
|
333
|
-
_copySubLink(const SubLink *from)
|
334
|
-
{
|
335
|
-
SubLink *newnode = makeNode(SubLink);
|
336
|
-
|
337
|
-
COPY_SCALAR_FIELD(subLinkType);
|
338
|
-
COPY_SCALAR_FIELD(subLinkId);
|
339
|
-
COPY_NODE_FIELD(testexpr);
|
340
|
-
COPY_NODE_FIELD(operName);
|
341
|
-
COPY_NODE_FIELD(subselect);
|
342
|
-
COPY_LOCATION_FIELD(location);
|
343
|
-
|
344
|
-
return newnode;
|
345
|
-
}
|
346
|
-
|
347
|
-
static SubPlan *
|
348
|
-
_copySubPlan(const SubPlan *from)
|
349
|
-
{
|
350
|
-
SubPlan *newnode = makeNode(SubPlan);
|
351
|
-
|
352
|
-
COPY_SCALAR_FIELD(subLinkType);
|
353
|
-
COPY_NODE_FIELD(testexpr);
|
354
|
-
COPY_NODE_FIELD(paramIds);
|
355
|
-
COPY_SCALAR_FIELD(plan_id);
|
356
|
-
COPY_STRING_FIELD(plan_name);
|
357
|
-
COPY_SCALAR_FIELD(firstColType);
|
358
|
-
COPY_SCALAR_FIELD(firstColTypmod);
|
359
|
-
COPY_SCALAR_FIELD(firstColCollation);
|
360
|
-
COPY_SCALAR_FIELD(useHashTable);
|
361
|
-
COPY_SCALAR_FIELD(unknownEqFalse);
|
362
|
-
COPY_SCALAR_FIELD(parallel_safe);
|
363
|
-
COPY_NODE_FIELD(setParam);
|
364
|
-
COPY_NODE_FIELD(parParam);
|
365
|
-
COPY_NODE_FIELD(args);
|
366
|
-
COPY_SCALAR_FIELD(startup_cost);
|
367
|
-
COPY_SCALAR_FIELD(per_call_cost);
|
368
|
-
|
369
|
-
return newnode;
|
370
|
-
}
|
371
|
-
|
372
|
-
static AlternativeSubPlan *
|
373
|
-
_copyAlternativeSubPlan(const AlternativeSubPlan *from)
|
374
|
-
{
|
375
|
-
AlternativeSubPlan *newnode = makeNode(AlternativeSubPlan);
|
376
|
-
|
377
|
-
COPY_NODE_FIELD(subplans);
|
378
|
-
|
379
|
-
return newnode;
|
380
|
-
}
|
381
|
-
|
382
|
-
static FieldSelect *
|
383
|
-
_copyFieldSelect(const FieldSelect *from)
|
384
|
-
{
|
385
|
-
FieldSelect *newnode = makeNode(FieldSelect);
|
386
|
-
|
387
|
-
COPY_NODE_FIELD(arg);
|
388
|
-
COPY_SCALAR_FIELD(fieldnum);
|
389
|
-
COPY_SCALAR_FIELD(resulttype);
|
390
|
-
COPY_SCALAR_FIELD(resulttypmod);
|
391
|
-
COPY_SCALAR_FIELD(resultcollid);
|
392
|
-
|
393
|
-
return newnode;
|
394
|
-
}
|
395
|
-
|
396
|
-
static FieldStore *
|
397
|
-
_copyFieldStore(const FieldStore *from)
|
398
|
-
{
|
399
|
-
FieldStore *newnode = makeNode(FieldStore);
|
400
|
-
|
401
|
-
COPY_NODE_FIELD(arg);
|
402
|
-
COPY_NODE_FIELD(newvals);
|
403
|
-
COPY_NODE_FIELD(fieldnums);
|
404
|
-
COPY_SCALAR_FIELD(resulttype);
|
405
|
-
|
406
|
-
return newnode;
|
407
|
-
}
|
408
|
-
|
409
|
-
static RelabelType *
|
410
|
-
_copyRelabelType(const RelabelType *from)
|
411
|
-
{
|
412
|
-
RelabelType *newnode = makeNode(RelabelType);
|
413
|
-
|
414
|
-
COPY_NODE_FIELD(arg);
|
415
|
-
COPY_SCALAR_FIELD(resulttype);
|
416
|
-
COPY_SCALAR_FIELD(resulttypmod);
|
417
|
-
COPY_SCALAR_FIELD(resultcollid);
|
418
|
-
COPY_SCALAR_FIELD(relabelformat);
|
419
|
-
COPY_LOCATION_FIELD(location);
|
420
|
-
|
421
|
-
return newnode;
|
422
|
-
}
|
423
|
-
|
424
|
-
static CoerceViaIO *
|
425
|
-
_copyCoerceViaIO(const CoerceViaIO *from)
|
426
|
-
{
|
427
|
-
CoerceViaIO *newnode = makeNode(CoerceViaIO);
|
428
|
-
|
429
|
-
COPY_NODE_FIELD(arg);
|
430
|
-
COPY_SCALAR_FIELD(resulttype);
|
431
|
-
COPY_SCALAR_FIELD(resultcollid);
|
432
|
-
COPY_SCALAR_FIELD(coerceformat);
|
433
|
-
COPY_LOCATION_FIELD(location);
|
434
|
-
|
435
|
-
return newnode;
|
436
|
-
}
|
437
|
-
|
438
|
-
static ArrayCoerceExpr *
|
439
|
-
_copyArrayCoerceExpr(const ArrayCoerceExpr *from)
|
440
|
-
{
|
441
|
-
ArrayCoerceExpr *newnode = makeNode(ArrayCoerceExpr);
|
442
|
-
|
443
|
-
COPY_NODE_FIELD(arg);
|
444
|
-
COPY_NODE_FIELD(elemexpr);
|
445
|
-
COPY_SCALAR_FIELD(resulttype);
|
446
|
-
COPY_SCALAR_FIELD(resulttypmod);
|
447
|
-
COPY_SCALAR_FIELD(resultcollid);
|
448
|
-
COPY_SCALAR_FIELD(coerceformat);
|
449
|
-
COPY_LOCATION_FIELD(location);
|
450
|
-
|
451
|
-
return newnode;
|
452
|
-
}
|
453
|
-
|
454
|
-
static ConvertRowtypeExpr *
|
455
|
-
_copyConvertRowtypeExpr(const ConvertRowtypeExpr *from)
|
456
|
-
{
|
457
|
-
ConvertRowtypeExpr *newnode = makeNode(ConvertRowtypeExpr);
|
458
|
-
|
459
|
-
COPY_NODE_FIELD(arg);
|
460
|
-
COPY_SCALAR_FIELD(resulttype);
|
461
|
-
COPY_SCALAR_FIELD(convertformat);
|
462
|
-
COPY_LOCATION_FIELD(location);
|
463
|
-
|
464
|
-
return newnode;
|
465
|
-
}
|
466
|
-
|
467
|
-
static CollateExpr *
|
468
|
-
_copyCollateExpr(const CollateExpr *from)
|
469
|
-
{
|
470
|
-
CollateExpr *newnode = makeNode(CollateExpr);
|
471
|
-
|
472
|
-
COPY_NODE_FIELD(arg);
|
473
|
-
COPY_SCALAR_FIELD(collOid);
|
474
|
-
COPY_LOCATION_FIELD(location);
|
475
|
-
|
476
|
-
return newnode;
|
477
|
-
}
|
478
|
-
|
479
|
-
static CaseExpr *
|
480
|
-
_copyCaseExpr(const CaseExpr *from)
|
481
|
-
{
|
482
|
-
CaseExpr *newnode = makeNode(CaseExpr);
|
483
|
-
|
484
|
-
COPY_SCALAR_FIELD(casetype);
|
485
|
-
COPY_SCALAR_FIELD(casecollid);
|
486
|
-
COPY_NODE_FIELD(arg);
|
487
|
-
COPY_NODE_FIELD(args);
|
488
|
-
COPY_NODE_FIELD(defresult);
|
489
|
-
COPY_LOCATION_FIELD(location);
|
490
|
-
|
491
|
-
return newnode;
|
492
|
-
}
|
493
|
-
|
494
|
-
static CaseWhen *
|
495
|
-
_copyCaseWhen(const CaseWhen *from)
|
496
|
-
{
|
497
|
-
CaseWhen *newnode = makeNode(CaseWhen);
|
498
|
-
|
499
|
-
COPY_NODE_FIELD(expr);
|
500
|
-
COPY_NODE_FIELD(result);
|
501
|
-
COPY_LOCATION_FIELD(location);
|
502
|
-
|
503
|
-
return newnode;
|
504
|
-
}
|
505
|
-
|
506
|
-
static CaseTestExpr *
|
507
|
-
_copyCaseTestExpr(const CaseTestExpr *from)
|
508
|
-
{
|
509
|
-
CaseTestExpr *newnode = makeNode(CaseTestExpr);
|
510
|
-
|
511
|
-
COPY_SCALAR_FIELD(typeId);
|
512
|
-
COPY_SCALAR_FIELD(typeMod);
|
513
|
-
COPY_SCALAR_FIELD(collation);
|
514
|
-
|
515
|
-
return newnode;
|
516
|
-
}
|
517
|
-
|
518
|
-
static ArrayExpr *
|
519
|
-
_copyArrayExpr(const ArrayExpr *from)
|
520
|
-
{
|
521
|
-
ArrayExpr *newnode = makeNode(ArrayExpr);
|
522
|
-
|
523
|
-
COPY_SCALAR_FIELD(array_typeid);
|
524
|
-
COPY_SCALAR_FIELD(array_collid);
|
525
|
-
COPY_SCALAR_FIELD(element_typeid);
|
526
|
-
COPY_NODE_FIELD(elements);
|
527
|
-
COPY_SCALAR_FIELD(multidims);
|
528
|
-
COPY_LOCATION_FIELD(location);
|
529
|
-
|
530
|
-
return newnode;
|
531
|
-
}
|
532
|
-
|
533
|
-
static RowExpr *
|
534
|
-
_copyRowExpr(const RowExpr *from)
|
535
|
-
{
|
536
|
-
RowExpr *newnode = makeNode(RowExpr);
|
537
|
-
|
538
|
-
COPY_NODE_FIELD(args);
|
539
|
-
COPY_SCALAR_FIELD(row_typeid);
|
540
|
-
COPY_SCALAR_FIELD(row_format);
|
541
|
-
COPY_NODE_FIELD(colnames);
|
542
|
-
COPY_LOCATION_FIELD(location);
|
543
|
-
|
544
|
-
return newnode;
|
545
|
-
}
|
546
|
-
|
547
|
-
static RowCompareExpr *
|
548
|
-
_copyRowCompareExpr(const RowCompareExpr *from)
|
549
|
-
{
|
550
|
-
RowCompareExpr *newnode = makeNode(RowCompareExpr);
|
551
|
-
|
552
|
-
COPY_SCALAR_FIELD(rctype);
|
553
|
-
COPY_NODE_FIELD(opnos);
|
554
|
-
COPY_NODE_FIELD(opfamilies);
|
555
|
-
COPY_NODE_FIELD(inputcollids);
|
556
|
-
COPY_NODE_FIELD(largs);
|
557
|
-
COPY_NODE_FIELD(rargs);
|
558
|
-
|
559
|
-
return newnode;
|
560
|
-
}
|
561
|
-
|
562
|
-
static CoalesceExpr *
|
563
|
-
_copyCoalesceExpr(const CoalesceExpr *from)
|
564
|
-
{
|
565
|
-
CoalesceExpr *newnode = makeNode(CoalesceExpr);
|
566
|
-
|
567
|
-
COPY_SCALAR_FIELD(coalescetype);
|
568
|
-
COPY_SCALAR_FIELD(coalescecollid);
|
569
|
-
COPY_NODE_FIELD(args);
|
570
|
-
COPY_LOCATION_FIELD(location);
|
571
|
-
|
572
|
-
return newnode;
|
573
|
-
}
|
574
|
-
|
575
|
-
static MinMaxExpr *
|
576
|
-
_copyMinMaxExpr(const MinMaxExpr *from)
|
577
|
-
{
|
578
|
-
MinMaxExpr *newnode = makeNode(MinMaxExpr);
|
579
|
-
|
580
|
-
COPY_SCALAR_FIELD(minmaxtype);
|
581
|
-
COPY_SCALAR_FIELD(minmaxcollid);
|
582
|
-
COPY_SCALAR_FIELD(inputcollid);
|
583
|
-
COPY_SCALAR_FIELD(op);
|
584
|
-
COPY_NODE_FIELD(args);
|
585
|
-
COPY_LOCATION_FIELD(location);
|
586
|
-
|
587
|
-
return newnode;
|
588
|
-
}
|
589
|
-
|
590
|
-
static SQLValueFunction *
|
591
|
-
_copySQLValueFunction(const SQLValueFunction *from)
|
592
|
-
{
|
593
|
-
SQLValueFunction *newnode = makeNode(SQLValueFunction);
|
594
|
-
|
595
|
-
COPY_SCALAR_FIELD(op);
|
596
|
-
COPY_SCALAR_FIELD(type);
|
597
|
-
COPY_SCALAR_FIELD(typmod);
|
598
|
-
COPY_LOCATION_FIELD(location);
|
599
|
-
|
600
|
-
return newnode;
|
601
|
-
}
|
602
|
-
|
603
|
-
static XmlExpr *
|
604
|
-
_copyXmlExpr(const XmlExpr *from)
|
605
|
-
{
|
606
|
-
XmlExpr *newnode = makeNode(XmlExpr);
|
607
|
-
|
608
|
-
COPY_SCALAR_FIELD(op);
|
609
|
-
COPY_STRING_FIELD(name);
|
610
|
-
COPY_NODE_FIELD(named_args);
|
611
|
-
COPY_NODE_FIELD(arg_names);
|
612
|
-
COPY_NODE_FIELD(args);
|
613
|
-
COPY_SCALAR_FIELD(xmloption);
|
614
|
-
COPY_SCALAR_FIELD(indent);
|
615
|
-
COPY_SCALAR_FIELD(type);
|
616
|
-
COPY_SCALAR_FIELD(typmod);
|
617
|
-
COPY_LOCATION_FIELD(location);
|
618
|
-
|
619
|
-
return newnode;
|
620
|
-
}
|
621
|
-
|
622
|
-
static JsonFormat *
|
623
|
-
_copyJsonFormat(const JsonFormat *from)
|
624
|
-
{
|
625
|
-
JsonFormat *newnode = makeNode(JsonFormat);
|
626
|
-
|
627
|
-
COPY_SCALAR_FIELD(format_type);
|
628
|
-
COPY_SCALAR_FIELD(encoding);
|
629
|
-
COPY_LOCATION_FIELD(location);
|
630
|
-
|
631
|
-
return newnode;
|
632
|
-
}
|
633
|
-
|
634
|
-
static JsonReturning *
|
635
|
-
_copyJsonReturning(const JsonReturning *from)
|
636
|
-
{
|
637
|
-
JsonReturning *newnode = makeNode(JsonReturning);
|
638
|
-
|
639
|
-
COPY_NODE_FIELD(format);
|
640
|
-
COPY_SCALAR_FIELD(typid);
|
641
|
-
COPY_SCALAR_FIELD(typmod);
|
642
|
-
|
643
|
-
return newnode;
|
644
|
-
}
|
645
|
-
|
646
|
-
static JsonValueExpr *
|
647
|
-
_copyJsonValueExpr(const JsonValueExpr *from)
|
648
|
-
{
|
649
|
-
JsonValueExpr *newnode = makeNode(JsonValueExpr);
|
650
|
-
|
651
|
-
COPY_NODE_FIELD(raw_expr);
|
652
|
-
COPY_NODE_FIELD(formatted_expr);
|
653
|
-
COPY_NODE_FIELD(format);
|
654
|
-
|
655
|
-
return newnode;
|
656
|
-
}
|
657
|
-
|
658
|
-
static JsonConstructorExpr *
|
659
|
-
_copyJsonConstructorExpr(const JsonConstructorExpr *from)
|
660
|
-
{
|
661
|
-
JsonConstructorExpr *newnode = makeNode(JsonConstructorExpr);
|
662
|
-
|
663
|
-
COPY_SCALAR_FIELD(type);
|
664
|
-
COPY_NODE_FIELD(args);
|
665
|
-
COPY_NODE_FIELD(func);
|
666
|
-
COPY_NODE_FIELD(coercion);
|
667
|
-
COPY_NODE_FIELD(returning);
|
668
|
-
COPY_SCALAR_FIELD(absent_on_null);
|
669
|
-
COPY_SCALAR_FIELD(unique);
|
670
|
-
COPY_LOCATION_FIELD(location);
|
671
|
-
|
672
|
-
return newnode;
|
673
|
-
}
|
674
|
-
|
675
|
-
static JsonIsPredicate *
|
676
|
-
_copyJsonIsPredicate(const JsonIsPredicate *from)
|
677
|
-
{
|
678
|
-
JsonIsPredicate *newnode = makeNode(JsonIsPredicate);
|
679
|
-
|
680
|
-
COPY_NODE_FIELD(expr);
|
681
|
-
COPY_NODE_FIELD(format);
|
682
|
-
COPY_SCALAR_FIELD(item_type);
|
683
|
-
COPY_SCALAR_FIELD(unique_keys);
|
684
|
-
COPY_LOCATION_FIELD(location);
|
685
|
-
|
686
|
-
return newnode;
|
687
|
-
}
|
688
|
-
|
689
|
-
static NullTest *
|
690
|
-
_copyNullTest(const NullTest *from)
|
691
|
-
{
|
692
|
-
NullTest *newnode = makeNode(NullTest);
|
693
|
-
|
694
|
-
COPY_NODE_FIELD(arg);
|
695
|
-
COPY_SCALAR_FIELD(nulltesttype);
|
696
|
-
COPY_SCALAR_FIELD(argisrow);
|
697
|
-
COPY_LOCATION_FIELD(location);
|
698
|
-
|
699
|
-
return newnode;
|
700
|
-
}
|
701
|
-
|
702
|
-
static BooleanTest *
|
703
|
-
_copyBooleanTest(const BooleanTest *from)
|
704
|
-
{
|
705
|
-
BooleanTest *newnode = makeNode(BooleanTest);
|
706
|
-
|
707
|
-
COPY_NODE_FIELD(arg);
|
708
|
-
COPY_SCALAR_FIELD(booltesttype);
|
709
|
-
COPY_LOCATION_FIELD(location);
|
710
|
-
|
711
|
-
return newnode;
|
712
|
-
}
|
713
|
-
|
714
|
-
static CoerceToDomain *
|
715
|
-
_copyCoerceToDomain(const CoerceToDomain *from)
|
716
|
-
{
|
717
|
-
CoerceToDomain *newnode = makeNode(CoerceToDomain);
|
718
|
-
|
719
|
-
COPY_NODE_FIELD(arg);
|
720
|
-
COPY_SCALAR_FIELD(resulttype);
|
721
|
-
COPY_SCALAR_FIELD(resulttypmod);
|
722
|
-
COPY_SCALAR_FIELD(resultcollid);
|
723
|
-
COPY_SCALAR_FIELD(coercionformat);
|
724
|
-
COPY_LOCATION_FIELD(location);
|
725
|
-
|
726
|
-
return newnode;
|
727
|
-
}
|
728
|
-
|
729
|
-
static CoerceToDomainValue *
|
730
|
-
_copyCoerceToDomainValue(const CoerceToDomainValue *from)
|
731
|
-
{
|
732
|
-
CoerceToDomainValue *newnode = makeNode(CoerceToDomainValue);
|
733
|
-
|
734
|
-
COPY_SCALAR_FIELD(typeId);
|
735
|
-
COPY_SCALAR_FIELD(typeMod);
|
736
|
-
COPY_SCALAR_FIELD(collation);
|
737
|
-
COPY_LOCATION_FIELD(location);
|
738
|
-
|
739
|
-
return newnode;
|
740
|
-
}
|
741
|
-
|
742
|
-
static SetToDefault *
|
743
|
-
_copySetToDefault(const SetToDefault *from)
|
744
|
-
{
|
745
|
-
SetToDefault *newnode = makeNode(SetToDefault);
|
746
|
-
|
747
|
-
COPY_SCALAR_FIELD(typeId);
|
748
|
-
COPY_SCALAR_FIELD(typeMod);
|
749
|
-
COPY_SCALAR_FIELD(collation);
|
750
|
-
COPY_LOCATION_FIELD(location);
|
751
|
-
|
752
|
-
return newnode;
|
753
|
-
}
|
754
|
-
|
755
|
-
static CurrentOfExpr *
|
756
|
-
_copyCurrentOfExpr(const CurrentOfExpr *from)
|
757
|
-
{
|
758
|
-
CurrentOfExpr *newnode = makeNode(CurrentOfExpr);
|
759
|
-
|
760
|
-
COPY_SCALAR_FIELD(cvarno);
|
761
|
-
COPY_STRING_FIELD(cursor_name);
|
762
|
-
COPY_SCALAR_FIELD(cursor_param);
|
763
|
-
|
764
|
-
return newnode;
|
765
|
-
}
|
766
|
-
|
767
|
-
static NextValueExpr *
|
768
|
-
_copyNextValueExpr(const NextValueExpr *from)
|
769
|
-
{
|
770
|
-
NextValueExpr *newnode = makeNode(NextValueExpr);
|
771
|
-
|
772
|
-
COPY_SCALAR_FIELD(seqid);
|
773
|
-
COPY_SCALAR_FIELD(typeId);
|
774
|
-
|
775
|
-
return newnode;
|
776
|
-
}
|
777
|
-
|
778
|
-
static InferenceElem *
|
779
|
-
_copyInferenceElem(const InferenceElem *from)
|
780
|
-
{
|
781
|
-
InferenceElem *newnode = makeNode(InferenceElem);
|
782
|
-
|
783
|
-
COPY_NODE_FIELD(expr);
|
784
|
-
COPY_SCALAR_FIELD(infercollid);
|
785
|
-
COPY_SCALAR_FIELD(inferopclass);
|
786
|
-
|
787
|
-
return newnode;
|
788
|
-
}
|
789
|
-
|
790
|
-
static TargetEntry *
|
791
|
-
_copyTargetEntry(const TargetEntry *from)
|
792
|
-
{
|
793
|
-
TargetEntry *newnode = makeNode(TargetEntry);
|
794
|
-
|
795
|
-
COPY_NODE_FIELD(expr);
|
796
|
-
COPY_SCALAR_FIELD(resno);
|
797
|
-
COPY_STRING_FIELD(resname);
|
798
|
-
COPY_SCALAR_FIELD(ressortgroupref);
|
799
|
-
COPY_SCALAR_FIELD(resorigtbl);
|
800
|
-
COPY_SCALAR_FIELD(resorigcol);
|
801
|
-
COPY_SCALAR_FIELD(resjunk);
|
802
|
-
|
803
|
-
return newnode;
|
804
|
-
}
|
805
|
-
|
806
|
-
static RangeTblRef *
|
807
|
-
_copyRangeTblRef(const RangeTblRef *from)
|
808
|
-
{
|
809
|
-
RangeTblRef *newnode = makeNode(RangeTblRef);
|
810
|
-
|
811
|
-
COPY_SCALAR_FIELD(rtindex);
|
812
|
-
|
813
|
-
return newnode;
|
814
|
-
}
|
815
|
-
|
816
|
-
static JoinExpr *
|
817
|
-
_copyJoinExpr(const JoinExpr *from)
|
818
|
-
{
|
819
|
-
JoinExpr *newnode = makeNode(JoinExpr);
|
820
|
-
|
821
|
-
COPY_SCALAR_FIELD(jointype);
|
822
|
-
COPY_SCALAR_FIELD(isNatural);
|
823
|
-
COPY_NODE_FIELD(larg);
|
824
|
-
COPY_NODE_FIELD(rarg);
|
825
|
-
COPY_NODE_FIELD(usingClause);
|
826
|
-
COPY_NODE_FIELD(join_using_alias);
|
827
|
-
COPY_NODE_FIELD(quals);
|
828
|
-
COPY_NODE_FIELD(alias);
|
829
|
-
COPY_SCALAR_FIELD(rtindex);
|
830
|
-
|
831
|
-
return newnode;
|
832
|
-
}
|
833
|
-
|
834
|
-
static FromExpr *
|
835
|
-
_copyFromExpr(const FromExpr *from)
|
836
|
-
{
|
837
|
-
FromExpr *newnode = makeNode(FromExpr);
|
838
|
-
|
839
|
-
COPY_NODE_FIELD(fromlist);
|
840
|
-
COPY_NODE_FIELD(quals);
|
841
|
-
|
842
|
-
return newnode;
|
843
|
-
}
|
844
|
-
|
845
|
-
static OnConflictExpr *
|
846
|
-
_copyOnConflictExpr(const OnConflictExpr *from)
|
847
|
-
{
|
848
|
-
OnConflictExpr *newnode = makeNode(OnConflictExpr);
|
849
|
-
|
850
|
-
COPY_SCALAR_FIELD(action);
|
851
|
-
COPY_NODE_FIELD(arbiterElems);
|
852
|
-
COPY_NODE_FIELD(arbiterWhere);
|
853
|
-
COPY_SCALAR_FIELD(constraint);
|
854
|
-
COPY_NODE_FIELD(onConflictSet);
|
855
|
-
COPY_NODE_FIELD(onConflictWhere);
|
856
|
-
COPY_SCALAR_FIELD(exclRelIndex);
|
857
|
-
COPY_NODE_FIELD(exclRelTlist);
|
858
|
-
|
859
|
-
return newnode;
|
860
|
-
}
|
861
|
-
|
862
|
-
static Query *
|
863
|
-
_copyQuery(const Query *from)
|
864
|
-
{
|
865
|
-
Query *newnode = makeNode(Query);
|
866
|
-
|
867
|
-
COPY_SCALAR_FIELD(commandType);
|
868
|
-
COPY_SCALAR_FIELD(querySource);
|
869
|
-
COPY_SCALAR_FIELD(queryId);
|
870
|
-
COPY_SCALAR_FIELD(canSetTag);
|
871
|
-
COPY_NODE_FIELD(utilityStmt);
|
872
|
-
COPY_SCALAR_FIELD(resultRelation);
|
873
|
-
COPY_SCALAR_FIELD(hasAggs);
|
874
|
-
COPY_SCALAR_FIELD(hasWindowFuncs);
|
875
|
-
COPY_SCALAR_FIELD(hasTargetSRFs);
|
876
|
-
COPY_SCALAR_FIELD(hasSubLinks);
|
877
|
-
COPY_SCALAR_FIELD(hasDistinctOn);
|
878
|
-
COPY_SCALAR_FIELD(hasRecursive);
|
879
|
-
COPY_SCALAR_FIELD(hasModifyingCTE);
|
880
|
-
COPY_SCALAR_FIELD(hasForUpdate);
|
881
|
-
COPY_SCALAR_FIELD(hasRowSecurity);
|
882
|
-
COPY_SCALAR_FIELD(isReturn);
|
883
|
-
COPY_NODE_FIELD(cteList);
|
884
|
-
COPY_NODE_FIELD(rtable);
|
885
|
-
COPY_NODE_FIELD(rteperminfos);
|
886
|
-
COPY_NODE_FIELD(jointree);
|
887
|
-
COPY_NODE_FIELD(mergeActionList);
|
888
|
-
COPY_SCALAR_FIELD(mergeUseOuterJoin);
|
889
|
-
COPY_NODE_FIELD(targetList);
|
890
|
-
COPY_SCALAR_FIELD(override);
|
891
|
-
COPY_NODE_FIELD(onConflict);
|
892
|
-
COPY_NODE_FIELD(returningList);
|
893
|
-
COPY_NODE_FIELD(groupClause);
|
894
|
-
COPY_SCALAR_FIELD(groupDistinct);
|
895
|
-
COPY_NODE_FIELD(groupingSets);
|
896
|
-
COPY_NODE_FIELD(havingQual);
|
897
|
-
COPY_NODE_FIELD(windowClause);
|
898
|
-
COPY_NODE_FIELD(distinctClause);
|
899
|
-
COPY_NODE_FIELD(sortClause);
|
900
|
-
COPY_NODE_FIELD(limitOffset);
|
901
|
-
COPY_NODE_FIELD(limitCount);
|
902
|
-
COPY_SCALAR_FIELD(limitOption);
|
903
|
-
COPY_NODE_FIELD(rowMarks);
|
904
|
-
COPY_NODE_FIELD(setOperations);
|
905
|
-
COPY_NODE_FIELD(constraintDeps);
|
906
|
-
COPY_NODE_FIELD(withCheckOptions);
|
907
|
-
COPY_LOCATION_FIELD(stmt_location);
|
908
|
-
COPY_SCALAR_FIELD(stmt_len);
|
909
|
-
|
910
|
-
return newnode;
|
911
|
-
}
|
912
|
-
|
913
|
-
static TypeName *
|
914
|
-
_copyTypeName(const TypeName *from)
|
915
|
-
{
|
916
|
-
TypeName *newnode = makeNode(TypeName);
|
917
|
-
|
918
|
-
COPY_NODE_FIELD(names);
|
919
|
-
COPY_SCALAR_FIELD(typeOid);
|
920
|
-
COPY_SCALAR_FIELD(setof);
|
921
|
-
COPY_SCALAR_FIELD(pct_type);
|
922
|
-
COPY_NODE_FIELD(typmods);
|
923
|
-
COPY_SCALAR_FIELD(typemod);
|
924
|
-
COPY_NODE_FIELD(arrayBounds);
|
925
|
-
COPY_LOCATION_FIELD(location);
|
926
|
-
|
927
|
-
return newnode;
|
928
|
-
}
|
929
|
-
|
930
|
-
static ColumnRef *
|
931
|
-
_copyColumnRef(const ColumnRef *from)
|
932
|
-
{
|
933
|
-
ColumnRef *newnode = makeNode(ColumnRef);
|
934
|
-
|
935
|
-
COPY_NODE_FIELD(fields);
|
936
|
-
COPY_LOCATION_FIELD(location);
|
937
|
-
|
938
|
-
return newnode;
|
939
|
-
}
|
940
|
-
|
941
|
-
static ParamRef *
|
942
|
-
_copyParamRef(const ParamRef *from)
|
943
|
-
{
|
944
|
-
ParamRef *newnode = makeNode(ParamRef);
|
945
|
-
|
946
|
-
COPY_SCALAR_FIELD(number);
|
947
|
-
COPY_LOCATION_FIELD(location);
|
948
|
-
|
949
|
-
return newnode;
|
950
|
-
}
|
951
|
-
|
952
|
-
static A_Expr *
|
953
|
-
_copyA_Expr(const A_Expr *from)
|
954
|
-
{
|
955
|
-
A_Expr *newnode = makeNode(A_Expr);
|
956
|
-
|
957
|
-
COPY_SCALAR_FIELD(kind);
|
958
|
-
COPY_NODE_FIELD(name);
|
959
|
-
COPY_NODE_FIELD(lexpr);
|
960
|
-
COPY_NODE_FIELD(rexpr);
|
961
|
-
COPY_LOCATION_FIELD(location);
|
962
|
-
|
963
|
-
return newnode;
|
964
|
-
}
|
965
|
-
|
966
|
-
static TypeCast *
|
967
|
-
_copyTypeCast(const TypeCast *from)
|
968
|
-
{
|
969
|
-
TypeCast *newnode = makeNode(TypeCast);
|
970
|
-
|
971
|
-
COPY_NODE_FIELD(arg);
|
972
|
-
COPY_NODE_FIELD(typeName);
|
973
|
-
COPY_LOCATION_FIELD(location);
|
974
|
-
|
975
|
-
return newnode;
|
976
|
-
}
|
977
|
-
|
978
|
-
static CollateClause *
|
979
|
-
_copyCollateClause(const CollateClause *from)
|
980
|
-
{
|
981
|
-
CollateClause *newnode = makeNode(CollateClause);
|
982
|
-
|
983
|
-
COPY_NODE_FIELD(arg);
|
984
|
-
COPY_NODE_FIELD(collname);
|
985
|
-
COPY_LOCATION_FIELD(location);
|
986
|
-
|
987
|
-
return newnode;
|
988
|
-
}
|
989
|
-
|
990
|
-
static RoleSpec *
|
991
|
-
_copyRoleSpec(const RoleSpec *from)
|
992
|
-
{
|
993
|
-
RoleSpec *newnode = makeNode(RoleSpec);
|
994
|
-
|
995
|
-
COPY_SCALAR_FIELD(roletype);
|
996
|
-
COPY_STRING_FIELD(rolename);
|
997
|
-
COPY_LOCATION_FIELD(location);
|
998
|
-
|
999
|
-
return newnode;
|
1000
|
-
}
|
1001
|
-
|
1002
|
-
static FuncCall *
|
1003
|
-
_copyFuncCall(const FuncCall *from)
|
1004
|
-
{
|
1005
|
-
FuncCall *newnode = makeNode(FuncCall);
|
1006
|
-
|
1007
|
-
COPY_NODE_FIELD(funcname);
|
1008
|
-
COPY_NODE_FIELD(args);
|
1009
|
-
COPY_NODE_FIELD(agg_order);
|
1010
|
-
COPY_NODE_FIELD(agg_filter);
|
1011
|
-
COPY_NODE_FIELD(over);
|
1012
|
-
COPY_SCALAR_FIELD(agg_within_group);
|
1013
|
-
COPY_SCALAR_FIELD(agg_star);
|
1014
|
-
COPY_SCALAR_FIELD(agg_distinct);
|
1015
|
-
COPY_SCALAR_FIELD(func_variadic);
|
1016
|
-
COPY_SCALAR_FIELD(funcformat);
|
1017
|
-
COPY_LOCATION_FIELD(location);
|
1018
|
-
|
1019
|
-
return newnode;
|
1020
|
-
}
|
1021
|
-
|
1022
|
-
static A_Star *
|
1023
|
-
_copyA_Star(const A_Star *from)
|
1024
|
-
{
|
1025
|
-
A_Star *newnode = makeNode(A_Star);
|
1026
|
-
|
1027
|
-
|
1028
|
-
return newnode;
|
1029
|
-
}
|
1030
|
-
|
1031
|
-
static A_Indices *
|
1032
|
-
_copyA_Indices(const A_Indices *from)
|
1033
|
-
{
|
1034
|
-
A_Indices *newnode = makeNode(A_Indices);
|
1035
|
-
|
1036
|
-
COPY_SCALAR_FIELD(is_slice);
|
1037
|
-
COPY_NODE_FIELD(lidx);
|
1038
|
-
COPY_NODE_FIELD(uidx);
|
1039
|
-
|
1040
|
-
return newnode;
|
1041
|
-
}
|
1042
|
-
|
1043
|
-
static A_Indirection *
|
1044
|
-
_copyA_Indirection(const A_Indirection *from)
|
1045
|
-
{
|
1046
|
-
A_Indirection *newnode = makeNode(A_Indirection);
|
1047
|
-
|
1048
|
-
COPY_NODE_FIELD(arg);
|
1049
|
-
COPY_NODE_FIELD(indirection);
|
1050
|
-
|
1051
|
-
return newnode;
|
1052
|
-
}
|
1053
|
-
|
1054
|
-
static A_ArrayExpr *
|
1055
|
-
_copyA_ArrayExpr(const A_ArrayExpr *from)
|
1056
|
-
{
|
1057
|
-
A_ArrayExpr *newnode = makeNode(A_ArrayExpr);
|
1058
|
-
|
1059
|
-
COPY_NODE_FIELD(elements);
|
1060
|
-
COPY_LOCATION_FIELD(location);
|
1061
|
-
|
1062
|
-
return newnode;
|
1063
|
-
}
|
1064
|
-
|
1065
|
-
static ResTarget *
|
1066
|
-
_copyResTarget(const ResTarget *from)
|
1067
|
-
{
|
1068
|
-
ResTarget *newnode = makeNode(ResTarget);
|
1069
|
-
|
1070
|
-
COPY_STRING_FIELD(name);
|
1071
|
-
COPY_NODE_FIELD(indirection);
|
1072
|
-
COPY_NODE_FIELD(val);
|
1073
|
-
COPY_LOCATION_FIELD(location);
|
1074
|
-
|
1075
|
-
return newnode;
|
1076
|
-
}
|
1077
|
-
|
1078
|
-
static MultiAssignRef *
|
1079
|
-
_copyMultiAssignRef(const MultiAssignRef *from)
|
1080
|
-
{
|
1081
|
-
MultiAssignRef *newnode = makeNode(MultiAssignRef);
|
1082
|
-
|
1083
|
-
COPY_NODE_FIELD(source);
|
1084
|
-
COPY_SCALAR_FIELD(colno);
|
1085
|
-
COPY_SCALAR_FIELD(ncolumns);
|
1086
|
-
|
1087
|
-
return newnode;
|
1088
|
-
}
|
1089
|
-
|
1090
|
-
static SortBy *
|
1091
|
-
_copySortBy(const SortBy *from)
|
1092
|
-
{
|
1093
|
-
SortBy *newnode = makeNode(SortBy);
|
1094
|
-
|
1095
|
-
COPY_NODE_FIELD(node);
|
1096
|
-
COPY_SCALAR_FIELD(sortby_dir);
|
1097
|
-
COPY_SCALAR_FIELD(sortby_nulls);
|
1098
|
-
COPY_NODE_FIELD(useOp);
|
1099
|
-
COPY_LOCATION_FIELD(location);
|
1100
|
-
|
1101
|
-
return newnode;
|
1102
|
-
}
|
1103
|
-
|
1104
|
-
static WindowDef *
|
1105
|
-
_copyWindowDef(const WindowDef *from)
|
1106
|
-
{
|
1107
|
-
WindowDef *newnode = makeNode(WindowDef);
|
1108
|
-
|
1109
|
-
COPY_STRING_FIELD(name);
|
1110
|
-
COPY_STRING_FIELD(refname);
|
1111
|
-
COPY_NODE_FIELD(partitionClause);
|
1112
|
-
COPY_NODE_FIELD(orderClause);
|
1113
|
-
COPY_SCALAR_FIELD(frameOptions);
|
1114
|
-
COPY_NODE_FIELD(startOffset);
|
1115
|
-
COPY_NODE_FIELD(endOffset);
|
1116
|
-
COPY_LOCATION_FIELD(location);
|
1117
|
-
|
1118
|
-
return newnode;
|
1119
|
-
}
|
1120
|
-
|
1121
|
-
static RangeSubselect *
|
1122
|
-
_copyRangeSubselect(const RangeSubselect *from)
|
1123
|
-
{
|
1124
|
-
RangeSubselect *newnode = makeNode(RangeSubselect);
|
1125
|
-
|
1126
|
-
COPY_SCALAR_FIELD(lateral);
|
1127
|
-
COPY_NODE_FIELD(subquery);
|
1128
|
-
COPY_NODE_FIELD(alias);
|
1129
|
-
|
1130
|
-
return newnode;
|
1131
|
-
}
|
1132
|
-
|
1133
|
-
static RangeFunction *
|
1134
|
-
_copyRangeFunction(const RangeFunction *from)
|
1135
|
-
{
|
1136
|
-
RangeFunction *newnode = makeNode(RangeFunction);
|
1137
|
-
|
1138
|
-
COPY_SCALAR_FIELD(lateral);
|
1139
|
-
COPY_SCALAR_FIELD(ordinality);
|
1140
|
-
COPY_SCALAR_FIELD(is_rowsfrom);
|
1141
|
-
COPY_NODE_FIELD(functions);
|
1142
|
-
COPY_NODE_FIELD(alias);
|
1143
|
-
COPY_NODE_FIELD(coldeflist);
|
1144
|
-
|
1145
|
-
return newnode;
|
1146
|
-
}
|
1147
|
-
|
1148
|
-
static RangeTableFunc *
|
1149
|
-
_copyRangeTableFunc(const RangeTableFunc *from)
|
1150
|
-
{
|
1151
|
-
RangeTableFunc *newnode = makeNode(RangeTableFunc);
|
1152
|
-
|
1153
|
-
COPY_SCALAR_FIELD(lateral);
|
1154
|
-
COPY_NODE_FIELD(docexpr);
|
1155
|
-
COPY_NODE_FIELD(rowexpr);
|
1156
|
-
COPY_NODE_FIELD(namespaces);
|
1157
|
-
COPY_NODE_FIELD(columns);
|
1158
|
-
COPY_NODE_FIELD(alias);
|
1159
|
-
COPY_LOCATION_FIELD(location);
|
1160
|
-
|
1161
|
-
return newnode;
|
1162
|
-
}
|
1163
|
-
|
1164
|
-
static RangeTableFuncCol *
|
1165
|
-
_copyRangeTableFuncCol(const RangeTableFuncCol *from)
|
1166
|
-
{
|
1167
|
-
RangeTableFuncCol *newnode = makeNode(RangeTableFuncCol);
|
1168
|
-
|
1169
|
-
COPY_STRING_FIELD(colname);
|
1170
|
-
COPY_NODE_FIELD(typeName);
|
1171
|
-
COPY_SCALAR_FIELD(for_ordinality);
|
1172
|
-
COPY_SCALAR_FIELD(is_not_null);
|
1173
|
-
COPY_NODE_FIELD(colexpr);
|
1174
|
-
COPY_NODE_FIELD(coldefexpr);
|
1175
|
-
COPY_LOCATION_FIELD(location);
|
1176
|
-
|
1177
|
-
return newnode;
|
1178
|
-
}
|
1179
|
-
|
1180
|
-
static RangeTableSample *
|
1181
|
-
_copyRangeTableSample(const RangeTableSample *from)
|
1182
|
-
{
|
1183
|
-
RangeTableSample *newnode = makeNode(RangeTableSample);
|
1184
|
-
|
1185
|
-
COPY_NODE_FIELD(relation);
|
1186
|
-
COPY_NODE_FIELD(method);
|
1187
|
-
COPY_NODE_FIELD(args);
|
1188
|
-
COPY_NODE_FIELD(repeatable);
|
1189
|
-
COPY_LOCATION_FIELD(location);
|
1190
|
-
|
1191
|
-
return newnode;
|
1192
|
-
}
|
1193
|
-
|
1194
|
-
static ColumnDef *
|
1195
|
-
_copyColumnDef(const ColumnDef *from)
|
1196
|
-
{
|
1197
|
-
ColumnDef *newnode = makeNode(ColumnDef);
|
1198
|
-
|
1199
|
-
COPY_STRING_FIELD(colname);
|
1200
|
-
COPY_NODE_FIELD(typeName);
|
1201
|
-
COPY_STRING_FIELD(compression);
|
1202
|
-
COPY_SCALAR_FIELD(inhcount);
|
1203
|
-
COPY_SCALAR_FIELD(is_local);
|
1204
|
-
COPY_SCALAR_FIELD(is_not_null);
|
1205
|
-
COPY_SCALAR_FIELD(is_from_type);
|
1206
|
-
COPY_SCALAR_FIELD(storage);
|
1207
|
-
COPY_STRING_FIELD(storage_name);
|
1208
|
-
COPY_NODE_FIELD(raw_default);
|
1209
|
-
COPY_NODE_FIELD(cooked_default);
|
1210
|
-
COPY_SCALAR_FIELD(identity);
|
1211
|
-
COPY_NODE_FIELD(identitySequence);
|
1212
|
-
COPY_SCALAR_FIELD(generated);
|
1213
|
-
COPY_NODE_FIELD(collClause);
|
1214
|
-
COPY_SCALAR_FIELD(collOid);
|
1215
|
-
COPY_NODE_FIELD(constraints);
|
1216
|
-
COPY_NODE_FIELD(fdwoptions);
|
1217
|
-
COPY_LOCATION_FIELD(location);
|
1218
|
-
|
1219
|
-
return newnode;
|
1220
|
-
}
|
1221
|
-
|
1222
|
-
static TableLikeClause *
|
1223
|
-
_copyTableLikeClause(const TableLikeClause *from)
|
1224
|
-
{
|
1225
|
-
TableLikeClause *newnode = makeNode(TableLikeClause);
|
1226
|
-
|
1227
|
-
COPY_NODE_FIELD(relation);
|
1228
|
-
COPY_SCALAR_FIELD(options);
|
1229
|
-
COPY_SCALAR_FIELD(relationOid);
|
1230
|
-
|
1231
|
-
return newnode;
|
1232
|
-
}
|
1233
|
-
|
1234
|
-
static IndexElem *
|
1235
|
-
_copyIndexElem(const IndexElem *from)
|
1236
|
-
{
|
1237
|
-
IndexElem *newnode = makeNode(IndexElem);
|
1238
|
-
|
1239
|
-
COPY_STRING_FIELD(name);
|
1240
|
-
COPY_NODE_FIELD(expr);
|
1241
|
-
COPY_STRING_FIELD(indexcolname);
|
1242
|
-
COPY_NODE_FIELD(collation);
|
1243
|
-
COPY_NODE_FIELD(opclass);
|
1244
|
-
COPY_NODE_FIELD(opclassopts);
|
1245
|
-
COPY_SCALAR_FIELD(ordering);
|
1246
|
-
COPY_SCALAR_FIELD(nulls_ordering);
|
1247
|
-
|
1248
|
-
return newnode;
|
1249
|
-
}
|
1250
|
-
|
1251
|
-
static DefElem *
|
1252
|
-
_copyDefElem(const DefElem *from)
|
1253
|
-
{
|
1254
|
-
DefElem *newnode = makeNode(DefElem);
|
1255
|
-
|
1256
|
-
COPY_STRING_FIELD(defnamespace);
|
1257
|
-
COPY_STRING_FIELD(defname);
|
1258
|
-
COPY_NODE_FIELD(arg);
|
1259
|
-
COPY_SCALAR_FIELD(defaction);
|
1260
|
-
COPY_LOCATION_FIELD(location);
|
1261
|
-
|
1262
|
-
return newnode;
|
1263
|
-
}
|
1264
|
-
|
1265
|
-
static LockingClause *
|
1266
|
-
_copyLockingClause(const LockingClause *from)
|
1267
|
-
{
|
1268
|
-
LockingClause *newnode = makeNode(LockingClause);
|
1269
|
-
|
1270
|
-
COPY_NODE_FIELD(lockedRels);
|
1271
|
-
COPY_SCALAR_FIELD(strength);
|
1272
|
-
COPY_SCALAR_FIELD(waitPolicy);
|
1273
|
-
|
1274
|
-
return newnode;
|
1275
|
-
}
|
1276
|
-
|
1277
|
-
static XmlSerialize *
|
1278
|
-
_copyXmlSerialize(const XmlSerialize *from)
|
1279
|
-
{
|
1280
|
-
XmlSerialize *newnode = makeNode(XmlSerialize);
|
1281
|
-
|
1282
|
-
COPY_SCALAR_FIELD(xmloption);
|
1283
|
-
COPY_NODE_FIELD(expr);
|
1284
|
-
COPY_NODE_FIELD(typeName);
|
1285
|
-
COPY_SCALAR_FIELD(indent);
|
1286
|
-
COPY_LOCATION_FIELD(location);
|
1287
|
-
|
1288
|
-
return newnode;
|
1289
|
-
}
|
1290
|
-
|
1291
|
-
static PartitionElem *
|
1292
|
-
_copyPartitionElem(const PartitionElem *from)
|
1293
|
-
{
|
1294
|
-
PartitionElem *newnode = makeNode(PartitionElem);
|
1295
|
-
|
1296
|
-
COPY_STRING_FIELD(name);
|
1297
|
-
COPY_NODE_FIELD(expr);
|
1298
|
-
COPY_NODE_FIELD(collation);
|
1299
|
-
COPY_NODE_FIELD(opclass);
|
1300
|
-
COPY_LOCATION_FIELD(location);
|
1301
|
-
|
1302
|
-
return newnode;
|
1303
|
-
}
|
1304
|
-
|
1305
|
-
static PartitionSpec *
|
1306
|
-
_copyPartitionSpec(const PartitionSpec *from)
|
1307
|
-
{
|
1308
|
-
PartitionSpec *newnode = makeNode(PartitionSpec);
|
1309
|
-
|
1310
|
-
COPY_SCALAR_FIELD(strategy);
|
1311
|
-
COPY_NODE_FIELD(partParams);
|
1312
|
-
COPY_LOCATION_FIELD(location);
|
1313
|
-
|
1314
|
-
return newnode;
|
1315
|
-
}
|
1316
|
-
|
1317
|
-
static PartitionBoundSpec *
|
1318
|
-
_copyPartitionBoundSpec(const PartitionBoundSpec *from)
|
1319
|
-
{
|
1320
|
-
PartitionBoundSpec *newnode = makeNode(PartitionBoundSpec);
|
1321
|
-
|
1322
|
-
COPY_SCALAR_FIELD(strategy);
|
1323
|
-
COPY_SCALAR_FIELD(is_default);
|
1324
|
-
COPY_SCALAR_FIELD(modulus);
|
1325
|
-
COPY_SCALAR_FIELD(remainder);
|
1326
|
-
COPY_NODE_FIELD(listdatums);
|
1327
|
-
COPY_NODE_FIELD(lowerdatums);
|
1328
|
-
COPY_NODE_FIELD(upperdatums);
|
1329
|
-
COPY_LOCATION_FIELD(location);
|
1330
|
-
|
1331
|
-
return newnode;
|
1332
|
-
}
|
1333
|
-
|
1334
|
-
static PartitionRangeDatum *
|
1335
|
-
_copyPartitionRangeDatum(const PartitionRangeDatum *from)
|
1336
|
-
{
|
1337
|
-
PartitionRangeDatum *newnode = makeNode(PartitionRangeDatum);
|
1338
|
-
|
1339
|
-
COPY_SCALAR_FIELD(kind);
|
1340
|
-
COPY_NODE_FIELD(value);
|
1341
|
-
COPY_LOCATION_FIELD(location);
|
1342
|
-
|
1343
|
-
return newnode;
|
1344
|
-
}
|
1345
|
-
|
1346
|
-
static PartitionCmd *
|
1347
|
-
_copyPartitionCmd(const PartitionCmd *from)
|
1348
|
-
{
|
1349
|
-
PartitionCmd *newnode = makeNode(PartitionCmd);
|
1350
|
-
|
1351
|
-
COPY_NODE_FIELD(name);
|
1352
|
-
COPY_NODE_FIELD(bound);
|
1353
|
-
COPY_SCALAR_FIELD(concurrent);
|
1354
|
-
|
1355
|
-
return newnode;
|
1356
|
-
}
|
1357
|
-
|
1358
|
-
static RangeTblEntry *
|
1359
|
-
_copyRangeTblEntry(const RangeTblEntry *from)
|
1360
|
-
{
|
1361
|
-
RangeTblEntry *newnode = makeNode(RangeTblEntry);
|
1362
|
-
|
1363
|
-
COPY_SCALAR_FIELD(rtekind);
|
1364
|
-
COPY_SCALAR_FIELD(relid);
|
1365
|
-
COPY_SCALAR_FIELD(relkind);
|
1366
|
-
COPY_SCALAR_FIELD(rellockmode);
|
1367
|
-
COPY_NODE_FIELD(tablesample);
|
1368
|
-
COPY_SCALAR_FIELD(perminfoindex);
|
1369
|
-
COPY_NODE_FIELD(subquery);
|
1370
|
-
COPY_SCALAR_FIELD(security_barrier);
|
1371
|
-
COPY_SCALAR_FIELD(jointype);
|
1372
|
-
COPY_SCALAR_FIELD(joinmergedcols);
|
1373
|
-
COPY_NODE_FIELD(joinaliasvars);
|
1374
|
-
COPY_NODE_FIELD(joinleftcols);
|
1375
|
-
COPY_NODE_FIELD(joinrightcols);
|
1376
|
-
COPY_NODE_FIELD(join_using_alias);
|
1377
|
-
COPY_NODE_FIELD(functions);
|
1378
|
-
COPY_SCALAR_FIELD(funcordinality);
|
1379
|
-
COPY_NODE_FIELD(tablefunc);
|
1380
|
-
COPY_NODE_FIELD(values_lists);
|
1381
|
-
COPY_STRING_FIELD(ctename);
|
1382
|
-
COPY_SCALAR_FIELD(ctelevelsup);
|
1383
|
-
COPY_SCALAR_FIELD(self_reference);
|
1384
|
-
COPY_NODE_FIELD(coltypes);
|
1385
|
-
COPY_NODE_FIELD(coltypmods);
|
1386
|
-
COPY_NODE_FIELD(colcollations);
|
1387
|
-
COPY_STRING_FIELD(enrname);
|
1388
|
-
COPY_SCALAR_FIELD(enrtuples);
|
1389
|
-
COPY_NODE_FIELD(alias);
|
1390
|
-
COPY_NODE_FIELD(eref);
|
1391
|
-
COPY_SCALAR_FIELD(lateral);
|
1392
|
-
COPY_SCALAR_FIELD(inh);
|
1393
|
-
COPY_SCALAR_FIELD(inFromCl);
|
1394
|
-
COPY_NODE_FIELD(securityQuals);
|
1395
|
-
|
1396
|
-
return newnode;
|
1397
|
-
}
|
1398
|
-
|
1399
|
-
static RTEPermissionInfo *
|
1400
|
-
_copyRTEPermissionInfo(const RTEPermissionInfo *from)
|
1401
|
-
{
|
1402
|
-
RTEPermissionInfo *newnode = makeNode(RTEPermissionInfo);
|
1403
|
-
|
1404
|
-
COPY_SCALAR_FIELD(relid);
|
1405
|
-
COPY_SCALAR_FIELD(inh);
|
1406
|
-
COPY_SCALAR_FIELD(requiredPerms);
|
1407
|
-
COPY_SCALAR_FIELD(checkAsUser);
|
1408
|
-
COPY_BITMAPSET_FIELD(selectedCols);
|
1409
|
-
COPY_BITMAPSET_FIELD(insertedCols);
|
1410
|
-
COPY_BITMAPSET_FIELD(updatedCols);
|
1411
|
-
|
1412
|
-
return newnode;
|
1413
|
-
}
|
1414
|
-
|
1415
|
-
static RangeTblFunction *
|
1416
|
-
_copyRangeTblFunction(const RangeTblFunction *from)
|
1417
|
-
{
|
1418
|
-
RangeTblFunction *newnode = makeNode(RangeTblFunction);
|
1419
|
-
|
1420
|
-
COPY_NODE_FIELD(funcexpr);
|
1421
|
-
COPY_SCALAR_FIELD(funccolcount);
|
1422
|
-
COPY_NODE_FIELD(funccolnames);
|
1423
|
-
COPY_NODE_FIELD(funccoltypes);
|
1424
|
-
COPY_NODE_FIELD(funccoltypmods);
|
1425
|
-
COPY_NODE_FIELD(funccolcollations);
|
1426
|
-
COPY_BITMAPSET_FIELD(funcparams);
|
1427
|
-
|
1428
|
-
return newnode;
|
1429
|
-
}
|
1430
|
-
|
1431
|
-
static TableSampleClause *
|
1432
|
-
_copyTableSampleClause(const TableSampleClause *from)
|
1433
|
-
{
|
1434
|
-
TableSampleClause *newnode = makeNode(TableSampleClause);
|
1435
|
-
|
1436
|
-
COPY_SCALAR_FIELD(tsmhandler);
|
1437
|
-
COPY_NODE_FIELD(args);
|
1438
|
-
COPY_NODE_FIELD(repeatable);
|
1439
|
-
|
1440
|
-
return newnode;
|
1441
|
-
}
|
1442
|
-
|
1443
|
-
static WithCheckOption *
|
1444
|
-
_copyWithCheckOption(const WithCheckOption *from)
|
1445
|
-
{
|
1446
|
-
WithCheckOption *newnode = makeNode(WithCheckOption);
|
1447
|
-
|
1448
|
-
COPY_SCALAR_FIELD(kind);
|
1449
|
-
COPY_STRING_FIELD(relname);
|
1450
|
-
COPY_STRING_FIELD(polname);
|
1451
|
-
COPY_NODE_FIELD(qual);
|
1452
|
-
COPY_SCALAR_FIELD(cascaded);
|
1453
|
-
|
1454
|
-
return newnode;
|
1455
|
-
}
|
1456
|
-
|
1457
|
-
static SortGroupClause *
|
1458
|
-
_copySortGroupClause(const SortGroupClause *from)
|
1459
|
-
{
|
1460
|
-
SortGroupClause *newnode = makeNode(SortGroupClause);
|
1461
|
-
|
1462
|
-
COPY_SCALAR_FIELD(tleSortGroupRef);
|
1463
|
-
COPY_SCALAR_FIELD(eqop);
|
1464
|
-
COPY_SCALAR_FIELD(sortop);
|
1465
|
-
COPY_SCALAR_FIELD(nulls_first);
|
1466
|
-
COPY_SCALAR_FIELD(hashable);
|
1467
|
-
|
1468
|
-
return newnode;
|
1469
|
-
}
|
1470
|
-
|
1471
|
-
static GroupingSet *
|
1472
|
-
_copyGroupingSet(const GroupingSet *from)
|
1473
|
-
{
|
1474
|
-
GroupingSet *newnode = makeNode(GroupingSet);
|
1475
|
-
|
1476
|
-
COPY_SCALAR_FIELD(kind);
|
1477
|
-
COPY_NODE_FIELD(content);
|
1478
|
-
COPY_LOCATION_FIELD(location);
|
1479
|
-
|
1480
|
-
return newnode;
|
1481
|
-
}
|
1482
|
-
|
1483
|
-
static WindowClause *
|
1484
|
-
_copyWindowClause(const WindowClause *from)
|
1485
|
-
{
|
1486
|
-
WindowClause *newnode = makeNode(WindowClause);
|
1487
|
-
|
1488
|
-
COPY_STRING_FIELD(name);
|
1489
|
-
COPY_STRING_FIELD(refname);
|
1490
|
-
COPY_NODE_FIELD(partitionClause);
|
1491
|
-
COPY_NODE_FIELD(orderClause);
|
1492
|
-
COPY_SCALAR_FIELD(frameOptions);
|
1493
|
-
COPY_NODE_FIELD(startOffset);
|
1494
|
-
COPY_NODE_FIELD(endOffset);
|
1495
|
-
COPY_NODE_FIELD(runCondition);
|
1496
|
-
COPY_SCALAR_FIELD(startInRangeFunc);
|
1497
|
-
COPY_SCALAR_FIELD(endInRangeFunc);
|
1498
|
-
COPY_SCALAR_FIELD(inRangeColl);
|
1499
|
-
COPY_SCALAR_FIELD(inRangeAsc);
|
1500
|
-
COPY_SCALAR_FIELD(inRangeNullsFirst);
|
1501
|
-
COPY_SCALAR_FIELD(winref);
|
1502
|
-
COPY_SCALAR_FIELD(copiedOrder);
|
1503
|
-
|
1504
|
-
return newnode;
|
1505
|
-
}
|
1506
|
-
|
1507
|
-
static RowMarkClause *
|
1508
|
-
_copyRowMarkClause(const RowMarkClause *from)
|
1509
|
-
{
|
1510
|
-
RowMarkClause *newnode = makeNode(RowMarkClause);
|
1511
|
-
|
1512
|
-
COPY_SCALAR_FIELD(rti);
|
1513
|
-
COPY_SCALAR_FIELD(strength);
|
1514
|
-
COPY_SCALAR_FIELD(waitPolicy);
|
1515
|
-
COPY_SCALAR_FIELD(pushedDown);
|
1516
|
-
|
1517
|
-
return newnode;
|
1518
|
-
}
|
1519
|
-
|
1520
|
-
static WithClause *
|
1521
|
-
_copyWithClause(const WithClause *from)
|
1522
|
-
{
|
1523
|
-
WithClause *newnode = makeNode(WithClause);
|
1524
|
-
|
1525
|
-
COPY_NODE_FIELD(ctes);
|
1526
|
-
COPY_SCALAR_FIELD(recursive);
|
1527
|
-
COPY_LOCATION_FIELD(location);
|
1528
|
-
|
1529
|
-
return newnode;
|
1530
|
-
}
|
1531
|
-
|
1532
|
-
static InferClause *
|
1533
|
-
_copyInferClause(const InferClause *from)
|
1534
|
-
{
|
1535
|
-
InferClause *newnode = makeNode(InferClause);
|
1536
|
-
|
1537
|
-
COPY_NODE_FIELD(indexElems);
|
1538
|
-
COPY_NODE_FIELD(whereClause);
|
1539
|
-
COPY_STRING_FIELD(conname);
|
1540
|
-
COPY_LOCATION_FIELD(location);
|
1541
|
-
|
1542
|
-
return newnode;
|
1543
|
-
}
|
1544
|
-
|
1545
|
-
static OnConflictClause *
|
1546
|
-
_copyOnConflictClause(const OnConflictClause *from)
|
1547
|
-
{
|
1548
|
-
OnConflictClause *newnode = makeNode(OnConflictClause);
|
1549
|
-
|
1550
|
-
COPY_SCALAR_FIELD(action);
|
1551
|
-
COPY_NODE_FIELD(infer);
|
1552
|
-
COPY_NODE_FIELD(targetList);
|
1553
|
-
COPY_NODE_FIELD(whereClause);
|
1554
|
-
COPY_LOCATION_FIELD(location);
|
1555
|
-
|
1556
|
-
return newnode;
|
1557
|
-
}
|
1558
|
-
|
1559
|
-
static CTESearchClause *
|
1560
|
-
_copyCTESearchClause(const CTESearchClause *from)
|
1561
|
-
{
|
1562
|
-
CTESearchClause *newnode = makeNode(CTESearchClause);
|
1563
|
-
|
1564
|
-
COPY_NODE_FIELD(search_col_list);
|
1565
|
-
COPY_SCALAR_FIELD(search_breadth_first);
|
1566
|
-
COPY_STRING_FIELD(search_seq_column);
|
1567
|
-
COPY_LOCATION_FIELD(location);
|
1568
|
-
|
1569
|
-
return newnode;
|
1570
|
-
}
|
1571
|
-
|
1572
|
-
static CTECycleClause *
|
1573
|
-
_copyCTECycleClause(const CTECycleClause *from)
|
1574
|
-
{
|
1575
|
-
CTECycleClause *newnode = makeNode(CTECycleClause);
|
1576
|
-
|
1577
|
-
COPY_NODE_FIELD(cycle_col_list);
|
1578
|
-
COPY_STRING_FIELD(cycle_mark_column);
|
1579
|
-
COPY_NODE_FIELD(cycle_mark_value);
|
1580
|
-
COPY_NODE_FIELD(cycle_mark_default);
|
1581
|
-
COPY_STRING_FIELD(cycle_path_column);
|
1582
|
-
COPY_LOCATION_FIELD(location);
|
1583
|
-
COPY_SCALAR_FIELD(cycle_mark_type);
|
1584
|
-
COPY_SCALAR_FIELD(cycle_mark_typmod);
|
1585
|
-
COPY_SCALAR_FIELD(cycle_mark_collation);
|
1586
|
-
COPY_SCALAR_FIELD(cycle_mark_neop);
|
1587
|
-
|
1588
|
-
return newnode;
|
1589
|
-
}
|
1590
|
-
|
1591
|
-
static CommonTableExpr *
|
1592
|
-
_copyCommonTableExpr(const CommonTableExpr *from)
|
1593
|
-
{
|
1594
|
-
CommonTableExpr *newnode = makeNode(CommonTableExpr);
|
1595
|
-
|
1596
|
-
COPY_STRING_FIELD(ctename);
|
1597
|
-
COPY_NODE_FIELD(aliascolnames);
|
1598
|
-
COPY_SCALAR_FIELD(ctematerialized);
|
1599
|
-
COPY_NODE_FIELD(ctequery);
|
1600
|
-
COPY_NODE_FIELD(search_clause);
|
1601
|
-
COPY_NODE_FIELD(cycle_clause);
|
1602
|
-
COPY_LOCATION_FIELD(location);
|
1603
|
-
COPY_SCALAR_FIELD(cterecursive);
|
1604
|
-
COPY_SCALAR_FIELD(cterefcount);
|
1605
|
-
COPY_NODE_FIELD(ctecolnames);
|
1606
|
-
COPY_NODE_FIELD(ctecoltypes);
|
1607
|
-
COPY_NODE_FIELD(ctecoltypmods);
|
1608
|
-
COPY_NODE_FIELD(ctecolcollations);
|
1609
|
-
|
1610
|
-
return newnode;
|
1611
|
-
}
|
1612
|
-
|
1613
|
-
static MergeWhenClause *
|
1614
|
-
_copyMergeWhenClause(const MergeWhenClause *from)
|
1615
|
-
{
|
1616
|
-
MergeWhenClause *newnode = makeNode(MergeWhenClause);
|
1617
|
-
|
1618
|
-
COPY_SCALAR_FIELD(matched);
|
1619
|
-
COPY_SCALAR_FIELD(commandType);
|
1620
|
-
COPY_SCALAR_FIELD(override);
|
1621
|
-
COPY_NODE_FIELD(condition);
|
1622
|
-
COPY_NODE_FIELD(targetList);
|
1623
|
-
COPY_NODE_FIELD(values);
|
1624
|
-
|
1625
|
-
return newnode;
|
1626
|
-
}
|
1627
|
-
|
1628
|
-
static MergeAction *
|
1629
|
-
_copyMergeAction(const MergeAction *from)
|
1630
|
-
{
|
1631
|
-
MergeAction *newnode = makeNode(MergeAction);
|
1632
|
-
|
1633
|
-
COPY_SCALAR_FIELD(matched);
|
1634
|
-
COPY_SCALAR_FIELD(commandType);
|
1635
|
-
COPY_SCALAR_FIELD(override);
|
1636
|
-
COPY_NODE_FIELD(qual);
|
1637
|
-
COPY_NODE_FIELD(targetList);
|
1638
|
-
COPY_NODE_FIELD(updateColnos);
|
1639
|
-
|
1640
|
-
return newnode;
|
1641
|
-
}
|
1642
|
-
|
1643
|
-
static TriggerTransition *
|
1644
|
-
_copyTriggerTransition(const TriggerTransition *from)
|
1645
|
-
{
|
1646
|
-
TriggerTransition *newnode = makeNode(TriggerTransition);
|
1647
|
-
|
1648
|
-
COPY_STRING_FIELD(name);
|
1649
|
-
COPY_SCALAR_FIELD(isNew);
|
1650
|
-
COPY_SCALAR_FIELD(isTable);
|
1651
|
-
|
1652
|
-
return newnode;
|
1653
|
-
}
|
1654
|
-
|
1655
|
-
static JsonOutput *
|
1656
|
-
_copyJsonOutput(const JsonOutput *from)
|
1657
|
-
{
|
1658
|
-
JsonOutput *newnode = makeNode(JsonOutput);
|
1659
|
-
|
1660
|
-
COPY_NODE_FIELD(typeName);
|
1661
|
-
COPY_NODE_FIELD(returning);
|
1662
|
-
|
1663
|
-
return newnode;
|
1664
|
-
}
|
1665
|
-
|
1666
|
-
static JsonKeyValue *
|
1667
|
-
_copyJsonKeyValue(const JsonKeyValue *from)
|
1668
|
-
{
|
1669
|
-
JsonKeyValue *newnode = makeNode(JsonKeyValue);
|
1670
|
-
|
1671
|
-
COPY_NODE_FIELD(key);
|
1672
|
-
COPY_NODE_FIELD(value);
|
1673
|
-
|
1674
|
-
return newnode;
|
1675
|
-
}
|
1676
|
-
|
1677
|
-
static JsonObjectConstructor *
|
1678
|
-
_copyJsonObjectConstructor(const JsonObjectConstructor *from)
|
1679
|
-
{
|
1680
|
-
JsonObjectConstructor *newnode = makeNode(JsonObjectConstructor);
|
1681
|
-
|
1682
|
-
COPY_NODE_FIELD(exprs);
|
1683
|
-
COPY_NODE_FIELD(output);
|
1684
|
-
COPY_SCALAR_FIELD(absent_on_null);
|
1685
|
-
COPY_SCALAR_FIELD(unique);
|
1686
|
-
COPY_LOCATION_FIELD(location);
|
1687
|
-
|
1688
|
-
return newnode;
|
1689
|
-
}
|
1690
|
-
|
1691
|
-
static JsonArrayConstructor *
|
1692
|
-
_copyJsonArrayConstructor(const JsonArrayConstructor *from)
|
1693
|
-
{
|
1694
|
-
JsonArrayConstructor *newnode = makeNode(JsonArrayConstructor);
|
1695
|
-
|
1696
|
-
COPY_NODE_FIELD(exprs);
|
1697
|
-
COPY_NODE_FIELD(output);
|
1698
|
-
COPY_SCALAR_FIELD(absent_on_null);
|
1699
|
-
COPY_LOCATION_FIELD(location);
|
1700
|
-
|
1701
|
-
return newnode;
|
1702
|
-
}
|
1703
|
-
|
1704
|
-
static JsonArrayQueryConstructor *
|
1705
|
-
_copyJsonArrayQueryConstructor(const JsonArrayQueryConstructor *from)
|
1706
|
-
{
|
1707
|
-
JsonArrayQueryConstructor *newnode = makeNode(JsonArrayQueryConstructor);
|
1708
|
-
|
1709
|
-
COPY_NODE_FIELD(query);
|
1710
|
-
COPY_NODE_FIELD(output);
|
1711
|
-
COPY_NODE_FIELD(format);
|
1712
|
-
COPY_SCALAR_FIELD(absent_on_null);
|
1713
|
-
COPY_LOCATION_FIELD(location);
|
1714
|
-
|
1715
|
-
return newnode;
|
1716
|
-
}
|
1717
|
-
|
1718
|
-
static JsonAggConstructor *
|
1719
|
-
_copyJsonAggConstructor(const JsonAggConstructor *from)
|
1720
|
-
{
|
1721
|
-
JsonAggConstructor *newnode = makeNode(JsonAggConstructor);
|
1722
|
-
|
1723
|
-
COPY_NODE_FIELD(output);
|
1724
|
-
COPY_NODE_FIELD(agg_filter);
|
1725
|
-
COPY_NODE_FIELD(agg_order);
|
1726
|
-
COPY_NODE_FIELD(over);
|
1727
|
-
COPY_LOCATION_FIELD(location);
|
1728
|
-
|
1729
|
-
return newnode;
|
1730
|
-
}
|
1731
|
-
|
1732
|
-
static JsonObjectAgg *
|
1733
|
-
_copyJsonObjectAgg(const JsonObjectAgg *from)
|
1734
|
-
{
|
1735
|
-
JsonObjectAgg *newnode = makeNode(JsonObjectAgg);
|
1736
|
-
|
1737
|
-
COPY_NODE_FIELD(constructor);
|
1738
|
-
COPY_NODE_FIELD(arg);
|
1739
|
-
COPY_SCALAR_FIELD(absent_on_null);
|
1740
|
-
COPY_SCALAR_FIELD(unique);
|
1741
|
-
|
1742
|
-
return newnode;
|
1743
|
-
}
|
1744
|
-
|
1745
|
-
static JsonArrayAgg *
|
1746
|
-
_copyJsonArrayAgg(const JsonArrayAgg *from)
|
1747
|
-
{
|
1748
|
-
JsonArrayAgg *newnode = makeNode(JsonArrayAgg);
|
1749
|
-
|
1750
|
-
COPY_NODE_FIELD(constructor);
|
1751
|
-
COPY_NODE_FIELD(arg);
|
1752
|
-
COPY_SCALAR_FIELD(absent_on_null);
|
1753
|
-
|
1754
|
-
return newnode;
|
1755
|
-
}
|
1756
|
-
|
1757
|
-
static RawStmt *
|
1758
|
-
_copyRawStmt(const RawStmt *from)
|
1759
|
-
{
|
1760
|
-
RawStmt *newnode = makeNode(RawStmt);
|
1761
|
-
|
1762
|
-
COPY_NODE_FIELD(stmt);
|
1763
|
-
COPY_LOCATION_FIELD(stmt_location);
|
1764
|
-
COPY_SCALAR_FIELD(stmt_len);
|
1765
|
-
|
1766
|
-
return newnode;
|
1767
|
-
}
|
1768
|
-
|
1769
|
-
static InsertStmt *
|
1770
|
-
_copyInsertStmt(const InsertStmt *from)
|
1771
|
-
{
|
1772
|
-
InsertStmt *newnode = makeNode(InsertStmt);
|
1773
|
-
|
1774
|
-
COPY_NODE_FIELD(relation);
|
1775
|
-
COPY_NODE_FIELD(cols);
|
1776
|
-
COPY_NODE_FIELD(selectStmt);
|
1777
|
-
COPY_NODE_FIELD(onConflictClause);
|
1778
|
-
COPY_NODE_FIELD(returningList);
|
1779
|
-
COPY_NODE_FIELD(withClause);
|
1780
|
-
COPY_SCALAR_FIELD(override);
|
1781
|
-
|
1782
|
-
return newnode;
|
1783
|
-
}
|
1784
|
-
|
1785
|
-
static DeleteStmt *
|
1786
|
-
_copyDeleteStmt(const DeleteStmt *from)
|
1787
|
-
{
|
1788
|
-
DeleteStmt *newnode = makeNode(DeleteStmt);
|
1789
|
-
|
1790
|
-
COPY_NODE_FIELD(relation);
|
1791
|
-
COPY_NODE_FIELD(usingClause);
|
1792
|
-
COPY_NODE_FIELD(whereClause);
|
1793
|
-
COPY_NODE_FIELD(returningList);
|
1794
|
-
COPY_NODE_FIELD(withClause);
|
1795
|
-
|
1796
|
-
return newnode;
|
1797
|
-
}
|
1798
|
-
|
1799
|
-
static UpdateStmt *
|
1800
|
-
_copyUpdateStmt(const UpdateStmt *from)
|
1801
|
-
{
|
1802
|
-
UpdateStmt *newnode = makeNode(UpdateStmt);
|
1803
|
-
|
1804
|
-
COPY_NODE_FIELD(relation);
|
1805
|
-
COPY_NODE_FIELD(targetList);
|
1806
|
-
COPY_NODE_FIELD(whereClause);
|
1807
|
-
COPY_NODE_FIELD(fromClause);
|
1808
|
-
COPY_NODE_FIELD(returningList);
|
1809
|
-
COPY_NODE_FIELD(withClause);
|
1810
|
-
|
1811
|
-
return newnode;
|
1812
|
-
}
|
1813
|
-
|
1814
|
-
static MergeStmt *
|
1815
|
-
_copyMergeStmt(const MergeStmt *from)
|
1816
|
-
{
|
1817
|
-
MergeStmt *newnode = makeNode(MergeStmt);
|
1818
|
-
|
1819
|
-
COPY_NODE_FIELD(relation);
|
1820
|
-
COPY_NODE_FIELD(sourceRelation);
|
1821
|
-
COPY_NODE_FIELD(joinCondition);
|
1822
|
-
COPY_NODE_FIELD(mergeWhenClauses);
|
1823
|
-
COPY_NODE_FIELD(withClause);
|
1824
|
-
|
1825
|
-
return newnode;
|
1826
|
-
}
|
1827
|
-
|
1828
|
-
static SelectStmt *
|
1829
|
-
_copySelectStmt(const SelectStmt *from)
|
1830
|
-
{
|
1831
|
-
SelectStmt *newnode = makeNode(SelectStmt);
|
1832
|
-
|
1833
|
-
COPY_NODE_FIELD(distinctClause);
|
1834
|
-
COPY_NODE_FIELD(intoClause);
|
1835
|
-
COPY_NODE_FIELD(targetList);
|
1836
|
-
COPY_NODE_FIELD(fromClause);
|
1837
|
-
COPY_NODE_FIELD(whereClause);
|
1838
|
-
COPY_NODE_FIELD(groupClause);
|
1839
|
-
COPY_SCALAR_FIELD(groupDistinct);
|
1840
|
-
COPY_NODE_FIELD(havingClause);
|
1841
|
-
COPY_NODE_FIELD(windowClause);
|
1842
|
-
COPY_NODE_FIELD(valuesLists);
|
1843
|
-
COPY_NODE_FIELD(sortClause);
|
1844
|
-
COPY_NODE_FIELD(limitOffset);
|
1845
|
-
COPY_NODE_FIELD(limitCount);
|
1846
|
-
COPY_SCALAR_FIELD(limitOption);
|
1847
|
-
COPY_NODE_FIELD(lockingClause);
|
1848
|
-
COPY_NODE_FIELD(withClause);
|
1849
|
-
COPY_SCALAR_FIELD(op);
|
1850
|
-
COPY_SCALAR_FIELD(all);
|
1851
|
-
COPY_NODE_FIELD(larg);
|
1852
|
-
COPY_NODE_FIELD(rarg);
|
1853
|
-
|
1854
|
-
return newnode;
|
1855
|
-
}
|
1856
|
-
|
1857
|
-
static SetOperationStmt *
|
1858
|
-
_copySetOperationStmt(const SetOperationStmt *from)
|
1859
|
-
{
|
1860
|
-
SetOperationStmt *newnode = makeNode(SetOperationStmt);
|
1861
|
-
|
1862
|
-
COPY_SCALAR_FIELD(op);
|
1863
|
-
COPY_SCALAR_FIELD(all);
|
1864
|
-
COPY_NODE_FIELD(larg);
|
1865
|
-
COPY_NODE_FIELD(rarg);
|
1866
|
-
COPY_NODE_FIELD(colTypes);
|
1867
|
-
COPY_NODE_FIELD(colTypmods);
|
1868
|
-
COPY_NODE_FIELD(colCollations);
|
1869
|
-
COPY_NODE_FIELD(groupClauses);
|
1870
|
-
|
1871
|
-
return newnode;
|
1872
|
-
}
|
1873
|
-
|
1874
|
-
static ReturnStmt *
|
1875
|
-
_copyReturnStmt(const ReturnStmt *from)
|
1876
|
-
{
|
1877
|
-
ReturnStmt *newnode = makeNode(ReturnStmt);
|
1878
|
-
|
1879
|
-
COPY_NODE_FIELD(returnval);
|
1880
|
-
|
1881
|
-
return newnode;
|
1882
|
-
}
|
1883
|
-
|
1884
|
-
static PLAssignStmt *
|
1885
|
-
_copyPLAssignStmt(const PLAssignStmt *from)
|
1886
|
-
{
|
1887
|
-
PLAssignStmt *newnode = makeNode(PLAssignStmt);
|
1888
|
-
|
1889
|
-
COPY_STRING_FIELD(name);
|
1890
|
-
COPY_NODE_FIELD(indirection);
|
1891
|
-
COPY_SCALAR_FIELD(nnames);
|
1892
|
-
COPY_NODE_FIELD(val);
|
1893
|
-
COPY_LOCATION_FIELD(location);
|
1894
|
-
|
1895
|
-
return newnode;
|
1896
|
-
}
|
1897
|
-
|
1898
|
-
static CreateSchemaStmt *
|
1899
|
-
_copyCreateSchemaStmt(const CreateSchemaStmt *from)
|
1900
|
-
{
|
1901
|
-
CreateSchemaStmt *newnode = makeNode(CreateSchemaStmt);
|
1902
|
-
|
1903
|
-
COPY_STRING_FIELD(schemaname);
|
1904
|
-
COPY_NODE_FIELD(authrole);
|
1905
|
-
COPY_NODE_FIELD(schemaElts);
|
1906
|
-
COPY_SCALAR_FIELD(if_not_exists);
|
1907
|
-
|
1908
|
-
return newnode;
|
1909
|
-
}
|
1910
|
-
|
1911
|
-
static AlterTableStmt *
|
1912
|
-
_copyAlterTableStmt(const AlterTableStmt *from)
|
1913
|
-
{
|
1914
|
-
AlterTableStmt *newnode = makeNode(AlterTableStmt);
|
1915
|
-
|
1916
|
-
COPY_NODE_FIELD(relation);
|
1917
|
-
COPY_NODE_FIELD(cmds);
|
1918
|
-
COPY_SCALAR_FIELD(objtype);
|
1919
|
-
COPY_SCALAR_FIELD(missing_ok);
|
1920
|
-
|
1921
|
-
return newnode;
|
1922
|
-
}
|
1923
|
-
|
1924
|
-
static ReplicaIdentityStmt *
|
1925
|
-
_copyReplicaIdentityStmt(const ReplicaIdentityStmt *from)
|
1926
|
-
{
|
1927
|
-
ReplicaIdentityStmt *newnode = makeNode(ReplicaIdentityStmt);
|
1928
|
-
|
1929
|
-
COPY_SCALAR_FIELD(identity_type);
|
1930
|
-
COPY_STRING_FIELD(name);
|
1931
|
-
|
1932
|
-
return newnode;
|
1933
|
-
}
|
1934
|
-
|
1935
|
-
static AlterTableCmd *
|
1936
|
-
_copyAlterTableCmd(const AlterTableCmd *from)
|
1937
|
-
{
|
1938
|
-
AlterTableCmd *newnode = makeNode(AlterTableCmd);
|
1939
|
-
|
1940
|
-
COPY_SCALAR_FIELD(subtype);
|
1941
|
-
COPY_STRING_FIELD(name);
|
1942
|
-
COPY_SCALAR_FIELD(num);
|
1943
|
-
COPY_NODE_FIELD(newowner);
|
1944
|
-
COPY_NODE_FIELD(def);
|
1945
|
-
COPY_SCALAR_FIELD(behavior);
|
1946
|
-
COPY_SCALAR_FIELD(missing_ok);
|
1947
|
-
COPY_SCALAR_FIELD(recurse);
|
1948
|
-
|
1949
|
-
return newnode;
|
1950
|
-
}
|
1951
|
-
|
1952
|
-
static AlterCollationStmt *
|
1953
|
-
_copyAlterCollationStmt(const AlterCollationStmt *from)
|
1954
|
-
{
|
1955
|
-
AlterCollationStmt *newnode = makeNode(AlterCollationStmt);
|
1956
|
-
|
1957
|
-
COPY_NODE_FIELD(collname);
|
1958
|
-
|
1959
|
-
return newnode;
|
1960
|
-
}
|
1961
|
-
|
1962
|
-
static AlterDomainStmt *
|
1963
|
-
_copyAlterDomainStmt(const AlterDomainStmt *from)
|
1964
|
-
{
|
1965
|
-
AlterDomainStmt *newnode = makeNode(AlterDomainStmt);
|
1966
|
-
|
1967
|
-
COPY_SCALAR_FIELD(subtype);
|
1968
|
-
COPY_NODE_FIELD(typeName);
|
1969
|
-
COPY_STRING_FIELD(name);
|
1970
|
-
COPY_NODE_FIELD(def);
|
1971
|
-
COPY_SCALAR_FIELD(behavior);
|
1972
|
-
COPY_SCALAR_FIELD(missing_ok);
|
1973
|
-
|
1974
|
-
return newnode;
|
1975
|
-
}
|
1976
|
-
|
1977
|
-
static GrantStmt *
|
1978
|
-
_copyGrantStmt(const GrantStmt *from)
|
1979
|
-
{
|
1980
|
-
GrantStmt *newnode = makeNode(GrantStmt);
|
1981
|
-
|
1982
|
-
COPY_SCALAR_FIELD(is_grant);
|
1983
|
-
COPY_SCALAR_FIELD(targtype);
|
1984
|
-
COPY_SCALAR_FIELD(objtype);
|
1985
|
-
COPY_NODE_FIELD(objects);
|
1986
|
-
COPY_NODE_FIELD(privileges);
|
1987
|
-
COPY_NODE_FIELD(grantees);
|
1988
|
-
COPY_SCALAR_FIELD(grant_option);
|
1989
|
-
COPY_NODE_FIELD(grantor);
|
1990
|
-
COPY_SCALAR_FIELD(behavior);
|
1991
|
-
|
1992
|
-
return newnode;
|
1993
|
-
}
|
1994
|
-
|
1995
|
-
static ObjectWithArgs *
|
1996
|
-
_copyObjectWithArgs(const ObjectWithArgs *from)
|
1997
|
-
{
|
1998
|
-
ObjectWithArgs *newnode = makeNode(ObjectWithArgs);
|
1999
|
-
|
2000
|
-
COPY_NODE_FIELD(objname);
|
2001
|
-
COPY_NODE_FIELD(objargs);
|
2002
|
-
COPY_NODE_FIELD(objfuncargs);
|
2003
|
-
COPY_SCALAR_FIELD(args_unspecified);
|
2004
|
-
|
2005
|
-
return newnode;
|
2006
|
-
}
|
2007
|
-
|
2008
|
-
static AccessPriv *
|
2009
|
-
_copyAccessPriv(const AccessPriv *from)
|
2010
|
-
{
|
2011
|
-
AccessPriv *newnode = makeNode(AccessPriv);
|
2012
|
-
|
2013
|
-
COPY_STRING_FIELD(priv_name);
|
2014
|
-
COPY_NODE_FIELD(cols);
|
2015
|
-
|
2016
|
-
return newnode;
|
2017
|
-
}
|
2018
|
-
|
2019
|
-
static GrantRoleStmt *
|
2020
|
-
_copyGrantRoleStmt(const GrantRoleStmt *from)
|
2021
|
-
{
|
2022
|
-
GrantRoleStmt *newnode = makeNode(GrantRoleStmt);
|
2023
|
-
|
2024
|
-
COPY_NODE_FIELD(granted_roles);
|
2025
|
-
COPY_NODE_FIELD(grantee_roles);
|
2026
|
-
COPY_SCALAR_FIELD(is_grant);
|
2027
|
-
COPY_NODE_FIELD(opt);
|
2028
|
-
COPY_NODE_FIELD(grantor);
|
2029
|
-
COPY_SCALAR_FIELD(behavior);
|
2030
|
-
|
2031
|
-
return newnode;
|
2032
|
-
}
|
2033
|
-
|
2034
|
-
static AlterDefaultPrivilegesStmt *
|
2035
|
-
_copyAlterDefaultPrivilegesStmt(const AlterDefaultPrivilegesStmt *from)
|
2036
|
-
{
|
2037
|
-
AlterDefaultPrivilegesStmt *newnode = makeNode(AlterDefaultPrivilegesStmt);
|
2038
|
-
|
2039
|
-
COPY_NODE_FIELD(options);
|
2040
|
-
COPY_NODE_FIELD(action);
|
2041
|
-
|
2042
|
-
return newnode;
|
2043
|
-
}
|
2044
|
-
|
2045
|
-
static CopyStmt *
|
2046
|
-
_copyCopyStmt(const CopyStmt *from)
|
2047
|
-
{
|
2048
|
-
CopyStmt *newnode = makeNode(CopyStmt);
|
2049
|
-
|
2050
|
-
COPY_NODE_FIELD(relation);
|
2051
|
-
COPY_NODE_FIELD(query);
|
2052
|
-
COPY_NODE_FIELD(attlist);
|
2053
|
-
COPY_SCALAR_FIELD(is_from);
|
2054
|
-
COPY_SCALAR_FIELD(is_program);
|
2055
|
-
COPY_STRING_FIELD(filename);
|
2056
|
-
COPY_NODE_FIELD(options);
|
2057
|
-
COPY_NODE_FIELD(whereClause);
|
2058
|
-
|
2059
|
-
return newnode;
|
2060
|
-
}
|
2061
|
-
|
2062
|
-
static VariableSetStmt *
|
2063
|
-
_copyVariableSetStmt(const VariableSetStmt *from)
|
2064
|
-
{
|
2065
|
-
VariableSetStmt *newnode = makeNode(VariableSetStmt);
|
2066
|
-
|
2067
|
-
COPY_SCALAR_FIELD(kind);
|
2068
|
-
COPY_STRING_FIELD(name);
|
2069
|
-
COPY_NODE_FIELD(args);
|
2070
|
-
COPY_SCALAR_FIELD(is_local);
|
2071
|
-
|
2072
|
-
return newnode;
|
2073
|
-
}
|
2074
|
-
|
2075
|
-
static VariableShowStmt *
|
2076
|
-
_copyVariableShowStmt(const VariableShowStmt *from)
|
2077
|
-
{
|
2078
|
-
VariableShowStmt *newnode = makeNode(VariableShowStmt);
|
2079
|
-
|
2080
|
-
COPY_STRING_FIELD(name);
|
2081
|
-
|
2082
|
-
return newnode;
|
2083
|
-
}
|
2084
|
-
|
2085
|
-
static CreateStmt *
|
2086
|
-
_copyCreateStmt(const CreateStmt *from)
|
2087
|
-
{
|
2088
|
-
CreateStmt *newnode = makeNode(CreateStmt);
|
2089
|
-
|
2090
|
-
COPY_NODE_FIELD(relation);
|
2091
|
-
COPY_NODE_FIELD(tableElts);
|
2092
|
-
COPY_NODE_FIELD(inhRelations);
|
2093
|
-
COPY_NODE_FIELD(partbound);
|
2094
|
-
COPY_NODE_FIELD(partspec);
|
2095
|
-
COPY_NODE_FIELD(ofTypename);
|
2096
|
-
COPY_NODE_FIELD(constraints);
|
2097
|
-
COPY_NODE_FIELD(options);
|
2098
|
-
COPY_SCALAR_FIELD(oncommit);
|
2099
|
-
COPY_STRING_FIELD(tablespacename);
|
2100
|
-
COPY_STRING_FIELD(accessMethod);
|
2101
|
-
COPY_SCALAR_FIELD(if_not_exists);
|
2102
|
-
|
2103
|
-
return newnode;
|
2104
|
-
}
|
2105
|
-
|
2106
|
-
static Constraint *
|
2107
|
-
_copyConstraint(const Constraint *from)
|
2108
|
-
{
|
2109
|
-
Constraint *newnode = makeNode(Constraint);
|
2110
|
-
|
2111
|
-
COPY_SCALAR_FIELD(contype);
|
2112
|
-
COPY_STRING_FIELD(conname);
|
2113
|
-
COPY_SCALAR_FIELD(deferrable);
|
2114
|
-
COPY_SCALAR_FIELD(initdeferred);
|
2115
|
-
COPY_LOCATION_FIELD(location);
|
2116
|
-
COPY_SCALAR_FIELD(is_no_inherit);
|
2117
|
-
COPY_NODE_FIELD(raw_expr);
|
2118
|
-
COPY_STRING_FIELD(cooked_expr);
|
2119
|
-
COPY_SCALAR_FIELD(generated_when);
|
2120
|
-
COPY_SCALAR_FIELD(nulls_not_distinct);
|
2121
|
-
COPY_NODE_FIELD(keys);
|
2122
|
-
COPY_NODE_FIELD(including);
|
2123
|
-
COPY_NODE_FIELD(exclusions);
|
2124
|
-
COPY_NODE_FIELD(options);
|
2125
|
-
COPY_STRING_FIELD(indexname);
|
2126
|
-
COPY_STRING_FIELD(indexspace);
|
2127
|
-
COPY_SCALAR_FIELD(reset_default_tblspc);
|
2128
|
-
COPY_STRING_FIELD(access_method);
|
2129
|
-
COPY_NODE_FIELD(where_clause);
|
2130
|
-
COPY_NODE_FIELD(pktable);
|
2131
|
-
COPY_NODE_FIELD(fk_attrs);
|
2132
|
-
COPY_NODE_FIELD(pk_attrs);
|
2133
|
-
COPY_SCALAR_FIELD(fk_matchtype);
|
2134
|
-
COPY_SCALAR_FIELD(fk_upd_action);
|
2135
|
-
COPY_SCALAR_FIELD(fk_del_action);
|
2136
|
-
COPY_NODE_FIELD(fk_del_set_cols);
|
2137
|
-
COPY_NODE_FIELD(old_conpfeqop);
|
2138
|
-
COPY_SCALAR_FIELD(old_pktable_oid);
|
2139
|
-
COPY_SCALAR_FIELD(skip_validation);
|
2140
|
-
COPY_SCALAR_FIELD(initially_valid);
|
2141
|
-
|
2142
|
-
return newnode;
|
2143
|
-
}
|
2144
|
-
|
2145
|
-
static CreateTableSpaceStmt *
|
2146
|
-
_copyCreateTableSpaceStmt(const CreateTableSpaceStmt *from)
|
2147
|
-
{
|
2148
|
-
CreateTableSpaceStmt *newnode = makeNode(CreateTableSpaceStmt);
|
2149
|
-
|
2150
|
-
COPY_STRING_FIELD(tablespacename);
|
2151
|
-
COPY_NODE_FIELD(owner);
|
2152
|
-
COPY_STRING_FIELD(location);
|
2153
|
-
COPY_NODE_FIELD(options);
|
2154
|
-
|
2155
|
-
return newnode;
|
2156
|
-
}
|
2157
|
-
|
2158
|
-
static DropTableSpaceStmt *
|
2159
|
-
_copyDropTableSpaceStmt(const DropTableSpaceStmt *from)
|
2160
|
-
{
|
2161
|
-
DropTableSpaceStmt *newnode = makeNode(DropTableSpaceStmt);
|
2162
|
-
|
2163
|
-
COPY_STRING_FIELD(tablespacename);
|
2164
|
-
COPY_SCALAR_FIELD(missing_ok);
|
2165
|
-
|
2166
|
-
return newnode;
|
2167
|
-
}
|
2168
|
-
|
2169
|
-
static AlterTableSpaceOptionsStmt *
|
2170
|
-
_copyAlterTableSpaceOptionsStmt(const AlterTableSpaceOptionsStmt *from)
|
2171
|
-
{
|
2172
|
-
AlterTableSpaceOptionsStmt *newnode = makeNode(AlterTableSpaceOptionsStmt);
|
2173
|
-
|
2174
|
-
COPY_STRING_FIELD(tablespacename);
|
2175
|
-
COPY_NODE_FIELD(options);
|
2176
|
-
COPY_SCALAR_FIELD(isReset);
|
2177
|
-
|
2178
|
-
return newnode;
|
2179
|
-
}
|
2180
|
-
|
2181
|
-
static AlterTableMoveAllStmt *
|
2182
|
-
_copyAlterTableMoveAllStmt(const AlterTableMoveAllStmt *from)
|
2183
|
-
{
|
2184
|
-
AlterTableMoveAllStmt *newnode = makeNode(AlterTableMoveAllStmt);
|
2185
|
-
|
2186
|
-
COPY_STRING_FIELD(orig_tablespacename);
|
2187
|
-
COPY_SCALAR_FIELD(objtype);
|
2188
|
-
COPY_NODE_FIELD(roles);
|
2189
|
-
COPY_STRING_FIELD(new_tablespacename);
|
2190
|
-
COPY_SCALAR_FIELD(nowait);
|
2191
|
-
|
2192
|
-
return newnode;
|
2193
|
-
}
|
2194
|
-
|
2195
|
-
static CreateExtensionStmt *
|
2196
|
-
_copyCreateExtensionStmt(const CreateExtensionStmt *from)
|
2197
|
-
{
|
2198
|
-
CreateExtensionStmt *newnode = makeNode(CreateExtensionStmt);
|
2199
|
-
|
2200
|
-
COPY_STRING_FIELD(extname);
|
2201
|
-
COPY_SCALAR_FIELD(if_not_exists);
|
2202
|
-
COPY_NODE_FIELD(options);
|
2203
|
-
|
2204
|
-
return newnode;
|
2205
|
-
}
|
2206
|
-
|
2207
|
-
static AlterExtensionStmt *
|
2208
|
-
_copyAlterExtensionStmt(const AlterExtensionStmt *from)
|
2209
|
-
{
|
2210
|
-
AlterExtensionStmt *newnode = makeNode(AlterExtensionStmt);
|
2211
|
-
|
2212
|
-
COPY_STRING_FIELD(extname);
|
2213
|
-
COPY_NODE_FIELD(options);
|
2214
|
-
|
2215
|
-
return newnode;
|
2216
|
-
}
|
2217
|
-
|
2218
|
-
static AlterExtensionContentsStmt *
|
2219
|
-
_copyAlterExtensionContentsStmt(const AlterExtensionContentsStmt *from)
|
2220
|
-
{
|
2221
|
-
AlterExtensionContentsStmt *newnode = makeNode(AlterExtensionContentsStmt);
|
2222
|
-
|
2223
|
-
COPY_STRING_FIELD(extname);
|
2224
|
-
COPY_SCALAR_FIELD(action);
|
2225
|
-
COPY_SCALAR_FIELD(objtype);
|
2226
|
-
COPY_NODE_FIELD(object);
|
2227
|
-
|
2228
|
-
return newnode;
|
2229
|
-
}
|
2230
|
-
|
2231
|
-
static CreateFdwStmt *
|
2232
|
-
_copyCreateFdwStmt(const CreateFdwStmt *from)
|
2233
|
-
{
|
2234
|
-
CreateFdwStmt *newnode = makeNode(CreateFdwStmt);
|
2235
|
-
|
2236
|
-
COPY_STRING_FIELD(fdwname);
|
2237
|
-
COPY_NODE_FIELD(func_options);
|
2238
|
-
COPY_NODE_FIELD(options);
|
2239
|
-
|
2240
|
-
return newnode;
|
2241
|
-
}
|
2242
|
-
|
2243
|
-
static AlterFdwStmt *
|
2244
|
-
_copyAlterFdwStmt(const AlterFdwStmt *from)
|
2245
|
-
{
|
2246
|
-
AlterFdwStmt *newnode = makeNode(AlterFdwStmt);
|
2247
|
-
|
2248
|
-
COPY_STRING_FIELD(fdwname);
|
2249
|
-
COPY_NODE_FIELD(func_options);
|
2250
|
-
COPY_NODE_FIELD(options);
|
2251
|
-
|
2252
|
-
return newnode;
|
2253
|
-
}
|
2254
|
-
|
2255
|
-
static CreateForeignServerStmt *
|
2256
|
-
_copyCreateForeignServerStmt(const CreateForeignServerStmt *from)
|
2257
|
-
{
|
2258
|
-
CreateForeignServerStmt *newnode = makeNode(CreateForeignServerStmt);
|
2259
|
-
|
2260
|
-
COPY_STRING_FIELD(servername);
|
2261
|
-
COPY_STRING_FIELD(servertype);
|
2262
|
-
COPY_STRING_FIELD(version);
|
2263
|
-
COPY_STRING_FIELD(fdwname);
|
2264
|
-
COPY_SCALAR_FIELD(if_not_exists);
|
2265
|
-
COPY_NODE_FIELD(options);
|
2266
|
-
|
2267
|
-
return newnode;
|
2268
|
-
}
|
2269
|
-
|
2270
|
-
static AlterForeignServerStmt *
|
2271
|
-
_copyAlterForeignServerStmt(const AlterForeignServerStmt *from)
|
2272
|
-
{
|
2273
|
-
AlterForeignServerStmt *newnode = makeNode(AlterForeignServerStmt);
|
2274
|
-
|
2275
|
-
COPY_STRING_FIELD(servername);
|
2276
|
-
COPY_STRING_FIELD(version);
|
2277
|
-
COPY_NODE_FIELD(options);
|
2278
|
-
COPY_SCALAR_FIELD(has_version);
|
2279
|
-
|
2280
|
-
return newnode;
|
2281
|
-
}
|
2282
|
-
|
2283
|
-
static CreateForeignTableStmt *
|
2284
|
-
_copyCreateForeignTableStmt(const CreateForeignTableStmt *from)
|
2285
|
-
{
|
2286
|
-
CreateForeignTableStmt *newnode = makeNode(CreateForeignTableStmt);
|
2287
|
-
|
2288
|
-
COPY_NODE_FIELD(base.relation);
|
2289
|
-
COPY_NODE_FIELD(base.tableElts);
|
2290
|
-
COPY_NODE_FIELD(base.inhRelations);
|
2291
|
-
COPY_NODE_FIELD(base.partbound);
|
2292
|
-
COPY_NODE_FIELD(base.partspec);
|
2293
|
-
COPY_NODE_FIELD(base.ofTypename);
|
2294
|
-
COPY_NODE_FIELD(base.constraints);
|
2295
|
-
COPY_NODE_FIELD(base.options);
|
2296
|
-
COPY_SCALAR_FIELD(base.oncommit);
|
2297
|
-
COPY_STRING_FIELD(base.tablespacename);
|
2298
|
-
COPY_STRING_FIELD(base.accessMethod);
|
2299
|
-
COPY_SCALAR_FIELD(base.if_not_exists);
|
2300
|
-
COPY_STRING_FIELD(servername);
|
2301
|
-
COPY_NODE_FIELD(options);
|
2302
|
-
|
2303
|
-
return newnode;
|
2304
|
-
}
|
2305
|
-
|
2306
|
-
static CreateUserMappingStmt *
|
2307
|
-
_copyCreateUserMappingStmt(const CreateUserMappingStmt *from)
|
2308
|
-
{
|
2309
|
-
CreateUserMappingStmt *newnode = makeNode(CreateUserMappingStmt);
|
2310
|
-
|
2311
|
-
COPY_NODE_FIELD(user);
|
2312
|
-
COPY_STRING_FIELD(servername);
|
2313
|
-
COPY_SCALAR_FIELD(if_not_exists);
|
2314
|
-
COPY_NODE_FIELD(options);
|
2315
|
-
|
2316
|
-
return newnode;
|
2317
|
-
}
|
2318
|
-
|
2319
|
-
static AlterUserMappingStmt *
|
2320
|
-
_copyAlterUserMappingStmt(const AlterUserMappingStmt *from)
|
2321
|
-
{
|
2322
|
-
AlterUserMappingStmt *newnode = makeNode(AlterUserMappingStmt);
|
2323
|
-
|
2324
|
-
COPY_NODE_FIELD(user);
|
2325
|
-
COPY_STRING_FIELD(servername);
|
2326
|
-
COPY_NODE_FIELD(options);
|
2327
|
-
|
2328
|
-
return newnode;
|
2329
|
-
}
|
2330
|
-
|
2331
|
-
static DropUserMappingStmt *
|
2332
|
-
_copyDropUserMappingStmt(const DropUserMappingStmt *from)
|
2333
|
-
{
|
2334
|
-
DropUserMappingStmt *newnode = makeNode(DropUserMappingStmt);
|
2335
|
-
|
2336
|
-
COPY_NODE_FIELD(user);
|
2337
|
-
COPY_STRING_FIELD(servername);
|
2338
|
-
COPY_SCALAR_FIELD(missing_ok);
|
2339
|
-
|
2340
|
-
return newnode;
|
2341
|
-
}
|
2342
|
-
|
2343
|
-
static ImportForeignSchemaStmt *
|
2344
|
-
_copyImportForeignSchemaStmt(const ImportForeignSchemaStmt *from)
|
2345
|
-
{
|
2346
|
-
ImportForeignSchemaStmt *newnode = makeNode(ImportForeignSchemaStmt);
|
2347
|
-
|
2348
|
-
COPY_STRING_FIELD(server_name);
|
2349
|
-
COPY_STRING_FIELD(remote_schema);
|
2350
|
-
COPY_STRING_FIELD(local_schema);
|
2351
|
-
COPY_SCALAR_FIELD(list_type);
|
2352
|
-
COPY_NODE_FIELD(table_list);
|
2353
|
-
COPY_NODE_FIELD(options);
|
2354
|
-
|
2355
|
-
return newnode;
|
2356
|
-
}
|
2357
|
-
|
2358
|
-
static CreatePolicyStmt *
|
2359
|
-
_copyCreatePolicyStmt(const CreatePolicyStmt *from)
|
2360
|
-
{
|
2361
|
-
CreatePolicyStmt *newnode = makeNode(CreatePolicyStmt);
|
2362
|
-
|
2363
|
-
COPY_STRING_FIELD(policy_name);
|
2364
|
-
COPY_NODE_FIELD(table);
|
2365
|
-
COPY_STRING_FIELD(cmd_name);
|
2366
|
-
COPY_SCALAR_FIELD(permissive);
|
2367
|
-
COPY_NODE_FIELD(roles);
|
2368
|
-
COPY_NODE_FIELD(qual);
|
2369
|
-
COPY_NODE_FIELD(with_check);
|
2370
|
-
|
2371
|
-
return newnode;
|
2372
|
-
}
|
2373
|
-
|
2374
|
-
static AlterPolicyStmt *
|
2375
|
-
_copyAlterPolicyStmt(const AlterPolicyStmt *from)
|
2376
|
-
{
|
2377
|
-
AlterPolicyStmt *newnode = makeNode(AlterPolicyStmt);
|
2378
|
-
|
2379
|
-
COPY_STRING_FIELD(policy_name);
|
2380
|
-
COPY_NODE_FIELD(table);
|
2381
|
-
COPY_NODE_FIELD(roles);
|
2382
|
-
COPY_NODE_FIELD(qual);
|
2383
|
-
COPY_NODE_FIELD(with_check);
|
2384
|
-
|
2385
|
-
return newnode;
|
2386
|
-
}
|
2387
|
-
|
2388
|
-
static CreateAmStmt *
|
2389
|
-
_copyCreateAmStmt(const CreateAmStmt *from)
|
2390
|
-
{
|
2391
|
-
CreateAmStmt *newnode = makeNode(CreateAmStmt);
|
2392
|
-
|
2393
|
-
COPY_STRING_FIELD(amname);
|
2394
|
-
COPY_NODE_FIELD(handler_name);
|
2395
|
-
COPY_SCALAR_FIELD(amtype);
|
2396
|
-
|
2397
|
-
return newnode;
|
2398
|
-
}
|
2399
|
-
|
2400
|
-
static CreateTrigStmt *
|
2401
|
-
_copyCreateTrigStmt(const CreateTrigStmt *from)
|
2402
|
-
{
|
2403
|
-
CreateTrigStmt *newnode = makeNode(CreateTrigStmt);
|
2404
|
-
|
2405
|
-
COPY_SCALAR_FIELD(replace);
|
2406
|
-
COPY_SCALAR_FIELD(isconstraint);
|
2407
|
-
COPY_STRING_FIELD(trigname);
|
2408
|
-
COPY_NODE_FIELD(relation);
|
2409
|
-
COPY_NODE_FIELD(funcname);
|
2410
|
-
COPY_NODE_FIELD(args);
|
2411
|
-
COPY_SCALAR_FIELD(row);
|
2412
|
-
COPY_SCALAR_FIELD(timing);
|
2413
|
-
COPY_SCALAR_FIELD(events);
|
2414
|
-
COPY_NODE_FIELD(columns);
|
2415
|
-
COPY_NODE_FIELD(whenClause);
|
2416
|
-
COPY_NODE_FIELD(transitionRels);
|
2417
|
-
COPY_SCALAR_FIELD(deferrable);
|
2418
|
-
COPY_SCALAR_FIELD(initdeferred);
|
2419
|
-
COPY_NODE_FIELD(constrrel);
|
2420
|
-
|
2421
|
-
return newnode;
|
2422
|
-
}
|
2423
|
-
|
2424
|
-
static CreateEventTrigStmt *
|
2425
|
-
_copyCreateEventTrigStmt(const CreateEventTrigStmt *from)
|
2426
|
-
{
|
2427
|
-
CreateEventTrigStmt *newnode = makeNode(CreateEventTrigStmt);
|
2428
|
-
|
2429
|
-
COPY_STRING_FIELD(trigname);
|
2430
|
-
COPY_STRING_FIELD(eventname);
|
2431
|
-
COPY_NODE_FIELD(whenclause);
|
2432
|
-
COPY_NODE_FIELD(funcname);
|
2433
|
-
|
2434
|
-
return newnode;
|
2435
|
-
}
|
2436
|
-
|
2437
|
-
static AlterEventTrigStmt *
|
2438
|
-
_copyAlterEventTrigStmt(const AlterEventTrigStmt *from)
|
2439
|
-
{
|
2440
|
-
AlterEventTrigStmt *newnode = makeNode(AlterEventTrigStmt);
|
2441
|
-
|
2442
|
-
COPY_STRING_FIELD(trigname);
|
2443
|
-
COPY_SCALAR_FIELD(tgenabled);
|
2444
|
-
|
2445
|
-
return newnode;
|
2446
|
-
}
|
2447
|
-
|
2448
|
-
static CreatePLangStmt *
|
2449
|
-
_copyCreatePLangStmt(const CreatePLangStmt *from)
|
2450
|
-
{
|
2451
|
-
CreatePLangStmt *newnode = makeNode(CreatePLangStmt);
|
2452
|
-
|
2453
|
-
COPY_SCALAR_FIELD(replace);
|
2454
|
-
COPY_STRING_FIELD(plname);
|
2455
|
-
COPY_NODE_FIELD(plhandler);
|
2456
|
-
COPY_NODE_FIELD(plinline);
|
2457
|
-
COPY_NODE_FIELD(plvalidator);
|
2458
|
-
COPY_SCALAR_FIELD(pltrusted);
|
2459
|
-
|
2460
|
-
return newnode;
|
2461
|
-
}
|
2462
|
-
|
2463
|
-
static CreateRoleStmt *
|
2464
|
-
_copyCreateRoleStmt(const CreateRoleStmt *from)
|
2465
|
-
{
|
2466
|
-
CreateRoleStmt *newnode = makeNode(CreateRoleStmt);
|
2467
|
-
|
2468
|
-
COPY_SCALAR_FIELD(stmt_type);
|
2469
|
-
COPY_STRING_FIELD(role);
|
2470
|
-
COPY_NODE_FIELD(options);
|
2471
|
-
|
2472
|
-
return newnode;
|
2473
|
-
}
|
2474
|
-
|
2475
|
-
static AlterRoleStmt *
|
2476
|
-
_copyAlterRoleStmt(const AlterRoleStmt *from)
|
2477
|
-
{
|
2478
|
-
AlterRoleStmt *newnode = makeNode(AlterRoleStmt);
|
2479
|
-
|
2480
|
-
COPY_NODE_FIELD(role);
|
2481
|
-
COPY_NODE_FIELD(options);
|
2482
|
-
COPY_SCALAR_FIELD(action);
|
2483
|
-
|
2484
|
-
return newnode;
|
2485
|
-
}
|
2486
|
-
|
2487
|
-
static AlterRoleSetStmt *
|
2488
|
-
_copyAlterRoleSetStmt(const AlterRoleSetStmt *from)
|
2489
|
-
{
|
2490
|
-
AlterRoleSetStmt *newnode = makeNode(AlterRoleSetStmt);
|
2491
|
-
|
2492
|
-
COPY_NODE_FIELD(role);
|
2493
|
-
COPY_STRING_FIELD(database);
|
2494
|
-
COPY_NODE_FIELD(setstmt);
|
2495
|
-
|
2496
|
-
return newnode;
|
2497
|
-
}
|
2498
|
-
|
2499
|
-
static DropRoleStmt *
|
2500
|
-
_copyDropRoleStmt(const DropRoleStmt *from)
|
2501
|
-
{
|
2502
|
-
DropRoleStmt *newnode = makeNode(DropRoleStmt);
|
2503
|
-
|
2504
|
-
COPY_NODE_FIELD(roles);
|
2505
|
-
COPY_SCALAR_FIELD(missing_ok);
|
2506
|
-
|
2507
|
-
return newnode;
|
2508
|
-
}
|
2509
|
-
|
2510
|
-
static CreateSeqStmt *
|
2511
|
-
_copyCreateSeqStmt(const CreateSeqStmt *from)
|
2512
|
-
{
|
2513
|
-
CreateSeqStmt *newnode = makeNode(CreateSeqStmt);
|
2514
|
-
|
2515
|
-
COPY_NODE_FIELD(sequence);
|
2516
|
-
COPY_NODE_FIELD(options);
|
2517
|
-
COPY_SCALAR_FIELD(ownerId);
|
2518
|
-
COPY_SCALAR_FIELD(for_identity);
|
2519
|
-
COPY_SCALAR_FIELD(if_not_exists);
|
2520
|
-
|
2521
|
-
return newnode;
|
2522
|
-
}
|
2523
|
-
|
2524
|
-
static AlterSeqStmt *
|
2525
|
-
_copyAlterSeqStmt(const AlterSeqStmt *from)
|
2526
|
-
{
|
2527
|
-
AlterSeqStmt *newnode = makeNode(AlterSeqStmt);
|
2528
|
-
|
2529
|
-
COPY_NODE_FIELD(sequence);
|
2530
|
-
COPY_NODE_FIELD(options);
|
2531
|
-
COPY_SCALAR_FIELD(for_identity);
|
2532
|
-
COPY_SCALAR_FIELD(missing_ok);
|
2533
|
-
|
2534
|
-
return newnode;
|
2535
|
-
}
|
2536
|
-
|
2537
|
-
static DefineStmt *
|
2538
|
-
_copyDefineStmt(const DefineStmt *from)
|
2539
|
-
{
|
2540
|
-
DefineStmt *newnode = makeNode(DefineStmt);
|
2541
|
-
|
2542
|
-
COPY_SCALAR_FIELD(kind);
|
2543
|
-
COPY_SCALAR_FIELD(oldstyle);
|
2544
|
-
COPY_NODE_FIELD(defnames);
|
2545
|
-
COPY_NODE_FIELD(args);
|
2546
|
-
COPY_NODE_FIELD(definition);
|
2547
|
-
COPY_SCALAR_FIELD(if_not_exists);
|
2548
|
-
COPY_SCALAR_FIELD(replace);
|
2549
|
-
|
2550
|
-
return newnode;
|
2551
|
-
}
|
2552
|
-
|
2553
|
-
static CreateDomainStmt *
|
2554
|
-
_copyCreateDomainStmt(const CreateDomainStmt *from)
|
2555
|
-
{
|
2556
|
-
CreateDomainStmt *newnode = makeNode(CreateDomainStmt);
|
2557
|
-
|
2558
|
-
COPY_NODE_FIELD(domainname);
|
2559
|
-
COPY_NODE_FIELD(typeName);
|
2560
|
-
COPY_NODE_FIELD(collClause);
|
2561
|
-
COPY_NODE_FIELD(constraints);
|
2562
|
-
|
2563
|
-
return newnode;
|
2564
|
-
}
|
2565
|
-
|
2566
|
-
static CreateOpClassStmt *
|
2567
|
-
_copyCreateOpClassStmt(const CreateOpClassStmt *from)
|
2568
|
-
{
|
2569
|
-
CreateOpClassStmt *newnode = makeNode(CreateOpClassStmt);
|
2570
|
-
|
2571
|
-
COPY_NODE_FIELD(opclassname);
|
2572
|
-
COPY_NODE_FIELD(opfamilyname);
|
2573
|
-
COPY_STRING_FIELD(amname);
|
2574
|
-
COPY_NODE_FIELD(datatype);
|
2575
|
-
COPY_NODE_FIELD(items);
|
2576
|
-
COPY_SCALAR_FIELD(isDefault);
|
2577
|
-
|
2578
|
-
return newnode;
|
2579
|
-
}
|
2580
|
-
|
2581
|
-
static CreateOpClassItem *
|
2582
|
-
_copyCreateOpClassItem(const CreateOpClassItem *from)
|
2583
|
-
{
|
2584
|
-
CreateOpClassItem *newnode = makeNode(CreateOpClassItem);
|
2585
|
-
|
2586
|
-
COPY_SCALAR_FIELD(itemtype);
|
2587
|
-
COPY_NODE_FIELD(name);
|
2588
|
-
COPY_SCALAR_FIELD(number);
|
2589
|
-
COPY_NODE_FIELD(order_family);
|
2590
|
-
COPY_NODE_FIELD(class_args);
|
2591
|
-
COPY_NODE_FIELD(storedtype);
|
2592
|
-
|
2593
|
-
return newnode;
|
2594
|
-
}
|
2595
|
-
|
2596
|
-
static CreateOpFamilyStmt *
|
2597
|
-
_copyCreateOpFamilyStmt(const CreateOpFamilyStmt *from)
|
2598
|
-
{
|
2599
|
-
CreateOpFamilyStmt *newnode = makeNode(CreateOpFamilyStmt);
|
2600
|
-
|
2601
|
-
COPY_NODE_FIELD(opfamilyname);
|
2602
|
-
COPY_STRING_FIELD(amname);
|
2603
|
-
|
2604
|
-
return newnode;
|
2605
|
-
}
|
2606
|
-
|
2607
|
-
static AlterOpFamilyStmt *
|
2608
|
-
_copyAlterOpFamilyStmt(const AlterOpFamilyStmt *from)
|
2609
|
-
{
|
2610
|
-
AlterOpFamilyStmt *newnode = makeNode(AlterOpFamilyStmt);
|
2611
|
-
|
2612
|
-
COPY_NODE_FIELD(opfamilyname);
|
2613
|
-
COPY_STRING_FIELD(amname);
|
2614
|
-
COPY_SCALAR_FIELD(isDrop);
|
2615
|
-
COPY_NODE_FIELD(items);
|
2616
|
-
|
2617
|
-
return newnode;
|
2618
|
-
}
|
2619
|
-
|
2620
|
-
static DropStmt *
|
2621
|
-
_copyDropStmt(const DropStmt *from)
|
2622
|
-
{
|
2623
|
-
DropStmt *newnode = makeNode(DropStmt);
|
2624
|
-
|
2625
|
-
COPY_NODE_FIELD(objects);
|
2626
|
-
COPY_SCALAR_FIELD(removeType);
|
2627
|
-
COPY_SCALAR_FIELD(behavior);
|
2628
|
-
COPY_SCALAR_FIELD(missing_ok);
|
2629
|
-
COPY_SCALAR_FIELD(concurrent);
|
2630
|
-
|
2631
|
-
return newnode;
|
2632
|
-
}
|
2633
|
-
|
2634
|
-
static TruncateStmt *
|
2635
|
-
_copyTruncateStmt(const TruncateStmt *from)
|
2636
|
-
{
|
2637
|
-
TruncateStmt *newnode = makeNode(TruncateStmt);
|
2638
|
-
|
2639
|
-
COPY_NODE_FIELD(relations);
|
2640
|
-
COPY_SCALAR_FIELD(restart_seqs);
|
2641
|
-
COPY_SCALAR_FIELD(behavior);
|
2642
|
-
|
2643
|
-
return newnode;
|
2644
|
-
}
|
2645
|
-
|
2646
|
-
static CommentStmt *
|
2647
|
-
_copyCommentStmt(const CommentStmt *from)
|
2648
|
-
{
|
2649
|
-
CommentStmt *newnode = makeNode(CommentStmt);
|
2650
|
-
|
2651
|
-
COPY_SCALAR_FIELD(objtype);
|
2652
|
-
COPY_NODE_FIELD(object);
|
2653
|
-
COPY_STRING_FIELD(comment);
|
2654
|
-
|
2655
|
-
return newnode;
|
2656
|
-
}
|
2657
|
-
|
2658
|
-
static SecLabelStmt *
|
2659
|
-
_copySecLabelStmt(const SecLabelStmt *from)
|
2660
|
-
{
|
2661
|
-
SecLabelStmt *newnode = makeNode(SecLabelStmt);
|
2662
|
-
|
2663
|
-
COPY_SCALAR_FIELD(objtype);
|
2664
|
-
COPY_NODE_FIELD(object);
|
2665
|
-
COPY_STRING_FIELD(provider);
|
2666
|
-
COPY_STRING_FIELD(label);
|
2667
|
-
|
2668
|
-
return newnode;
|
2669
|
-
}
|
2670
|
-
|
2671
|
-
static DeclareCursorStmt *
|
2672
|
-
_copyDeclareCursorStmt(const DeclareCursorStmt *from)
|
2673
|
-
{
|
2674
|
-
DeclareCursorStmt *newnode = makeNode(DeclareCursorStmt);
|
2675
|
-
|
2676
|
-
COPY_STRING_FIELD(portalname);
|
2677
|
-
COPY_SCALAR_FIELD(options);
|
2678
|
-
COPY_NODE_FIELD(query);
|
2679
|
-
|
2680
|
-
return newnode;
|
2681
|
-
}
|
2682
|
-
|
2683
|
-
static ClosePortalStmt *
|
2684
|
-
_copyClosePortalStmt(const ClosePortalStmt *from)
|
2685
|
-
{
|
2686
|
-
ClosePortalStmt *newnode = makeNode(ClosePortalStmt);
|
2687
|
-
|
2688
|
-
COPY_STRING_FIELD(portalname);
|
2689
|
-
|
2690
|
-
return newnode;
|
2691
|
-
}
|
2692
|
-
|
2693
|
-
static FetchStmt *
|
2694
|
-
_copyFetchStmt(const FetchStmt *from)
|
2695
|
-
{
|
2696
|
-
FetchStmt *newnode = makeNode(FetchStmt);
|
2697
|
-
|
2698
|
-
COPY_SCALAR_FIELD(direction);
|
2699
|
-
COPY_SCALAR_FIELD(howMany);
|
2700
|
-
COPY_STRING_FIELD(portalname);
|
2701
|
-
COPY_SCALAR_FIELD(ismove);
|
2702
|
-
|
2703
|
-
return newnode;
|
2704
|
-
}
|
2705
|
-
|
2706
|
-
static IndexStmt *
|
2707
|
-
_copyIndexStmt(const IndexStmt *from)
|
2708
|
-
{
|
2709
|
-
IndexStmt *newnode = makeNode(IndexStmt);
|
2710
|
-
|
2711
|
-
COPY_STRING_FIELD(idxname);
|
2712
|
-
COPY_NODE_FIELD(relation);
|
2713
|
-
COPY_STRING_FIELD(accessMethod);
|
2714
|
-
COPY_STRING_FIELD(tableSpace);
|
2715
|
-
COPY_NODE_FIELD(indexParams);
|
2716
|
-
COPY_NODE_FIELD(indexIncludingParams);
|
2717
|
-
COPY_NODE_FIELD(options);
|
2718
|
-
COPY_NODE_FIELD(whereClause);
|
2719
|
-
COPY_NODE_FIELD(excludeOpNames);
|
2720
|
-
COPY_STRING_FIELD(idxcomment);
|
2721
|
-
COPY_SCALAR_FIELD(indexOid);
|
2722
|
-
COPY_SCALAR_FIELD(oldNumber);
|
2723
|
-
COPY_SCALAR_FIELD(oldCreateSubid);
|
2724
|
-
COPY_SCALAR_FIELD(oldFirstRelfilelocatorSubid);
|
2725
|
-
COPY_SCALAR_FIELD(unique);
|
2726
|
-
COPY_SCALAR_FIELD(nulls_not_distinct);
|
2727
|
-
COPY_SCALAR_FIELD(primary);
|
2728
|
-
COPY_SCALAR_FIELD(isconstraint);
|
2729
|
-
COPY_SCALAR_FIELD(deferrable);
|
2730
|
-
COPY_SCALAR_FIELD(initdeferred);
|
2731
|
-
COPY_SCALAR_FIELD(transformed);
|
2732
|
-
COPY_SCALAR_FIELD(concurrent);
|
2733
|
-
COPY_SCALAR_FIELD(if_not_exists);
|
2734
|
-
COPY_SCALAR_FIELD(reset_default_tblspc);
|
2735
|
-
|
2736
|
-
return newnode;
|
2737
|
-
}
|
2738
|
-
|
2739
|
-
static CreateStatsStmt *
|
2740
|
-
_copyCreateStatsStmt(const CreateStatsStmt *from)
|
2741
|
-
{
|
2742
|
-
CreateStatsStmt *newnode = makeNode(CreateStatsStmt);
|
2743
|
-
|
2744
|
-
COPY_NODE_FIELD(defnames);
|
2745
|
-
COPY_NODE_FIELD(stat_types);
|
2746
|
-
COPY_NODE_FIELD(exprs);
|
2747
|
-
COPY_NODE_FIELD(relations);
|
2748
|
-
COPY_STRING_FIELD(stxcomment);
|
2749
|
-
COPY_SCALAR_FIELD(transformed);
|
2750
|
-
COPY_SCALAR_FIELD(if_not_exists);
|
2751
|
-
|
2752
|
-
return newnode;
|
2753
|
-
}
|
2754
|
-
|
2755
|
-
static StatsElem *
|
2756
|
-
_copyStatsElem(const StatsElem *from)
|
2757
|
-
{
|
2758
|
-
StatsElem *newnode = makeNode(StatsElem);
|
2759
|
-
|
2760
|
-
COPY_STRING_FIELD(name);
|
2761
|
-
COPY_NODE_FIELD(expr);
|
2762
|
-
|
2763
|
-
return newnode;
|
2764
|
-
}
|
2765
|
-
|
2766
|
-
static AlterStatsStmt *
|
2767
|
-
_copyAlterStatsStmt(const AlterStatsStmt *from)
|
2768
|
-
{
|
2769
|
-
AlterStatsStmt *newnode = makeNode(AlterStatsStmt);
|
2770
|
-
|
2771
|
-
COPY_NODE_FIELD(defnames);
|
2772
|
-
COPY_SCALAR_FIELD(stxstattarget);
|
2773
|
-
COPY_SCALAR_FIELD(missing_ok);
|
2774
|
-
|
2775
|
-
return newnode;
|
2776
|
-
}
|
2777
|
-
|
2778
|
-
static CreateFunctionStmt *
|
2779
|
-
_copyCreateFunctionStmt(const CreateFunctionStmt *from)
|
2780
|
-
{
|
2781
|
-
CreateFunctionStmt *newnode = makeNode(CreateFunctionStmt);
|
2782
|
-
|
2783
|
-
COPY_SCALAR_FIELD(is_procedure);
|
2784
|
-
COPY_SCALAR_FIELD(replace);
|
2785
|
-
COPY_NODE_FIELD(funcname);
|
2786
|
-
COPY_NODE_FIELD(parameters);
|
2787
|
-
COPY_NODE_FIELD(returnType);
|
2788
|
-
COPY_NODE_FIELD(options);
|
2789
|
-
COPY_NODE_FIELD(sql_body);
|
2790
|
-
|
2791
|
-
return newnode;
|
2792
|
-
}
|
2793
|
-
|
2794
|
-
static FunctionParameter *
|
2795
|
-
_copyFunctionParameter(const FunctionParameter *from)
|
2796
|
-
{
|
2797
|
-
FunctionParameter *newnode = makeNode(FunctionParameter);
|
2798
|
-
|
2799
|
-
COPY_STRING_FIELD(name);
|
2800
|
-
COPY_NODE_FIELD(argType);
|
2801
|
-
COPY_SCALAR_FIELD(mode);
|
2802
|
-
COPY_NODE_FIELD(defexpr);
|
2803
|
-
|
2804
|
-
return newnode;
|
2805
|
-
}
|
2806
|
-
|
2807
|
-
static AlterFunctionStmt *
|
2808
|
-
_copyAlterFunctionStmt(const AlterFunctionStmt *from)
|
2809
|
-
{
|
2810
|
-
AlterFunctionStmt *newnode = makeNode(AlterFunctionStmt);
|
2811
|
-
|
2812
|
-
COPY_SCALAR_FIELD(objtype);
|
2813
|
-
COPY_NODE_FIELD(func);
|
2814
|
-
COPY_NODE_FIELD(actions);
|
2815
|
-
|
2816
|
-
return newnode;
|
2817
|
-
}
|
2818
|
-
|
2819
|
-
static DoStmt *
|
2820
|
-
_copyDoStmt(const DoStmt *from)
|
2821
|
-
{
|
2822
|
-
DoStmt *newnode = makeNode(DoStmt);
|
2823
|
-
|
2824
|
-
COPY_NODE_FIELD(args);
|
2825
|
-
|
2826
|
-
return newnode;
|
2827
|
-
}
|
2828
|
-
|
2829
|
-
static CallStmt *
|
2830
|
-
_copyCallStmt(const CallStmt *from)
|
2831
|
-
{
|
2832
|
-
CallStmt *newnode = makeNode(CallStmt);
|
2833
|
-
|
2834
|
-
COPY_NODE_FIELD(funccall);
|
2835
|
-
COPY_NODE_FIELD(funcexpr);
|
2836
|
-
COPY_NODE_FIELD(outargs);
|
2837
|
-
|
2838
|
-
return newnode;
|
2839
|
-
}
|
2840
|
-
|
2841
|
-
static RenameStmt *
|
2842
|
-
_copyRenameStmt(const RenameStmt *from)
|
2843
|
-
{
|
2844
|
-
RenameStmt *newnode = makeNode(RenameStmt);
|
2845
|
-
|
2846
|
-
COPY_SCALAR_FIELD(renameType);
|
2847
|
-
COPY_SCALAR_FIELD(relationType);
|
2848
|
-
COPY_NODE_FIELD(relation);
|
2849
|
-
COPY_NODE_FIELD(object);
|
2850
|
-
COPY_STRING_FIELD(subname);
|
2851
|
-
COPY_STRING_FIELD(newname);
|
2852
|
-
COPY_SCALAR_FIELD(behavior);
|
2853
|
-
COPY_SCALAR_FIELD(missing_ok);
|
2854
|
-
|
2855
|
-
return newnode;
|
2856
|
-
}
|
2857
|
-
|
2858
|
-
static AlterObjectDependsStmt *
|
2859
|
-
_copyAlterObjectDependsStmt(const AlterObjectDependsStmt *from)
|
2860
|
-
{
|
2861
|
-
AlterObjectDependsStmt *newnode = makeNode(AlterObjectDependsStmt);
|
2862
|
-
|
2863
|
-
COPY_SCALAR_FIELD(objectType);
|
2864
|
-
COPY_NODE_FIELD(relation);
|
2865
|
-
COPY_NODE_FIELD(object);
|
2866
|
-
COPY_NODE_FIELD(extname);
|
2867
|
-
COPY_SCALAR_FIELD(remove);
|
2868
|
-
|
2869
|
-
return newnode;
|
2870
|
-
}
|
2871
|
-
|
2872
|
-
static AlterObjectSchemaStmt *
|
2873
|
-
_copyAlterObjectSchemaStmt(const AlterObjectSchemaStmt *from)
|
2874
|
-
{
|
2875
|
-
AlterObjectSchemaStmt *newnode = makeNode(AlterObjectSchemaStmt);
|
2876
|
-
|
2877
|
-
COPY_SCALAR_FIELD(objectType);
|
2878
|
-
COPY_NODE_FIELD(relation);
|
2879
|
-
COPY_NODE_FIELD(object);
|
2880
|
-
COPY_STRING_FIELD(newschema);
|
2881
|
-
COPY_SCALAR_FIELD(missing_ok);
|
2882
|
-
|
2883
|
-
return newnode;
|
2884
|
-
}
|
2885
|
-
|
2886
|
-
static AlterOwnerStmt *
|
2887
|
-
_copyAlterOwnerStmt(const AlterOwnerStmt *from)
|
2888
|
-
{
|
2889
|
-
AlterOwnerStmt *newnode = makeNode(AlterOwnerStmt);
|
2890
|
-
|
2891
|
-
COPY_SCALAR_FIELD(objectType);
|
2892
|
-
COPY_NODE_FIELD(relation);
|
2893
|
-
COPY_NODE_FIELD(object);
|
2894
|
-
COPY_NODE_FIELD(newowner);
|
2895
|
-
|
2896
|
-
return newnode;
|
2897
|
-
}
|
2898
|
-
|
2899
|
-
static AlterOperatorStmt *
|
2900
|
-
_copyAlterOperatorStmt(const AlterOperatorStmt *from)
|
2901
|
-
{
|
2902
|
-
AlterOperatorStmt *newnode = makeNode(AlterOperatorStmt);
|
2903
|
-
|
2904
|
-
COPY_NODE_FIELD(opername);
|
2905
|
-
COPY_NODE_FIELD(options);
|
2906
|
-
|
2907
|
-
return newnode;
|
2908
|
-
}
|
2909
|
-
|
2910
|
-
static AlterTypeStmt *
|
2911
|
-
_copyAlterTypeStmt(const AlterTypeStmt *from)
|
2912
|
-
{
|
2913
|
-
AlterTypeStmt *newnode = makeNode(AlterTypeStmt);
|
2914
|
-
|
2915
|
-
COPY_NODE_FIELD(typeName);
|
2916
|
-
COPY_NODE_FIELD(options);
|
2917
|
-
|
2918
|
-
return newnode;
|
2919
|
-
}
|
2920
|
-
|
2921
|
-
static RuleStmt *
|
2922
|
-
_copyRuleStmt(const RuleStmt *from)
|
2923
|
-
{
|
2924
|
-
RuleStmt *newnode = makeNode(RuleStmt);
|
2925
|
-
|
2926
|
-
COPY_NODE_FIELD(relation);
|
2927
|
-
COPY_STRING_FIELD(rulename);
|
2928
|
-
COPY_NODE_FIELD(whereClause);
|
2929
|
-
COPY_SCALAR_FIELD(event);
|
2930
|
-
COPY_SCALAR_FIELD(instead);
|
2931
|
-
COPY_NODE_FIELD(actions);
|
2932
|
-
COPY_SCALAR_FIELD(replace);
|
2933
|
-
|
2934
|
-
return newnode;
|
2935
|
-
}
|
2936
|
-
|
2937
|
-
static NotifyStmt *
|
2938
|
-
_copyNotifyStmt(const NotifyStmt *from)
|
2939
|
-
{
|
2940
|
-
NotifyStmt *newnode = makeNode(NotifyStmt);
|
2941
|
-
|
2942
|
-
COPY_STRING_FIELD(conditionname);
|
2943
|
-
COPY_STRING_FIELD(payload);
|
2944
|
-
|
2945
|
-
return newnode;
|
2946
|
-
}
|
2947
|
-
|
2948
|
-
static ListenStmt *
|
2949
|
-
_copyListenStmt(const ListenStmt *from)
|
2950
|
-
{
|
2951
|
-
ListenStmt *newnode = makeNode(ListenStmt);
|
2952
|
-
|
2953
|
-
COPY_STRING_FIELD(conditionname);
|
2954
|
-
|
2955
|
-
return newnode;
|
2956
|
-
}
|
2957
|
-
|
2958
|
-
static UnlistenStmt *
|
2959
|
-
_copyUnlistenStmt(const UnlistenStmt *from)
|
2960
|
-
{
|
2961
|
-
UnlistenStmt *newnode = makeNode(UnlistenStmt);
|
2962
|
-
|
2963
|
-
COPY_STRING_FIELD(conditionname);
|
2964
|
-
|
2965
|
-
return newnode;
|
2966
|
-
}
|
2967
|
-
|
2968
|
-
static TransactionStmt *
|
2969
|
-
_copyTransactionStmt(const TransactionStmt *from)
|
2970
|
-
{
|
2971
|
-
TransactionStmt *newnode = makeNode(TransactionStmt);
|
2972
|
-
|
2973
|
-
COPY_SCALAR_FIELD(kind);
|
2974
|
-
COPY_NODE_FIELD(options);
|
2975
|
-
COPY_STRING_FIELD(savepoint_name);
|
2976
|
-
COPY_STRING_FIELD(gid);
|
2977
|
-
COPY_SCALAR_FIELD(chain);
|
2978
|
-
|
2979
|
-
return newnode;
|
2980
|
-
}
|
2981
|
-
|
2982
|
-
static CompositeTypeStmt *
|
2983
|
-
_copyCompositeTypeStmt(const CompositeTypeStmt *from)
|
2984
|
-
{
|
2985
|
-
CompositeTypeStmt *newnode = makeNode(CompositeTypeStmt);
|
2986
|
-
|
2987
|
-
COPY_NODE_FIELD(typevar);
|
2988
|
-
COPY_NODE_FIELD(coldeflist);
|
2989
|
-
|
2990
|
-
return newnode;
|
2991
|
-
}
|
2992
|
-
|
2993
|
-
static CreateEnumStmt *
|
2994
|
-
_copyCreateEnumStmt(const CreateEnumStmt *from)
|
2995
|
-
{
|
2996
|
-
CreateEnumStmt *newnode = makeNode(CreateEnumStmt);
|
2997
|
-
|
2998
|
-
COPY_NODE_FIELD(typeName);
|
2999
|
-
COPY_NODE_FIELD(vals);
|
3000
|
-
|
3001
|
-
return newnode;
|
3002
|
-
}
|
3003
|
-
|
3004
|
-
static CreateRangeStmt *
|
3005
|
-
_copyCreateRangeStmt(const CreateRangeStmt *from)
|
3006
|
-
{
|
3007
|
-
CreateRangeStmt *newnode = makeNode(CreateRangeStmt);
|
3008
|
-
|
3009
|
-
COPY_NODE_FIELD(typeName);
|
3010
|
-
COPY_NODE_FIELD(params);
|
3011
|
-
|
3012
|
-
return newnode;
|
3013
|
-
}
|
3014
|
-
|
3015
|
-
static AlterEnumStmt *
|
3016
|
-
_copyAlterEnumStmt(const AlterEnumStmt *from)
|
3017
|
-
{
|
3018
|
-
AlterEnumStmt *newnode = makeNode(AlterEnumStmt);
|
3019
|
-
|
3020
|
-
COPY_NODE_FIELD(typeName);
|
3021
|
-
COPY_STRING_FIELD(oldVal);
|
3022
|
-
COPY_STRING_FIELD(newVal);
|
3023
|
-
COPY_STRING_FIELD(newValNeighbor);
|
3024
|
-
COPY_SCALAR_FIELD(newValIsAfter);
|
3025
|
-
COPY_SCALAR_FIELD(skipIfNewValExists);
|
3026
|
-
|
3027
|
-
return newnode;
|
3028
|
-
}
|
3029
|
-
|
3030
|
-
static ViewStmt *
|
3031
|
-
_copyViewStmt(const ViewStmt *from)
|
3032
|
-
{
|
3033
|
-
ViewStmt *newnode = makeNode(ViewStmt);
|
3034
|
-
|
3035
|
-
COPY_NODE_FIELD(view);
|
3036
|
-
COPY_NODE_FIELD(aliases);
|
3037
|
-
COPY_NODE_FIELD(query);
|
3038
|
-
COPY_SCALAR_FIELD(replace);
|
3039
|
-
COPY_NODE_FIELD(options);
|
3040
|
-
COPY_SCALAR_FIELD(withCheckOption);
|
3041
|
-
|
3042
|
-
return newnode;
|
3043
|
-
}
|
3044
|
-
|
3045
|
-
static LoadStmt *
|
3046
|
-
_copyLoadStmt(const LoadStmt *from)
|
3047
|
-
{
|
3048
|
-
LoadStmt *newnode = makeNode(LoadStmt);
|
3049
|
-
|
3050
|
-
COPY_STRING_FIELD(filename);
|
3051
|
-
|
3052
|
-
return newnode;
|
3053
|
-
}
|
3054
|
-
|
3055
|
-
static CreatedbStmt *
|
3056
|
-
_copyCreatedbStmt(const CreatedbStmt *from)
|
3057
|
-
{
|
3058
|
-
CreatedbStmt *newnode = makeNode(CreatedbStmt);
|
3059
|
-
|
3060
|
-
COPY_STRING_FIELD(dbname);
|
3061
|
-
COPY_NODE_FIELD(options);
|
3062
|
-
|
3063
|
-
return newnode;
|
3064
|
-
}
|
3065
|
-
|
3066
|
-
static AlterDatabaseStmt *
|
3067
|
-
_copyAlterDatabaseStmt(const AlterDatabaseStmt *from)
|
3068
|
-
{
|
3069
|
-
AlterDatabaseStmt *newnode = makeNode(AlterDatabaseStmt);
|
3070
|
-
|
3071
|
-
COPY_STRING_FIELD(dbname);
|
3072
|
-
COPY_NODE_FIELD(options);
|
3073
|
-
|
3074
|
-
return newnode;
|
3075
|
-
}
|
3076
|
-
|
3077
|
-
static AlterDatabaseRefreshCollStmt *
|
3078
|
-
_copyAlterDatabaseRefreshCollStmt(const AlterDatabaseRefreshCollStmt *from)
|
3079
|
-
{
|
3080
|
-
AlterDatabaseRefreshCollStmt *newnode = makeNode(AlterDatabaseRefreshCollStmt);
|
3081
|
-
|
3082
|
-
COPY_STRING_FIELD(dbname);
|
3083
|
-
|
3084
|
-
return newnode;
|
3085
|
-
}
|
3086
|
-
|
3087
|
-
static AlterDatabaseSetStmt *
|
3088
|
-
_copyAlterDatabaseSetStmt(const AlterDatabaseSetStmt *from)
|
3089
|
-
{
|
3090
|
-
AlterDatabaseSetStmt *newnode = makeNode(AlterDatabaseSetStmt);
|
3091
|
-
|
3092
|
-
COPY_STRING_FIELD(dbname);
|
3093
|
-
COPY_NODE_FIELD(setstmt);
|
3094
|
-
|
3095
|
-
return newnode;
|
3096
|
-
}
|
3097
|
-
|
3098
|
-
static DropdbStmt *
|
3099
|
-
_copyDropdbStmt(const DropdbStmt *from)
|
3100
|
-
{
|
3101
|
-
DropdbStmt *newnode = makeNode(DropdbStmt);
|
3102
|
-
|
3103
|
-
COPY_STRING_FIELD(dbname);
|
3104
|
-
COPY_SCALAR_FIELD(missing_ok);
|
3105
|
-
COPY_NODE_FIELD(options);
|
3106
|
-
|
3107
|
-
return newnode;
|
3108
|
-
}
|
3109
|
-
|
3110
|
-
static AlterSystemStmt *
|
3111
|
-
_copyAlterSystemStmt(const AlterSystemStmt *from)
|
3112
|
-
{
|
3113
|
-
AlterSystemStmt *newnode = makeNode(AlterSystemStmt);
|
3114
|
-
|
3115
|
-
COPY_NODE_FIELD(setstmt);
|
3116
|
-
|
3117
|
-
return newnode;
|
3118
|
-
}
|
3119
|
-
|
3120
|
-
static ClusterStmt *
|
3121
|
-
_copyClusterStmt(const ClusterStmt *from)
|
3122
|
-
{
|
3123
|
-
ClusterStmt *newnode = makeNode(ClusterStmt);
|
3124
|
-
|
3125
|
-
COPY_NODE_FIELD(relation);
|
3126
|
-
COPY_STRING_FIELD(indexname);
|
3127
|
-
COPY_NODE_FIELD(params);
|
3128
|
-
|
3129
|
-
return newnode;
|
3130
|
-
}
|
3131
|
-
|
3132
|
-
static VacuumStmt *
|
3133
|
-
_copyVacuumStmt(const VacuumStmt *from)
|
3134
|
-
{
|
3135
|
-
VacuumStmt *newnode = makeNode(VacuumStmt);
|
3136
|
-
|
3137
|
-
COPY_NODE_FIELD(options);
|
3138
|
-
COPY_NODE_FIELD(rels);
|
3139
|
-
COPY_SCALAR_FIELD(is_vacuumcmd);
|
3140
|
-
|
3141
|
-
return newnode;
|
3142
|
-
}
|
3143
|
-
|
3144
|
-
static VacuumRelation *
|
3145
|
-
_copyVacuumRelation(const VacuumRelation *from)
|
3146
|
-
{
|
3147
|
-
VacuumRelation *newnode = makeNode(VacuumRelation);
|
3148
|
-
|
3149
|
-
COPY_NODE_FIELD(relation);
|
3150
|
-
COPY_SCALAR_FIELD(oid);
|
3151
|
-
COPY_NODE_FIELD(va_cols);
|
3152
|
-
|
3153
|
-
return newnode;
|
3154
|
-
}
|
3155
|
-
|
3156
|
-
static ExplainStmt *
|
3157
|
-
_copyExplainStmt(const ExplainStmt *from)
|
3158
|
-
{
|
3159
|
-
ExplainStmt *newnode = makeNode(ExplainStmt);
|
3160
|
-
|
3161
|
-
COPY_NODE_FIELD(query);
|
3162
|
-
COPY_NODE_FIELD(options);
|
3163
|
-
|
3164
|
-
return newnode;
|
3165
|
-
}
|
3166
|
-
|
3167
|
-
static CreateTableAsStmt *
|
3168
|
-
_copyCreateTableAsStmt(const CreateTableAsStmt *from)
|
3169
|
-
{
|
3170
|
-
CreateTableAsStmt *newnode = makeNode(CreateTableAsStmt);
|
3171
|
-
|
3172
|
-
COPY_NODE_FIELD(query);
|
3173
|
-
COPY_NODE_FIELD(into);
|
3174
|
-
COPY_SCALAR_FIELD(objtype);
|
3175
|
-
COPY_SCALAR_FIELD(is_select_into);
|
3176
|
-
COPY_SCALAR_FIELD(if_not_exists);
|
3177
|
-
|
3178
|
-
return newnode;
|
3179
|
-
}
|
3180
|
-
|
3181
|
-
static RefreshMatViewStmt *
|
3182
|
-
_copyRefreshMatViewStmt(const RefreshMatViewStmt *from)
|
3183
|
-
{
|
3184
|
-
RefreshMatViewStmt *newnode = makeNode(RefreshMatViewStmt);
|
3185
|
-
|
3186
|
-
COPY_SCALAR_FIELD(concurrent);
|
3187
|
-
COPY_SCALAR_FIELD(skipData);
|
3188
|
-
COPY_NODE_FIELD(relation);
|
3189
|
-
|
3190
|
-
return newnode;
|
3191
|
-
}
|
3192
|
-
|
3193
|
-
static CheckPointStmt *
|
3194
|
-
_copyCheckPointStmt(const CheckPointStmt *from)
|
3195
|
-
{
|
3196
|
-
CheckPointStmt *newnode = makeNode(CheckPointStmt);
|
3197
|
-
|
3198
|
-
|
3199
|
-
return newnode;
|
3200
|
-
}
|
3201
|
-
|
3202
|
-
static DiscardStmt *
|
3203
|
-
_copyDiscardStmt(const DiscardStmt *from)
|
3204
|
-
{
|
3205
|
-
DiscardStmt *newnode = makeNode(DiscardStmt);
|
3206
|
-
|
3207
|
-
COPY_SCALAR_FIELD(target);
|
3208
|
-
|
3209
|
-
return newnode;
|
3210
|
-
}
|
3211
|
-
|
3212
|
-
static LockStmt *
|
3213
|
-
_copyLockStmt(const LockStmt *from)
|
3214
|
-
{
|
3215
|
-
LockStmt *newnode = makeNode(LockStmt);
|
3216
|
-
|
3217
|
-
COPY_NODE_FIELD(relations);
|
3218
|
-
COPY_SCALAR_FIELD(mode);
|
3219
|
-
COPY_SCALAR_FIELD(nowait);
|
3220
|
-
|
3221
|
-
return newnode;
|
3222
|
-
}
|
3223
|
-
|
3224
|
-
static ConstraintsSetStmt *
|
3225
|
-
_copyConstraintsSetStmt(const ConstraintsSetStmt *from)
|
3226
|
-
{
|
3227
|
-
ConstraintsSetStmt *newnode = makeNode(ConstraintsSetStmt);
|
3228
|
-
|
3229
|
-
COPY_NODE_FIELD(constraints);
|
3230
|
-
COPY_SCALAR_FIELD(deferred);
|
3231
|
-
|
3232
|
-
return newnode;
|
3233
|
-
}
|
3234
|
-
|
3235
|
-
static ReindexStmt *
|
3236
|
-
_copyReindexStmt(const ReindexStmt *from)
|
3237
|
-
{
|
3238
|
-
ReindexStmt *newnode = makeNode(ReindexStmt);
|
3239
|
-
|
3240
|
-
COPY_SCALAR_FIELD(kind);
|
3241
|
-
COPY_NODE_FIELD(relation);
|
3242
|
-
COPY_STRING_FIELD(name);
|
3243
|
-
COPY_NODE_FIELD(params);
|
3244
|
-
|
3245
|
-
return newnode;
|
3246
|
-
}
|
3247
|
-
|
3248
|
-
static CreateConversionStmt *
|
3249
|
-
_copyCreateConversionStmt(const CreateConversionStmt *from)
|
3250
|
-
{
|
3251
|
-
CreateConversionStmt *newnode = makeNode(CreateConversionStmt);
|
3252
|
-
|
3253
|
-
COPY_NODE_FIELD(conversion_name);
|
3254
|
-
COPY_STRING_FIELD(for_encoding_name);
|
3255
|
-
COPY_STRING_FIELD(to_encoding_name);
|
3256
|
-
COPY_NODE_FIELD(func_name);
|
3257
|
-
COPY_SCALAR_FIELD(def);
|
3258
|
-
|
3259
|
-
return newnode;
|
3260
|
-
}
|
3261
|
-
|
3262
|
-
static CreateCastStmt *
|
3263
|
-
_copyCreateCastStmt(const CreateCastStmt *from)
|
3264
|
-
{
|
3265
|
-
CreateCastStmt *newnode = makeNode(CreateCastStmt);
|
3266
|
-
|
3267
|
-
COPY_NODE_FIELD(sourcetype);
|
3268
|
-
COPY_NODE_FIELD(targettype);
|
3269
|
-
COPY_NODE_FIELD(func);
|
3270
|
-
COPY_SCALAR_FIELD(context);
|
3271
|
-
COPY_SCALAR_FIELD(inout);
|
3272
|
-
|
3273
|
-
return newnode;
|
3274
|
-
}
|
3275
|
-
|
3276
|
-
static CreateTransformStmt *
|
3277
|
-
_copyCreateTransformStmt(const CreateTransformStmt *from)
|
3278
|
-
{
|
3279
|
-
CreateTransformStmt *newnode = makeNode(CreateTransformStmt);
|
3280
|
-
|
3281
|
-
COPY_SCALAR_FIELD(replace);
|
3282
|
-
COPY_NODE_FIELD(type_name);
|
3283
|
-
COPY_STRING_FIELD(lang);
|
3284
|
-
COPY_NODE_FIELD(fromsql);
|
3285
|
-
COPY_NODE_FIELD(tosql);
|
3286
|
-
|
3287
|
-
return newnode;
|
3288
|
-
}
|
3289
|
-
|
3290
|
-
static PrepareStmt *
|
3291
|
-
_copyPrepareStmt(const PrepareStmt *from)
|
3292
|
-
{
|
3293
|
-
PrepareStmt *newnode = makeNode(PrepareStmt);
|
3294
|
-
|
3295
|
-
COPY_STRING_FIELD(name);
|
3296
|
-
COPY_NODE_FIELD(argtypes);
|
3297
|
-
COPY_NODE_FIELD(query);
|
3298
|
-
|
3299
|
-
return newnode;
|
3300
|
-
}
|
3301
|
-
|
3302
|
-
static ExecuteStmt *
|
3303
|
-
_copyExecuteStmt(const ExecuteStmt *from)
|
3304
|
-
{
|
3305
|
-
ExecuteStmt *newnode = makeNode(ExecuteStmt);
|
3306
|
-
|
3307
|
-
COPY_STRING_FIELD(name);
|
3308
|
-
COPY_NODE_FIELD(params);
|
3309
|
-
|
3310
|
-
return newnode;
|
3311
|
-
}
|
3312
|
-
|
3313
|
-
static DeallocateStmt *
|
3314
|
-
_copyDeallocateStmt(const DeallocateStmt *from)
|
3315
|
-
{
|
3316
|
-
DeallocateStmt *newnode = makeNode(DeallocateStmt);
|
3317
|
-
|
3318
|
-
COPY_STRING_FIELD(name);
|
3319
|
-
|
3320
|
-
return newnode;
|
3321
|
-
}
|
3322
|
-
|
3323
|
-
static DropOwnedStmt *
|
3324
|
-
_copyDropOwnedStmt(const DropOwnedStmt *from)
|
3325
|
-
{
|
3326
|
-
DropOwnedStmt *newnode = makeNode(DropOwnedStmt);
|
3327
|
-
|
3328
|
-
COPY_NODE_FIELD(roles);
|
3329
|
-
COPY_SCALAR_FIELD(behavior);
|
3330
|
-
|
3331
|
-
return newnode;
|
3332
|
-
}
|
3333
|
-
|
3334
|
-
static ReassignOwnedStmt *
|
3335
|
-
_copyReassignOwnedStmt(const ReassignOwnedStmt *from)
|
3336
|
-
{
|
3337
|
-
ReassignOwnedStmt *newnode = makeNode(ReassignOwnedStmt);
|
3338
|
-
|
3339
|
-
COPY_NODE_FIELD(roles);
|
3340
|
-
COPY_NODE_FIELD(newrole);
|
3341
|
-
|
3342
|
-
return newnode;
|
3343
|
-
}
|
3344
|
-
|
3345
|
-
static AlterTSDictionaryStmt *
|
3346
|
-
_copyAlterTSDictionaryStmt(const AlterTSDictionaryStmt *from)
|
3347
|
-
{
|
3348
|
-
AlterTSDictionaryStmt *newnode = makeNode(AlterTSDictionaryStmt);
|
3349
|
-
|
3350
|
-
COPY_NODE_FIELD(dictname);
|
3351
|
-
COPY_NODE_FIELD(options);
|
3352
|
-
|
3353
|
-
return newnode;
|
3354
|
-
}
|
3355
|
-
|
3356
|
-
static AlterTSConfigurationStmt *
|
3357
|
-
_copyAlterTSConfigurationStmt(const AlterTSConfigurationStmt *from)
|
3358
|
-
{
|
3359
|
-
AlterTSConfigurationStmt *newnode = makeNode(AlterTSConfigurationStmt);
|
3360
|
-
|
3361
|
-
COPY_SCALAR_FIELD(kind);
|
3362
|
-
COPY_NODE_FIELD(cfgname);
|
3363
|
-
COPY_NODE_FIELD(tokentype);
|
3364
|
-
COPY_NODE_FIELD(dicts);
|
3365
|
-
COPY_SCALAR_FIELD(override);
|
3366
|
-
COPY_SCALAR_FIELD(replace);
|
3367
|
-
COPY_SCALAR_FIELD(missing_ok);
|
3368
|
-
|
3369
|
-
return newnode;
|
3370
|
-
}
|
3371
|
-
|
3372
|
-
static PublicationTable *
|
3373
|
-
_copyPublicationTable(const PublicationTable *from)
|
3374
|
-
{
|
3375
|
-
PublicationTable *newnode = makeNode(PublicationTable);
|
3376
|
-
|
3377
|
-
COPY_NODE_FIELD(relation);
|
3378
|
-
COPY_NODE_FIELD(whereClause);
|
3379
|
-
COPY_NODE_FIELD(columns);
|
3380
|
-
|
3381
|
-
return newnode;
|
3382
|
-
}
|
3383
|
-
|
3384
|
-
static PublicationObjSpec *
|
3385
|
-
_copyPublicationObjSpec(const PublicationObjSpec *from)
|
3386
|
-
{
|
3387
|
-
PublicationObjSpec *newnode = makeNode(PublicationObjSpec);
|
3388
|
-
|
3389
|
-
COPY_SCALAR_FIELD(pubobjtype);
|
3390
|
-
COPY_STRING_FIELD(name);
|
3391
|
-
COPY_NODE_FIELD(pubtable);
|
3392
|
-
COPY_LOCATION_FIELD(location);
|
3393
|
-
|
3394
|
-
return newnode;
|
3395
|
-
}
|
3396
|
-
|
3397
|
-
static CreatePublicationStmt *
|
3398
|
-
_copyCreatePublicationStmt(const CreatePublicationStmt *from)
|
3399
|
-
{
|
3400
|
-
CreatePublicationStmt *newnode = makeNode(CreatePublicationStmt);
|
3401
|
-
|
3402
|
-
COPY_STRING_FIELD(pubname);
|
3403
|
-
COPY_NODE_FIELD(options);
|
3404
|
-
COPY_NODE_FIELD(pubobjects);
|
3405
|
-
COPY_SCALAR_FIELD(for_all_tables);
|
3406
|
-
|
3407
|
-
return newnode;
|
3408
|
-
}
|
3409
|
-
|
3410
|
-
static AlterPublicationStmt *
|
3411
|
-
_copyAlterPublicationStmt(const AlterPublicationStmt *from)
|
3412
|
-
{
|
3413
|
-
AlterPublicationStmt *newnode = makeNode(AlterPublicationStmt);
|
3414
|
-
|
3415
|
-
COPY_STRING_FIELD(pubname);
|
3416
|
-
COPY_NODE_FIELD(options);
|
3417
|
-
COPY_NODE_FIELD(pubobjects);
|
3418
|
-
COPY_SCALAR_FIELD(for_all_tables);
|
3419
|
-
COPY_SCALAR_FIELD(action);
|
3420
|
-
|
3421
|
-
return newnode;
|
3422
|
-
}
|
3423
|
-
|
3424
|
-
static CreateSubscriptionStmt *
|
3425
|
-
_copyCreateSubscriptionStmt(const CreateSubscriptionStmt *from)
|
3426
|
-
{
|
3427
|
-
CreateSubscriptionStmt *newnode = makeNode(CreateSubscriptionStmt);
|
3428
|
-
|
3429
|
-
COPY_STRING_FIELD(subname);
|
3430
|
-
COPY_STRING_FIELD(conninfo);
|
3431
|
-
COPY_NODE_FIELD(publication);
|
3432
|
-
COPY_NODE_FIELD(options);
|
3433
|
-
|
3434
|
-
return newnode;
|
3435
|
-
}
|
3436
|
-
|
3437
|
-
static AlterSubscriptionStmt *
|
3438
|
-
_copyAlterSubscriptionStmt(const AlterSubscriptionStmt *from)
|
3439
|
-
{
|
3440
|
-
AlterSubscriptionStmt *newnode = makeNode(AlterSubscriptionStmt);
|
3441
|
-
|
3442
|
-
COPY_SCALAR_FIELD(kind);
|
3443
|
-
COPY_STRING_FIELD(subname);
|
3444
|
-
COPY_STRING_FIELD(conninfo);
|
3445
|
-
COPY_NODE_FIELD(publication);
|
3446
|
-
COPY_NODE_FIELD(options);
|
3447
|
-
|
3448
|
-
return newnode;
|
3449
|
-
}
|
3450
|
-
|
3451
|
-
static DropSubscriptionStmt *
|
3452
|
-
_copyDropSubscriptionStmt(const DropSubscriptionStmt *from)
|
3453
|
-
{
|
3454
|
-
DropSubscriptionStmt *newnode = makeNode(DropSubscriptionStmt);
|
3455
|
-
|
3456
|
-
COPY_STRING_FIELD(subname);
|
3457
|
-
COPY_SCALAR_FIELD(missing_ok);
|
3458
|
-
COPY_SCALAR_FIELD(behavior);
|
3459
|
-
|
3460
|
-
return newnode;
|
3461
|
-
}
|
3462
|
-
|
3463
|
-
static PathKey *
|
3464
|
-
_copyPathKey(const PathKey *from)
|
3465
|
-
{
|
3466
|
-
PathKey *newnode = makeNode(PathKey);
|
3467
|
-
|
3468
|
-
COPY_SCALAR_FIELD(pk_eclass);
|
3469
|
-
COPY_SCALAR_FIELD(pk_opfamily);
|
3470
|
-
COPY_SCALAR_FIELD(pk_strategy);
|
3471
|
-
COPY_SCALAR_FIELD(pk_nulls_first);
|
3472
|
-
|
3473
|
-
return newnode;
|
3474
|
-
}
|
3475
|
-
|
3476
|
-
static RestrictInfo *
|
3477
|
-
_copyRestrictInfo(const RestrictInfo *from)
|
3478
|
-
{
|
3479
|
-
RestrictInfo *newnode = makeNode(RestrictInfo);
|
3480
|
-
|
3481
|
-
COPY_NODE_FIELD(clause);
|
3482
|
-
COPY_SCALAR_FIELD(is_pushed_down);
|
3483
|
-
COPY_SCALAR_FIELD(can_join);
|
3484
|
-
COPY_SCALAR_FIELD(pseudoconstant);
|
3485
|
-
COPY_SCALAR_FIELD(has_clone);
|
3486
|
-
COPY_SCALAR_FIELD(is_clone);
|
3487
|
-
COPY_SCALAR_FIELD(leakproof);
|
3488
|
-
COPY_SCALAR_FIELD(has_volatile);
|
3489
|
-
COPY_SCALAR_FIELD(security_level);
|
3490
|
-
COPY_SCALAR_FIELD(num_base_rels);
|
3491
|
-
COPY_BITMAPSET_FIELD(clause_relids);
|
3492
|
-
COPY_BITMAPSET_FIELD(required_relids);
|
3493
|
-
COPY_BITMAPSET_FIELD(incompatible_relids);
|
3494
|
-
COPY_BITMAPSET_FIELD(outer_relids);
|
3495
|
-
COPY_BITMAPSET_FIELD(left_relids);
|
3496
|
-
COPY_BITMAPSET_FIELD(right_relids);
|
3497
|
-
COPY_NODE_FIELD(orclause);
|
3498
|
-
COPY_SCALAR_FIELD(rinfo_serial);
|
3499
|
-
COPY_SCALAR_FIELD(parent_ec);
|
3500
|
-
COPY_SCALAR_FIELD(eval_cost);
|
3501
|
-
COPY_SCALAR_FIELD(norm_selec);
|
3502
|
-
COPY_SCALAR_FIELD(outer_selec);
|
3503
|
-
COPY_NODE_FIELD(mergeopfamilies);
|
3504
|
-
COPY_SCALAR_FIELD(left_ec);
|
3505
|
-
COPY_SCALAR_FIELD(right_ec);
|
3506
|
-
COPY_SCALAR_FIELD(left_em);
|
3507
|
-
COPY_SCALAR_FIELD(right_em);
|
3508
|
-
newnode->scansel_cache = NIL;
|
3509
|
-
COPY_SCALAR_FIELD(outer_is_left);
|
3510
|
-
COPY_SCALAR_FIELD(hashjoinoperator);
|
3511
|
-
COPY_SCALAR_FIELD(left_bucketsize);
|
3512
|
-
COPY_SCALAR_FIELD(right_bucketsize);
|
3513
|
-
COPY_SCALAR_FIELD(left_mcvfreq);
|
3514
|
-
COPY_SCALAR_FIELD(right_mcvfreq);
|
3515
|
-
COPY_SCALAR_FIELD(left_hasheqoperator);
|
3516
|
-
COPY_SCALAR_FIELD(right_hasheqoperator);
|
3517
|
-
|
3518
|
-
return newnode;
|
3519
|
-
}
|
3520
|
-
|
3521
|
-
static PlaceHolderVar *
|
3522
|
-
_copyPlaceHolderVar(const PlaceHolderVar *from)
|
3523
|
-
{
|
3524
|
-
PlaceHolderVar *newnode = makeNode(PlaceHolderVar);
|
3525
|
-
|
3526
|
-
COPY_NODE_FIELD(phexpr);
|
3527
|
-
COPY_BITMAPSET_FIELD(phrels);
|
3528
|
-
COPY_BITMAPSET_FIELD(phnullingrels);
|
3529
|
-
COPY_SCALAR_FIELD(phid);
|
3530
|
-
COPY_SCALAR_FIELD(phlevelsup);
|
3531
|
-
|
3532
|
-
return newnode;
|
3533
|
-
}
|
3534
|
-
|
3535
|
-
static SpecialJoinInfo *
|
3536
|
-
_copySpecialJoinInfo(const SpecialJoinInfo *from)
|
3537
|
-
{
|
3538
|
-
SpecialJoinInfo *newnode = makeNode(SpecialJoinInfo);
|
3539
|
-
|
3540
|
-
COPY_BITMAPSET_FIELD(min_lefthand);
|
3541
|
-
COPY_BITMAPSET_FIELD(min_righthand);
|
3542
|
-
COPY_BITMAPSET_FIELD(syn_lefthand);
|
3543
|
-
COPY_BITMAPSET_FIELD(syn_righthand);
|
3544
|
-
COPY_SCALAR_FIELD(jointype);
|
3545
|
-
COPY_SCALAR_FIELD(ojrelid);
|
3546
|
-
COPY_BITMAPSET_FIELD(commute_above_l);
|
3547
|
-
COPY_BITMAPSET_FIELD(commute_above_r);
|
3548
|
-
COPY_BITMAPSET_FIELD(commute_below_l);
|
3549
|
-
COPY_BITMAPSET_FIELD(commute_below_r);
|
3550
|
-
COPY_SCALAR_FIELD(lhs_strict);
|
3551
|
-
COPY_SCALAR_FIELD(semi_can_btree);
|
3552
|
-
COPY_SCALAR_FIELD(semi_can_hash);
|
3553
|
-
COPY_NODE_FIELD(semi_operators);
|
3554
|
-
COPY_NODE_FIELD(semi_rhs_exprs);
|
3555
|
-
|
3556
|
-
return newnode;
|
3557
|
-
}
|
3558
|
-
|
3559
|
-
static AppendRelInfo *
|
3560
|
-
_copyAppendRelInfo(const AppendRelInfo *from)
|
3561
|
-
{
|
3562
|
-
AppendRelInfo *newnode = makeNode(AppendRelInfo);
|
3563
|
-
|
3564
|
-
COPY_SCALAR_FIELD(parent_relid);
|
3565
|
-
COPY_SCALAR_FIELD(child_relid);
|
3566
|
-
COPY_SCALAR_FIELD(parent_reltype);
|
3567
|
-
COPY_SCALAR_FIELD(child_reltype);
|
3568
|
-
COPY_NODE_FIELD(translated_vars);
|
3569
|
-
COPY_SCALAR_FIELD(num_child_cols);
|
3570
|
-
COPY_POINTER_FIELD(parent_colnos, from->num_child_cols * sizeof(AttrNumber));
|
3571
|
-
COPY_SCALAR_FIELD(parent_reloid);
|
3572
|
-
|
3573
|
-
return newnode;
|
3574
|
-
}
|
3575
|
-
|
3576
|
-
static PlaceHolderInfo *
|
3577
|
-
_copyPlaceHolderInfo(const PlaceHolderInfo *from)
|
3578
|
-
{
|
3579
|
-
PlaceHolderInfo *newnode = makeNode(PlaceHolderInfo);
|
3580
|
-
|
3581
|
-
COPY_SCALAR_FIELD(phid);
|
3582
|
-
COPY_NODE_FIELD(ph_var);
|
3583
|
-
COPY_BITMAPSET_FIELD(ph_eval_at);
|
3584
|
-
COPY_BITMAPSET_FIELD(ph_lateral);
|
3585
|
-
COPY_BITMAPSET_FIELD(ph_needed);
|
3586
|
-
COPY_SCALAR_FIELD(ph_width);
|
3587
|
-
|
3588
|
-
return newnode;
|
3589
|
-
}
|
3590
|
-
|
3591
|
-
static PlannedStmt *
|
3592
|
-
_copyPlannedStmt(const PlannedStmt *from)
|
3593
|
-
{
|
3594
|
-
PlannedStmt *newnode = makeNode(PlannedStmt);
|
3595
|
-
|
3596
|
-
COPY_SCALAR_FIELD(commandType);
|
3597
|
-
COPY_SCALAR_FIELD(queryId);
|
3598
|
-
COPY_SCALAR_FIELD(hasReturning);
|
3599
|
-
COPY_SCALAR_FIELD(hasModifyingCTE);
|
3600
|
-
COPY_SCALAR_FIELD(canSetTag);
|
3601
|
-
COPY_SCALAR_FIELD(transientPlan);
|
3602
|
-
COPY_SCALAR_FIELD(dependsOnRole);
|
3603
|
-
COPY_SCALAR_FIELD(parallelModeNeeded);
|
3604
|
-
COPY_SCALAR_FIELD(jitFlags);
|
3605
|
-
COPY_NODE_FIELD(planTree);
|
3606
|
-
COPY_NODE_FIELD(rtable);
|
3607
|
-
COPY_NODE_FIELD(permInfos);
|
3608
|
-
COPY_NODE_FIELD(resultRelations);
|
3609
|
-
COPY_NODE_FIELD(appendRelations);
|
3610
|
-
COPY_NODE_FIELD(subplans);
|
3611
|
-
COPY_BITMAPSET_FIELD(rewindPlanIDs);
|
3612
|
-
COPY_NODE_FIELD(rowMarks);
|
3613
|
-
COPY_NODE_FIELD(relationOids);
|
3614
|
-
COPY_NODE_FIELD(invalItems);
|
3615
|
-
COPY_NODE_FIELD(paramExecTypes);
|
3616
|
-
COPY_NODE_FIELD(utilityStmt);
|
3617
|
-
COPY_LOCATION_FIELD(stmt_location);
|
3618
|
-
COPY_SCALAR_FIELD(stmt_len);
|
3619
|
-
|
3620
|
-
return newnode;
|
3621
|
-
}
|
3622
|
-
|
3623
|
-
static Result *
|
3624
|
-
_copyResult(const Result *from)
|
3625
|
-
{
|
3626
|
-
Result *newnode = makeNode(Result);
|
3627
|
-
|
3628
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
3629
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
3630
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
3631
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
3632
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
3633
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
3634
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
3635
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
3636
|
-
COPY_NODE_FIELD(plan.targetlist);
|
3637
|
-
COPY_NODE_FIELD(plan.qual);
|
3638
|
-
COPY_NODE_FIELD(plan.lefttree);
|
3639
|
-
COPY_NODE_FIELD(plan.righttree);
|
3640
|
-
COPY_NODE_FIELD(plan.initPlan);
|
3641
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
3642
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
3643
|
-
COPY_NODE_FIELD(resconstantqual);
|
3644
|
-
|
3645
|
-
return newnode;
|
3646
|
-
}
|
3647
|
-
|
3648
|
-
static ProjectSet *
|
3649
|
-
_copyProjectSet(const ProjectSet *from)
|
3650
|
-
{
|
3651
|
-
ProjectSet *newnode = makeNode(ProjectSet);
|
3652
|
-
|
3653
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
3654
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
3655
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
3656
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
3657
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
3658
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
3659
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
3660
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
3661
|
-
COPY_NODE_FIELD(plan.targetlist);
|
3662
|
-
COPY_NODE_FIELD(plan.qual);
|
3663
|
-
COPY_NODE_FIELD(plan.lefttree);
|
3664
|
-
COPY_NODE_FIELD(plan.righttree);
|
3665
|
-
COPY_NODE_FIELD(plan.initPlan);
|
3666
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
3667
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
3668
|
-
|
3669
|
-
return newnode;
|
3670
|
-
}
|
3671
|
-
|
3672
|
-
static ModifyTable *
|
3673
|
-
_copyModifyTable(const ModifyTable *from)
|
3674
|
-
{
|
3675
|
-
ModifyTable *newnode = makeNode(ModifyTable);
|
3676
|
-
|
3677
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
3678
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
3679
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
3680
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
3681
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
3682
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
3683
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
3684
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
3685
|
-
COPY_NODE_FIELD(plan.targetlist);
|
3686
|
-
COPY_NODE_FIELD(plan.qual);
|
3687
|
-
COPY_NODE_FIELD(plan.lefttree);
|
3688
|
-
COPY_NODE_FIELD(plan.righttree);
|
3689
|
-
COPY_NODE_FIELD(plan.initPlan);
|
3690
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
3691
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
3692
|
-
COPY_SCALAR_FIELD(operation);
|
3693
|
-
COPY_SCALAR_FIELD(canSetTag);
|
3694
|
-
COPY_SCALAR_FIELD(nominalRelation);
|
3695
|
-
COPY_SCALAR_FIELD(rootRelation);
|
3696
|
-
COPY_SCALAR_FIELD(partColsUpdated);
|
3697
|
-
COPY_NODE_FIELD(resultRelations);
|
3698
|
-
COPY_NODE_FIELD(updateColnosLists);
|
3699
|
-
COPY_NODE_FIELD(withCheckOptionLists);
|
3700
|
-
COPY_NODE_FIELD(returningLists);
|
3701
|
-
COPY_NODE_FIELD(fdwPrivLists);
|
3702
|
-
COPY_BITMAPSET_FIELD(fdwDirectModifyPlans);
|
3703
|
-
COPY_NODE_FIELD(rowMarks);
|
3704
|
-
COPY_SCALAR_FIELD(epqParam);
|
3705
|
-
COPY_SCALAR_FIELD(onConflictAction);
|
3706
|
-
COPY_NODE_FIELD(arbiterIndexes);
|
3707
|
-
COPY_NODE_FIELD(onConflictSet);
|
3708
|
-
COPY_NODE_FIELD(onConflictCols);
|
3709
|
-
COPY_NODE_FIELD(onConflictWhere);
|
3710
|
-
COPY_SCALAR_FIELD(exclRelRTI);
|
3711
|
-
COPY_NODE_FIELD(exclRelTlist);
|
3712
|
-
COPY_NODE_FIELD(mergeActionLists);
|
3713
|
-
|
3714
|
-
return newnode;
|
3715
|
-
}
|
3716
|
-
|
3717
|
-
static Append *
|
3718
|
-
_copyAppend(const Append *from)
|
3719
|
-
{
|
3720
|
-
Append *newnode = makeNode(Append);
|
3721
|
-
|
3722
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
3723
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
3724
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
3725
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
3726
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
3727
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
3728
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
3729
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
3730
|
-
COPY_NODE_FIELD(plan.targetlist);
|
3731
|
-
COPY_NODE_FIELD(plan.qual);
|
3732
|
-
COPY_NODE_FIELD(plan.lefttree);
|
3733
|
-
COPY_NODE_FIELD(plan.righttree);
|
3734
|
-
COPY_NODE_FIELD(plan.initPlan);
|
3735
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
3736
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
3737
|
-
COPY_BITMAPSET_FIELD(apprelids);
|
3738
|
-
COPY_NODE_FIELD(appendplans);
|
3739
|
-
COPY_SCALAR_FIELD(nasyncplans);
|
3740
|
-
COPY_SCALAR_FIELD(first_partial_plan);
|
3741
|
-
COPY_NODE_FIELD(part_prune_info);
|
3742
|
-
|
3743
|
-
return newnode;
|
3744
|
-
}
|
3745
|
-
|
3746
|
-
static MergeAppend *
|
3747
|
-
_copyMergeAppend(const MergeAppend *from)
|
3748
|
-
{
|
3749
|
-
MergeAppend *newnode = makeNode(MergeAppend);
|
3750
|
-
|
3751
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
3752
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
3753
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
3754
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
3755
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
3756
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
3757
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
3758
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
3759
|
-
COPY_NODE_FIELD(plan.targetlist);
|
3760
|
-
COPY_NODE_FIELD(plan.qual);
|
3761
|
-
COPY_NODE_FIELD(plan.lefttree);
|
3762
|
-
COPY_NODE_FIELD(plan.righttree);
|
3763
|
-
COPY_NODE_FIELD(plan.initPlan);
|
3764
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
3765
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
3766
|
-
COPY_BITMAPSET_FIELD(apprelids);
|
3767
|
-
COPY_NODE_FIELD(mergeplans);
|
3768
|
-
COPY_SCALAR_FIELD(numCols);
|
3769
|
-
COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
|
3770
|
-
COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
|
3771
|
-
COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
|
3772
|
-
COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
|
3773
|
-
COPY_NODE_FIELD(part_prune_info);
|
3774
|
-
|
3775
|
-
return newnode;
|
3776
|
-
}
|
3777
|
-
|
3778
|
-
static RecursiveUnion *
|
3779
|
-
_copyRecursiveUnion(const RecursiveUnion *from)
|
3780
|
-
{
|
3781
|
-
RecursiveUnion *newnode = makeNode(RecursiveUnion);
|
3782
|
-
|
3783
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
3784
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
3785
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
3786
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
3787
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
3788
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
3789
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
3790
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
3791
|
-
COPY_NODE_FIELD(plan.targetlist);
|
3792
|
-
COPY_NODE_FIELD(plan.qual);
|
3793
|
-
COPY_NODE_FIELD(plan.lefttree);
|
3794
|
-
COPY_NODE_FIELD(plan.righttree);
|
3795
|
-
COPY_NODE_FIELD(plan.initPlan);
|
3796
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
3797
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
3798
|
-
COPY_SCALAR_FIELD(wtParam);
|
3799
|
-
COPY_SCALAR_FIELD(numCols);
|
3800
|
-
COPY_POINTER_FIELD(dupColIdx, from->numCols * sizeof(AttrNumber));
|
3801
|
-
COPY_POINTER_FIELD(dupOperators, from->numCols * sizeof(Oid));
|
3802
|
-
COPY_POINTER_FIELD(dupCollations, from->numCols * sizeof(Oid));
|
3803
|
-
COPY_SCALAR_FIELD(numGroups);
|
3804
|
-
|
3805
|
-
return newnode;
|
3806
|
-
}
|
3807
|
-
|
3808
|
-
static BitmapAnd *
|
3809
|
-
_copyBitmapAnd(const BitmapAnd *from)
|
3810
|
-
{
|
3811
|
-
BitmapAnd *newnode = makeNode(BitmapAnd);
|
3812
|
-
|
3813
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
3814
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
3815
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
3816
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
3817
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
3818
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
3819
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
3820
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
3821
|
-
COPY_NODE_FIELD(plan.targetlist);
|
3822
|
-
COPY_NODE_FIELD(plan.qual);
|
3823
|
-
COPY_NODE_FIELD(plan.lefttree);
|
3824
|
-
COPY_NODE_FIELD(plan.righttree);
|
3825
|
-
COPY_NODE_FIELD(plan.initPlan);
|
3826
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
3827
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
3828
|
-
COPY_NODE_FIELD(bitmapplans);
|
3829
|
-
|
3830
|
-
return newnode;
|
3831
|
-
}
|
3832
|
-
|
3833
|
-
static BitmapOr *
|
3834
|
-
_copyBitmapOr(const BitmapOr *from)
|
3835
|
-
{
|
3836
|
-
BitmapOr *newnode = makeNode(BitmapOr);
|
3837
|
-
|
3838
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
3839
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
3840
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
3841
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
3842
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
3843
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
3844
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
3845
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
3846
|
-
COPY_NODE_FIELD(plan.targetlist);
|
3847
|
-
COPY_NODE_FIELD(plan.qual);
|
3848
|
-
COPY_NODE_FIELD(plan.lefttree);
|
3849
|
-
COPY_NODE_FIELD(plan.righttree);
|
3850
|
-
COPY_NODE_FIELD(plan.initPlan);
|
3851
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
3852
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
3853
|
-
COPY_SCALAR_FIELD(isshared);
|
3854
|
-
COPY_NODE_FIELD(bitmapplans);
|
3855
|
-
|
3856
|
-
return newnode;
|
3857
|
-
}
|
3858
|
-
|
3859
|
-
static SeqScan *
|
3860
|
-
_copySeqScan(const SeqScan *from)
|
3861
|
-
{
|
3862
|
-
SeqScan *newnode = makeNode(SeqScan);
|
3863
|
-
|
3864
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
3865
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
3866
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
3867
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
3868
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
3869
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
3870
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
3871
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
3872
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
3873
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
3874
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
3875
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
3876
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
3877
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
3878
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
3879
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
3880
|
-
|
3881
|
-
return newnode;
|
3882
|
-
}
|
3883
|
-
|
3884
|
-
static SampleScan *
|
3885
|
-
_copySampleScan(const SampleScan *from)
|
3886
|
-
{
|
3887
|
-
SampleScan *newnode = makeNode(SampleScan);
|
3888
|
-
|
3889
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
3890
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
3891
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
3892
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
3893
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
3894
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
3895
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
3896
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
3897
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
3898
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
3899
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
3900
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
3901
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
3902
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
3903
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
3904
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
3905
|
-
COPY_NODE_FIELD(tablesample);
|
3906
|
-
|
3907
|
-
return newnode;
|
3908
|
-
}
|
3909
|
-
|
3910
|
-
static IndexScan *
|
3911
|
-
_copyIndexScan(const IndexScan *from)
|
3912
|
-
{
|
3913
|
-
IndexScan *newnode = makeNode(IndexScan);
|
3914
|
-
|
3915
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
3916
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
3917
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
3918
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
3919
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
3920
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
3921
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
3922
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
3923
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
3924
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
3925
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
3926
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
3927
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
3928
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
3929
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
3930
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
3931
|
-
COPY_SCALAR_FIELD(indexid);
|
3932
|
-
COPY_NODE_FIELD(indexqual);
|
3933
|
-
COPY_NODE_FIELD(indexqualorig);
|
3934
|
-
COPY_NODE_FIELD(indexorderby);
|
3935
|
-
COPY_NODE_FIELD(indexorderbyorig);
|
3936
|
-
COPY_NODE_FIELD(indexorderbyops);
|
3937
|
-
COPY_SCALAR_FIELD(indexorderdir);
|
3938
|
-
|
3939
|
-
return newnode;
|
3940
|
-
}
|
3941
|
-
|
3942
|
-
static IndexOnlyScan *
|
3943
|
-
_copyIndexOnlyScan(const IndexOnlyScan *from)
|
3944
|
-
{
|
3945
|
-
IndexOnlyScan *newnode = makeNode(IndexOnlyScan);
|
3946
|
-
|
3947
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
3948
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
3949
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
3950
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
3951
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
3952
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
3953
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
3954
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
3955
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
3956
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
3957
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
3958
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
3959
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
3960
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
3961
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
3962
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
3963
|
-
COPY_SCALAR_FIELD(indexid);
|
3964
|
-
COPY_NODE_FIELD(indexqual);
|
3965
|
-
COPY_NODE_FIELD(recheckqual);
|
3966
|
-
COPY_NODE_FIELD(indexorderby);
|
3967
|
-
COPY_NODE_FIELD(indextlist);
|
3968
|
-
COPY_SCALAR_FIELD(indexorderdir);
|
3969
|
-
|
3970
|
-
return newnode;
|
3971
|
-
}
|
3972
|
-
|
3973
|
-
static BitmapIndexScan *
|
3974
|
-
_copyBitmapIndexScan(const BitmapIndexScan *from)
|
3975
|
-
{
|
3976
|
-
BitmapIndexScan *newnode = makeNode(BitmapIndexScan);
|
3977
|
-
|
3978
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
3979
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
3980
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
3981
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
3982
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
3983
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
3984
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
3985
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
3986
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
3987
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
3988
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
3989
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
3990
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
3991
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
3992
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
3993
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
3994
|
-
COPY_SCALAR_FIELD(indexid);
|
3995
|
-
COPY_SCALAR_FIELD(isshared);
|
3996
|
-
COPY_NODE_FIELD(indexqual);
|
3997
|
-
COPY_NODE_FIELD(indexqualorig);
|
3998
|
-
|
3999
|
-
return newnode;
|
4000
|
-
}
|
4001
|
-
|
4002
|
-
static BitmapHeapScan *
|
4003
|
-
_copyBitmapHeapScan(const BitmapHeapScan *from)
|
4004
|
-
{
|
4005
|
-
BitmapHeapScan *newnode = makeNode(BitmapHeapScan);
|
4006
|
-
|
4007
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
4008
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
4009
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
4010
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
4011
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
4012
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
4013
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
4014
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
4015
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
4016
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
4017
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
4018
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
4019
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
4020
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
4021
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
4022
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
4023
|
-
COPY_NODE_FIELD(bitmapqualorig);
|
4024
|
-
|
4025
|
-
return newnode;
|
4026
|
-
}
|
4027
|
-
|
4028
|
-
static TidScan *
|
4029
|
-
_copyTidScan(const TidScan *from)
|
4030
|
-
{
|
4031
|
-
TidScan *newnode = makeNode(TidScan);
|
4032
|
-
|
4033
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
4034
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
4035
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
4036
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
4037
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
4038
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
4039
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
4040
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
4041
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
4042
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
4043
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
4044
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
4045
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
4046
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
4047
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
4048
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
4049
|
-
COPY_NODE_FIELD(tidquals);
|
4050
|
-
|
4051
|
-
return newnode;
|
4052
|
-
}
|
4053
|
-
|
4054
|
-
static TidRangeScan *
|
4055
|
-
_copyTidRangeScan(const TidRangeScan *from)
|
4056
|
-
{
|
4057
|
-
TidRangeScan *newnode = makeNode(TidRangeScan);
|
4058
|
-
|
4059
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
4060
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
4061
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
4062
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
4063
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
4064
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
4065
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
4066
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
4067
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
4068
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
4069
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
4070
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
4071
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
4072
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
4073
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
4074
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
4075
|
-
COPY_NODE_FIELD(tidrangequals);
|
4076
|
-
|
4077
|
-
return newnode;
|
4078
|
-
}
|
4079
|
-
|
4080
|
-
static SubqueryScan *
|
4081
|
-
_copySubqueryScan(const SubqueryScan *from)
|
4082
|
-
{
|
4083
|
-
SubqueryScan *newnode = makeNode(SubqueryScan);
|
4084
|
-
|
4085
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
4086
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
4087
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
4088
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
4089
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
4090
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
4091
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
4092
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
4093
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
4094
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
4095
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
4096
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
4097
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
4098
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
4099
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
4100
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
4101
|
-
COPY_NODE_FIELD(subplan);
|
4102
|
-
COPY_SCALAR_FIELD(scanstatus);
|
4103
|
-
|
4104
|
-
return newnode;
|
4105
|
-
}
|
4106
|
-
|
4107
|
-
static FunctionScan *
|
4108
|
-
_copyFunctionScan(const FunctionScan *from)
|
4109
|
-
{
|
4110
|
-
FunctionScan *newnode = makeNode(FunctionScan);
|
4111
|
-
|
4112
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
4113
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
4114
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
4115
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
4116
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
4117
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
4118
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
4119
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
4120
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
4121
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
4122
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
4123
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
4124
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
4125
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
4126
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
4127
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
4128
|
-
COPY_NODE_FIELD(functions);
|
4129
|
-
COPY_SCALAR_FIELD(funcordinality);
|
4130
|
-
|
4131
|
-
return newnode;
|
4132
|
-
}
|
4133
|
-
|
4134
|
-
static ValuesScan *
|
4135
|
-
_copyValuesScan(const ValuesScan *from)
|
4136
|
-
{
|
4137
|
-
ValuesScan *newnode = makeNode(ValuesScan);
|
4138
|
-
|
4139
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
4140
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
4141
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
4142
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
4143
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
4144
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
4145
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
4146
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
4147
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
4148
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
4149
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
4150
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
4151
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
4152
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
4153
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
4154
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
4155
|
-
COPY_NODE_FIELD(values_lists);
|
4156
|
-
|
4157
|
-
return newnode;
|
4158
|
-
}
|
4159
|
-
|
4160
|
-
static TableFuncScan *
|
4161
|
-
_copyTableFuncScan(const TableFuncScan *from)
|
4162
|
-
{
|
4163
|
-
TableFuncScan *newnode = makeNode(TableFuncScan);
|
4164
|
-
|
4165
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
4166
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
4167
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
4168
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
4169
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
4170
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
4171
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
4172
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
4173
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
4174
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
4175
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
4176
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
4177
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
4178
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
4179
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
4180
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
4181
|
-
COPY_NODE_FIELD(tablefunc);
|
4182
|
-
|
4183
|
-
return newnode;
|
4184
|
-
}
|
4185
|
-
|
4186
|
-
static CteScan *
|
4187
|
-
_copyCteScan(const CteScan *from)
|
4188
|
-
{
|
4189
|
-
CteScan *newnode = makeNode(CteScan);
|
4190
|
-
|
4191
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
4192
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
4193
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
4194
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
4195
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
4196
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
4197
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
4198
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
4199
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
4200
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
4201
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
4202
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
4203
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
4204
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
4205
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
4206
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
4207
|
-
COPY_SCALAR_FIELD(ctePlanId);
|
4208
|
-
COPY_SCALAR_FIELD(cteParam);
|
4209
|
-
|
4210
|
-
return newnode;
|
4211
|
-
}
|
4212
|
-
|
4213
|
-
static NamedTuplestoreScan *
|
4214
|
-
_copyNamedTuplestoreScan(const NamedTuplestoreScan *from)
|
4215
|
-
{
|
4216
|
-
NamedTuplestoreScan *newnode = makeNode(NamedTuplestoreScan);
|
4217
|
-
|
4218
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
4219
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
4220
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
4221
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
4222
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
4223
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
4224
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
4225
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
4226
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
4227
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
4228
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
4229
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
4230
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
4231
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
4232
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
4233
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
4234
|
-
COPY_STRING_FIELD(enrname);
|
4235
|
-
|
4236
|
-
return newnode;
|
4237
|
-
}
|
4238
|
-
|
4239
|
-
static WorkTableScan *
|
4240
|
-
_copyWorkTableScan(const WorkTableScan *from)
|
4241
|
-
{
|
4242
|
-
WorkTableScan *newnode = makeNode(WorkTableScan);
|
4243
|
-
|
4244
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
4245
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
4246
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
4247
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
4248
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
4249
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
4250
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
4251
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
4252
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
4253
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
4254
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
4255
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
4256
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
4257
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
4258
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
4259
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
4260
|
-
COPY_SCALAR_FIELD(wtParam);
|
4261
|
-
|
4262
|
-
return newnode;
|
4263
|
-
}
|
4264
|
-
|
4265
|
-
static ForeignScan *
|
4266
|
-
_copyForeignScan(const ForeignScan *from)
|
4267
|
-
{
|
4268
|
-
ForeignScan *newnode = makeNode(ForeignScan);
|
4269
|
-
|
4270
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
4271
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
4272
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
4273
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
4274
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
4275
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
4276
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
4277
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
4278
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
4279
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
4280
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
4281
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
4282
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
4283
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
4284
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
4285
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
4286
|
-
COPY_SCALAR_FIELD(operation);
|
4287
|
-
COPY_SCALAR_FIELD(resultRelation);
|
4288
|
-
COPY_SCALAR_FIELD(checkAsUser);
|
4289
|
-
COPY_SCALAR_FIELD(fs_server);
|
4290
|
-
COPY_NODE_FIELD(fdw_exprs);
|
4291
|
-
COPY_NODE_FIELD(fdw_private);
|
4292
|
-
COPY_NODE_FIELD(fdw_scan_tlist);
|
4293
|
-
COPY_NODE_FIELD(fdw_recheck_quals);
|
4294
|
-
COPY_BITMAPSET_FIELD(fs_relids);
|
4295
|
-
COPY_BITMAPSET_FIELD(fs_base_relids);
|
4296
|
-
COPY_SCALAR_FIELD(fsSystemCol);
|
4297
|
-
|
4298
|
-
return newnode;
|
4299
|
-
}
|
4300
|
-
|
4301
|
-
static CustomScan *
|
4302
|
-
_copyCustomScan(const CustomScan *from)
|
4303
|
-
{
|
4304
|
-
CustomScan *newnode = makeNode(CustomScan);
|
4305
|
-
|
4306
|
-
COPY_SCALAR_FIELD(scan.plan.startup_cost);
|
4307
|
-
COPY_SCALAR_FIELD(scan.plan.total_cost);
|
4308
|
-
COPY_SCALAR_FIELD(scan.plan.plan_rows);
|
4309
|
-
COPY_SCALAR_FIELD(scan.plan.plan_width);
|
4310
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_aware);
|
4311
|
-
COPY_SCALAR_FIELD(scan.plan.parallel_safe);
|
4312
|
-
COPY_SCALAR_FIELD(scan.plan.async_capable);
|
4313
|
-
COPY_SCALAR_FIELD(scan.plan.plan_node_id);
|
4314
|
-
COPY_NODE_FIELD(scan.plan.targetlist);
|
4315
|
-
COPY_NODE_FIELD(scan.plan.qual);
|
4316
|
-
COPY_NODE_FIELD(scan.plan.lefttree);
|
4317
|
-
COPY_NODE_FIELD(scan.plan.righttree);
|
4318
|
-
COPY_NODE_FIELD(scan.plan.initPlan);
|
4319
|
-
COPY_BITMAPSET_FIELD(scan.plan.extParam);
|
4320
|
-
COPY_BITMAPSET_FIELD(scan.plan.allParam);
|
4321
|
-
COPY_SCALAR_FIELD(scan.scanrelid);
|
4322
|
-
COPY_SCALAR_FIELD(flags);
|
4323
|
-
COPY_NODE_FIELD(custom_plans);
|
4324
|
-
COPY_NODE_FIELD(custom_exprs);
|
4325
|
-
COPY_NODE_FIELD(custom_private);
|
4326
|
-
COPY_NODE_FIELD(custom_scan_tlist);
|
4327
|
-
COPY_BITMAPSET_FIELD(custom_relids);
|
4328
|
-
COPY_SCALAR_FIELD(methods);
|
4329
|
-
|
4330
|
-
return newnode;
|
4331
|
-
}
|
4332
|
-
|
4333
|
-
static NestLoop *
|
4334
|
-
_copyNestLoop(const NestLoop *from)
|
4335
|
-
{
|
4336
|
-
NestLoop *newnode = makeNode(NestLoop);
|
4337
|
-
|
4338
|
-
COPY_SCALAR_FIELD(join.plan.startup_cost);
|
4339
|
-
COPY_SCALAR_FIELD(join.plan.total_cost);
|
4340
|
-
COPY_SCALAR_FIELD(join.plan.plan_rows);
|
4341
|
-
COPY_SCALAR_FIELD(join.plan.plan_width);
|
4342
|
-
COPY_SCALAR_FIELD(join.plan.parallel_aware);
|
4343
|
-
COPY_SCALAR_FIELD(join.plan.parallel_safe);
|
4344
|
-
COPY_SCALAR_FIELD(join.plan.async_capable);
|
4345
|
-
COPY_SCALAR_FIELD(join.plan.plan_node_id);
|
4346
|
-
COPY_NODE_FIELD(join.plan.targetlist);
|
4347
|
-
COPY_NODE_FIELD(join.plan.qual);
|
4348
|
-
COPY_NODE_FIELD(join.plan.lefttree);
|
4349
|
-
COPY_NODE_FIELD(join.plan.righttree);
|
4350
|
-
COPY_NODE_FIELD(join.plan.initPlan);
|
4351
|
-
COPY_BITMAPSET_FIELD(join.plan.extParam);
|
4352
|
-
COPY_BITMAPSET_FIELD(join.plan.allParam);
|
4353
|
-
COPY_SCALAR_FIELD(join.jointype);
|
4354
|
-
COPY_SCALAR_FIELD(join.inner_unique);
|
4355
|
-
COPY_NODE_FIELD(join.joinqual);
|
4356
|
-
COPY_NODE_FIELD(nestParams);
|
4357
|
-
|
4358
|
-
return newnode;
|
4359
|
-
}
|
4360
|
-
|
4361
|
-
static NestLoopParam *
|
4362
|
-
_copyNestLoopParam(const NestLoopParam *from)
|
4363
|
-
{
|
4364
|
-
NestLoopParam *newnode = makeNode(NestLoopParam);
|
4365
|
-
|
4366
|
-
COPY_SCALAR_FIELD(paramno);
|
4367
|
-
COPY_NODE_FIELD(paramval);
|
4368
|
-
|
4369
|
-
return newnode;
|
4370
|
-
}
|
4371
|
-
|
4372
|
-
static MergeJoin *
|
4373
|
-
_copyMergeJoin(const MergeJoin *from)
|
4374
|
-
{
|
4375
|
-
MergeJoin *newnode = makeNode(MergeJoin);
|
4376
|
-
|
4377
|
-
COPY_SCALAR_FIELD(join.plan.startup_cost);
|
4378
|
-
COPY_SCALAR_FIELD(join.plan.total_cost);
|
4379
|
-
COPY_SCALAR_FIELD(join.plan.plan_rows);
|
4380
|
-
COPY_SCALAR_FIELD(join.plan.plan_width);
|
4381
|
-
COPY_SCALAR_FIELD(join.plan.parallel_aware);
|
4382
|
-
COPY_SCALAR_FIELD(join.plan.parallel_safe);
|
4383
|
-
COPY_SCALAR_FIELD(join.plan.async_capable);
|
4384
|
-
COPY_SCALAR_FIELD(join.plan.plan_node_id);
|
4385
|
-
COPY_NODE_FIELD(join.plan.targetlist);
|
4386
|
-
COPY_NODE_FIELD(join.plan.qual);
|
4387
|
-
COPY_NODE_FIELD(join.plan.lefttree);
|
4388
|
-
COPY_NODE_FIELD(join.plan.righttree);
|
4389
|
-
COPY_NODE_FIELD(join.plan.initPlan);
|
4390
|
-
COPY_BITMAPSET_FIELD(join.plan.extParam);
|
4391
|
-
COPY_BITMAPSET_FIELD(join.plan.allParam);
|
4392
|
-
COPY_SCALAR_FIELD(join.jointype);
|
4393
|
-
COPY_SCALAR_FIELD(join.inner_unique);
|
4394
|
-
COPY_NODE_FIELD(join.joinqual);
|
4395
|
-
COPY_SCALAR_FIELD(skip_mark_restore);
|
4396
|
-
COPY_NODE_FIELD(mergeclauses);
|
4397
|
-
COPY_POINTER_FIELD(mergeFamilies, list_length(from->mergeclauses) * sizeof(Oid));
|
4398
|
-
COPY_POINTER_FIELD(mergeCollations, list_length(from->mergeclauses) * sizeof(Oid));
|
4399
|
-
COPY_POINTER_FIELD(mergeStrategies, list_length(from->mergeclauses) * sizeof(int));
|
4400
|
-
COPY_POINTER_FIELD(mergeNullsFirst, list_length(from->mergeclauses) * sizeof(bool));
|
4401
|
-
|
4402
|
-
return newnode;
|
4403
|
-
}
|
4404
|
-
|
4405
|
-
static HashJoin *
|
4406
|
-
_copyHashJoin(const HashJoin *from)
|
4407
|
-
{
|
4408
|
-
HashJoin *newnode = makeNode(HashJoin);
|
4409
|
-
|
4410
|
-
COPY_SCALAR_FIELD(join.plan.startup_cost);
|
4411
|
-
COPY_SCALAR_FIELD(join.plan.total_cost);
|
4412
|
-
COPY_SCALAR_FIELD(join.plan.plan_rows);
|
4413
|
-
COPY_SCALAR_FIELD(join.plan.plan_width);
|
4414
|
-
COPY_SCALAR_FIELD(join.plan.parallel_aware);
|
4415
|
-
COPY_SCALAR_FIELD(join.plan.parallel_safe);
|
4416
|
-
COPY_SCALAR_FIELD(join.plan.async_capable);
|
4417
|
-
COPY_SCALAR_FIELD(join.plan.plan_node_id);
|
4418
|
-
COPY_NODE_FIELD(join.plan.targetlist);
|
4419
|
-
COPY_NODE_FIELD(join.plan.qual);
|
4420
|
-
COPY_NODE_FIELD(join.plan.lefttree);
|
4421
|
-
COPY_NODE_FIELD(join.plan.righttree);
|
4422
|
-
COPY_NODE_FIELD(join.plan.initPlan);
|
4423
|
-
COPY_BITMAPSET_FIELD(join.plan.extParam);
|
4424
|
-
COPY_BITMAPSET_FIELD(join.plan.allParam);
|
4425
|
-
COPY_SCALAR_FIELD(join.jointype);
|
4426
|
-
COPY_SCALAR_FIELD(join.inner_unique);
|
4427
|
-
COPY_NODE_FIELD(join.joinqual);
|
4428
|
-
COPY_NODE_FIELD(hashclauses);
|
4429
|
-
COPY_NODE_FIELD(hashoperators);
|
4430
|
-
COPY_NODE_FIELD(hashcollations);
|
4431
|
-
COPY_NODE_FIELD(hashkeys);
|
4432
|
-
|
4433
|
-
return newnode;
|
4434
|
-
}
|
4435
|
-
|
4436
|
-
static Material *
|
4437
|
-
_copyMaterial(const Material *from)
|
4438
|
-
{
|
4439
|
-
Material *newnode = makeNode(Material);
|
4440
|
-
|
4441
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
4442
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
4443
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
4444
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
4445
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
4446
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
4447
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
4448
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
4449
|
-
COPY_NODE_FIELD(plan.targetlist);
|
4450
|
-
COPY_NODE_FIELD(plan.qual);
|
4451
|
-
COPY_NODE_FIELD(plan.lefttree);
|
4452
|
-
COPY_NODE_FIELD(plan.righttree);
|
4453
|
-
COPY_NODE_FIELD(plan.initPlan);
|
4454
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
4455
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
4456
|
-
|
4457
|
-
return newnode;
|
4458
|
-
}
|
4459
|
-
|
4460
|
-
static Memoize *
|
4461
|
-
_copyMemoize(const Memoize *from)
|
4462
|
-
{
|
4463
|
-
Memoize *newnode = makeNode(Memoize);
|
4464
|
-
|
4465
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
4466
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
4467
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
4468
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
4469
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
4470
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
4471
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
4472
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
4473
|
-
COPY_NODE_FIELD(plan.targetlist);
|
4474
|
-
COPY_NODE_FIELD(plan.qual);
|
4475
|
-
COPY_NODE_FIELD(plan.lefttree);
|
4476
|
-
COPY_NODE_FIELD(plan.righttree);
|
4477
|
-
COPY_NODE_FIELD(plan.initPlan);
|
4478
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
4479
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
4480
|
-
COPY_SCALAR_FIELD(numKeys);
|
4481
|
-
COPY_POINTER_FIELD(hashOperators, from->numKeys * sizeof(Oid));
|
4482
|
-
COPY_POINTER_FIELD(collations, from->numKeys * sizeof(Oid));
|
4483
|
-
COPY_NODE_FIELD(param_exprs);
|
4484
|
-
COPY_SCALAR_FIELD(singlerow);
|
4485
|
-
COPY_SCALAR_FIELD(binary_mode);
|
4486
|
-
COPY_SCALAR_FIELD(est_entries);
|
4487
|
-
COPY_BITMAPSET_FIELD(keyparamids);
|
4488
|
-
|
4489
|
-
return newnode;
|
4490
|
-
}
|
4491
|
-
|
4492
|
-
static Sort *
|
4493
|
-
_copySort(const Sort *from)
|
4494
|
-
{
|
4495
|
-
Sort *newnode = makeNode(Sort);
|
4496
|
-
|
4497
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
4498
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
4499
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
4500
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
4501
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
4502
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
4503
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
4504
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
4505
|
-
COPY_NODE_FIELD(plan.targetlist);
|
4506
|
-
COPY_NODE_FIELD(plan.qual);
|
4507
|
-
COPY_NODE_FIELD(plan.lefttree);
|
4508
|
-
COPY_NODE_FIELD(plan.righttree);
|
4509
|
-
COPY_NODE_FIELD(plan.initPlan);
|
4510
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
4511
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
4512
|
-
COPY_SCALAR_FIELD(numCols);
|
4513
|
-
COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
|
4514
|
-
COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
|
4515
|
-
COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
|
4516
|
-
COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
|
4517
|
-
|
4518
|
-
return newnode;
|
4519
|
-
}
|
4520
|
-
|
4521
|
-
static IncrementalSort *
|
4522
|
-
_copyIncrementalSort(const IncrementalSort *from)
|
4523
|
-
{
|
4524
|
-
IncrementalSort *newnode = makeNode(IncrementalSort);
|
4525
|
-
|
4526
|
-
COPY_SCALAR_FIELD(sort.plan.startup_cost);
|
4527
|
-
COPY_SCALAR_FIELD(sort.plan.total_cost);
|
4528
|
-
COPY_SCALAR_FIELD(sort.plan.plan_rows);
|
4529
|
-
COPY_SCALAR_FIELD(sort.plan.plan_width);
|
4530
|
-
COPY_SCALAR_FIELD(sort.plan.parallel_aware);
|
4531
|
-
COPY_SCALAR_FIELD(sort.plan.parallel_safe);
|
4532
|
-
COPY_SCALAR_FIELD(sort.plan.async_capable);
|
4533
|
-
COPY_SCALAR_FIELD(sort.plan.plan_node_id);
|
4534
|
-
COPY_NODE_FIELD(sort.plan.targetlist);
|
4535
|
-
COPY_NODE_FIELD(sort.plan.qual);
|
4536
|
-
COPY_NODE_FIELD(sort.plan.lefttree);
|
4537
|
-
COPY_NODE_FIELD(sort.plan.righttree);
|
4538
|
-
COPY_NODE_FIELD(sort.plan.initPlan);
|
4539
|
-
COPY_BITMAPSET_FIELD(sort.plan.extParam);
|
4540
|
-
COPY_BITMAPSET_FIELD(sort.plan.allParam);
|
4541
|
-
COPY_SCALAR_FIELD(sort.numCols);
|
4542
|
-
COPY_POINTER_FIELD(sort.sortColIdx, from->sort.numCols * sizeof(AttrNumber));
|
4543
|
-
COPY_POINTER_FIELD(sort.sortOperators, from->sort.numCols * sizeof(Oid));
|
4544
|
-
COPY_POINTER_FIELD(sort.collations, from->sort.numCols * sizeof(Oid));
|
4545
|
-
COPY_POINTER_FIELD(sort.nullsFirst, from->sort.numCols * sizeof(bool));
|
4546
|
-
COPY_SCALAR_FIELD(nPresortedCols);
|
4547
|
-
|
4548
|
-
return newnode;
|
4549
|
-
}
|
4550
|
-
|
4551
|
-
static Group *
|
4552
|
-
_copyGroup(const Group *from)
|
4553
|
-
{
|
4554
|
-
Group *newnode = makeNode(Group);
|
4555
|
-
|
4556
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
4557
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
4558
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
4559
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
4560
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
4561
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
4562
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
4563
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
4564
|
-
COPY_NODE_FIELD(plan.targetlist);
|
4565
|
-
COPY_NODE_FIELD(plan.qual);
|
4566
|
-
COPY_NODE_FIELD(plan.lefttree);
|
4567
|
-
COPY_NODE_FIELD(plan.righttree);
|
4568
|
-
COPY_NODE_FIELD(plan.initPlan);
|
4569
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
4570
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
4571
|
-
COPY_SCALAR_FIELD(numCols);
|
4572
|
-
COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
|
4573
|
-
COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
|
4574
|
-
COPY_POINTER_FIELD(grpCollations, from->numCols * sizeof(Oid));
|
4575
|
-
|
4576
|
-
return newnode;
|
4577
|
-
}
|
4578
|
-
|
4579
|
-
static Agg *
|
4580
|
-
_copyAgg(const Agg *from)
|
4581
|
-
{
|
4582
|
-
Agg *newnode = makeNode(Agg);
|
4583
|
-
|
4584
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
4585
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
4586
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
4587
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
4588
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
4589
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
4590
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
4591
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
4592
|
-
COPY_NODE_FIELD(plan.targetlist);
|
4593
|
-
COPY_NODE_FIELD(plan.qual);
|
4594
|
-
COPY_NODE_FIELD(plan.lefttree);
|
4595
|
-
COPY_NODE_FIELD(plan.righttree);
|
4596
|
-
COPY_NODE_FIELD(plan.initPlan);
|
4597
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
4598
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
4599
|
-
COPY_SCALAR_FIELD(aggstrategy);
|
4600
|
-
COPY_SCALAR_FIELD(aggsplit);
|
4601
|
-
COPY_SCALAR_FIELD(numCols);
|
4602
|
-
COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber));
|
4603
|
-
COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid));
|
4604
|
-
COPY_POINTER_FIELD(grpCollations, from->numCols * sizeof(Oid));
|
4605
|
-
COPY_SCALAR_FIELD(numGroups);
|
4606
|
-
COPY_SCALAR_FIELD(transitionSpace);
|
4607
|
-
COPY_BITMAPSET_FIELD(aggParams);
|
4608
|
-
COPY_NODE_FIELD(groupingSets);
|
4609
|
-
COPY_NODE_FIELD(chain);
|
4610
|
-
|
4611
|
-
return newnode;
|
4612
|
-
}
|
4613
|
-
|
4614
|
-
static WindowAgg *
|
4615
|
-
_copyWindowAgg(const WindowAgg *from)
|
4616
|
-
{
|
4617
|
-
WindowAgg *newnode = makeNode(WindowAgg);
|
4618
|
-
|
4619
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
4620
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
4621
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
4622
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
4623
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
4624
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
4625
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
4626
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
4627
|
-
COPY_NODE_FIELD(plan.targetlist);
|
4628
|
-
COPY_NODE_FIELD(plan.qual);
|
4629
|
-
COPY_NODE_FIELD(plan.lefttree);
|
4630
|
-
COPY_NODE_FIELD(plan.righttree);
|
4631
|
-
COPY_NODE_FIELD(plan.initPlan);
|
4632
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
4633
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
4634
|
-
COPY_SCALAR_FIELD(winref);
|
4635
|
-
COPY_SCALAR_FIELD(partNumCols);
|
4636
|
-
COPY_POINTER_FIELD(partColIdx, from->partNumCols * sizeof(AttrNumber));
|
4637
|
-
COPY_POINTER_FIELD(partOperators, from->partNumCols * sizeof(Oid));
|
4638
|
-
COPY_POINTER_FIELD(partCollations, from->partNumCols * sizeof(Oid));
|
4639
|
-
COPY_SCALAR_FIELD(ordNumCols);
|
4640
|
-
COPY_POINTER_FIELD(ordColIdx, from->ordNumCols * sizeof(AttrNumber));
|
4641
|
-
COPY_POINTER_FIELD(ordOperators, from->ordNumCols * sizeof(Oid));
|
4642
|
-
COPY_POINTER_FIELD(ordCollations, from->ordNumCols * sizeof(Oid));
|
4643
|
-
COPY_SCALAR_FIELD(frameOptions);
|
4644
|
-
COPY_NODE_FIELD(startOffset);
|
4645
|
-
COPY_NODE_FIELD(endOffset);
|
4646
|
-
COPY_NODE_FIELD(runCondition);
|
4647
|
-
COPY_NODE_FIELD(runConditionOrig);
|
4648
|
-
COPY_SCALAR_FIELD(startInRangeFunc);
|
4649
|
-
COPY_SCALAR_FIELD(endInRangeFunc);
|
4650
|
-
COPY_SCALAR_FIELD(inRangeColl);
|
4651
|
-
COPY_SCALAR_FIELD(inRangeAsc);
|
4652
|
-
COPY_SCALAR_FIELD(inRangeNullsFirst);
|
4653
|
-
COPY_SCALAR_FIELD(topWindow);
|
4654
|
-
|
4655
|
-
return newnode;
|
4656
|
-
}
|
4657
|
-
|
4658
|
-
static Unique *
|
4659
|
-
_copyUnique(const Unique *from)
|
4660
|
-
{
|
4661
|
-
Unique *newnode = makeNode(Unique);
|
4662
|
-
|
4663
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
4664
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
4665
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
4666
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
4667
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
4668
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
4669
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
4670
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
4671
|
-
COPY_NODE_FIELD(plan.targetlist);
|
4672
|
-
COPY_NODE_FIELD(plan.qual);
|
4673
|
-
COPY_NODE_FIELD(plan.lefttree);
|
4674
|
-
COPY_NODE_FIELD(plan.righttree);
|
4675
|
-
COPY_NODE_FIELD(plan.initPlan);
|
4676
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
4677
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
4678
|
-
COPY_SCALAR_FIELD(numCols);
|
4679
|
-
COPY_POINTER_FIELD(uniqColIdx, from->numCols * sizeof(AttrNumber));
|
4680
|
-
COPY_POINTER_FIELD(uniqOperators, from->numCols * sizeof(Oid));
|
4681
|
-
COPY_POINTER_FIELD(uniqCollations, from->numCols * sizeof(Oid));
|
4682
|
-
|
4683
|
-
return newnode;
|
4684
|
-
}
|
4685
|
-
|
4686
|
-
static Gather *
|
4687
|
-
_copyGather(const Gather *from)
|
4688
|
-
{
|
4689
|
-
Gather *newnode = makeNode(Gather);
|
4690
|
-
|
4691
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
4692
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
4693
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
4694
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
4695
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
4696
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
4697
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
4698
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
4699
|
-
COPY_NODE_FIELD(plan.targetlist);
|
4700
|
-
COPY_NODE_FIELD(plan.qual);
|
4701
|
-
COPY_NODE_FIELD(plan.lefttree);
|
4702
|
-
COPY_NODE_FIELD(plan.righttree);
|
4703
|
-
COPY_NODE_FIELD(plan.initPlan);
|
4704
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
4705
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
4706
|
-
COPY_SCALAR_FIELD(num_workers);
|
4707
|
-
COPY_SCALAR_FIELD(rescan_param);
|
4708
|
-
COPY_SCALAR_FIELD(single_copy);
|
4709
|
-
COPY_SCALAR_FIELD(invisible);
|
4710
|
-
COPY_BITMAPSET_FIELD(initParam);
|
4711
|
-
|
4712
|
-
return newnode;
|
4713
|
-
}
|
4714
|
-
|
4715
|
-
static GatherMerge *
|
4716
|
-
_copyGatherMerge(const GatherMerge *from)
|
4717
|
-
{
|
4718
|
-
GatherMerge *newnode = makeNode(GatherMerge);
|
4719
|
-
|
4720
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
4721
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
4722
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
4723
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
4724
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
4725
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
4726
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
4727
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
4728
|
-
COPY_NODE_FIELD(plan.targetlist);
|
4729
|
-
COPY_NODE_FIELD(plan.qual);
|
4730
|
-
COPY_NODE_FIELD(plan.lefttree);
|
4731
|
-
COPY_NODE_FIELD(plan.righttree);
|
4732
|
-
COPY_NODE_FIELD(plan.initPlan);
|
4733
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
4734
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
4735
|
-
COPY_SCALAR_FIELD(num_workers);
|
4736
|
-
COPY_SCALAR_FIELD(rescan_param);
|
4737
|
-
COPY_SCALAR_FIELD(numCols);
|
4738
|
-
COPY_POINTER_FIELD(sortColIdx, from->numCols * sizeof(AttrNumber));
|
4739
|
-
COPY_POINTER_FIELD(sortOperators, from->numCols * sizeof(Oid));
|
4740
|
-
COPY_POINTER_FIELD(collations, from->numCols * sizeof(Oid));
|
4741
|
-
COPY_POINTER_FIELD(nullsFirst, from->numCols * sizeof(bool));
|
4742
|
-
COPY_BITMAPSET_FIELD(initParam);
|
4743
|
-
|
4744
|
-
return newnode;
|
4745
|
-
}
|
4746
|
-
|
4747
|
-
static Hash *
|
4748
|
-
_copyHash(const Hash *from)
|
4749
|
-
{
|
4750
|
-
Hash *newnode = makeNode(Hash);
|
4751
|
-
|
4752
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
4753
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
4754
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
4755
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
4756
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
4757
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
4758
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
4759
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
4760
|
-
COPY_NODE_FIELD(plan.targetlist);
|
4761
|
-
COPY_NODE_FIELD(plan.qual);
|
4762
|
-
COPY_NODE_FIELD(plan.lefttree);
|
4763
|
-
COPY_NODE_FIELD(plan.righttree);
|
4764
|
-
COPY_NODE_FIELD(plan.initPlan);
|
4765
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
4766
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
4767
|
-
COPY_NODE_FIELD(hashkeys);
|
4768
|
-
COPY_SCALAR_FIELD(skewTable);
|
4769
|
-
COPY_SCALAR_FIELD(skewColumn);
|
4770
|
-
COPY_SCALAR_FIELD(skewInherit);
|
4771
|
-
COPY_SCALAR_FIELD(rows_total);
|
4772
|
-
|
4773
|
-
return newnode;
|
4774
|
-
}
|
4775
|
-
|
4776
|
-
static SetOp *
|
4777
|
-
_copySetOp(const SetOp *from)
|
4778
|
-
{
|
4779
|
-
SetOp *newnode = makeNode(SetOp);
|
4780
|
-
|
4781
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
4782
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
4783
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
4784
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
4785
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
4786
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
4787
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
4788
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
4789
|
-
COPY_NODE_FIELD(plan.targetlist);
|
4790
|
-
COPY_NODE_FIELD(plan.qual);
|
4791
|
-
COPY_NODE_FIELD(plan.lefttree);
|
4792
|
-
COPY_NODE_FIELD(plan.righttree);
|
4793
|
-
COPY_NODE_FIELD(plan.initPlan);
|
4794
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
4795
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
4796
|
-
COPY_SCALAR_FIELD(cmd);
|
4797
|
-
COPY_SCALAR_FIELD(strategy);
|
4798
|
-
COPY_SCALAR_FIELD(numCols);
|
4799
|
-
COPY_POINTER_FIELD(dupColIdx, from->numCols * sizeof(AttrNumber));
|
4800
|
-
COPY_POINTER_FIELD(dupOperators, from->numCols * sizeof(Oid));
|
4801
|
-
COPY_POINTER_FIELD(dupCollations, from->numCols * sizeof(Oid));
|
4802
|
-
COPY_SCALAR_FIELD(flagColIdx);
|
4803
|
-
COPY_SCALAR_FIELD(firstFlag);
|
4804
|
-
COPY_SCALAR_FIELD(numGroups);
|
4805
|
-
|
4806
|
-
return newnode;
|
4807
|
-
}
|
4808
|
-
|
4809
|
-
static LockRows *
|
4810
|
-
_copyLockRows(const LockRows *from)
|
4811
|
-
{
|
4812
|
-
LockRows *newnode = makeNode(LockRows);
|
4813
|
-
|
4814
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
4815
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
4816
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
4817
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
4818
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
4819
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
4820
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
4821
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
4822
|
-
COPY_NODE_FIELD(plan.targetlist);
|
4823
|
-
COPY_NODE_FIELD(plan.qual);
|
4824
|
-
COPY_NODE_FIELD(plan.lefttree);
|
4825
|
-
COPY_NODE_FIELD(plan.righttree);
|
4826
|
-
COPY_NODE_FIELD(plan.initPlan);
|
4827
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
4828
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
4829
|
-
COPY_NODE_FIELD(rowMarks);
|
4830
|
-
COPY_SCALAR_FIELD(epqParam);
|
4831
|
-
|
4832
|
-
return newnode;
|
4833
|
-
}
|
4834
|
-
|
4835
|
-
static Limit *
|
4836
|
-
_copyLimit(const Limit *from)
|
4837
|
-
{
|
4838
|
-
Limit *newnode = makeNode(Limit);
|
4839
|
-
|
4840
|
-
COPY_SCALAR_FIELD(plan.startup_cost);
|
4841
|
-
COPY_SCALAR_FIELD(plan.total_cost);
|
4842
|
-
COPY_SCALAR_FIELD(plan.plan_rows);
|
4843
|
-
COPY_SCALAR_FIELD(plan.plan_width);
|
4844
|
-
COPY_SCALAR_FIELD(plan.parallel_aware);
|
4845
|
-
COPY_SCALAR_FIELD(plan.parallel_safe);
|
4846
|
-
COPY_SCALAR_FIELD(plan.async_capable);
|
4847
|
-
COPY_SCALAR_FIELD(plan.plan_node_id);
|
4848
|
-
COPY_NODE_FIELD(plan.targetlist);
|
4849
|
-
COPY_NODE_FIELD(plan.qual);
|
4850
|
-
COPY_NODE_FIELD(plan.lefttree);
|
4851
|
-
COPY_NODE_FIELD(plan.righttree);
|
4852
|
-
COPY_NODE_FIELD(plan.initPlan);
|
4853
|
-
COPY_BITMAPSET_FIELD(plan.extParam);
|
4854
|
-
COPY_BITMAPSET_FIELD(plan.allParam);
|
4855
|
-
COPY_NODE_FIELD(limitOffset);
|
4856
|
-
COPY_NODE_FIELD(limitCount);
|
4857
|
-
COPY_SCALAR_FIELD(limitOption);
|
4858
|
-
COPY_SCALAR_FIELD(uniqNumCols);
|
4859
|
-
COPY_POINTER_FIELD(uniqColIdx, from->uniqNumCols * sizeof(AttrNumber));
|
4860
|
-
COPY_POINTER_FIELD(uniqOperators, from->uniqNumCols * sizeof(Oid));
|
4861
|
-
COPY_POINTER_FIELD(uniqCollations, from->uniqNumCols * sizeof(Oid));
|
4862
|
-
|
4863
|
-
return newnode;
|
4864
|
-
}
|
4865
|
-
|
4866
|
-
static PlanRowMark *
|
4867
|
-
_copyPlanRowMark(const PlanRowMark *from)
|
4868
|
-
{
|
4869
|
-
PlanRowMark *newnode = makeNode(PlanRowMark);
|
4870
|
-
|
4871
|
-
COPY_SCALAR_FIELD(rti);
|
4872
|
-
COPY_SCALAR_FIELD(prti);
|
4873
|
-
COPY_SCALAR_FIELD(rowmarkId);
|
4874
|
-
COPY_SCALAR_FIELD(markType);
|
4875
|
-
COPY_SCALAR_FIELD(allMarkTypes);
|
4876
|
-
COPY_SCALAR_FIELD(strength);
|
4877
|
-
COPY_SCALAR_FIELD(waitPolicy);
|
4878
|
-
COPY_SCALAR_FIELD(isParent);
|
4879
|
-
|
4880
|
-
return newnode;
|
4881
|
-
}
|
4882
|
-
|
4883
|
-
static PartitionPruneInfo *
|
4884
|
-
_copyPartitionPruneInfo(const PartitionPruneInfo *from)
|
4885
|
-
{
|
4886
|
-
PartitionPruneInfo *newnode = makeNode(PartitionPruneInfo);
|
4887
|
-
|
4888
|
-
COPY_NODE_FIELD(prune_infos);
|
4889
|
-
COPY_BITMAPSET_FIELD(other_subplans);
|
4890
|
-
|
4891
|
-
return newnode;
|
4892
|
-
}
|
4893
|
-
|
4894
|
-
static PartitionedRelPruneInfo *
|
4895
|
-
_copyPartitionedRelPruneInfo(const PartitionedRelPruneInfo *from)
|
4896
|
-
{
|
4897
|
-
PartitionedRelPruneInfo *newnode = makeNode(PartitionedRelPruneInfo);
|
4898
|
-
|
4899
|
-
COPY_SCALAR_FIELD(rtindex);
|
4900
|
-
COPY_BITMAPSET_FIELD(present_parts);
|
4901
|
-
COPY_SCALAR_FIELD(nparts);
|
4902
|
-
COPY_POINTER_FIELD(subplan_map, from->nparts * sizeof(int));
|
4903
|
-
COPY_POINTER_FIELD(subpart_map, from->nparts * sizeof(int));
|
4904
|
-
COPY_POINTER_FIELD(relid_map, from->nparts * sizeof(Oid));
|
4905
|
-
COPY_NODE_FIELD(initial_pruning_steps);
|
4906
|
-
COPY_NODE_FIELD(exec_pruning_steps);
|
4907
|
-
COPY_BITMAPSET_FIELD(execparamids);
|
4908
|
-
|
4909
|
-
return newnode;
|
4910
|
-
}
|
4911
|
-
|
4912
|
-
static PartitionPruneStepOp *
|
4913
|
-
_copyPartitionPruneStepOp(const PartitionPruneStepOp *from)
|
4914
|
-
{
|
4915
|
-
PartitionPruneStepOp *newnode = makeNode(PartitionPruneStepOp);
|
4916
|
-
|
4917
|
-
COPY_SCALAR_FIELD(step.step_id);
|
4918
|
-
COPY_SCALAR_FIELD(opstrategy);
|
4919
|
-
COPY_NODE_FIELD(exprs);
|
4920
|
-
COPY_NODE_FIELD(cmpfns);
|
4921
|
-
COPY_BITMAPSET_FIELD(nullkeys);
|
4922
|
-
|
4923
|
-
return newnode;
|
4924
|
-
}
|
4925
|
-
|
4926
|
-
static PartitionPruneStepCombine *
|
4927
|
-
_copyPartitionPruneStepCombine(const PartitionPruneStepCombine *from)
|
4928
|
-
{
|
4929
|
-
PartitionPruneStepCombine *newnode = makeNode(PartitionPruneStepCombine);
|
4930
|
-
|
4931
|
-
COPY_SCALAR_FIELD(step.step_id);
|
4932
|
-
COPY_SCALAR_FIELD(combineOp);
|
4933
|
-
COPY_NODE_FIELD(source_stepids);
|
4934
|
-
|
4935
|
-
return newnode;
|
4936
|
-
}
|
4937
|
-
|
4938
|
-
static PlanInvalItem *
|
4939
|
-
_copyPlanInvalItem(const PlanInvalItem *from)
|
4940
|
-
{
|
4941
|
-
PlanInvalItem *newnode = makeNode(PlanInvalItem);
|
4942
|
-
|
4943
|
-
COPY_SCALAR_FIELD(cacheId);
|
4944
|
-
COPY_SCALAR_FIELD(hashValue);
|
4945
|
-
|
4946
|
-
return newnode;
|
4947
|
-
}
|
4948
|
-
|
4949
|
-
static Integer *
|
4950
|
-
_copyInteger(const Integer *from)
|
4951
|
-
{
|
4952
|
-
Integer *newnode = makeNode(Integer);
|
4953
|
-
|
4954
|
-
COPY_SCALAR_FIELD(ival);
|
4955
|
-
|
4956
|
-
return newnode;
|
4957
|
-
}
|
4958
|
-
|
4959
|
-
static Float *
|
4960
|
-
_copyFloat(const Float *from)
|
4961
|
-
{
|
4962
|
-
Float *newnode = makeNode(Float);
|
4963
|
-
|
4964
|
-
COPY_STRING_FIELD(fval);
|
4965
|
-
|
4966
|
-
return newnode;
|
4967
|
-
}
|
4968
|
-
|
4969
|
-
static Boolean *
|
4970
|
-
_copyBoolean(const Boolean *from)
|
4971
|
-
{
|
4972
|
-
Boolean *newnode = makeNode(Boolean);
|
4973
|
-
|
4974
|
-
COPY_SCALAR_FIELD(boolval);
|
4975
|
-
|
4976
|
-
return newnode;
|
4977
|
-
}
|
4978
|
-
|
4979
|
-
static String *
|
4980
|
-
_copyString(const String *from)
|
4981
|
-
{
|
4982
|
-
String *newnode = makeNode(String);
|
4983
|
-
|
4984
|
-
COPY_STRING_FIELD(sval);
|
4985
|
-
|
4986
|
-
return newnode;
|
4987
|
-
}
|
4988
|
-
|
4989
|
-
static BitString *
|
4990
|
-
_copyBitString(const BitString *from)
|
4991
|
-
{
|
4992
|
-
BitString *newnode = makeNode(BitString);
|
4993
|
-
|
4994
|
-
COPY_STRING_FIELD(bsval);
|
4995
|
-
|
4996
|
-
return newnode;
|
4997
|
-
}
|
4998
|
-
|
4999
|
-
static ForeignKeyCacheInfo *
|
5000
|
-
_copyForeignKeyCacheInfo(const ForeignKeyCacheInfo *from)
|
5001
|
-
{
|
5002
|
-
ForeignKeyCacheInfo *newnode = makeNode(ForeignKeyCacheInfo);
|
5003
|
-
|
5004
|
-
COPY_SCALAR_FIELD(conoid);
|
5005
|
-
COPY_SCALAR_FIELD(conrelid);
|
5006
|
-
COPY_SCALAR_FIELD(confrelid);
|
5007
|
-
COPY_SCALAR_FIELD(nkeys);
|
5008
|
-
COPY_ARRAY_FIELD(conkey);
|
5009
|
-
COPY_ARRAY_FIELD(confkey);
|
5010
|
-
COPY_ARRAY_FIELD(conpfeqop);
|
5011
|
-
|
5012
|
-
return newnode;
|
5013
|
-
}
|