pg_query 2.2.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +86 -0
- data/README.md +57 -31
- data/Rakefile +5 -6
- data/ext/pg_query/ext_symbols_freebsd.sym +1 -0
- data/ext/pg_query/ext_symbols_freebsd_with_ruby_abi_version.sym +2 -0
- data/ext/pg_query/ext_symbols_openbsd.sym +1 -0
- data/ext/pg_query/ext_symbols_openbsd_with_ruby_abi_version.sym +2 -0
- data/ext/pg_query/ext_symbols_with_ruby_abi_version.sym +2 -0
- data/ext/pg_query/extconf.rb +33 -9
- data/ext/pg_query/include/pg_query.h +30 -4
- data/ext/pg_query/include/pg_query_enum_defs.c +839 -290
- data/ext/pg_query/include/pg_query_fingerprint_conds.c +638 -481
- data/ext/pg_query/include/pg_query_fingerprint_defs.c +6786 -4193
- data/ext/pg_query/include/pg_query_outfuncs_conds.c +450 -330
- data/ext/pg_query/include/pg_query_outfuncs_defs.c +1489 -1044
- data/ext/pg_query/include/pg_query_readfuncs_conds.c +157 -118
- data/ext/pg_query/include/pg_query_readfuncs_defs.c +1933 -1410
- data/ext/pg_query/include/postgres/access/amapi.h +303 -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 +246 -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/rmgr.h +62 -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 +218 -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 +2110 -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 +418 -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 +93 -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 +97 -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/user.h +43 -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 +407 -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/common/unicode_nonspacing_table.h +326 -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 +361 -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 +793 -0
- data/ext/pg_query/include/postgres/mb/stringinfo_mb.h +24 -0
- data/ext/pg_query/include/postgres/miscadmin.h +527 -0
- data/ext/pg_query/include/postgres/nodes/bitmapset.h +140 -0
- data/ext/pg_query/include/postgres/nodes/execnodes.h +2855 -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 +3438 -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 +2339 -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 +105 -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 +985 -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 +582 -0
- data/ext/pg_query/include/postgres/port.h +555 -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/postgres_ext.h +73 -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 +734 -0
- data/ext/pg_query/include/postgres/replication/slot.h +289 -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 +61 -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 +488 -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 +130 -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 +231 -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 +827 -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/probes.h +114 -0
- data/ext/pg_query/include/postgres/utils/ps_status.h +47 -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 +136 -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 +8077 -6217
- data/ext/pg_query/include/protobuf/pg_query.pb.h +132024 -88124
- data/ext/pg_query/pg_query.c +10 -1
- data/ext/pg_query/pg_query.pb-c.c +24028 -17173
- data/ext/pg_query/pg_query_deparse.c +1 -9902
- data/ext/pg_query/pg_query_fingerprint.c +42 -18
- data/ext/pg_query/pg_query_fingerprint.h +1 -1
- data/ext/pg_query/pg_query_internal.h +1 -1
- data/ext/pg_query/pg_query_json_plpgsql.c +1 -25
- data/ext/pg_query/pg_query_normalize.c +44 -3
- data/ext/pg_query/pg_query_outfuncs_json.c +62 -16
- data/ext/pg_query/pg_query_outfuncs_protobuf.c +73 -12
- data/ext/pg_query/pg_query_parse.c +47 -5
- data/ext/pg_query/pg_query_parse_plpgsql.c +19 -18
- data/ext/pg_query/pg_query_readfuncs_protobuf.c +45 -10
- data/ext/pg_query/pg_query_ruby.c +5 -0
- data/ext/pg_query/pg_query_scan.c +4 -3
- data/ext/pg_query/pg_query_split.c +6 -5
- data/ext/pg_query/postgres_deparse.c +11496 -0
- data/ext/pg_query/postgres_deparse.h +9 -0
- data/ext/pg_query/src_backend_catalog_namespace.c +262 -71
- data/ext/pg_query/src_backend_catalog_pg_proc.c +3 -2
- data/ext/pg_query/src_backend_commands_define.c +12 -3
- data/ext/pg_query/src_backend_nodes_bitmapset.c +142 -156
- data/ext/pg_query/src_backend_nodes_copyfuncs.c +100 -5881
- data/ext/pg_query/src_backend_nodes_equalfuncs.c +102 -3831
- data/ext/pg_query/src_backend_nodes_extensible.c +6 -29
- data/ext/pg_query/src_backend_nodes_list.c +89 -18
- data/ext/pg_query/src_backend_nodes_makefuncs.c +138 -4
- data/ext/pg_query/src_backend_nodes_nodeFuncs.c +433 -132
- data/ext/pg_query/src_backend_nodes_value.c +28 -19
- data/ext/pg_query/src_backend_parser_gram.c +45255 -38885
- data/ext/pg_query/src_backend_parser_parser.c +53 -8
- data/ext/pg_query/src_backend_parser_scan.c +6999 -3438
- data/ext/pg_query/src_backend_parser_scansup.c +5 -28
- data/ext/pg_query/src_backend_storage_ipc_ipc.c +13 -4
- data/ext/pg_query/src_backend_tcop_postgres.c +156 -114
- data/ext/pg_query/src_backend_utils_activity_pgstat_database.c +140 -0
- data/ext/pg_query/src_backend_utils_adt_datum.c +14 -2
- data/ext/pg_query/src_backend_utils_adt_expandeddatum.c +1 -1
- data/ext/pg_query/src_backend_utils_adt_format_type.c +6 -2
- data/ext/pg_query/src_backend_utils_adt_numutils.c +488 -0
- data/ext/pg_query/src_backend_utils_adt_ruleutils.c +247 -34
- data/ext/pg_query/src_backend_utils_error_assert.c +17 -18
- data/ext/pg_query/src_backend_utils_error_elog.c +543 -343
- data/ext/pg_query/src_backend_utils_fmgr_fmgr.c +47 -18
- data/ext/pg_query/src_backend_utils_init_globals.c +22 -7
- data/ext/pg_query/src_backend_utils_mb_mbutils.c +84 -148
- data/ext/pg_query/src_backend_utils_misc_guc_tables.c +502 -0
- data/ext/pg_query/src_backend_utils_mmgr_alignedalloc.c +166 -0
- data/ext/pg_query/src_backend_utils_mmgr_aset.c +708 -499
- data/ext/pg_query/src_backend_utils_mmgr_bump.c +728 -0
- data/ext/pg_query/src_backend_utils_mmgr_generation.c +1115 -0
- data/ext/pg_query/src_backend_utils_mmgr_mcxt.c +710 -218
- data/ext/pg_query/src_backend_utils_mmgr_slab.c +1079 -0
- data/ext/pg_query/src_common_encnames.c +46 -44
- data/ext/pg_query/src_common_hashfn.c +3 -3
- data/ext/pg_query/src_common_keywords.c +15 -2
- data/ext/pg_query/src_common_kwlist_d.h +602 -510
- 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 +21 -4
- data/ext/pg_query/src_common_wchar.c +754 -178
- data/ext/pg_query/src_pl_plpgsql_src_pl_comp.c +143 -24
- data/ext/pg_query/src_pl_plpgsql_src_pl_funcs.c +3 -18
- data/ext/pg_query/src_pl_plpgsql_src_pl_gram.c +1295 -1255
- data/ext/pg_query/src_pl_plpgsql_src_pl_handler.c +1 -1
- data/ext/pg_query/src_pl_plpgsql_src_pl_reserved_kwlist_d.h +10 -10
- data/ext/pg_query/src_pl_plpgsql_src_pl_scanner.c +20 -2
- data/ext/pg_query/src_pl_plpgsql_src_pl_unreserved_kwlist_d.h +60 -60
- data/ext/pg_query/src_port_pg_bitutils.c +283 -54
- data/ext/pg_query/src_port_pgstrcasecmp.c +57 -1
- data/ext/pg_query/src_port_qsort.c +12 -224
- data/ext/pg_query/src_port_snprintf.c +56 -39
- data/ext/pg_query/src_port_strerror.c +9 -21
- data/ext/pg_query/src_port_strlcpy.c +79 -0
- data/lib/pg_query/filter_columns.rb +1 -1
- data/lib/pg_query/fingerprint.rb +10 -9
- data/lib/pg_query/node.rb +18 -13
- data/lib/pg_query/param_refs.rb +3 -3
- data/lib/pg_query/parse.rb +25 -15
- data/lib/pg_query/parse_error.rb +1 -0
- data/lib/pg_query/pg_query_pb.rb +181 -3038
- data/lib/pg_query/scan.rb +1 -0
- data/lib/pg_query/treewalker.rb +55 -8
- data/lib/pg_query/truncate.rb +19 -21
- data/lib/pg_query/version.rb +1 -1
- metadata +447 -436
- data/ext/pg_query/guc-file.c +0 -0
- data/ext/pg_query/include/access/amapi.h +0 -246
- data/ext/pg_query/include/access/attmap.h +0 -52
- data/ext/pg_query/include/access/attnum.h +0 -64
- data/ext/pg_query/include/access/clog.h +0 -61
- data/ext/pg_query/include/access/commit_ts.h +0 -77
- data/ext/pg_query/include/access/detoast.h +0 -92
- data/ext/pg_query/include/access/genam.h +0 -228
- data/ext/pg_query/include/access/gin.h +0 -78
- data/ext/pg_query/include/access/htup.h +0 -89
- data/ext/pg_query/include/access/htup_details.h +0 -819
- data/ext/pg_query/include/access/itup.h +0 -161
- 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 -176
- data/ext/pg_query/include/access/rmgr.h +0 -35
- data/ext/pg_query/include/access/rmgrlist.h +0 -49
- data/ext/pg_query/include/access/sdir.h +0 -58
- data/ext/pg_query/include/access/skey.h +0 -151
- data/ext/pg_query/include/access/stratnum.h +0 -83
- data/ext/pg_query/include/access/sysattr.h +0 -29
- data/ext/pg_query/include/access/table.h +0 -27
- data/ext/pg_query/include/access/tableam.h +0 -1825
- data/ext/pg_query/include/access/transam.h +0 -265
- data/ext/pg_query/include/access/tupconvert.h +0 -51
- data/ext/pg_query/include/access/tupdesc.h +0 -154
- data/ext/pg_query/include/access/tupmacs.h +0 -247
- data/ext/pg_query/include/access/twophase.h +0 -63
- data/ext/pg_query/include/access/xact.h +0 -469
- data/ext/pg_query/include/access/xlog.h +0 -398
- data/ext/pg_query/include/access/xlog_internal.h +0 -339
- data/ext/pg_query/include/access/xlogdefs.h +0 -109
- data/ext/pg_query/include/access/xloginsert.h +0 -64
- data/ext/pg_query/include/access/xlogreader.h +0 -337
- data/ext/pg_query/include/access/xlogrecord.h +0 -227
- data/ext/pg_query/include/bootstrap/bootstrap.h +0 -62
- data/ext/pg_query/include/c.h +0 -1334
- data/ext/pg_query/include/catalog/catalog.h +0 -42
- data/ext/pg_query/include/catalog/catversion.h +0 -58
- data/ext/pg_query/include/catalog/dependency.h +0 -277
- data/ext/pg_query/include/catalog/genbki.h +0 -64
- data/ext/pg_query/include/catalog/index.h +0 -199
- data/ext/pg_query/include/catalog/indexing.h +0 -366
- data/ext/pg_query/include/catalog/namespace.h +0 -188
- data/ext/pg_query/include/catalog/objectaccess.h +0 -197
- data/ext/pg_query/include/catalog/objectaddress.h +0 -84
- data/ext/pg_query/include/catalog/pg_aggregate.h +0 -176
- data/ext/pg_query/include/catalog/pg_aggregate_d.h +0 -77
- data/ext/pg_query/include/catalog/pg_am.h +0 -60
- data/ext/pg_query/include/catalog/pg_am_d.h +0 -45
- data/ext/pg_query/include/catalog/pg_attribute.h +0 -204
- data/ext/pg_query/include/catalog/pg_attribute_d.h +0 -59
- data/ext/pg_query/include/catalog/pg_authid.h +0 -58
- data/ext/pg_query/include/catalog/pg_authid_d.h +0 -49
- data/ext/pg_query/include/catalog/pg_class.h +0 -200
- data/ext/pg_query/include/catalog/pg_class_d.h +0 -103
- data/ext/pg_query/include/catalog/pg_collation.h +0 -73
- data/ext/pg_query/include/catalog/pg_collation_d.h +0 -45
- data/ext/pg_query/include/catalog/pg_constraint.h +0 -247
- data/ext/pg_query/include/catalog/pg_constraint_d.h +0 -67
- data/ext/pg_query/include/catalog/pg_control.h +0 -252
- data/ext/pg_query/include/catalog/pg_conversion.h +0 -72
- data/ext/pg_query/include/catalog/pg_conversion_d.h +0 -35
- data/ext/pg_query/include/catalog/pg_depend.h +0 -73
- data/ext/pg_query/include/catalog/pg_depend_d.h +0 -34
- data/ext/pg_query/include/catalog/pg_event_trigger.h +0 -51
- data/ext/pg_query/include/catalog/pg_event_trigger_d.h +0 -34
- data/ext/pg_query/include/catalog/pg_index.h +0 -80
- data/ext/pg_query/include/catalog/pg_index_d.h +0 -56
- data/ext/pg_query/include/catalog/pg_language.h +0 -67
- data/ext/pg_query/include/catalog/pg_language_d.h +0 -39
- data/ext/pg_query/include/catalog/pg_namespace.h +0 -59
- data/ext/pg_query/include/catalog/pg_namespace_d.h +0 -34
- data/ext/pg_query/include/catalog/pg_opclass.h +0 -85
- data/ext/pg_query/include/catalog/pg_opclass_d.h +0 -49
- data/ext/pg_query/include/catalog/pg_operator.h +0 -104
- data/ext/pg_query/include/catalog/pg_operator_d.h +0 -106
- data/ext/pg_query/include/catalog/pg_opfamily.h +0 -60
- data/ext/pg_query/include/catalog/pg_opfamily_d.h +0 -47
- data/ext/pg_query/include/catalog/pg_partitioned_table.h +0 -63
- data/ext/pg_query/include/catalog/pg_partitioned_table_d.h +0 -35
- data/ext/pg_query/include/catalog/pg_proc.h +0 -211
- data/ext/pg_query/include/catalog/pg_proc_d.h +0 -99
- data/ext/pg_query/include/catalog/pg_publication.h +0 -118
- data/ext/pg_query/include/catalog/pg_publication_d.h +0 -36
- data/ext/pg_query/include/catalog/pg_replication_origin.h +0 -57
- data/ext/pg_query/include/catalog/pg_replication_origin_d.h +0 -29
- data/ext/pg_query/include/catalog/pg_statistic.h +0 -275
- data/ext/pg_query/include/catalog/pg_statistic_d.h +0 -194
- data/ext/pg_query/include/catalog/pg_statistic_ext.h +0 -74
- data/ext/pg_query/include/catalog/pg_statistic_ext_d.h +0 -40
- data/ext/pg_query/include/catalog/pg_transform.h +0 -45
- data/ext/pg_query/include/catalog/pg_transform_d.h +0 -32
- data/ext/pg_query/include/catalog/pg_trigger.h +0 -137
- data/ext/pg_query/include/catalog/pg_trigger_d.h +0 -106
- data/ext/pg_query/include/catalog/pg_ts_config.h +0 -50
- data/ext/pg_query/include/catalog/pg_ts_config_d.h +0 -32
- data/ext/pg_query/include/catalog/pg_ts_dict.h +0 -54
- data/ext/pg_query/include/catalog/pg_ts_dict_d.h +0 -33
- data/ext/pg_query/include/catalog/pg_ts_parser.h +0 -57
- data/ext/pg_query/include/catalog/pg_ts_parser_d.h +0 -35
- data/ext/pg_query/include/catalog/pg_ts_template.h +0 -48
- data/ext/pg_query/include/catalog/pg_ts_template_d.h +0 -32
- data/ext/pg_query/include/catalog/pg_type.h +0 -373
- data/ext/pg_query/include/catalog/pg_type_d.h +0 -285
- data/ext/pg_query/include/catalog/storage.h +0 -48
- data/ext/pg_query/include/commands/async.h +0 -54
- data/ext/pg_query/include/commands/dbcommands.h +0 -35
- data/ext/pg_query/include/commands/defrem.h +0 -173
- data/ext/pg_query/include/commands/event_trigger.h +0 -88
- data/ext/pg_query/include/commands/explain.h +0 -127
- 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 -285
- data/ext/pg_query/include/commands/user.h +0 -37
- data/ext/pg_query/include/commands/vacuum.h +0 -293
- data/ext/pg_query/include/commands/variable.h +0 -38
- 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/ip.h +0 -37
- data/ext/pg_query/include/common/keywords.h +0 -33
- data/ext/pg_query/include/common/kwlookup.h +0 -44
- data/ext/pg_query/include/common/relpath.h +0 -90
- data/ext/pg_query/include/common/string.h +0 -19
- data/ext/pg_query/include/common/unicode_combining_table.h +0 -196
- data/ext/pg_query/include/datatype/timestamp.h +0 -197
- data/ext/pg_query/include/executor/execdesc.h +0 -70
- data/ext/pg_query/include/executor/executor.h +0 -620
- data/ext/pg_query/include/executor/functions.h +0 -41
- data/ext/pg_query/include/executor/instrument.h +0 -101
- data/ext/pg_query/include/executor/spi.h +0 -175
- data/ext/pg_query/include/executor/tablefunc.h +0 -67
- data/ext/pg_query/include/executor/tuptable.h +0 -487
- data/ext/pg_query/include/fmgr.h +0 -775
- data/ext/pg_query/include/funcapi.h +0 -348
- data/ext/pg_query/include/getaddrinfo.h +0 -162
- data/ext/pg_query/include/jit/jit.h +0 -105
- data/ext/pg_query/include/kwlist_d.h +0 -1072
- data/ext/pg_query/include/lib/ilist.h +0 -727
- data/ext/pg_query/include/lib/pairingheap.h +0 -102
- data/ext/pg_query/include/lib/simplehash.h +0 -1059
- data/ext/pg_query/include/lib/stringinfo.h +0 -161
- data/ext/pg_query/include/libpq/auth.h +0 -29
- data/ext/pg_query/include/libpq/crypt.h +0 -46
- data/ext/pg_query/include/libpq/hba.h +0 -140
- data/ext/pg_query/include/libpq/libpq-be.h +0 -326
- data/ext/pg_query/include/libpq/libpq.h +0 -134
- data/ext/pg_query/include/libpq/pqcomm.h +0 -208
- data/ext/pg_query/include/libpq/pqformat.h +0 -210
- data/ext/pg_query/include/libpq/pqsignal.h +0 -42
- data/ext/pg_query/include/mb/pg_wchar.h +0 -673
- data/ext/pg_query/include/mb/stringinfo_mb.h +0 -24
- data/ext/pg_query/include/miscadmin.h +0 -489
- data/ext/pg_query/include/nodes/bitmapset.h +0 -122
- data/ext/pg_query/include/nodes/execnodes.h +0 -2523
- data/ext/pg_query/include/nodes/extensible.h +0 -160
- data/ext/pg_query/include/nodes/lockoptions.h +0 -61
- data/ext/pg_query/include/nodes/makefuncs.h +0 -108
- data/ext/pg_query/include/nodes/memnodes.h +0 -108
- data/ext/pg_query/include/nodes/nodeFuncs.h +0 -162
- data/ext/pg_query/include/nodes/nodes.h +0 -842
- data/ext/pg_query/include/nodes/params.h +0 -170
- data/ext/pg_query/include/nodes/parsenodes.h +0 -3580
- data/ext/pg_query/include/nodes/pathnodes.h +0 -2557
- data/ext/pg_query/include/nodes/pg_list.h +0 -606
- data/ext/pg_query/include/nodes/plannodes.h +0 -1266
- data/ext/pg_query/include/nodes/primnodes.h +0 -1541
- data/ext/pg_query/include/nodes/print.h +0 -34
- data/ext/pg_query/include/nodes/tidbitmap.h +0 -75
- data/ext/pg_query/include/nodes/value.h +0 -61
- data/ext/pg_query/include/optimizer/cost.h +0 -206
- data/ext/pg_query/include/optimizer/geqo.h +0 -88
- data/ext/pg_query/include/optimizer/geqo_gene.h +0 -45
- data/ext/pg_query/include/optimizer/optimizer.h +0 -194
- data/ext/pg_query/include/optimizer/paths.h +0 -257
- data/ext/pg_query/include/optimizer/planmain.h +0 -119
- data/ext/pg_query/include/parser/analyze.h +0 -49
- data/ext/pg_query/include/parser/gram.h +0 -1067
- data/ext/pg_query/include/parser/gramparse.h +0 -75
- data/ext/pg_query/include/parser/kwlist.h +0 -477
- data/ext/pg_query/include/parser/parse_agg.h +0 -68
- data/ext/pg_query/include/parser/parse_clause.h +0 -54
- data/ext/pg_query/include/parser/parse_coerce.h +0 -98
- data/ext/pg_query/include/parser/parse_collate.h +0 -27
- data/ext/pg_query/include/parser/parse_expr.h +0 -26
- data/ext/pg_query/include/parser/parse_func.h +0 -73
- data/ext/pg_query/include/parser/parse_node.h +0 -327
- data/ext/pg_query/include/parser/parse_oper.h +0 -67
- data/ext/pg_query/include/parser/parse_relation.h +0 -123
- data/ext/pg_query/include/parser/parse_target.h +0 -46
- data/ext/pg_query/include/parser/parse_type.h +0 -60
- data/ext/pg_query/include/parser/parser.h +0 -41
- 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 -30
- data/ext/pg_query/include/partitioning/partdefs.h +0 -26
- data/ext/pg_query/include/pg_config.h +0 -995
- data/ext/pg_query/include/pg_config_manual.h +0 -357
- 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 -1488
- data/ext/pg_query/include/pgtime.h +0 -84
- 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 -990
- data/ext/pg_query/include/plpgsql.h +0 -1347
- data/ext/pg_query/include/port/atomics/arch-arm.h +0 -26
- 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 -524
- data/ext/pg_query/include/port/pg_bitutils.h +0 -272
- 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.h +0 -528
- data/ext/pg_query/include/portability/instr_time.h +0 -256
- data/ext/pg_query/include/postgres.h +0 -764
- data/ext/pg_query/include/postgres_ext.h +0 -74
- data/ext/pg_query/include/postmaster/autovacuum.h +0 -83
- data/ext/pg_query/include/postmaster/bgworker.h +0 -161
- 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 -39
- data/ext/pg_query/include/postmaster/postmaster.h +0 -77
- data/ext/pg_query/include/postmaster/syslogger.h +0 -98
- data/ext/pg_query/include/postmaster/walwriter.h +0 -21
- data/ext/pg_query/include/regex/regex.h +0 -184
- data/ext/pg_query/include/replication/logicallauncher.h +0 -31
- data/ext/pg_query/include/replication/logicalproto.h +0 -110
- data/ext/pg_query/include/replication/logicalworker.h +0 -19
- data/ext/pg_query/include/replication/origin.h +0 -73
- data/ext/pg_query/include/replication/reorderbuffer.h +0 -468
- data/ext/pg_query/include/replication/slot.h +0 -219
- data/ext/pg_query/include/replication/syncrep.h +0 -115
- data/ext/pg_query/include/replication/walreceiver.h +0 -340
- 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 -40
- data/ext/pg_query/include/rewrite/rewriteManip.h +0 -87
- data/ext/pg_query/include/rewrite/rewriteSupport.h +0 -26
- data/ext/pg_query/include/storage/backendid.h +0 -37
- data/ext/pg_query/include/storage/block.h +0 -121
- data/ext/pg_query/include/storage/buf.h +0 -46
- data/ext/pg_query/include/storage/bufmgr.h +0 -292
- data/ext/pg_query/include/storage/bufpage.h +0 -459
- data/ext/pg_query/include/storage/condition_variable.h +0 -62
- data/ext/pg_query/include/storage/dsm.h +0 -61
- data/ext/pg_query/include/storage/dsm_impl.h +0 -75
- data/ext/pg_query/include/storage/fd.h +0 -168
- data/ext/pg_query/include/storage/ipc.h +0 -81
- 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 -206
- data/ext/pg_query/include/storage/large_object.h +0 -100
- data/ext/pg_query/include/storage/latch.h +0 -190
- data/ext/pg_query/include/storage/lmgr.h +0 -114
- data/ext/pg_query/include/storage/lock.h +0 -613
- data/ext/pg_query/include/storage/lockdefs.h +0 -59
- data/ext/pg_query/include/storage/lwlock.h +0 -233
- data/ext/pg_query/include/storage/lwlocknames.h +0 -51
- 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 -90
- data/ext/pg_query/include/storage/pmsignal.h +0 -94
- data/ext/pg_query/include/storage/predicate.h +0 -87
- data/ext/pg_query/include/storage/proc.h +0 -347
- data/ext/pg_query/include/storage/proclist_types.h +0 -51
- data/ext/pg_query/include/storage/procsignal.h +0 -75
- data/ext/pg_query/include/storage/relfilenode.h +0 -99
- data/ext/pg_query/include/storage/s_lock.h +0 -1071
- data/ext/pg_query/include/storage/sharedfileset.h +0 -45
- data/ext/pg_query/include/storage/shm_mq.h +0 -85
- data/ext/pg_query/include/storage/shm_toc.h +0 -58
- data/ext/pg_query/include/storage/shmem.h +0 -81
- data/ext/pg_query/include/storage/sinval.h +0 -153
- data/ext/pg_query/include/storage/sinvaladt.h +0 -43
- data/ext/pg_query/include/storage/smgr.h +0 -109
- data/ext/pg_query/include/storage/spin.h +0 -77
- data/ext/pg_query/include/storage/standby.h +0 -91
- data/ext/pg_query/include/storage/standbydefs.h +0 -74
- data/ext/pg_query/include/storage/sync.h +0 -62
- data/ext/pg_query/include/tcop/cmdtag.h +0 -58
- data/ext/pg_query/include/tcop/cmdtaglist.h +0 -217
- data/ext/pg_query/include/tcop/deparse_utility.h +0 -108
- data/ext/pg_query/include/tcop/dest.h +0 -149
- data/ext/pg_query/include/tcop/fastpath.h +0 -21
- data/ext/pg_query/include/tcop/pquery.h +0 -51
- data/ext/pg_query/include/tcop/tcopprot.h +0 -89
- data/ext/pg_query/include/tcop/utility.h +0 -108
- data/ext/pg_query/include/tsearch/ts_cache.h +0 -98
- data/ext/pg_query/include/utils/acl.h +0 -312
- data/ext/pg_query/include/utils/aclchk_internal.h +0 -45
- data/ext/pg_query/include/utils/array.h +0 -459
- data/ext/pg_query/include/utils/builtins.h +0 -128
- data/ext/pg_query/include/utils/bytea.h +0 -27
- data/ext/pg_query/include/utils/catcache.h +0 -231
- data/ext/pg_query/include/utils/date.h +0 -90
- data/ext/pg_query/include/utils/datetime.h +0 -343
- data/ext/pg_query/include/utils/datum.h +0 -68
- data/ext/pg_query/include/utils/dsa.h +0 -123
- data/ext/pg_query/include/utils/dynahash.h +0 -19
- data/ext/pg_query/include/utils/elog.h +0 -439
- data/ext/pg_query/include/utils/errcodes.h +0 -352
- data/ext/pg_query/include/utils/expandeddatum.h +0 -159
- data/ext/pg_query/include/utils/expandedrecord.h +0 -231
- data/ext/pg_query/include/utils/float.h +0 -356
- data/ext/pg_query/include/utils/fmgroids.h +0 -2657
- data/ext/pg_query/include/utils/fmgrprotos.h +0 -2646
- data/ext/pg_query/include/utils/fmgrtab.h +0 -48
- data/ext/pg_query/include/utils/guc.h +0 -443
- data/ext/pg_query/include/utils/guc_tables.h +0 -272
- data/ext/pg_query/include/utils/hsearch.h +0 -149
- data/ext/pg_query/include/utils/inval.h +0 -65
- data/ext/pg_query/include/utils/lsyscache.h +0 -198
- data/ext/pg_query/include/utils/memdebug.h +0 -82
- data/ext/pg_query/include/utils/memutils.h +0 -225
- data/ext/pg_query/include/utils/numeric.h +0 -76
- data/ext/pg_query/include/utils/palloc.h +0 -136
- data/ext/pg_query/include/utils/partcache.h +0 -102
- data/ext/pg_query/include/utils/pg_locale.h +0 -119
- data/ext/pg_query/include/utils/pg_lsn.h +0 -29
- data/ext/pg_query/include/utils/pidfile.h +0 -56
- data/ext/pg_query/include/utils/plancache.h +0 -235
- data/ext/pg_query/include/utils/portal.h +0 -254
- data/ext/pg_query/include/utils/probes.h +0 -114
- data/ext/pg_query/include/utils/ps_status.h +0 -25
- data/ext/pg_query/include/utils/queryenvironment.h +0 -74
- data/ext/pg_query/include/utils/regproc.h +0 -28
- data/ext/pg_query/include/utils/rel.h +0 -643
- data/ext/pg_query/include/utils/relcache.h +0 -150
- 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/rls.h +0 -50
- data/ext/pg_query/include/utils/ruleutils.h +0 -44
- data/ext/pg_query/include/utils/sharedtuplestore.h +0 -61
- data/ext/pg_query/include/utils/snapmgr.h +0 -159
- data/ext/pg_query/include/utils/snapshot.h +0 -206
- data/ext/pg_query/include/utils/sortsupport.h +0 -276
- data/ext/pg_query/include/utils/syscache.h +0 -219
- data/ext/pg_query/include/utils/timeout.h +0 -88
- data/ext/pg_query/include/utils/timestamp.h +0 -116
- data/ext/pg_query/include/utils/tuplesort.h +0 -277
- data/ext/pg_query/include/utils/tuplestore.h +0 -91
- data/ext/pg_query/include/utils/typcache.h +0 -202
- data/ext/pg_query/include/utils/tzparser.h +0 -39
- data/ext/pg_query/include/utils/varlena.h +0 -39
- data/ext/pg_query/include/utils/xml.h +0 -84
- data/ext/pg_query/pg_query_ruby_freebsd.sym +0 -2
- data/ext/pg_query/src_backend_libpq_pqcomm.c +0 -659
- data/ext/pg_query/src_backend_parser_parse_expr.c +0 -313
- data/ext/pg_query/src_backend_postmaster_postmaster.c +0 -2230
- data/ext/pg_query/src_backend_storage_lmgr_s_lock.c +0 -370
- data/ext/pg_query/src_backend_utils_hash_dynahash.c +0 -1086
- data/ext/pg_query/src_backend_utils_misc_guc.c +0 -1832
- data/ext/pg_query/src_common_string.c +0 -86
- data/ext/pg_query/src_port_erand48.c +0 -127
- data/ext/pg_query/src_port_pgsleep.c +0 -69
- data/ext/pg_query/src_port_random.c +0 -31
- data/ext/pg_query/src_port_strnlen.c +0 -39
- /data/ext/pg_query/{pg_query_ruby.sym → ext_symbols.sym} +0 -0
- /data/ext/pg_query/include/{pg_config_ext.h → postgres/pg_config_ext.h} +0 -0
@@ -1,232 +1,11 @@
|
|
1
1
|
/*--------------------------------------------------------------------
|
2
2
|
* Symbols referenced in this file:
|
3
3
|
* - equal
|
4
|
-
* - _equalAlias
|
5
|
-
* - _equalRangeVar
|
6
|
-
* - _equalTableFunc
|
7
|
-
* - _equalIntoClause
|
8
|
-
* - _equalVar
|
9
4
|
* - _equalConst
|
10
|
-
* -
|
11
|
-
* -
|
12
|
-
* - _equalGroupingFunc
|
13
|
-
* - _equalWindowFunc
|
14
|
-
* - _equalSubscriptingRef
|
15
|
-
* - _equalFuncExpr
|
16
|
-
* - _equalNamedArgExpr
|
17
|
-
* - _equalOpExpr
|
18
|
-
* - _equalDistinctExpr
|
19
|
-
* - _equalNullIfExpr
|
20
|
-
* - _equalScalarArrayOpExpr
|
21
|
-
* - _equalBoolExpr
|
22
|
-
* - _equalSubLink
|
23
|
-
* - _equalSubPlan
|
24
|
-
* - _equalAlternativeSubPlan
|
25
|
-
* - _equalFieldSelect
|
26
|
-
* - _equalFieldStore
|
27
|
-
* - _equalRelabelType
|
28
|
-
* - _equalCoerceViaIO
|
29
|
-
* - _equalArrayCoerceExpr
|
30
|
-
* - _equalConvertRowtypeExpr
|
31
|
-
* - _equalCollateExpr
|
32
|
-
* - _equalCaseExpr
|
33
|
-
* - _equalCaseWhen
|
34
|
-
* - _equalCaseTestExpr
|
35
|
-
* - _equalArrayExpr
|
36
|
-
* - _equalRowExpr
|
37
|
-
* - _equalRowCompareExpr
|
38
|
-
* - _equalCoalesceExpr
|
39
|
-
* - _equalMinMaxExpr
|
40
|
-
* - _equalSQLValueFunction
|
41
|
-
* - _equalXmlExpr
|
42
|
-
* - _equalNullTest
|
43
|
-
* - _equalBooleanTest
|
44
|
-
* - _equalCoerceToDomain
|
45
|
-
* - _equalCoerceToDomainValue
|
46
|
-
* - _equalSetToDefault
|
47
|
-
* - _equalCurrentOfExpr
|
48
|
-
* - _equalNextValueExpr
|
49
|
-
* - _equalInferenceElem
|
50
|
-
* - _equalTargetEntry
|
51
|
-
* - _equalRangeTblRef
|
52
|
-
* - _equalFromExpr
|
53
|
-
* - _equalOnConflictExpr
|
54
|
-
* - _equalJoinExpr
|
55
|
-
* - _equalPathKey
|
56
|
-
* - _equalRestrictInfo
|
57
|
-
* - _equalPlaceHolderVar
|
58
|
-
* - _equalSpecialJoinInfo
|
59
|
-
* - _equalAppendRelInfo
|
60
|
-
* - _equalPlaceHolderInfo
|
61
|
-
* - _equalList
|
62
|
-
* - _equalValue
|
5
|
+
* - _equalA_Const
|
6
|
+
* - _equalBitmapset
|
63
7
|
* - _equalExtensibleNode
|
64
|
-
* -
|
65
|
-
* - _equalRawStmt
|
66
|
-
* - _equalInsertStmt
|
67
|
-
* - _equalDeleteStmt
|
68
|
-
* - _equalUpdateStmt
|
69
|
-
* - _equalSelectStmt
|
70
|
-
* - _equalSetOperationStmt
|
71
|
-
* - _equalAlterTableStmt
|
72
|
-
* - _equalAlterTableCmd
|
73
|
-
* - _equalAlterCollationStmt
|
74
|
-
* - _equalAlterDomainStmt
|
75
|
-
* - _equalGrantStmt
|
76
|
-
* - _equalGrantRoleStmt
|
77
|
-
* - _equalAlterDefaultPrivilegesStmt
|
78
|
-
* - _equalDeclareCursorStmt
|
79
|
-
* - _equalClosePortalStmt
|
80
|
-
* - _equalCallStmt
|
81
|
-
* - _equalClusterStmt
|
82
|
-
* - _equalCopyStmt
|
83
|
-
* - _equalCreateStmt
|
84
|
-
* - _equalTableLikeClause
|
85
|
-
* - _equalDefineStmt
|
86
|
-
* - _equalDropStmt
|
87
|
-
* - _equalTruncateStmt
|
88
|
-
* - _equalCommentStmt
|
89
|
-
* - _equalSecLabelStmt
|
90
|
-
* - _equalFetchStmt
|
91
|
-
* - _equalIndexStmt
|
92
|
-
* - _equalCreateStatsStmt
|
93
|
-
* - _equalAlterStatsStmt
|
94
|
-
* - _equalCreateFunctionStmt
|
95
|
-
* - _equalFunctionParameter
|
96
|
-
* - _equalAlterFunctionStmt
|
97
|
-
* - _equalDoStmt
|
98
|
-
* - _equalRenameStmt
|
99
|
-
* - _equalAlterObjectDependsStmt
|
100
|
-
* - _equalAlterObjectSchemaStmt
|
101
|
-
* - _equalAlterOwnerStmt
|
102
|
-
* - _equalAlterOperatorStmt
|
103
|
-
* - _equalAlterTypeStmt
|
104
|
-
* - _equalRuleStmt
|
105
|
-
* - _equalNotifyStmt
|
106
|
-
* - _equalListenStmt
|
107
|
-
* - _equalUnlistenStmt
|
108
|
-
* - _equalTransactionStmt
|
109
|
-
* - _equalCompositeTypeStmt
|
110
|
-
* - _equalCreateEnumStmt
|
111
|
-
* - _equalCreateRangeStmt
|
112
|
-
* - _equalAlterEnumStmt
|
113
|
-
* - _equalViewStmt
|
114
|
-
* - _equalLoadStmt
|
115
|
-
* - _equalCreateDomainStmt
|
116
|
-
* - _equalCreateOpClassStmt
|
117
|
-
* - _equalCreateOpClassItem
|
118
|
-
* - _equalCreateOpFamilyStmt
|
119
|
-
* - _equalAlterOpFamilyStmt
|
120
|
-
* - _equalCreatedbStmt
|
121
|
-
* - _equalAlterDatabaseStmt
|
122
|
-
* - _equalAlterDatabaseSetStmt
|
123
|
-
* - _equalDropdbStmt
|
124
|
-
* - _equalVacuumStmt
|
125
|
-
* - _equalVacuumRelation
|
126
|
-
* - _equalExplainStmt
|
127
|
-
* - _equalCreateTableAsStmt
|
128
|
-
* - _equalRefreshMatViewStmt
|
129
|
-
* - _equalReplicaIdentityStmt
|
130
|
-
* - _equalAlterSystemStmt
|
131
|
-
* - _equalCreateSeqStmt
|
132
|
-
* - _equalAlterSeqStmt
|
133
|
-
* - _equalVariableSetStmt
|
134
|
-
* - _equalVariableShowStmt
|
135
|
-
* - _equalDiscardStmt
|
136
|
-
* - _equalCreateTableSpaceStmt
|
137
|
-
* - _equalDropTableSpaceStmt
|
138
|
-
* - _equalAlterTableSpaceOptionsStmt
|
139
|
-
* - _equalAlterTableMoveAllStmt
|
140
|
-
* - _equalCreateExtensionStmt
|
141
|
-
* - _equalAlterExtensionStmt
|
142
|
-
* - _equalAlterExtensionContentsStmt
|
143
|
-
* - _equalCreateFdwStmt
|
144
|
-
* - _equalAlterFdwStmt
|
145
|
-
* - _equalCreateForeignServerStmt
|
146
|
-
* - _equalAlterForeignServerStmt
|
147
|
-
* - _equalCreateUserMappingStmt
|
148
|
-
* - _equalAlterUserMappingStmt
|
149
|
-
* - _equalDropUserMappingStmt
|
150
|
-
* - _equalCreateForeignTableStmt
|
151
|
-
* - _equalImportForeignSchemaStmt
|
152
|
-
* - _equalCreateTransformStmt
|
153
|
-
* - _equalCreateAmStmt
|
154
|
-
* - _equalCreateTrigStmt
|
155
|
-
* - _equalCreateEventTrigStmt
|
156
|
-
* - _equalAlterEventTrigStmt
|
157
|
-
* - _equalCreatePLangStmt
|
158
|
-
* - _equalCreateRoleStmt
|
159
|
-
* - _equalAlterRoleStmt
|
160
|
-
* - _equalAlterRoleSetStmt
|
161
|
-
* - _equalDropRoleStmt
|
162
|
-
* - _equalLockStmt
|
163
|
-
* - _equalConstraintsSetStmt
|
164
|
-
* - _equalReindexStmt
|
165
|
-
* - _equalCreateSchemaStmt
|
166
|
-
* - _equalCreateConversionStmt
|
167
|
-
* - _equalCreateCastStmt
|
168
|
-
* - _equalPrepareStmt
|
169
|
-
* - _equalExecuteStmt
|
170
|
-
* - _equalDeallocateStmt
|
171
|
-
* - _equalDropOwnedStmt
|
172
|
-
* - _equalReassignOwnedStmt
|
173
|
-
* - _equalAlterTSDictionaryStmt
|
174
|
-
* - _equalAlterTSConfigurationStmt
|
175
|
-
* - _equalCreatePolicyStmt
|
176
|
-
* - _equalAlterPolicyStmt
|
177
|
-
* - _equalCreatePublicationStmt
|
178
|
-
* - _equalAlterPublicationStmt
|
179
|
-
* - _equalCreateSubscriptionStmt
|
180
|
-
* - _equalAlterSubscriptionStmt
|
181
|
-
* - _equalDropSubscriptionStmt
|
182
|
-
* - _equalAExpr
|
183
|
-
* - _equalColumnRef
|
184
|
-
* - _equalParamRef
|
185
|
-
* - _equalAConst
|
186
|
-
* - _equalFuncCall
|
187
|
-
* - _equalAStar
|
188
|
-
* - _equalAIndices
|
189
|
-
* - _equalA_Indirection
|
190
|
-
* - _equalA_ArrayExpr
|
191
|
-
* - _equalResTarget
|
192
|
-
* - _equalMultiAssignRef
|
193
|
-
* - _equalTypeCast
|
194
|
-
* - _equalCollateClause
|
195
|
-
* - _equalSortBy
|
196
|
-
* - _equalWindowDef
|
197
|
-
* - _equalRangeSubselect
|
198
|
-
* - _equalRangeFunction
|
199
|
-
* - _equalRangeTableSample
|
200
|
-
* - _equalRangeTableFunc
|
201
|
-
* - _equalRangeTableFuncCol
|
202
|
-
* - _equalTypeName
|
203
|
-
* - _equalIndexElem
|
204
|
-
* - _equalColumnDef
|
205
|
-
* - _equalConstraint
|
206
|
-
* - _equalDefElem
|
207
|
-
* - _equalLockingClause
|
208
|
-
* - _equalRangeTblEntry
|
209
|
-
* - _equalRangeTblFunction
|
210
|
-
* - _equalTableSampleClause
|
211
|
-
* - _equalWithCheckOption
|
212
|
-
* - _equalSortGroupClause
|
213
|
-
* - _equalGroupingSet
|
214
|
-
* - _equalWindowClause
|
215
|
-
* - _equalRowMarkClause
|
216
|
-
* - _equalWithClause
|
217
|
-
* - _equalInferClause
|
218
|
-
* - _equalOnConflictClause
|
219
|
-
* - _equalCommonTableExpr
|
220
|
-
* - _equalObjectWithArgs
|
221
|
-
* - _equalAccessPriv
|
222
|
-
* - _equalXmlSerialize
|
223
|
-
* - _equalRoleSpec
|
224
|
-
* - _equalTriggerTransition
|
225
|
-
* - _equalPartitionElem
|
226
|
-
* - _equalPartitionSpec
|
227
|
-
* - _equalPartitionBoundSpec
|
228
|
-
* - _equalPartitionRangeDatum
|
229
|
-
* - _equalPartitionCmd
|
8
|
+
* - _equalList
|
230
9
|
*--------------------------------------------------------------------
|
231
10
|
*/
|
232
11
|
|
@@ -235,22 +14,12 @@
|
|
235
14
|
* equalfuncs.c
|
236
15
|
* Equality functions to compare node trees.
|
237
16
|
*
|
238
|
-
* NOTE: we currently support comparing all node types found in parse
|
239
|
-
* trees. We do not support comparing executor state trees; there
|
240
|
-
* is no need for that, and no point in maintaining all the code that
|
241
|
-
* would be needed. We also do not support comparing Path trees, mainly
|
242
|
-
* because the circular linkages between RelOptInfo and Path nodes can't
|
243
|
-
* be handled easily in a simple depth-first traversal.
|
244
|
-
*
|
245
|
-
* Currently, in fact, equal() doesn't know how to compare Plan trees
|
246
|
-
* either. This might need to be fixed someday.
|
247
|
-
*
|
248
17
|
* NOTE: it is intentional that parse location fields (in nodes that have
|
249
18
|
* one) are not compared. This is because we want, for example, a variable
|
250
19
|
* "x" to be considered equal() to another reference to "x" in the query.
|
251
20
|
*
|
252
21
|
*
|
253
|
-
* Portions Copyright (c) 1996-
|
22
|
+
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
254
23
|
* Portions Copyright (c) 1994, Regents of the University of California
|
255
24
|
*
|
256
25
|
* IDENTIFICATION
|
@@ -262,8 +31,6 @@
|
|
262
31
|
#include "postgres.h"
|
263
32
|
|
264
33
|
#include "miscadmin.h"
|
265
|
-
#include "nodes/extensible.h"
|
266
|
-
#include "nodes/pathnodes.h"
|
267
34
|
#include "utils/datum.h"
|
268
35
|
|
269
36
|
|
@@ -306,6 +73,13 @@
|
|
306
73
|
#define equalstr(a, b) \
|
307
74
|
(((a) != NULL && (b) != NULL) ? (strcmp(a, b) == 0) : (a) == (b))
|
308
75
|
|
76
|
+
/* Compare a field that is an inline array */
|
77
|
+
#define COMPARE_ARRAY_FIELD(fldname) \
|
78
|
+
do { \
|
79
|
+
if (memcmp(a->fldname, b->fldname, sizeof(a->fldname)) != 0) \
|
80
|
+
return false; \
|
81
|
+
} while (0)
|
82
|
+
|
309
83
|
/* Compare a field that is a pointer to a simple palloc'd object of size sz */
|
310
84
|
#define COMPARE_POINTER_FIELD(fldname, sz) \
|
311
85
|
do { \
|
@@ -322,95 +96,13 @@
|
|
322
96
|
((void) 0)
|
323
97
|
|
324
98
|
|
325
|
-
|
326
|
-
* Stuff from primnodes.h
|
327
|
-
*/
|
328
|
-
|
329
|
-
static bool
|
330
|
-
_equalAlias(const Alias *a, const Alias *b)
|
331
|
-
{
|
332
|
-
COMPARE_STRING_FIELD(aliasname);
|
333
|
-
COMPARE_NODE_FIELD(colnames);
|
334
|
-
|
335
|
-
return true;
|
336
|
-
}
|
337
|
-
|
338
|
-
static bool
|
339
|
-
_equalRangeVar(const RangeVar *a, const RangeVar *b)
|
340
|
-
{
|
341
|
-
COMPARE_STRING_FIELD(catalogname);
|
342
|
-
COMPARE_STRING_FIELD(schemaname);
|
343
|
-
COMPARE_STRING_FIELD(relname);
|
344
|
-
COMPARE_SCALAR_FIELD(inh);
|
345
|
-
COMPARE_SCALAR_FIELD(relpersistence);
|
346
|
-
COMPARE_NODE_FIELD(alias);
|
347
|
-
COMPARE_LOCATION_FIELD(location);
|
348
|
-
|
349
|
-
return true;
|
350
|
-
}
|
351
|
-
|
352
|
-
static bool
|
353
|
-
_equalTableFunc(const TableFunc *a, const TableFunc *b)
|
354
|
-
{
|
355
|
-
COMPARE_NODE_FIELD(ns_uris);
|
356
|
-
COMPARE_NODE_FIELD(ns_names);
|
357
|
-
COMPARE_NODE_FIELD(docexpr);
|
358
|
-
COMPARE_NODE_FIELD(rowexpr);
|
359
|
-
COMPARE_NODE_FIELD(colnames);
|
360
|
-
COMPARE_NODE_FIELD(coltypes);
|
361
|
-
COMPARE_NODE_FIELD(coltypmods);
|
362
|
-
COMPARE_NODE_FIELD(colcollations);
|
363
|
-
COMPARE_NODE_FIELD(colexprs);
|
364
|
-
COMPARE_NODE_FIELD(coldefexprs);
|
365
|
-
COMPARE_BITMAPSET_FIELD(notnulls);
|
366
|
-
COMPARE_SCALAR_FIELD(ordinalitycol);
|
367
|
-
COMPARE_LOCATION_FIELD(location);
|
368
|
-
|
369
|
-
return true;
|
370
|
-
}
|
371
|
-
|
372
|
-
static bool
|
373
|
-
_equalIntoClause(const IntoClause *a, const IntoClause *b)
|
374
|
-
{
|
375
|
-
COMPARE_NODE_FIELD(rel);
|
376
|
-
COMPARE_NODE_FIELD(colNames);
|
377
|
-
COMPARE_STRING_FIELD(accessMethod);
|
378
|
-
COMPARE_NODE_FIELD(options);
|
379
|
-
COMPARE_SCALAR_FIELD(onCommit);
|
380
|
-
COMPARE_STRING_FIELD(tableSpaceName);
|
381
|
-
COMPARE_NODE_FIELD(viewQuery);
|
382
|
-
COMPARE_SCALAR_FIELD(skipData);
|
99
|
+
#include "equalfuncs.funcs.c"
|
383
100
|
|
384
|
-
return true;
|
385
|
-
}
|
386
101
|
|
387
102
|
/*
|
388
|
-
*
|
389
|
-
* should never actually get instantiated. Also, since it has no common
|
390
|
-
* fields except NodeTag, there's no need for a helper routine to factor
|
391
|
-
* out comparing the common fields...
|
103
|
+
* Support functions for nodes with custom_copy_equal attribute
|
392
104
|
*/
|
393
105
|
|
394
|
-
static bool
|
395
|
-
_equalVar(const Var *a, const Var *b)
|
396
|
-
{
|
397
|
-
COMPARE_SCALAR_FIELD(varno);
|
398
|
-
COMPARE_SCALAR_FIELD(varattno);
|
399
|
-
COMPARE_SCALAR_FIELD(vartype);
|
400
|
-
COMPARE_SCALAR_FIELD(vartypmod);
|
401
|
-
COMPARE_SCALAR_FIELD(varcollid);
|
402
|
-
COMPARE_SCALAR_FIELD(varlevelsup);
|
403
|
-
|
404
|
-
/*
|
405
|
-
* varnosyn/varattnosyn are intentionally ignored here, because Vars with
|
406
|
-
* different syntactic identifiers are semantically the same as long as
|
407
|
-
* their varno/varattno match.
|
408
|
-
*/
|
409
|
-
COMPARE_LOCATION_FIELD(location);
|
410
|
-
|
411
|
-
return true;
|
412
|
-
}
|
413
|
-
|
414
106
|
static bool
|
415
107
|
_equalConst(const Const *a, const Const *b)
|
416
108
|
{
|
@@ -433,3566 +125,145 @@ _equalConst(const Const *a, const Const *b)
|
|
433
125
|
}
|
434
126
|
|
435
127
|
static bool
|
436
|
-
|
437
|
-
{
|
438
|
-
COMPARE_SCALAR_FIELD(paramkind);
|
439
|
-
COMPARE_SCALAR_FIELD(paramid);
|
440
|
-
COMPARE_SCALAR_FIELD(paramtype);
|
441
|
-
COMPARE_SCALAR_FIELD(paramtypmod);
|
442
|
-
COMPARE_SCALAR_FIELD(paramcollid);
|
443
|
-
COMPARE_LOCATION_FIELD(location);
|
444
|
-
|
445
|
-
return true;
|
446
|
-
}
|
447
|
-
|
448
|
-
static bool
|
449
|
-
_equalAggref(const Aggref *a, const Aggref *b)
|
450
|
-
{
|
451
|
-
COMPARE_SCALAR_FIELD(aggfnoid);
|
452
|
-
COMPARE_SCALAR_FIELD(aggtype);
|
453
|
-
COMPARE_SCALAR_FIELD(aggcollid);
|
454
|
-
COMPARE_SCALAR_FIELD(inputcollid);
|
455
|
-
/* ignore aggtranstype since it might not be set yet */
|
456
|
-
COMPARE_NODE_FIELD(aggargtypes);
|
457
|
-
COMPARE_NODE_FIELD(aggdirectargs);
|
458
|
-
COMPARE_NODE_FIELD(args);
|
459
|
-
COMPARE_NODE_FIELD(aggorder);
|
460
|
-
COMPARE_NODE_FIELD(aggdistinct);
|
461
|
-
COMPARE_NODE_FIELD(aggfilter);
|
462
|
-
COMPARE_SCALAR_FIELD(aggstar);
|
463
|
-
COMPARE_SCALAR_FIELD(aggvariadic);
|
464
|
-
COMPARE_SCALAR_FIELD(aggkind);
|
465
|
-
COMPARE_SCALAR_FIELD(agglevelsup);
|
466
|
-
COMPARE_SCALAR_FIELD(aggsplit);
|
467
|
-
COMPARE_LOCATION_FIELD(location);
|
468
|
-
|
469
|
-
return true;
|
470
|
-
}
|
471
|
-
|
472
|
-
static bool
|
473
|
-
_equalGroupingFunc(const GroupingFunc *a, const GroupingFunc *b)
|
128
|
+
_equalExtensibleNode(const ExtensibleNode *a, const ExtensibleNode *b)
|
474
129
|
{
|
475
|
-
|
476
|
-
|
477
|
-
/*
|
478
|
-
* We must not compare the refs or cols field
|
479
|
-
*/
|
480
|
-
|
481
|
-
COMPARE_SCALAR_FIELD(agglevelsup);
|
482
|
-
COMPARE_LOCATION_FIELD(location);
|
483
|
-
|
484
|
-
return true;
|
485
|
-
}
|
130
|
+
const ExtensibleNodeMethods *methods;
|
486
131
|
|
487
|
-
|
488
|
-
_equalWindowFunc(const WindowFunc *a, const WindowFunc *b)
|
489
|
-
{
|
490
|
-
COMPARE_SCALAR_FIELD(winfnoid);
|
491
|
-
COMPARE_SCALAR_FIELD(wintype);
|
492
|
-
COMPARE_SCALAR_FIELD(wincollid);
|
493
|
-
COMPARE_SCALAR_FIELD(inputcollid);
|
494
|
-
COMPARE_NODE_FIELD(args);
|
495
|
-
COMPARE_NODE_FIELD(aggfilter);
|
496
|
-
COMPARE_SCALAR_FIELD(winref);
|
497
|
-
COMPARE_SCALAR_FIELD(winstar);
|
498
|
-
COMPARE_SCALAR_FIELD(winagg);
|
499
|
-
COMPARE_LOCATION_FIELD(location);
|
132
|
+
COMPARE_STRING_FIELD(extnodename);
|
500
133
|
|
501
|
-
|
502
|
-
|
134
|
+
/* At this point, we know extnodename is the same for both nodes. */
|
135
|
+
methods = GetExtensibleNodeMethods(a->extnodename, false);
|
503
136
|
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
COMPARE_SCALAR_FIELD(refcontainertype);
|
508
|
-
COMPARE_SCALAR_FIELD(refelemtype);
|
509
|
-
COMPARE_SCALAR_FIELD(reftypmod);
|
510
|
-
COMPARE_SCALAR_FIELD(refcollid);
|
511
|
-
COMPARE_NODE_FIELD(refupperindexpr);
|
512
|
-
COMPARE_NODE_FIELD(reflowerindexpr);
|
513
|
-
COMPARE_NODE_FIELD(refexpr);
|
514
|
-
COMPARE_NODE_FIELD(refassgnexpr);
|
137
|
+
/* compare the private fields */
|
138
|
+
if (!methods->nodeEqual(a, b))
|
139
|
+
return false;
|
515
140
|
|
516
141
|
return true;
|
517
142
|
}
|
518
143
|
|
519
144
|
static bool
|
520
|
-
|
145
|
+
_equalA_Const(const A_Const *a, const A_Const *b)
|
521
146
|
{
|
522
|
-
COMPARE_SCALAR_FIELD(
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
COMPARE_SCALAR_FIELD(funccollid);
|
528
|
-
COMPARE_SCALAR_FIELD(inputcollid);
|
529
|
-
COMPARE_NODE_FIELD(args);
|
147
|
+
COMPARE_SCALAR_FIELD(isnull);
|
148
|
+
/* Hack for in-line val field. Also val is not valid if isnull is true */
|
149
|
+
if (!a->isnull &&
|
150
|
+
!equal(&a->val, &b->val))
|
151
|
+
return false;
|
530
152
|
COMPARE_LOCATION_FIELD(location);
|
531
153
|
|
532
154
|
return true;
|
533
155
|
}
|
534
156
|
|
535
157
|
static bool
|
536
|
-
|
158
|
+
_equalBitmapset(const Bitmapset *a, const Bitmapset *b)
|
537
159
|
{
|
538
|
-
|
539
|
-
COMPARE_STRING_FIELD(name);
|
540
|
-
COMPARE_SCALAR_FIELD(argnumber);
|
541
|
-
COMPARE_LOCATION_FIELD(location);
|
542
|
-
|
543
|
-
return true;
|
160
|
+
return bms_equal(a, b);
|
544
161
|
}
|
545
162
|
|
163
|
+
/*
|
164
|
+
* Lists are handled specially
|
165
|
+
*/
|
546
166
|
static bool
|
547
|
-
|
167
|
+
_equalList(const List *a, const List *b)
|
548
168
|
{
|
549
|
-
|
169
|
+
const ListCell *item_a;
|
170
|
+
const ListCell *item_b;
|
550
171
|
|
551
172
|
/*
|
552
|
-
*
|
553
|
-
*
|
554
|
-
* isn't as far along in the parse/plan pipeline and hasn't had the
|
555
|
-
* opfuncid cache filled yet.
|
173
|
+
* Try to reject by simple scalar checks before grovelling through all the
|
174
|
+
* list elements...
|
556
175
|
*/
|
557
|
-
|
558
|
-
|
559
|
-
b->opfuncid != 0)
|
560
|
-
return false;
|
561
|
-
|
562
|
-
COMPARE_SCALAR_FIELD(opresulttype);
|
563
|
-
COMPARE_SCALAR_FIELD(opretset);
|
564
|
-
COMPARE_SCALAR_FIELD(opcollid);
|
565
|
-
COMPARE_SCALAR_FIELD(inputcollid);
|
566
|
-
COMPARE_NODE_FIELD(args);
|
567
|
-
COMPARE_LOCATION_FIELD(location);
|
568
|
-
|
569
|
-
return true;
|
570
|
-
}
|
571
|
-
|
572
|
-
static bool
|
573
|
-
_equalDistinctExpr(const DistinctExpr *a, const DistinctExpr *b)
|
574
|
-
{
|
575
|
-
COMPARE_SCALAR_FIELD(opno);
|
176
|
+
COMPARE_SCALAR_FIELD(type);
|
177
|
+
COMPARE_SCALAR_FIELD(length);
|
576
178
|
|
577
179
|
/*
|
578
|
-
*
|
579
|
-
*
|
580
|
-
* isn't as far along in the parse/plan pipeline and hasn't had the
|
581
|
-
* opfuncid cache filled yet.
|
180
|
+
* We place the switch outside the loop for the sake of efficiency; this
|
181
|
+
* may not be worth doing...
|
582
182
|
*/
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
183
|
+
switch (a->type)
|
184
|
+
{
|
185
|
+
case T_List:
|
186
|
+
forboth(item_a, a, item_b, b)
|
187
|
+
{
|
188
|
+
if (!equal(lfirst(item_a), lfirst(item_b)))
|
189
|
+
return false;
|
190
|
+
}
|
191
|
+
break;
|
192
|
+
case T_IntList:
|
193
|
+
forboth(item_a, a, item_b, b)
|
194
|
+
{
|
195
|
+
if (lfirst_int(item_a) != lfirst_int(item_b))
|
196
|
+
return false;
|
197
|
+
}
|
198
|
+
break;
|
199
|
+
case T_OidList:
|
200
|
+
forboth(item_a, a, item_b, b)
|
201
|
+
{
|
202
|
+
if (lfirst_oid(item_a) != lfirst_oid(item_b))
|
203
|
+
return false;
|
204
|
+
}
|
205
|
+
break;
|
206
|
+
case T_XidList:
|
207
|
+
forboth(item_a, a, item_b, b)
|
208
|
+
{
|
209
|
+
if (lfirst_xid(item_a) != lfirst_xid(item_b))
|
210
|
+
return false;
|
211
|
+
}
|
212
|
+
break;
|
213
|
+
default:
|
214
|
+
elog(ERROR, "unrecognized list node type: %d",
|
215
|
+
(int) a->type);
|
216
|
+
return false; /* keep compiler quiet */
|
217
|
+
}
|
587
218
|
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
COMPARE_LOCATION_FIELD(location);
|
219
|
+
/*
|
220
|
+
* If we got here, we should have run out of elements of both lists
|
221
|
+
*/
|
222
|
+
Assert(item_a == NULL);
|
223
|
+
Assert(item_b == NULL);
|
594
224
|
|
595
225
|
return true;
|
596
226
|
}
|
597
227
|
|
598
|
-
|
599
|
-
|
228
|
+
|
229
|
+
/*
|
230
|
+
* equal
|
231
|
+
* returns whether two nodes are equal
|
232
|
+
*/
|
233
|
+
bool
|
234
|
+
equal(const void *a, const void *b)
|
600
235
|
{
|
601
|
-
|
236
|
+
bool retval;
|
237
|
+
|
238
|
+
if (a == b)
|
239
|
+
return true;
|
602
240
|
|
603
241
|
/*
|
604
|
-
*
|
605
|
-
* contains zero and the other doesn't. This just means that the one node
|
606
|
-
* isn't as far along in the parse/plan pipeline and hasn't had the
|
607
|
-
* opfuncid cache filled yet.
|
242
|
+
* note that a!=b, so only one of them can be NULL
|
608
243
|
*/
|
609
|
-
if (a
|
610
|
-
a->opfuncid != 0 &&
|
611
|
-
b->opfuncid != 0)
|
244
|
+
if (a == NULL || b == NULL)
|
612
245
|
return false;
|
613
246
|
|
614
|
-
COMPARE_SCALAR_FIELD(opresulttype);
|
615
|
-
COMPARE_SCALAR_FIELD(opretset);
|
616
|
-
COMPARE_SCALAR_FIELD(opcollid);
|
617
|
-
COMPARE_SCALAR_FIELD(inputcollid);
|
618
|
-
COMPARE_NODE_FIELD(args);
|
619
|
-
COMPARE_LOCATION_FIELD(location);
|
620
|
-
|
621
|
-
return true;
|
622
|
-
}
|
623
|
-
|
624
|
-
static bool
|
625
|
-
_equalScalarArrayOpExpr(const ScalarArrayOpExpr *a, const ScalarArrayOpExpr *b)
|
626
|
-
{
|
627
|
-
COMPARE_SCALAR_FIELD(opno);
|
628
|
-
|
629
247
|
/*
|
630
|
-
*
|
631
|
-
* contains zero and the other doesn't. This just means that the one node
|
632
|
-
* isn't as far along in the parse/plan pipeline and hasn't had the
|
633
|
-
* opfuncid cache filled yet.
|
248
|
+
* are they the same type of nodes?
|
634
249
|
*/
|
635
|
-
if (a
|
636
|
-
a->opfuncid != 0 &&
|
637
|
-
b->opfuncid != 0)
|
250
|
+
if (nodeTag(a) != nodeTag(b))
|
638
251
|
return false;
|
639
252
|
|
640
|
-
|
641
|
-
|
642
|
-
COMPARE_NODE_FIELD(args);
|
643
|
-
COMPARE_LOCATION_FIELD(location);
|
644
|
-
|
645
|
-
return true;
|
646
|
-
}
|
647
|
-
|
648
|
-
static bool
|
649
|
-
_equalBoolExpr(const BoolExpr *a, const BoolExpr *b)
|
650
|
-
{
|
651
|
-
COMPARE_SCALAR_FIELD(boolop);
|
652
|
-
COMPARE_NODE_FIELD(args);
|
653
|
-
COMPARE_LOCATION_FIELD(location);
|
654
|
-
|
655
|
-
return true;
|
656
|
-
}
|
657
|
-
|
658
|
-
static bool
|
659
|
-
_equalSubLink(const SubLink *a, const SubLink *b)
|
660
|
-
{
|
661
|
-
COMPARE_SCALAR_FIELD(subLinkType);
|
662
|
-
COMPARE_SCALAR_FIELD(subLinkId);
|
663
|
-
COMPARE_NODE_FIELD(testexpr);
|
664
|
-
COMPARE_NODE_FIELD(operName);
|
665
|
-
COMPARE_NODE_FIELD(subselect);
|
666
|
-
COMPARE_LOCATION_FIELD(location);
|
667
|
-
|
668
|
-
return true;
|
669
|
-
}
|
670
|
-
|
671
|
-
static bool
|
672
|
-
_equalSubPlan(const SubPlan *a, const SubPlan *b)
|
673
|
-
{
|
674
|
-
COMPARE_SCALAR_FIELD(subLinkType);
|
675
|
-
COMPARE_NODE_FIELD(testexpr);
|
676
|
-
COMPARE_NODE_FIELD(paramIds);
|
677
|
-
COMPARE_SCALAR_FIELD(plan_id);
|
678
|
-
COMPARE_STRING_FIELD(plan_name);
|
679
|
-
COMPARE_SCALAR_FIELD(firstColType);
|
680
|
-
COMPARE_SCALAR_FIELD(firstColTypmod);
|
681
|
-
COMPARE_SCALAR_FIELD(firstColCollation);
|
682
|
-
COMPARE_SCALAR_FIELD(useHashTable);
|
683
|
-
COMPARE_SCALAR_FIELD(unknownEqFalse);
|
684
|
-
COMPARE_SCALAR_FIELD(parallel_safe);
|
685
|
-
COMPARE_NODE_FIELD(setParam);
|
686
|
-
COMPARE_NODE_FIELD(parParam);
|
687
|
-
COMPARE_NODE_FIELD(args);
|
688
|
-
COMPARE_SCALAR_FIELD(startup_cost);
|
689
|
-
COMPARE_SCALAR_FIELD(per_call_cost);
|
690
|
-
|
691
|
-
return true;
|
692
|
-
}
|
693
|
-
|
694
|
-
static bool
|
695
|
-
_equalAlternativeSubPlan(const AlternativeSubPlan *a, const AlternativeSubPlan *b)
|
696
|
-
{
|
697
|
-
COMPARE_NODE_FIELD(subplans);
|
698
|
-
|
699
|
-
return true;
|
700
|
-
}
|
701
|
-
|
702
|
-
static bool
|
703
|
-
_equalFieldSelect(const FieldSelect *a, const FieldSelect *b)
|
704
|
-
{
|
705
|
-
COMPARE_NODE_FIELD(arg);
|
706
|
-
COMPARE_SCALAR_FIELD(fieldnum);
|
707
|
-
COMPARE_SCALAR_FIELD(resulttype);
|
708
|
-
COMPARE_SCALAR_FIELD(resulttypmod);
|
709
|
-
COMPARE_SCALAR_FIELD(resultcollid);
|
710
|
-
|
711
|
-
return true;
|
712
|
-
}
|
713
|
-
|
714
|
-
static bool
|
715
|
-
_equalFieldStore(const FieldStore *a, const FieldStore *b)
|
716
|
-
{
|
717
|
-
COMPARE_NODE_FIELD(arg);
|
718
|
-
COMPARE_NODE_FIELD(newvals);
|
719
|
-
COMPARE_NODE_FIELD(fieldnums);
|
720
|
-
COMPARE_SCALAR_FIELD(resulttype);
|
721
|
-
|
722
|
-
return true;
|
723
|
-
}
|
724
|
-
|
725
|
-
static bool
|
726
|
-
_equalRelabelType(const RelabelType *a, const RelabelType *b)
|
727
|
-
{
|
728
|
-
COMPARE_NODE_FIELD(arg);
|
729
|
-
COMPARE_SCALAR_FIELD(resulttype);
|
730
|
-
COMPARE_SCALAR_FIELD(resulttypmod);
|
731
|
-
COMPARE_SCALAR_FIELD(resultcollid);
|
732
|
-
COMPARE_COERCIONFORM_FIELD(relabelformat);
|
733
|
-
COMPARE_LOCATION_FIELD(location);
|
734
|
-
|
735
|
-
return true;
|
736
|
-
}
|
737
|
-
|
738
|
-
static bool
|
739
|
-
_equalCoerceViaIO(const CoerceViaIO *a, const CoerceViaIO *b)
|
740
|
-
{
|
741
|
-
COMPARE_NODE_FIELD(arg);
|
742
|
-
COMPARE_SCALAR_FIELD(resulttype);
|
743
|
-
COMPARE_SCALAR_FIELD(resultcollid);
|
744
|
-
COMPARE_COERCIONFORM_FIELD(coerceformat);
|
745
|
-
COMPARE_LOCATION_FIELD(location);
|
746
|
-
|
747
|
-
return true;
|
748
|
-
}
|
749
|
-
|
750
|
-
static bool
|
751
|
-
_equalArrayCoerceExpr(const ArrayCoerceExpr *a, const ArrayCoerceExpr *b)
|
752
|
-
{
|
753
|
-
COMPARE_NODE_FIELD(arg);
|
754
|
-
COMPARE_NODE_FIELD(elemexpr);
|
755
|
-
COMPARE_SCALAR_FIELD(resulttype);
|
756
|
-
COMPARE_SCALAR_FIELD(resulttypmod);
|
757
|
-
COMPARE_SCALAR_FIELD(resultcollid);
|
758
|
-
COMPARE_COERCIONFORM_FIELD(coerceformat);
|
759
|
-
COMPARE_LOCATION_FIELD(location);
|
760
|
-
|
761
|
-
return true;
|
762
|
-
}
|
763
|
-
|
764
|
-
static bool
|
765
|
-
_equalConvertRowtypeExpr(const ConvertRowtypeExpr *a, const ConvertRowtypeExpr *b)
|
766
|
-
{
|
767
|
-
COMPARE_NODE_FIELD(arg);
|
768
|
-
COMPARE_SCALAR_FIELD(resulttype);
|
769
|
-
COMPARE_COERCIONFORM_FIELD(convertformat);
|
770
|
-
COMPARE_LOCATION_FIELD(location);
|
771
|
-
|
772
|
-
return true;
|
773
|
-
}
|
774
|
-
|
775
|
-
static bool
|
776
|
-
_equalCollateExpr(const CollateExpr *a, const CollateExpr *b)
|
777
|
-
{
|
778
|
-
COMPARE_NODE_FIELD(arg);
|
779
|
-
COMPARE_SCALAR_FIELD(collOid);
|
780
|
-
COMPARE_LOCATION_FIELD(location);
|
781
|
-
|
782
|
-
return true;
|
783
|
-
}
|
253
|
+
/* Guard against stack overflow due to overly complex expressions */
|
254
|
+
check_stack_depth();
|
784
255
|
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
COMPARE_SCALAR_FIELD(casetype);
|
789
|
-
COMPARE_SCALAR_FIELD(casecollid);
|
790
|
-
COMPARE_NODE_FIELD(arg);
|
791
|
-
COMPARE_NODE_FIELD(args);
|
792
|
-
COMPARE_NODE_FIELD(defresult);
|
793
|
-
COMPARE_LOCATION_FIELD(location);
|
794
|
-
|
795
|
-
return true;
|
796
|
-
}
|
797
|
-
|
798
|
-
static bool
|
799
|
-
_equalCaseWhen(const CaseWhen *a, const CaseWhen *b)
|
800
|
-
{
|
801
|
-
COMPARE_NODE_FIELD(expr);
|
802
|
-
COMPARE_NODE_FIELD(result);
|
803
|
-
COMPARE_LOCATION_FIELD(location);
|
804
|
-
|
805
|
-
return true;
|
806
|
-
}
|
807
|
-
|
808
|
-
static bool
|
809
|
-
_equalCaseTestExpr(const CaseTestExpr *a, const CaseTestExpr *b)
|
810
|
-
{
|
811
|
-
COMPARE_SCALAR_FIELD(typeId);
|
812
|
-
COMPARE_SCALAR_FIELD(typeMod);
|
813
|
-
COMPARE_SCALAR_FIELD(collation);
|
814
|
-
|
815
|
-
return true;
|
816
|
-
}
|
817
|
-
|
818
|
-
static bool
|
819
|
-
_equalArrayExpr(const ArrayExpr *a, const ArrayExpr *b)
|
820
|
-
{
|
821
|
-
COMPARE_SCALAR_FIELD(array_typeid);
|
822
|
-
COMPARE_SCALAR_FIELD(array_collid);
|
823
|
-
COMPARE_SCALAR_FIELD(element_typeid);
|
824
|
-
COMPARE_NODE_FIELD(elements);
|
825
|
-
COMPARE_SCALAR_FIELD(multidims);
|
826
|
-
COMPARE_LOCATION_FIELD(location);
|
827
|
-
|
828
|
-
return true;
|
829
|
-
}
|
830
|
-
|
831
|
-
static bool
|
832
|
-
_equalRowExpr(const RowExpr *a, const RowExpr *b)
|
833
|
-
{
|
834
|
-
COMPARE_NODE_FIELD(args);
|
835
|
-
COMPARE_SCALAR_FIELD(row_typeid);
|
836
|
-
COMPARE_COERCIONFORM_FIELD(row_format);
|
837
|
-
COMPARE_NODE_FIELD(colnames);
|
838
|
-
COMPARE_LOCATION_FIELD(location);
|
839
|
-
|
840
|
-
return true;
|
841
|
-
}
|
842
|
-
|
843
|
-
static bool
|
844
|
-
_equalRowCompareExpr(const RowCompareExpr *a, const RowCompareExpr *b)
|
845
|
-
{
|
846
|
-
COMPARE_SCALAR_FIELD(rctype);
|
847
|
-
COMPARE_NODE_FIELD(opnos);
|
848
|
-
COMPARE_NODE_FIELD(opfamilies);
|
849
|
-
COMPARE_NODE_FIELD(inputcollids);
|
850
|
-
COMPARE_NODE_FIELD(largs);
|
851
|
-
COMPARE_NODE_FIELD(rargs);
|
852
|
-
|
853
|
-
return true;
|
854
|
-
}
|
855
|
-
|
856
|
-
static bool
|
857
|
-
_equalCoalesceExpr(const CoalesceExpr *a, const CoalesceExpr *b)
|
858
|
-
{
|
859
|
-
COMPARE_SCALAR_FIELD(coalescetype);
|
860
|
-
COMPARE_SCALAR_FIELD(coalescecollid);
|
861
|
-
COMPARE_NODE_FIELD(args);
|
862
|
-
COMPARE_LOCATION_FIELD(location);
|
863
|
-
|
864
|
-
return true;
|
865
|
-
}
|
866
|
-
|
867
|
-
static bool
|
868
|
-
_equalMinMaxExpr(const MinMaxExpr *a, const MinMaxExpr *b)
|
869
|
-
{
|
870
|
-
COMPARE_SCALAR_FIELD(minmaxtype);
|
871
|
-
COMPARE_SCALAR_FIELD(minmaxcollid);
|
872
|
-
COMPARE_SCALAR_FIELD(inputcollid);
|
873
|
-
COMPARE_SCALAR_FIELD(op);
|
874
|
-
COMPARE_NODE_FIELD(args);
|
875
|
-
COMPARE_LOCATION_FIELD(location);
|
876
|
-
|
877
|
-
return true;
|
878
|
-
}
|
879
|
-
|
880
|
-
static bool
|
881
|
-
_equalSQLValueFunction(const SQLValueFunction *a, const SQLValueFunction *b)
|
882
|
-
{
|
883
|
-
COMPARE_SCALAR_FIELD(op);
|
884
|
-
COMPARE_SCALAR_FIELD(type);
|
885
|
-
COMPARE_SCALAR_FIELD(typmod);
|
886
|
-
COMPARE_LOCATION_FIELD(location);
|
887
|
-
|
888
|
-
return true;
|
889
|
-
}
|
890
|
-
|
891
|
-
static bool
|
892
|
-
_equalXmlExpr(const XmlExpr *a, const XmlExpr *b)
|
893
|
-
{
|
894
|
-
COMPARE_SCALAR_FIELD(op);
|
895
|
-
COMPARE_STRING_FIELD(name);
|
896
|
-
COMPARE_NODE_FIELD(named_args);
|
897
|
-
COMPARE_NODE_FIELD(arg_names);
|
898
|
-
COMPARE_NODE_FIELD(args);
|
899
|
-
COMPARE_SCALAR_FIELD(xmloption);
|
900
|
-
COMPARE_SCALAR_FIELD(type);
|
901
|
-
COMPARE_SCALAR_FIELD(typmod);
|
902
|
-
COMPARE_LOCATION_FIELD(location);
|
903
|
-
|
904
|
-
return true;
|
905
|
-
}
|
906
|
-
|
907
|
-
static bool
|
908
|
-
_equalNullTest(const NullTest *a, const NullTest *b)
|
909
|
-
{
|
910
|
-
COMPARE_NODE_FIELD(arg);
|
911
|
-
COMPARE_SCALAR_FIELD(nulltesttype);
|
912
|
-
COMPARE_SCALAR_FIELD(argisrow);
|
913
|
-
COMPARE_LOCATION_FIELD(location);
|
914
|
-
|
915
|
-
return true;
|
916
|
-
}
|
917
|
-
|
918
|
-
static bool
|
919
|
-
_equalBooleanTest(const BooleanTest *a, const BooleanTest *b)
|
920
|
-
{
|
921
|
-
COMPARE_NODE_FIELD(arg);
|
922
|
-
COMPARE_SCALAR_FIELD(booltesttype);
|
923
|
-
COMPARE_LOCATION_FIELD(location);
|
924
|
-
|
925
|
-
return true;
|
926
|
-
}
|
927
|
-
|
928
|
-
static bool
|
929
|
-
_equalCoerceToDomain(const CoerceToDomain *a, const CoerceToDomain *b)
|
930
|
-
{
|
931
|
-
COMPARE_NODE_FIELD(arg);
|
932
|
-
COMPARE_SCALAR_FIELD(resulttype);
|
933
|
-
COMPARE_SCALAR_FIELD(resulttypmod);
|
934
|
-
COMPARE_SCALAR_FIELD(resultcollid);
|
935
|
-
COMPARE_COERCIONFORM_FIELD(coercionformat);
|
936
|
-
COMPARE_LOCATION_FIELD(location);
|
937
|
-
|
938
|
-
return true;
|
939
|
-
}
|
940
|
-
|
941
|
-
static bool
|
942
|
-
_equalCoerceToDomainValue(const CoerceToDomainValue *a, const CoerceToDomainValue *b)
|
943
|
-
{
|
944
|
-
COMPARE_SCALAR_FIELD(typeId);
|
945
|
-
COMPARE_SCALAR_FIELD(typeMod);
|
946
|
-
COMPARE_SCALAR_FIELD(collation);
|
947
|
-
COMPARE_LOCATION_FIELD(location);
|
948
|
-
|
949
|
-
return true;
|
950
|
-
}
|
951
|
-
|
952
|
-
static bool
|
953
|
-
_equalSetToDefault(const SetToDefault *a, const SetToDefault *b)
|
954
|
-
{
|
955
|
-
COMPARE_SCALAR_FIELD(typeId);
|
956
|
-
COMPARE_SCALAR_FIELD(typeMod);
|
957
|
-
COMPARE_SCALAR_FIELD(collation);
|
958
|
-
COMPARE_LOCATION_FIELD(location);
|
959
|
-
|
960
|
-
return true;
|
961
|
-
}
|
962
|
-
|
963
|
-
static bool
|
964
|
-
_equalCurrentOfExpr(const CurrentOfExpr *a, const CurrentOfExpr *b)
|
965
|
-
{
|
966
|
-
COMPARE_SCALAR_FIELD(cvarno);
|
967
|
-
COMPARE_STRING_FIELD(cursor_name);
|
968
|
-
COMPARE_SCALAR_FIELD(cursor_param);
|
969
|
-
|
970
|
-
return true;
|
971
|
-
}
|
972
|
-
|
973
|
-
static bool
|
974
|
-
_equalNextValueExpr(const NextValueExpr *a, const NextValueExpr *b)
|
975
|
-
{
|
976
|
-
COMPARE_SCALAR_FIELD(seqid);
|
977
|
-
COMPARE_SCALAR_FIELD(typeId);
|
978
|
-
|
979
|
-
return true;
|
980
|
-
}
|
981
|
-
|
982
|
-
static bool
|
983
|
-
_equalInferenceElem(const InferenceElem *a, const InferenceElem *b)
|
984
|
-
{
|
985
|
-
COMPARE_NODE_FIELD(expr);
|
986
|
-
COMPARE_SCALAR_FIELD(infercollid);
|
987
|
-
COMPARE_SCALAR_FIELD(inferopclass);
|
988
|
-
|
989
|
-
return true;
|
990
|
-
}
|
991
|
-
|
992
|
-
static bool
|
993
|
-
_equalTargetEntry(const TargetEntry *a, const TargetEntry *b)
|
994
|
-
{
|
995
|
-
COMPARE_NODE_FIELD(expr);
|
996
|
-
COMPARE_SCALAR_FIELD(resno);
|
997
|
-
COMPARE_STRING_FIELD(resname);
|
998
|
-
COMPARE_SCALAR_FIELD(ressortgroupref);
|
999
|
-
COMPARE_SCALAR_FIELD(resorigtbl);
|
1000
|
-
COMPARE_SCALAR_FIELD(resorigcol);
|
1001
|
-
COMPARE_SCALAR_FIELD(resjunk);
|
1002
|
-
|
1003
|
-
return true;
|
1004
|
-
}
|
1005
|
-
|
1006
|
-
static bool
|
1007
|
-
_equalRangeTblRef(const RangeTblRef *a, const RangeTblRef *b)
|
1008
|
-
{
|
1009
|
-
COMPARE_SCALAR_FIELD(rtindex);
|
1010
|
-
|
1011
|
-
return true;
|
1012
|
-
}
|
1013
|
-
|
1014
|
-
static bool
|
1015
|
-
_equalJoinExpr(const JoinExpr *a, const JoinExpr *b)
|
1016
|
-
{
|
1017
|
-
COMPARE_SCALAR_FIELD(jointype);
|
1018
|
-
COMPARE_SCALAR_FIELD(isNatural);
|
1019
|
-
COMPARE_NODE_FIELD(larg);
|
1020
|
-
COMPARE_NODE_FIELD(rarg);
|
1021
|
-
COMPARE_NODE_FIELD(usingClause);
|
1022
|
-
COMPARE_NODE_FIELD(quals);
|
1023
|
-
COMPARE_NODE_FIELD(alias);
|
1024
|
-
COMPARE_SCALAR_FIELD(rtindex);
|
1025
|
-
|
1026
|
-
return true;
|
1027
|
-
}
|
1028
|
-
|
1029
|
-
static bool
|
1030
|
-
_equalFromExpr(const FromExpr *a, const FromExpr *b)
|
1031
|
-
{
|
1032
|
-
COMPARE_NODE_FIELD(fromlist);
|
1033
|
-
COMPARE_NODE_FIELD(quals);
|
1034
|
-
|
1035
|
-
return true;
|
1036
|
-
}
|
1037
|
-
|
1038
|
-
static bool
|
1039
|
-
_equalOnConflictExpr(const OnConflictExpr *a, const OnConflictExpr *b)
|
1040
|
-
{
|
1041
|
-
COMPARE_SCALAR_FIELD(action);
|
1042
|
-
COMPARE_NODE_FIELD(arbiterElems);
|
1043
|
-
COMPARE_NODE_FIELD(arbiterWhere);
|
1044
|
-
COMPARE_SCALAR_FIELD(constraint);
|
1045
|
-
COMPARE_NODE_FIELD(onConflictSet);
|
1046
|
-
COMPARE_NODE_FIELD(onConflictWhere);
|
1047
|
-
COMPARE_SCALAR_FIELD(exclRelIndex);
|
1048
|
-
COMPARE_NODE_FIELD(exclRelTlist);
|
1049
|
-
|
1050
|
-
return true;
|
1051
|
-
}
|
1052
|
-
|
1053
|
-
/*
|
1054
|
-
* Stuff from pathnodes.h
|
1055
|
-
*/
|
1056
|
-
|
1057
|
-
static bool
|
1058
|
-
_equalPathKey(const PathKey *a, const PathKey *b)
|
1059
|
-
{
|
1060
|
-
/* We assume pointer equality is sufficient to compare the eclasses */
|
1061
|
-
COMPARE_SCALAR_FIELD(pk_eclass);
|
1062
|
-
COMPARE_SCALAR_FIELD(pk_opfamily);
|
1063
|
-
COMPARE_SCALAR_FIELD(pk_strategy);
|
1064
|
-
COMPARE_SCALAR_FIELD(pk_nulls_first);
|
1065
|
-
|
1066
|
-
return true;
|
1067
|
-
}
|
1068
|
-
|
1069
|
-
static bool
|
1070
|
-
_equalRestrictInfo(const RestrictInfo *a, const RestrictInfo *b)
|
1071
|
-
{
|
1072
|
-
COMPARE_NODE_FIELD(clause);
|
1073
|
-
COMPARE_SCALAR_FIELD(is_pushed_down);
|
1074
|
-
COMPARE_SCALAR_FIELD(outerjoin_delayed);
|
1075
|
-
COMPARE_SCALAR_FIELD(security_level);
|
1076
|
-
COMPARE_BITMAPSET_FIELD(required_relids);
|
1077
|
-
COMPARE_BITMAPSET_FIELD(outer_relids);
|
1078
|
-
COMPARE_BITMAPSET_FIELD(nullable_relids);
|
1079
|
-
|
1080
|
-
/*
|
1081
|
-
* We ignore all the remaining fields, since they may not be set yet, and
|
1082
|
-
* should be derivable from the clause anyway.
|
1083
|
-
*/
|
1084
|
-
|
1085
|
-
return true;
|
1086
|
-
}
|
1087
|
-
|
1088
|
-
static bool
|
1089
|
-
_equalPlaceHolderVar(const PlaceHolderVar *a, const PlaceHolderVar *b)
|
1090
|
-
{
|
1091
|
-
/*
|
1092
|
-
* We intentionally do not compare phexpr. Two PlaceHolderVars with the
|
1093
|
-
* same ID and levelsup should be considered equal even if the contained
|
1094
|
-
* expressions have managed to mutate to different states. This will
|
1095
|
-
* happen during final plan construction when there are nested PHVs, since
|
1096
|
-
* the inner PHV will get replaced by a Param in some copies of the outer
|
1097
|
-
* PHV. Another way in which it can happen is that initplan sublinks
|
1098
|
-
* could get replaced by differently-numbered Params when sublink folding
|
1099
|
-
* is done. (The end result of such a situation would be some
|
1100
|
-
* unreferenced initplans, which is annoying but not really a problem.) On
|
1101
|
-
* the same reasoning, there is no need to examine phrels.
|
1102
|
-
*
|
1103
|
-
* COMPARE_NODE_FIELD(phexpr);
|
1104
|
-
*
|
1105
|
-
* COMPARE_BITMAPSET_FIELD(phrels);
|
1106
|
-
*/
|
1107
|
-
COMPARE_SCALAR_FIELD(phid);
|
1108
|
-
COMPARE_SCALAR_FIELD(phlevelsup);
|
1109
|
-
|
1110
|
-
return true;
|
1111
|
-
}
|
1112
|
-
|
1113
|
-
static bool
|
1114
|
-
_equalSpecialJoinInfo(const SpecialJoinInfo *a, const SpecialJoinInfo *b)
|
1115
|
-
{
|
1116
|
-
COMPARE_BITMAPSET_FIELD(min_lefthand);
|
1117
|
-
COMPARE_BITMAPSET_FIELD(min_righthand);
|
1118
|
-
COMPARE_BITMAPSET_FIELD(syn_lefthand);
|
1119
|
-
COMPARE_BITMAPSET_FIELD(syn_righthand);
|
1120
|
-
COMPARE_SCALAR_FIELD(jointype);
|
1121
|
-
COMPARE_SCALAR_FIELD(lhs_strict);
|
1122
|
-
COMPARE_SCALAR_FIELD(delay_upper_joins);
|
1123
|
-
COMPARE_SCALAR_FIELD(semi_can_btree);
|
1124
|
-
COMPARE_SCALAR_FIELD(semi_can_hash);
|
1125
|
-
COMPARE_NODE_FIELD(semi_operators);
|
1126
|
-
COMPARE_NODE_FIELD(semi_rhs_exprs);
|
1127
|
-
|
1128
|
-
return true;
|
1129
|
-
}
|
1130
|
-
|
1131
|
-
static bool
|
1132
|
-
_equalAppendRelInfo(const AppendRelInfo *a, const AppendRelInfo *b)
|
1133
|
-
{
|
1134
|
-
COMPARE_SCALAR_FIELD(parent_relid);
|
1135
|
-
COMPARE_SCALAR_FIELD(child_relid);
|
1136
|
-
COMPARE_SCALAR_FIELD(parent_reltype);
|
1137
|
-
COMPARE_SCALAR_FIELD(child_reltype);
|
1138
|
-
COMPARE_NODE_FIELD(translated_vars);
|
1139
|
-
COMPARE_SCALAR_FIELD(num_child_cols);
|
1140
|
-
COMPARE_POINTER_FIELD(parent_colnos, a->num_child_cols * sizeof(AttrNumber));
|
1141
|
-
COMPARE_SCALAR_FIELD(parent_reloid);
|
1142
|
-
|
1143
|
-
return true;
|
1144
|
-
}
|
1145
|
-
|
1146
|
-
static bool
|
1147
|
-
_equalPlaceHolderInfo(const PlaceHolderInfo *a, const PlaceHolderInfo *b)
|
1148
|
-
{
|
1149
|
-
COMPARE_SCALAR_FIELD(phid);
|
1150
|
-
COMPARE_NODE_FIELD(ph_var); /* should be redundant */
|
1151
|
-
COMPARE_BITMAPSET_FIELD(ph_eval_at);
|
1152
|
-
COMPARE_BITMAPSET_FIELD(ph_lateral);
|
1153
|
-
COMPARE_BITMAPSET_FIELD(ph_needed);
|
1154
|
-
COMPARE_SCALAR_FIELD(ph_width);
|
1155
|
-
|
1156
|
-
return true;
|
1157
|
-
}
|
1158
|
-
|
1159
|
-
/*
|
1160
|
-
* Stuff from extensible.h
|
1161
|
-
*/
|
1162
|
-
static bool
|
1163
|
-
_equalExtensibleNode(const ExtensibleNode *a, const ExtensibleNode *b)
|
1164
|
-
{
|
1165
|
-
const ExtensibleNodeMethods *methods;
|
1166
|
-
|
1167
|
-
COMPARE_STRING_FIELD(extnodename);
|
1168
|
-
|
1169
|
-
/* At this point, we know extnodename is the same for both nodes. */
|
1170
|
-
methods = GetExtensibleNodeMethods(a->extnodename, false);
|
1171
|
-
|
1172
|
-
/* compare the private fields */
|
1173
|
-
if (!methods->nodeEqual(a, b))
|
1174
|
-
return false;
|
1175
|
-
|
1176
|
-
return true;
|
1177
|
-
}
|
1178
|
-
|
1179
|
-
/*
|
1180
|
-
* Stuff from parsenodes.h
|
1181
|
-
*/
|
1182
|
-
|
1183
|
-
static bool
|
1184
|
-
_equalQuery(const Query *a, const Query *b)
|
1185
|
-
{
|
1186
|
-
COMPARE_SCALAR_FIELD(commandType);
|
1187
|
-
COMPARE_SCALAR_FIELD(querySource);
|
1188
|
-
/* we intentionally ignore queryId, since it might not be set */
|
1189
|
-
COMPARE_SCALAR_FIELD(canSetTag);
|
1190
|
-
COMPARE_NODE_FIELD(utilityStmt);
|
1191
|
-
COMPARE_SCALAR_FIELD(resultRelation);
|
1192
|
-
COMPARE_SCALAR_FIELD(hasAggs);
|
1193
|
-
COMPARE_SCALAR_FIELD(hasWindowFuncs);
|
1194
|
-
COMPARE_SCALAR_FIELD(hasTargetSRFs);
|
1195
|
-
COMPARE_SCALAR_FIELD(hasSubLinks);
|
1196
|
-
COMPARE_SCALAR_FIELD(hasDistinctOn);
|
1197
|
-
COMPARE_SCALAR_FIELD(hasRecursive);
|
1198
|
-
COMPARE_SCALAR_FIELD(hasModifyingCTE);
|
1199
|
-
COMPARE_SCALAR_FIELD(hasForUpdate);
|
1200
|
-
COMPARE_SCALAR_FIELD(hasRowSecurity);
|
1201
|
-
COMPARE_NODE_FIELD(cteList);
|
1202
|
-
COMPARE_NODE_FIELD(rtable);
|
1203
|
-
COMPARE_NODE_FIELD(jointree);
|
1204
|
-
COMPARE_NODE_FIELD(targetList);
|
1205
|
-
COMPARE_SCALAR_FIELD(override);
|
1206
|
-
COMPARE_NODE_FIELD(onConflict);
|
1207
|
-
COMPARE_NODE_FIELD(returningList);
|
1208
|
-
COMPARE_NODE_FIELD(groupClause);
|
1209
|
-
COMPARE_NODE_FIELD(groupingSets);
|
1210
|
-
COMPARE_NODE_FIELD(havingQual);
|
1211
|
-
COMPARE_NODE_FIELD(windowClause);
|
1212
|
-
COMPARE_NODE_FIELD(distinctClause);
|
1213
|
-
COMPARE_NODE_FIELD(sortClause);
|
1214
|
-
COMPARE_NODE_FIELD(limitOffset);
|
1215
|
-
COMPARE_NODE_FIELD(limitCount);
|
1216
|
-
COMPARE_SCALAR_FIELD(limitOption);
|
1217
|
-
COMPARE_NODE_FIELD(rowMarks);
|
1218
|
-
COMPARE_NODE_FIELD(setOperations);
|
1219
|
-
COMPARE_NODE_FIELD(constraintDeps);
|
1220
|
-
COMPARE_NODE_FIELD(withCheckOptions);
|
1221
|
-
COMPARE_LOCATION_FIELD(stmt_location);
|
1222
|
-
COMPARE_SCALAR_FIELD(stmt_len);
|
1223
|
-
|
1224
|
-
return true;
|
1225
|
-
}
|
1226
|
-
|
1227
|
-
static bool
|
1228
|
-
_equalRawStmt(const RawStmt *a, const RawStmt *b)
|
1229
|
-
{
|
1230
|
-
COMPARE_NODE_FIELD(stmt);
|
1231
|
-
COMPARE_LOCATION_FIELD(stmt_location);
|
1232
|
-
COMPARE_SCALAR_FIELD(stmt_len);
|
1233
|
-
|
1234
|
-
return true;
|
1235
|
-
}
|
1236
|
-
|
1237
|
-
static bool
|
1238
|
-
_equalInsertStmt(const InsertStmt *a, const InsertStmt *b)
|
1239
|
-
{
|
1240
|
-
COMPARE_NODE_FIELD(relation);
|
1241
|
-
COMPARE_NODE_FIELD(cols);
|
1242
|
-
COMPARE_NODE_FIELD(selectStmt);
|
1243
|
-
COMPARE_NODE_FIELD(onConflictClause);
|
1244
|
-
COMPARE_NODE_FIELD(returningList);
|
1245
|
-
COMPARE_NODE_FIELD(withClause);
|
1246
|
-
COMPARE_SCALAR_FIELD(override);
|
1247
|
-
|
1248
|
-
return true;
|
1249
|
-
}
|
1250
|
-
|
1251
|
-
static bool
|
1252
|
-
_equalDeleteStmt(const DeleteStmt *a, const DeleteStmt *b)
|
1253
|
-
{
|
1254
|
-
COMPARE_NODE_FIELD(relation);
|
1255
|
-
COMPARE_NODE_FIELD(usingClause);
|
1256
|
-
COMPARE_NODE_FIELD(whereClause);
|
1257
|
-
COMPARE_NODE_FIELD(returningList);
|
1258
|
-
COMPARE_NODE_FIELD(withClause);
|
1259
|
-
|
1260
|
-
return true;
|
1261
|
-
}
|
1262
|
-
|
1263
|
-
static bool
|
1264
|
-
_equalUpdateStmt(const UpdateStmt *a, const UpdateStmt *b)
|
1265
|
-
{
|
1266
|
-
COMPARE_NODE_FIELD(relation);
|
1267
|
-
COMPARE_NODE_FIELD(targetList);
|
1268
|
-
COMPARE_NODE_FIELD(whereClause);
|
1269
|
-
COMPARE_NODE_FIELD(fromClause);
|
1270
|
-
COMPARE_NODE_FIELD(returningList);
|
1271
|
-
COMPARE_NODE_FIELD(withClause);
|
1272
|
-
|
1273
|
-
return true;
|
1274
|
-
}
|
1275
|
-
|
1276
|
-
static bool
|
1277
|
-
_equalSelectStmt(const SelectStmt *a, const SelectStmt *b)
|
1278
|
-
{
|
1279
|
-
COMPARE_NODE_FIELD(distinctClause);
|
1280
|
-
COMPARE_NODE_FIELD(intoClause);
|
1281
|
-
COMPARE_NODE_FIELD(targetList);
|
1282
|
-
COMPARE_NODE_FIELD(fromClause);
|
1283
|
-
COMPARE_NODE_FIELD(whereClause);
|
1284
|
-
COMPARE_NODE_FIELD(groupClause);
|
1285
|
-
COMPARE_NODE_FIELD(havingClause);
|
1286
|
-
COMPARE_NODE_FIELD(windowClause);
|
1287
|
-
COMPARE_NODE_FIELD(valuesLists);
|
1288
|
-
COMPARE_NODE_FIELD(sortClause);
|
1289
|
-
COMPARE_NODE_FIELD(limitOffset);
|
1290
|
-
COMPARE_NODE_FIELD(limitCount);
|
1291
|
-
COMPARE_SCALAR_FIELD(limitOption);
|
1292
|
-
COMPARE_NODE_FIELD(lockingClause);
|
1293
|
-
COMPARE_NODE_FIELD(withClause);
|
1294
|
-
COMPARE_SCALAR_FIELD(op);
|
1295
|
-
COMPARE_SCALAR_FIELD(all);
|
1296
|
-
COMPARE_NODE_FIELD(larg);
|
1297
|
-
COMPARE_NODE_FIELD(rarg);
|
1298
|
-
|
1299
|
-
return true;
|
1300
|
-
}
|
1301
|
-
|
1302
|
-
static bool
|
1303
|
-
_equalSetOperationStmt(const SetOperationStmt *a, const SetOperationStmt *b)
|
1304
|
-
{
|
1305
|
-
COMPARE_SCALAR_FIELD(op);
|
1306
|
-
COMPARE_SCALAR_FIELD(all);
|
1307
|
-
COMPARE_NODE_FIELD(larg);
|
1308
|
-
COMPARE_NODE_FIELD(rarg);
|
1309
|
-
COMPARE_NODE_FIELD(colTypes);
|
1310
|
-
COMPARE_NODE_FIELD(colTypmods);
|
1311
|
-
COMPARE_NODE_FIELD(colCollations);
|
1312
|
-
COMPARE_NODE_FIELD(groupClauses);
|
1313
|
-
|
1314
|
-
return true;
|
1315
|
-
}
|
1316
|
-
|
1317
|
-
static bool
|
1318
|
-
_equalAlterTableStmt(const AlterTableStmt *a, const AlterTableStmt *b)
|
1319
|
-
{
|
1320
|
-
COMPARE_NODE_FIELD(relation);
|
1321
|
-
COMPARE_NODE_FIELD(cmds);
|
1322
|
-
COMPARE_SCALAR_FIELD(relkind);
|
1323
|
-
COMPARE_SCALAR_FIELD(missing_ok);
|
1324
|
-
|
1325
|
-
return true;
|
1326
|
-
}
|
1327
|
-
|
1328
|
-
static bool
|
1329
|
-
_equalAlterTableCmd(const AlterTableCmd *a, const AlterTableCmd *b)
|
1330
|
-
{
|
1331
|
-
COMPARE_SCALAR_FIELD(subtype);
|
1332
|
-
COMPARE_STRING_FIELD(name);
|
1333
|
-
COMPARE_SCALAR_FIELD(num);
|
1334
|
-
COMPARE_NODE_FIELD(newowner);
|
1335
|
-
COMPARE_NODE_FIELD(def);
|
1336
|
-
COMPARE_SCALAR_FIELD(behavior);
|
1337
|
-
COMPARE_SCALAR_FIELD(missing_ok);
|
1338
|
-
COMPARE_SCALAR_FIELD(recurse);
|
1339
|
-
|
1340
|
-
return true;
|
1341
|
-
}
|
1342
|
-
|
1343
|
-
static bool
|
1344
|
-
_equalAlterCollationStmt(const AlterCollationStmt *a, const AlterCollationStmt *b)
|
1345
|
-
{
|
1346
|
-
COMPARE_NODE_FIELD(collname);
|
1347
|
-
|
1348
|
-
return true;
|
1349
|
-
}
|
1350
|
-
|
1351
|
-
static bool
|
1352
|
-
_equalAlterDomainStmt(const AlterDomainStmt *a, const AlterDomainStmt *b)
|
1353
|
-
{
|
1354
|
-
COMPARE_SCALAR_FIELD(subtype);
|
1355
|
-
COMPARE_NODE_FIELD(typeName);
|
1356
|
-
COMPARE_STRING_FIELD(name);
|
1357
|
-
COMPARE_NODE_FIELD(def);
|
1358
|
-
COMPARE_SCALAR_FIELD(behavior);
|
1359
|
-
COMPARE_SCALAR_FIELD(missing_ok);
|
1360
|
-
|
1361
|
-
return true;
|
1362
|
-
}
|
1363
|
-
|
1364
|
-
static bool
|
1365
|
-
_equalGrantStmt(const GrantStmt *a, const GrantStmt *b)
|
1366
|
-
{
|
1367
|
-
COMPARE_SCALAR_FIELD(is_grant);
|
1368
|
-
COMPARE_SCALAR_FIELD(targtype);
|
1369
|
-
COMPARE_SCALAR_FIELD(objtype);
|
1370
|
-
COMPARE_NODE_FIELD(objects);
|
1371
|
-
COMPARE_NODE_FIELD(privileges);
|
1372
|
-
COMPARE_NODE_FIELD(grantees);
|
1373
|
-
COMPARE_SCALAR_FIELD(grant_option);
|
1374
|
-
COMPARE_SCALAR_FIELD(behavior);
|
1375
|
-
|
1376
|
-
return true;
|
1377
|
-
}
|
1378
|
-
|
1379
|
-
static bool
|
1380
|
-
_equalObjectWithArgs(const ObjectWithArgs *a, const ObjectWithArgs *b)
|
1381
|
-
{
|
1382
|
-
COMPARE_NODE_FIELD(objname);
|
1383
|
-
COMPARE_NODE_FIELD(objargs);
|
1384
|
-
COMPARE_SCALAR_FIELD(args_unspecified);
|
1385
|
-
|
1386
|
-
return true;
|
1387
|
-
}
|
1388
|
-
|
1389
|
-
static bool
|
1390
|
-
_equalAccessPriv(const AccessPriv *a, const AccessPriv *b)
|
1391
|
-
{
|
1392
|
-
COMPARE_STRING_FIELD(priv_name);
|
1393
|
-
COMPARE_NODE_FIELD(cols);
|
1394
|
-
|
1395
|
-
return true;
|
1396
|
-
}
|
1397
|
-
|
1398
|
-
static bool
|
1399
|
-
_equalGrantRoleStmt(const GrantRoleStmt *a, const GrantRoleStmt *b)
|
1400
|
-
{
|
1401
|
-
COMPARE_NODE_FIELD(granted_roles);
|
1402
|
-
COMPARE_NODE_FIELD(grantee_roles);
|
1403
|
-
COMPARE_SCALAR_FIELD(is_grant);
|
1404
|
-
COMPARE_SCALAR_FIELD(admin_opt);
|
1405
|
-
COMPARE_NODE_FIELD(grantor);
|
1406
|
-
COMPARE_SCALAR_FIELD(behavior);
|
1407
|
-
|
1408
|
-
return true;
|
1409
|
-
}
|
1410
|
-
|
1411
|
-
static bool
|
1412
|
-
_equalAlterDefaultPrivilegesStmt(const AlterDefaultPrivilegesStmt *a, const AlterDefaultPrivilegesStmt *b)
|
1413
|
-
{
|
1414
|
-
COMPARE_NODE_FIELD(options);
|
1415
|
-
COMPARE_NODE_FIELD(action);
|
1416
|
-
|
1417
|
-
return true;
|
1418
|
-
}
|
1419
|
-
|
1420
|
-
static bool
|
1421
|
-
_equalDeclareCursorStmt(const DeclareCursorStmt *a, const DeclareCursorStmt *b)
|
1422
|
-
{
|
1423
|
-
COMPARE_STRING_FIELD(portalname);
|
1424
|
-
COMPARE_SCALAR_FIELD(options);
|
1425
|
-
COMPARE_NODE_FIELD(query);
|
1426
|
-
|
1427
|
-
return true;
|
1428
|
-
}
|
1429
|
-
|
1430
|
-
static bool
|
1431
|
-
_equalClosePortalStmt(const ClosePortalStmt *a, const ClosePortalStmt *b)
|
1432
|
-
{
|
1433
|
-
COMPARE_STRING_FIELD(portalname);
|
1434
|
-
|
1435
|
-
return true;
|
1436
|
-
}
|
1437
|
-
|
1438
|
-
static bool
|
1439
|
-
_equalCallStmt(const CallStmt *a, const CallStmt *b)
|
1440
|
-
{
|
1441
|
-
COMPARE_NODE_FIELD(funccall);
|
1442
|
-
COMPARE_NODE_FIELD(funcexpr);
|
1443
|
-
|
1444
|
-
return true;
|
1445
|
-
}
|
1446
|
-
|
1447
|
-
static bool
|
1448
|
-
_equalClusterStmt(const ClusterStmt *a, const ClusterStmt *b)
|
1449
|
-
{
|
1450
|
-
COMPARE_NODE_FIELD(relation);
|
1451
|
-
COMPARE_STRING_FIELD(indexname);
|
1452
|
-
COMPARE_SCALAR_FIELD(options);
|
1453
|
-
|
1454
|
-
return true;
|
1455
|
-
}
|
1456
|
-
|
1457
|
-
static bool
|
1458
|
-
_equalCopyStmt(const CopyStmt *a, const CopyStmt *b)
|
1459
|
-
{
|
1460
|
-
COMPARE_NODE_FIELD(relation);
|
1461
|
-
COMPARE_NODE_FIELD(query);
|
1462
|
-
COMPARE_NODE_FIELD(attlist);
|
1463
|
-
COMPARE_SCALAR_FIELD(is_from);
|
1464
|
-
COMPARE_SCALAR_FIELD(is_program);
|
1465
|
-
COMPARE_STRING_FIELD(filename);
|
1466
|
-
COMPARE_NODE_FIELD(options);
|
1467
|
-
COMPARE_NODE_FIELD(whereClause);
|
1468
|
-
|
1469
|
-
return true;
|
1470
|
-
}
|
1471
|
-
|
1472
|
-
static bool
|
1473
|
-
_equalCreateStmt(const CreateStmt *a, const CreateStmt *b)
|
1474
|
-
{
|
1475
|
-
COMPARE_NODE_FIELD(relation);
|
1476
|
-
COMPARE_NODE_FIELD(tableElts);
|
1477
|
-
COMPARE_NODE_FIELD(inhRelations);
|
1478
|
-
COMPARE_NODE_FIELD(partbound);
|
1479
|
-
COMPARE_NODE_FIELD(partspec);
|
1480
|
-
COMPARE_NODE_FIELD(ofTypename);
|
1481
|
-
COMPARE_NODE_FIELD(constraints);
|
1482
|
-
COMPARE_NODE_FIELD(options);
|
1483
|
-
COMPARE_SCALAR_FIELD(oncommit);
|
1484
|
-
COMPARE_STRING_FIELD(tablespacename);
|
1485
|
-
COMPARE_STRING_FIELD(accessMethod);
|
1486
|
-
COMPARE_SCALAR_FIELD(if_not_exists);
|
1487
|
-
|
1488
|
-
return true;
|
1489
|
-
}
|
1490
|
-
|
1491
|
-
static bool
|
1492
|
-
_equalTableLikeClause(const TableLikeClause *a, const TableLikeClause *b)
|
1493
|
-
{
|
1494
|
-
COMPARE_NODE_FIELD(relation);
|
1495
|
-
COMPARE_SCALAR_FIELD(options);
|
1496
|
-
COMPARE_SCALAR_FIELD(relationOid);
|
1497
|
-
|
1498
|
-
return true;
|
1499
|
-
}
|
1500
|
-
|
1501
|
-
static bool
|
1502
|
-
_equalDefineStmt(const DefineStmt *a, const DefineStmt *b)
|
1503
|
-
{
|
1504
|
-
COMPARE_SCALAR_FIELD(kind);
|
1505
|
-
COMPARE_SCALAR_FIELD(oldstyle);
|
1506
|
-
COMPARE_NODE_FIELD(defnames);
|
1507
|
-
COMPARE_NODE_FIELD(args);
|
1508
|
-
COMPARE_NODE_FIELD(definition);
|
1509
|
-
COMPARE_SCALAR_FIELD(if_not_exists);
|
1510
|
-
COMPARE_SCALAR_FIELD(replace);
|
1511
|
-
|
1512
|
-
return true;
|
1513
|
-
}
|
1514
|
-
|
1515
|
-
static bool
|
1516
|
-
_equalDropStmt(const DropStmt *a, const DropStmt *b)
|
1517
|
-
{
|
1518
|
-
COMPARE_NODE_FIELD(objects);
|
1519
|
-
COMPARE_SCALAR_FIELD(removeType);
|
1520
|
-
COMPARE_SCALAR_FIELD(behavior);
|
1521
|
-
COMPARE_SCALAR_FIELD(missing_ok);
|
1522
|
-
COMPARE_SCALAR_FIELD(concurrent);
|
1523
|
-
|
1524
|
-
return true;
|
1525
|
-
}
|
1526
|
-
|
1527
|
-
static bool
|
1528
|
-
_equalTruncateStmt(const TruncateStmt *a, const TruncateStmt *b)
|
1529
|
-
{
|
1530
|
-
COMPARE_NODE_FIELD(relations);
|
1531
|
-
COMPARE_SCALAR_FIELD(restart_seqs);
|
1532
|
-
COMPARE_SCALAR_FIELD(behavior);
|
1533
|
-
|
1534
|
-
return true;
|
1535
|
-
}
|
1536
|
-
|
1537
|
-
static bool
|
1538
|
-
_equalCommentStmt(const CommentStmt *a, const CommentStmt *b)
|
1539
|
-
{
|
1540
|
-
COMPARE_SCALAR_FIELD(objtype);
|
1541
|
-
COMPARE_NODE_FIELD(object);
|
1542
|
-
COMPARE_STRING_FIELD(comment);
|
1543
|
-
|
1544
|
-
return true;
|
1545
|
-
}
|
1546
|
-
|
1547
|
-
static bool
|
1548
|
-
_equalSecLabelStmt(const SecLabelStmt *a, const SecLabelStmt *b)
|
1549
|
-
{
|
1550
|
-
COMPARE_SCALAR_FIELD(objtype);
|
1551
|
-
COMPARE_NODE_FIELD(object);
|
1552
|
-
COMPARE_STRING_FIELD(provider);
|
1553
|
-
COMPARE_STRING_FIELD(label);
|
1554
|
-
|
1555
|
-
return true;
|
1556
|
-
}
|
1557
|
-
|
1558
|
-
static bool
|
1559
|
-
_equalFetchStmt(const FetchStmt *a, const FetchStmt *b)
|
1560
|
-
{
|
1561
|
-
COMPARE_SCALAR_FIELD(direction);
|
1562
|
-
COMPARE_SCALAR_FIELD(howMany);
|
1563
|
-
COMPARE_STRING_FIELD(portalname);
|
1564
|
-
COMPARE_SCALAR_FIELD(ismove);
|
1565
|
-
|
1566
|
-
return true;
|
1567
|
-
}
|
1568
|
-
|
1569
|
-
static bool
|
1570
|
-
_equalIndexStmt(const IndexStmt *a, const IndexStmt *b)
|
1571
|
-
{
|
1572
|
-
COMPARE_STRING_FIELD(idxname);
|
1573
|
-
COMPARE_NODE_FIELD(relation);
|
1574
|
-
COMPARE_STRING_FIELD(accessMethod);
|
1575
|
-
COMPARE_STRING_FIELD(tableSpace);
|
1576
|
-
COMPARE_NODE_FIELD(indexParams);
|
1577
|
-
COMPARE_NODE_FIELD(indexIncludingParams);
|
1578
|
-
COMPARE_NODE_FIELD(options);
|
1579
|
-
COMPARE_NODE_FIELD(whereClause);
|
1580
|
-
COMPARE_NODE_FIELD(excludeOpNames);
|
1581
|
-
COMPARE_STRING_FIELD(idxcomment);
|
1582
|
-
COMPARE_SCALAR_FIELD(indexOid);
|
1583
|
-
COMPARE_SCALAR_FIELD(oldNode);
|
1584
|
-
COMPARE_SCALAR_FIELD(oldCreateSubid);
|
1585
|
-
COMPARE_SCALAR_FIELD(oldFirstRelfilenodeSubid);
|
1586
|
-
COMPARE_SCALAR_FIELD(unique);
|
1587
|
-
COMPARE_SCALAR_FIELD(primary);
|
1588
|
-
COMPARE_SCALAR_FIELD(isconstraint);
|
1589
|
-
COMPARE_SCALAR_FIELD(deferrable);
|
1590
|
-
COMPARE_SCALAR_FIELD(initdeferred);
|
1591
|
-
COMPARE_SCALAR_FIELD(transformed);
|
1592
|
-
COMPARE_SCALAR_FIELD(concurrent);
|
1593
|
-
COMPARE_SCALAR_FIELD(if_not_exists);
|
1594
|
-
COMPARE_SCALAR_FIELD(reset_default_tblspc);
|
1595
|
-
|
1596
|
-
return true;
|
1597
|
-
}
|
1598
|
-
|
1599
|
-
static bool
|
1600
|
-
_equalCreateStatsStmt(const CreateStatsStmt *a, const CreateStatsStmt *b)
|
1601
|
-
{
|
1602
|
-
COMPARE_NODE_FIELD(defnames);
|
1603
|
-
COMPARE_NODE_FIELD(stat_types);
|
1604
|
-
COMPARE_NODE_FIELD(exprs);
|
1605
|
-
COMPARE_NODE_FIELD(relations);
|
1606
|
-
COMPARE_STRING_FIELD(stxcomment);
|
1607
|
-
COMPARE_SCALAR_FIELD(if_not_exists);
|
1608
|
-
|
1609
|
-
return true;
|
1610
|
-
}
|
1611
|
-
|
1612
|
-
static bool
|
1613
|
-
_equalAlterStatsStmt(const AlterStatsStmt *a, const AlterStatsStmt *b)
|
1614
|
-
{
|
1615
|
-
COMPARE_NODE_FIELD(defnames);
|
1616
|
-
COMPARE_SCALAR_FIELD(stxstattarget);
|
1617
|
-
COMPARE_SCALAR_FIELD(missing_ok);
|
1618
|
-
|
1619
|
-
return true;
|
1620
|
-
}
|
1621
|
-
|
1622
|
-
static bool
|
1623
|
-
_equalCreateFunctionStmt(const CreateFunctionStmt *a, const CreateFunctionStmt *b)
|
1624
|
-
{
|
1625
|
-
COMPARE_SCALAR_FIELD(is_procedure);
|
1626
|
-
COMPARE_SCALAR_FIELD(replace);
|
1627
|
-
COMPARE_NODE_FIELD(funcname);
|
1628
|
-
COMPARE_NODE_FIELD(parameters);
|
1629
|
-
COMPARE_NODE_FIELD(returnType);
|
1630
|
-
COMPARE_NODE_FIELD(options);
|
1631
|
-
|
1632
|
-
return true;
|
1633
|
-
}
|
1634
|
-
|
1635
|
-
static bool
|
1636
|
-
_equalFunctionParameter(const FunctionParameter *a, const FunctionParameter *b)
|
1637
|
-
{
|
1638
|
-
COMPARE_STRING_FIELD(name);
|
1639
|
-
COMPARE_NODE_FIELD(argType);
|
1640
|
-
COMPARE_SCALAR_FIELD(mode);
|
1641
|
-
COMPARE_NODE_FIELD(defexpr);
|
1642
|
-
|
1643
|
-
return true;
|
1644
|
-
}
|
1645
|
-
|
1646
|
-
static bool
|
1647
|
-
_equalAlterFunctionStmt(const AlterFunctionStmt *a, const AlterFunctionStmt *b)
|
1648
|
-
{
|
1649
|
-
COMPARE_SCALAR_FIELD(objtype);
|
1650
|
-
COMPARE_NODE_FIELD(func);
|
1651
|
-
COMPARE_NODE_FIELD(actions);
|
1652
|
-
|
1653
|
-
return true;
|
1654
|
-
}
|
1655
|
-
|
1656
|
-
static bool
|
1657
|
-
_equalDoStmt(const DoStmt *a, const DoStmt *b)
|
1658
|
-
{
|
1659
|
-
COMPARE_NODE_FIELD(args);
|
1660
|
-
|
1661
|
-
return true;
|
1662
|
-
}
|
1663
|
-
|
1664
|
-
static bool
|
1665
|
-
_equalRenameStmt(const RenameStmt *a, const RenameStmt *b)
|
1666
|
-
{
|
1667
|
-
COMPARE_SCALAR_FIELD(renameType);
|
1668
|
-
COMPARE_SCALAR_FIELD(relationType);
|
1669
|
-
COMPARE_NODE_FIELD(relation);
|
1670
|
-
COMPARE_NODE_FIELD(object);
|
1671
|
-
COMPARE_STRING_FIELD(subname);
|
1672
|
-
COMPARE_STRING_FIELD(newname);
|
1673
|
-
COMPARE_SCALAR_FIELD(behavior);
|
1674
|
-
COMPARE_SCALAR_FIELD(missing_ok);
|
1675
|
-
|
1676
|
-
return true;
|
1677
|
-
}
|
1678
|
-
|
1679
|
-
static bool
|
1680
|
-
_equalAlterObjectDependsStmt(const AlterObjectDependsStmt *a, const AlterObjectDependsStmt *b)
|
1681
|
-
{
|
1682
|
-
COMPARE_SCALAR_FIELD(objectType);
|
1683
|
-
COMPARE_NODE_FIELD(relation);
|
1684
|
-
COMPARE_NODE_FIELD(object);
|
1685
|
-
COMPARE_NODE_FIELD(extname);
|
1686
|
-
COMPARE_SCALAR_FIELD(remove);
|
1687
|
-
|
1688
|
-
return true;
|
1689
|
-
}
|
1690
|
-
|
1691
|
-
static bool
|
1692
|
-
_equalAlterObjectSchemaStmt(const AlterObjectSchemaStmt *a, const AlterObjectSchemaStmt *b)
|
1693
|
-
{
|
1694
|
-
COMPARE_SCALAR_FIELD(objectType);
|
1695
|
-
COMPARE_NODE_FIELD(relation);
|
1696
|
-
COMPARE_NODE_FIELD(object);
|
1697
|
-
COMPARE_STRING_FIELD(newschema);
|
1698
|
-
COMPARE_SCALAR_FIELD(missing_ok);
|
1699
|
-
|
1700
|
-
return true;
|
1701
|
-
}
|
1702
|
-
|
1703
|
-
static bool
|
1704
|
-
_equalAlterOwnerStmt(const AlterOwnerStmt *a, const AlterOwnerStmt *b)
|
1705
|
-
{
|
1706
|
-
COMPARE_SCALAR_FIELD(objectType);
|
1707
|
-
COMPARE_NODE_FIELD(relation);
|
1708
|
-
COMPARE_NODE_FIELD(object);
|
1709
|
-
COMPARE_NODE_FIELD(newowner);
|
1710
|
-
|
1711
|
-
return true;
|
1712
|
-
}
|
1713
|
-
|
1714
|
-
static bool
|
1715
|
-
_equalAlterOperatorStmt(const AlterOperatorStmt *a, const AlterOperatorStmt *b)
|
1716
|
-
{
|
1717
|
-
COMPARE_NODE_FIELD(opername);
|
1718
|
-
COMPARE_NODE_FIELD(options);
|
1719
|
-
|
1720
|
-
return true;
|
1721
|
-
}
|
1722
|
-
|
1723
|
-
static bool
|
1724
|
-
_equalAlterTypeStmt(const AlterTypeStmt *a, const AlterTypeStmt *b)
|
1725
|
-
{
|
1726
|
-
COMPARE_NODE_FIELD(typeName);
|
1727
|
-
COMPARE_NODE_FIELD(options);
|
1728
|
-
|
1729
|
-
return true;
|
1730
|
-
}
|
1731
|
-
|
1732
|
-
static bool
|
1733
|
-
_equalRuleStmt(const RuleStmt *a, const RuleStmt *b)
|
1734
|
-
{
|
1735
|
-
COMPARE_NODE_FIELD(relation);
|
1736
|
-
COMPARE_STRING_FIELD(rulename);
|
1737
|
-
COMPARE_NODE_FIELD(whereClause);
|
1738
|
-
COMPARE_SCALAR_FIELD(event);
|
1739
|
-
COMPARE_SCALAR_FIELD(instead);
|
1740
|
-
COMPARE_NODE_FIELD(actions);
|
1741
|
-
COMPARE_SCALAR_FIELD(replace);
|
1742
|
-
|
1743
|
-
return true;
|
1744
|
-
}
|
1745
|
-
|
1746
|
-
static bool
|
1747
|
-
_equalNotifyStmt(const NotifyStmt *a, const NotifyStmt *b)
|
1748
|
-
{
|
1749
|
-
COMPARE_STRING_FIELD(conditionname);
|
1750
|
-
COMPARE_STRING_FIELD(payload);
|
1751
|
-
|
1752
|
-
return true;
|
1753
|
-
}
|
1754
|
-
|
1755
|
-
static bool
|
1756
|
-
_equalListenStmt(const ListenStmt *a, const ListenStmt *b)
|
1757
|
-
{
|
1758
|
-
COMPARE_STRING_FIELD(conditionname);
|
1759
|
-
|
1760
|
-
return true;
|
1761
|
-
}
|
1762
|
-
|
1763
|
-
static bool
|
1764
|
-
_equalUnlistenStmt(const UnlistenStmt *a, const UnlistenStmt *b)
|
1765
|
-
{
|
1766
|
-
COMPARE_STRING_FIELD(conditionname);
|
1767
|
-
|
1768
|
-
return true;
|
1769
|
-
}
|
1770
|
-
|
1771
|
-
static bool
|
1772
|
-
_equalTransactionStmt(const TransactionStmt *a, const TransactionStmt *b)
|
1773
|
-
{
|
1774
|
-
COMPARE_SCALAR_FIELD(kind);
|
1775
|
-
COMPARE_NODE_FIELD(options);
|
1776
|
-
COMPARE_STRING_FIELD(savepoint_name);
|
1777
|
-
COMPARE_STRING_FIELD(gid);
|
1778
|
-
COMPARE_SCALAR_FIELD(chain);
|
1779
|
-
|
1780
|
-
return true;
|
1781
|
-
}
|
1782
|
-
|
1783
|
-
static bool
|
1784
|
-
_equalCompositeTypeStmt(const CompositeTypeStmt *a, const CompositeTypeStmt *b)
|
1785
|
-
{
|
1786
|
-
COMPARE_NODE_FIELD(typevar);
|
1787
|
-
COMPARE_NODE_FIELD(coldeflist);
|
1788
|
-
|
1789
|
-
return true;
|
1790
|
-
}
|
1791
|
-
|
1792
|
-
static bool
|
1793
|
-
_equalCreateEnumStmt(const CreateEnumStmt *a, const CreateEnumStmt *b)
|
1794
|
-
{
|
1795
|
-
COMPARE_NODE_FIELD(typeName);
|
1796
|
-
COMPARE_NODE_FIELD(vals);
|
1797
|
-
|
1798
|
-
return true;
|
1799
|
-
}
|
1800
|
-
|
1801
|
-
static bool
|
1802
|
-
_equalCreateRangeStmt(const CreateRangeStmt *a, const CreateRangeStmt *b)
|
1803
|
-
{
|
1804
|
-
COMPARE_NODE_FIELD(typeName);
|
1805
|
-
COMPARE_NODE_FIELD(params);
|
1806
|
-
|
1807
|
-
return true;
|
1808
|
-
}
|
1809
|
-
|
1810
|
-
static bool
|
1811
|
-
_equalAlterEnumStmt(const AlterEnumStmt *a, const AlterEnumStmt *b)
|
1812
|
-
{
|
1813
|
-
COMPARE_NODE_FIELD(typeName);
|
1814
|
-
COMPARE_STRING_FIELD(oldVal);
|
1815
|
-
COMPARE_STRING_FIELD(newVal);
|
1816
|
-
COMPARE_STRING_FIELD(newValNeighbor);
|
1817
|
-
COMPARE_SCALAR_FIELD(newValIsAfter);
|
1818
|
-
COMPARE_SCALAR_FIELD(skipIfNewValExists);
|
1819
|
-
|
1820
|
-
return true;
|
1821
|
-
}
|
1822
|
-
|
1823
|
-
static bool
|
1824
|
-
_equalViewStmt(const ViewStmt *a, const ViewStmt *b)
|
1825
|
-
{
|
1826
|
-
COMPARE_NODE_FIELD(view);
|
1827
|
-
COMPARE_NODE_FIELD(aliases);
|
1828
|
-
COMPARE_NODE_FIELD(query);
|
1829
|
-
COMPARE_SCALAR_FIELD(replace);
|
1830
|
-
COMPARE_NODE_FIELD(options);
|
1831
|
-
COMPARE_SCALAR_FIELD(withCheckOption);
|
1832
|
-
|
1833
|
-
return true;
|
1834
|
-
}
|
1835
|
-
|
1836
|
-
static bool
|
1837
|
-
_equalLoadStmt(const LoadStmt *a, const LoadStmt *b)
|
1838
|
-
{
|
1839
|
-
COMPARE_STRING_FIELD(filename);
|
1840
|
-
|
1841
|
-
return true;
|
1842
|
-
}
|
1843
|
-
|
1844
|
-
static bool
|
1845
|
-
_equalCreateDomainStmt(const CreateDomainStmt *a, const CreateDomainStmt *b)
|
1846
|
-
{
|
1847
|
-
COMPARE_NODE_FIELD(domainname);
|
1848
|
-
COMPARE_NODE_FIELD(typeName);
|
1849
|
-
COMPARE_NODE_FIELD(collClause);
|
1850
|
-
COMPARE_NODE_FIELD(constraints);
|
1851
|
-
|
1852
|
-
return true;
|
1853
|
-
}
|
1854
|
-
|
1855
|
-
static bool
|
1856
|
-
_equalCreateOpClassStmt(const CreateOpClassStmt *a, const CreateOpClassStmt *b)
|
1857
|
-
{
|
1858
|
-
COMPARE_NODE_FIELD(opclassname);
|
1859
|
-
COMPARE_NODE_FIELD(opfamilyname);
|
1860
|
-
COMPARE_STRING_FIELD(amname);
|
1861
|
-
COMPARE_NODE_FIELD(datatype);
|
1862
|
-
COMPARE_NODE_FIELD(items);
|
1863
|
-
COMPARE_SCALAR_FIELD(isDefault);
|
1864
|
-
|
1865
|
-
return true;
|
1866
|
-
}
|
1867
|
-
|
1868
|
-
static bool
|
1869
|
-
_equalCreateOpClassItem(const CreateOpClassItem *a, const CreateOpClassItem *b)
|
1870
|
-
{
|
1871
|
-
COMPARE_SCALAR_FIELD(itemtype);
|
1872
|
-
COMPARE_NODE_FIELD(name);
|
1873
|
-
COMPARE_SCALAR_FIELD(number);
|
1874
|
-
COMPARE_NODE_FIELD(order_family);
|
1875
|
-
COMPARE_NODE_FIELD(class_args);
|
1876
|
-
COMPARE_NODE_FIELD(storedtype);
|
1877
|
-
|
1878
|
-
return true;
|
1879
|
-
}
|
1880
|
-
|
1881
|
-
static bool
|
1882
|
-
_equalCreateOpFamilyStmt(const CreateOpFamilyStmt *a, const CreateOpFamilyStmt *b)
|
1883
|
-
{
|
1884
|
-
COMPARE_NODE_FIELD(opfamilyname);
|
1885
|
-
COMPARE_STRING_FIELD(amname);
|
1886
|
-
|
1887
|
-
return true;
|
1888
|
-
}
|
1889
|
-
|
1890
|
-
static bool
|
1891
|
-
_equalAlterOpFamilyStmt(const AlterOpFamilyStmt *a, const AlterOpFamilyStmt *b)
|
1892
|
-
{
|
1893
|
-
COMPARE_NODE_FIELD(opfamilyname);
|
1894
|
-
COMPARE_STRING_FIELD(amname);
|
1895
|
-
COMPARE_SCALAR_FIELD(isDrop);
|
1896
|
-
COMPARE_NODE_FIELD(items);
|
1897
|
-
|
1898
|
-
return true;
|
1899
|
-
}
|
1900
|
-
|
1901
|
-
static bool
|
1902
|
-
_equalCreatedbStmt(const CreatedbStmt *a, const CreatedbStmt *b)
|
1903
|
-
{
|
1904
|
-
COMPARE_STRING_FIELD(dbname);
|
1905
|
-
COMPARE_NODE_FIELD(options);
|
1906
|
-
|
1907
|
-
return true;
|
1908
|
-
}
|
1909
|
-
|
1910
|
-
static bool
|
1911
|
-
_equalAlterDatabaseStmt(const AlterDatabaseStmt *a, const AlterDatabaseStmt *b)
|
1912
|
-
{
|
1913
|
-
COMPARE_STRING_FIELD(dbname);
|
1914
|
-
COMPARE_NODE_FIELD(options);
|
1915
|
-
|
1916
|
-
return true;
|
1917
|
-
}
|
1918
|
-
|
1919
|
-
static bool
|
1920
|
-
_equalAlterDatabaseSetStmt(const AlterDatabaseSetStmt *a, const AlterDatabaseSetStmt *b)
|
1921
|
-
{
|
1922
|
-
COMPARE_STRING_FIELD(dbname);
|
1923
|
-
COMPARE_NODE_FIELD(setstmt);
|
1924
|
-
|
1925
|
-
return true;
|
1926
|
-
}
|
1927
|
-
|
1928
|
-
static bool
|
1929
|
-
_equalDropdbStmt(const DropdbStmt *a, const DropdbStmt *b)
|
1930
|
-
{
|
1931
|
-
COMPARE_STRING_FIELD(dbname);
|
1932
|
-
COMPARE_SCALAR_FIELD(missing_ok);
|
1933
|
-
COMPARE_NODE_FIELD(options);
|
1934
|
-
|
1935
|
-
return true;
|
1936
|
-
}
|
1937
|
-
|
1938
|
-
static bool
|
1939
|
-
_equalVacuumStmt(const VacuumStmt *a, const VacuumStmt *b)
|
1940
|
-
{
|
1941
|
-
COMPARE_NODE_FIELD(options);
|
1942
|
-
COMPARE_NODE_FIELD(rels);
|
1943
|
-
COMPARE_SCALAR_FIELD(is_vacuumcmd);
|
1944
|
-
|
1945
|
-
return true;
|
1946
|
-
}
|
1947
|
-
|
1948
|
-
static bool
|
1949
|
-
_equalVacuumRelation(const VacuumRelation *a, const VacuumRelation *b)
|
1950
|
-
{
|
1951
|
-
COMPARE_NODE_FIELD(relation);
|
1952
|
-
COMPARE_SCALAR_FIELD(oid);
|
1953
|
-
COMPARE_NODE_FIELD(va_cols);
|
1954
|
-
|
1955
|
-
return true;
|
1956
|
-
}
|
1957
|
-
|
1958
|
-
static bool
|
1959
|
-
_equalExplainStmt(const ExplainStmt *a, const ExplainStmt *b)
|
1960
|
-
{
|
1961
|
-
COMPARE_NODE_FIELD(query);
|
1962
|
-
COMPARE_NODE_FIELD(options);
|
1963
|
-
|
1964
|
-
return true;
|
1965
|
-
}
|
1966
|
-
|
1967
|
-
static bool
|
1968
|
-
_equalCreateTableAsStmt(const CreateTableAsStmt *a, const CreateTableAsStmt *b)
|
1969
|
-
{
|
1970
|
-
COMPARE_NODE_FIELD(query);
|
1971
|
-
COMPARE_NODE_FIELD(into);
|
1972
|
-
COMPARE_SCALAR_FIELD(relkind);
|
1973
|
-
COMPARE_SCALAR_FIELD(is_select_into);
|
1974
|
-
COMPARE_SCALAR_FIELD(if_not_exists);
|
1975
|
-
|
1976
|
-
return true;
|
1977
|
-
}
|
1978
|
-
|
1979
|
-
static bool
|
1980
|
-
_equalRefreshMatViewStmt(const RefreshMatViewStmt *a, const RefreshMatViewStmt *b)
|
1981
|
-
{
|
1982
|
-
COMPARE_SCALAR_FIELD(concurrent);
|
1983
|
-
COMPARE_SCALAR_FIELD(skipData);
|
1984
|
-
COMPARE_NODE_FIELD(relation);
|
1985
|
-
|
1986
|
-
return true;
|
1987
|
-
}
|
1988
|
-
|
1989
|
-
static bool
|
1990
|
-
_equalReplicaIdentityStmt(const ReplicaIdentityStmt *a, const ReplicaIdentityStmt *b)
|
1991
|
-
{
|
1992
|
-
COMPARE_SCALAR_FIELD(identity_type);
|
1993
|
-
COMPARE_STRING_FIELD(name);
|
1994
|
-
|
1995
|
-
return true;
|
1996
|
-
}
|
1997
|
-
|
1998
|
-
static bool
|
1999
|
-
_equalAlterSystemStmt(const AlterSystemStmt *a, const AlterSystemStmt *b)
|
2000
|
-
{
|
2001
|
-
COMPARE_NODE_FIELD(setstmt);
|
2002
|
-
|
2003
|
-
return true;
|
2004
|
-
}
|
2005
|
-
|
2006
|
-
|
2007
|
-
static bool
|
2008
|
-
_equalCreateSeqStmt(const CreateSeqStmt *a, const CreateSeqStmt *b)
|
2009
|
-
{
|
2010
|
-
COMPARE_NODE_FIELD(sequence);
|
2011
|
-
COMPARE_NODE_FIELD(options);
|
2012
|
-
COMPARE_SCALAR_FIELD(ownerId);
|
2013
|
-
COMPARE_SCALAR_FIELD(for_identity);
|
2014
|
-
COMPARE_SCALAR_FIELD(if_not_exists);
|
2015
|
-
|
2016
|
-
return true;
|
2017
|
-
}
|
2018
|
-
|
2019
|
-
static bool
|
2020
|
-
_equalAlterSeqStmt(const AlterSeqStmt *a, const AlterSeqStmt *b)
|
2021
|
-
{
|
2022
|
-
COMPARE_NODE_FIELD(sequence);
|
2023
|
-
COMPARE_NODE_FIELD(options);
|
2024
|
-
COMPARE_SCALAR_FIELD(for_identity);
|
2025
|
-
COMPARE_SCALAR_FIELD(missing_ok);
|
2026
|
-
|
2027
|
-
return true;
|
2028
|
-
}
|
2029
|
-
|
2030
|
-
static bool
|
2031
|
-
_equalVariableSetStmt(const VariableSetStmt *a, const VariableSetStmt *b)
|
2032
|
-
{
|
2033
|
-
COMPARE_SCALAR_FIELD(kind);
|
2034
|
-
COMPARE_STRING_FIELD(name);
|
2035
|
-
COMPARE_NODE_FIELD(args);
|
2036
|
-
COMPARE_SCALAR_FIELD(is_local);
|
2037
|
-
|
2038
|
-
return true;
|
2039
|
-
}
|
2040
|
-
|
2041
|
-
static bool
|
2042
|
-
_equalVariableShowStmt(const VariableShowStmt *a, const VariableShowStmt *b)
|
2043
|
-
{
|
2044
|
-
COMPARE_STRING_FIELD(name);
|
2045
|
-
|
2046
|
-
return true;
|
2047
|
-
}
|
2048
|
-
|
2049
|
-
static bool
|
2050
|
-
_equalDiscardStmt(const DiscardStmt *a, const DiscardStmt *b)
|
2051
|
-
{
|
2052
|
-
COMPARE_SCALAR_FIELD(target);
|
2053
|
-
|
2054
|
-
return true;
|
2055
|
-
}
|
2056
|
-
|
2057
|
-
static bool
|
2058
|
-
_equalCreateTableSpaceStmt(const CreateTableSpaceStmt *a, const CreateTableSpaceStmt *b)
|
2059
|
-
{
|
2060
|
-
COMPARE_STRING_FIELD(tablespacename);
|
2061
|
-
COMPARE_NODE_FIELD(owner);
|
2062
|
-
COMPARE_STRING_FIELD(location);
|
2063
|
-
COMPARE_NODE_FIELD(options);
|
2064
|
-
|
2065
|
-
return true;
|
2066
|
-
}
|
2067
|
-
|
2068
|
-
static bool
|
2069
|
-
_equalDropTableSpaceStmt(const DropTableSpaceStmt *a, const DropTableSpaceStmt *b)
|
2070
|
-
{
|
2071
|
-
COMPARE_STRING_FIELD(tablespacename);
|
2072
|
-
COMPARE_SCALAR_FIELD(missing_ok);
|
2073
|
-
|
2074
|
-
return true;
|
2075
|
-
}
|
2076
|
-
|
2077
|
-
static bool
|
2078
|
-
_equalAlterTableSpaceOptionsStmt(const AlterTableSpaceOptionsStmt *a,
|
2079
|
-
const AlterTableSpaceOptionsStmt *b)
|
2080
|
-
{
|
2081
|
-
COMPARE_STRING_FIELD(tablespacename);
|
2082
|
-
COMPARE_NODE_FIELD(options);
|
2083
|
-
COMPARE_SCALAR_FIELD(isReset);
|
2084
|
-
|
2085
|
-
return true;
|
2086
|
-
}
|
2087
|
-
|
2088
|
-
static bool
|
2089
|
-
_equalAlterTableMoveAllStmt(const AlterTableMoveAllStmt *a,
|
2090
|
-
const AlterTableMoveAllStmt *b)
|
2091
|
-
{
|
2092
|
-
COMPARE_STRING_FIELD(orig_tablespacename);
|
2093
|
-
COMPARE_SCALAR_FIELD(objtype);
|
2094
|
-
COMPARE_NODE_FIELD(roles);
|
2095
|
-
COMPARE_STRING_FIELD(new_tablespacename);
|
2096
|
-
COMPARE_SCALAR_FIELD(nowait);
|
2097
|
-
|
2098
|
-
return true;
|
2099
|
-
}
|
2100
|
-
|
2101
|
-
static bool
|
2102
|
-
_equalCreateExtensionStmt(const CreateExtensionStmt *a, const CreateExtensionStmt *b)
|
2103
|
-
{
|
2104
|
-
COMPARE_STRING_FIELD(extname);
|
2105
|
-
COMPARE_SCALAR_FIELD(if_not_exists);
|
2106
|
-
COMPARE_NODE_FIELD(options);
|
2107
|
-
|
2108
|
-
return true;
|
2109
|
-
}
|
2110
|
-
|
2111
|
-
static bool
|
2112
|
-
_equalAlterExtensionStmt(const AlterExtensionStmt *a, const AlterExtensionStmt *b)
|
2113
|
-
{
|
2114
|
-
COMPARE_STRING_FIELD(extname);
|
2115
|
-
COMPARE_NODE_FIELD(options);
|
2116
|
-
|
2117
|
-
return true;
|
2118
|
-
}
|
2119
|
-
|
2120
|
-
static bool
|
2121
|
-
_equalAlterExtensionContentsStmt(const AlterExtensionContentsStmt *a, const AlterExtensionContentsStmt *b)
|
2122
|
-
{
|
2123
|
-
COMPARE_STRING_FIELD(extname);
|
2124
|
-
COMPARE_SCALAR_FIELD(action);
|
2125
|
-
COMPARE_SCALAR_FIELD(objtype);
|
2126
|
-
COMPARE_NODE_FIELD(object);
|
2127
|
-
|
2128
|
-
return true;
|
2129
|
-
}
|
2130
|
-
|
2131
|
-
static bool
|
2132
|
-
_equalCreateFdwStmt(const CreateFdwStmt *a, const CreateFdwStmt *b)
|
2133
|
-
{
|
2134
|
-
COMPARE_STRING_FIELD(fdwname);
|
2135
|
-
COMPARE_NODE_FIELD(func_options);
|
2136
|
-
COMPARE_NODE_FIELD(options);
|
2137
|
-
|
2138
|
-
return true;
|
2139
|
-
}
|
2140
|
-
|
2141
|
-
static bool
|
2142
|
-
_equalAlterFdwStmt(const AlterFdwStmt *a, const AlterFdwStmt *b)
|
2143
|
-
{
|
2144
|
-
COMPARE_STRING_FIELD(fdwname);
|
2145
|
-
COMPARE_NODE_FIELD(func_options);
|
2146
|
-
COMPARE_NODE_FIELD(options);
|
2147
|
-
|
2148
|
-
return true;
|
2149
|
-
}
|
2150
|
-
|
2151
|
-
static bool
|
2152
|
-
_equalCreateForeignServerStmt(const CreateForeignServerStmt *a, const CreateForeignServerStmt *b)
|
2153
|
-
{
|
2154
|
-
COMPARE_STRING_FIELD(servername);
|
2155
|
-
COMPARE_STRING_FIELD(servertype);
|
2156
|
-
COMPARE_STRING_FIELD(version);
|
2157
|
-
COMPARE_STRING_FIELD(fdwname);
|
2158
|
-
COMPARE_SCALAR_FIELD(if_not_exists);
|
2159
|
-
COMPARE_NODE_FIELD(options);
|
2160
|
-
|
2161
|
-
return true;
|
2162
|
-
}
|
2163
|
-
|
2164
|
-
static bool
|
2165
|
-
_equalAlterForeignServerStmt(const AlterForeignServerStmt *a, const AlterForeignServerStmt *b)
|
2166
|
-
{
|
2167
|
-
COMPARE_STRING_FIELD(servername);
|
2168
|
-
COMPARE_STRING_FIELD(version);
|
2169
|
-
COMPARE_NODE_FIELD(options);
|
2170
|
-
COMPARE_SCALAR_FIELD(has_version);
|
2171
|
-
|
2172
|
-
return true;
|
2173
|
-
}
|
2174
|
-
|
2175
|
-
static bool
|
2176
|
-
_equalCreateUserMappingStmt(const CreateUserMappingStmt *a, const CreateUserMappingStmt *b)
|
2177
|
-
{
|
2178
|
-
COMPARE_NODE_FIELD(user);
|
2179
|
-
COMPARE_STRING_FIELD(servername);
|
2180
|
-
COMPARE_SCALAR_FIELD(if_not_exists);
|
2181
|
-
COMPARE_NODE_FIELD(options);
|
2182
|
-
|
2183
|
-
return true;
|
2184
|
-
}
|
2185
|
-
|
2186
|
-
static bool
|
2187
|
-
_equalAlterUserMappingStmt(const AlterUserMappingStmt *a, const AlterUserMappingStmt *b)
|
2188
|
-
{
|
2189
|
-
COMPARE_NODE_FIELD(user);
|
2190
|
-
COMPARE_STRING_FIELD(servername);
|
2191
|
-
COMPARE_NODE_FIELD(options);
|
2192
|
-
|
2193
|
-
return true;
|
2194
|
-
}
|
2195
|
-
|
2196
|
-
static bool
|
2197
|
-
_equalDropUserMappingStmt(const DropUserMappingStmt *a, const DropUserMappingStmt *b)
|
2198
|
-
{
|
2199
|
-
COMPARE_NODE_FIELD(user);
|
2200
|
-
COMPARE_STRING_FIELD(servername);
|
2201
|
-
COMPARE_SCALAR_FIELD(missing_ok);
|
2202
|
-
|
2203
|
-
return true;
|
2204
|
-
}
|
2205
|
-
|
2206
|
-
static bool
|
2207
|
-
_equalCreateForeignTableStmt(const CreateForeignTableStmt *a, const CreateForeignTableStmt *b)
|
2208
|
-
{
|
2209
|
-
if (!_equalCreateStmt(&a->base, &b->base))
|
2210
|
-
return false;
|
2211
|
-
|
2212
|
-
COMPARE_STRING_FIELD(servername);
|
2213
|
-
COMPARE_NODE_FIELD(options);
|
2214
|
-
|
2215
|
-
return true;
|
2216
|
-
}
|
2217
|
-
|
2218
|
-
static bool
|
2219
|
-
_equalImportForeignSchemaStmt(const ImportForeignSchemaStmt *a, const ImportForeignSchemaStmt *b)
|
2220
|
-
{
|
2221
|
-
COMPARE_STRING_FIELD(server_name);
|
2222
|
-
COMPARE_STRING_FIELD(remote_schema);
|
2223
|
-
COMPARE_STRING_FIELD(local_schema);
|
2224
|
-
COMPARE_SCALAR_FIELD(list_type);
|
2225
|
-
COMPARE_NODE_FIELD(table_list);
|
2226
|
-
COMPARE_NODE_FIELD(options);
|
2227
|
-
|
2228
|
-
return true;
|
2229
|
-
}
|
2230
|
-
|
2231
|
-
static bool
|
2232
|
-
_equalCreateTransformStmt(const CreateTransformStmt *a, const CreateTransformStmt *b)
|
2233
|
-
{
|
2234
|
-
COMPARE_SCALAR_FIELD(replace);
|
2235
|
-
COMPARE_NODE_FIELD(type_name);
|
2236
|
-
COMPARE_STRING_FIELD(lang);
|
2237
|
-
COMPARE_NODE_FIELD(fromsql);
|
2238
|
-
COMPARE_NODE_FIELD(tosql);
|
2239
|
-
|
2240
|
-
return true;
|
2241
|
-
}
|
2242
|
-
|
2243
|
-
static bool
|
2244
|
-
_equalCreateAmStmt(const CreateAmStmt *a, const CreateAmStmt *b)
|
2245
|
-
{
|
2246
|
-
COMPARE_STRING_FIELD(amname);
|
2247
|
-
COMPARE_NODE_FIELD(handler_name);
|
2248
|
-
COMPARE_SCALAR_FIELD(amtype);
|
2249
|
-
|
2250
|
-
return true;
|
2251
|
-
}
|
2252
|
-
|
2253
|
-
static bool
|
2254
|
-
_equalCreateTrigStmt(const CreateTrigStmt *a, const CreateTrigStmt *b)
|
2255
|
-
{
|
2256
|
-
COMPARE_STRING_FIELD(trigname);
|
2257
|
-
COMPARE_NODE_FIELD(relation);
|
2258
|
-
COMPARE_NODE_FIELD(funcname);
|
2259
|
-
COMPARE_NODE_FIELD(args);
|
2260
|
-
COMPARE_SCALAR_FIELD(row);
|
2261
|
-
COMPARE_SCALAR_FIELD(timing);
|
2262
|
-
COMPARE_SCALAR_FIELD(events);
|
2263
|
-
COMPARE_NODE_FIELD(columns);
|
2264
|
-
COMPARE_NODE_FIELD(whenClause);
|
2265
|
-
COMPARE_SCALAR_FIELD(isconstraint);
|
2266
|
-
COMPARE_NODE_FIELD(transitionRels);
|
2267
|
-
COMPARE_SCALAR_FIELD(deferrable);
|
2268
|
-
COMPARE_SCALAR_FIELD(initdeferred);
|
2269
|
-
COMPARE_NODE_FIELD(constrrel);
|
2270
|
-
|
2271
|
-
return true;
|
2272
|
-
}
|
2273
|
-
|
2274
|
-
static bool
|
2275
|
-
_equalCreateEventTrigStmt(const CreateEventTrigStmt *a, const CreateEventTrigStmt *b)
|
2276
|
-
{
|
2277
|
-
COMPARE_STRING_FIELD(trigname);
|
2278
|
-
COMPARE_STRING_FIELD(eventname);
|
2279
|
-
COMPARE_NODE_FIELD(whenclause);
|
2280
|
-
COMPARE_NODE_FIELD(funcname);
|
2281
|
-
|
2282
|
-
return true;
|
2283
|
-
}
|
2284
|
-
|
2285
|
-
static bool
|
2286
|
-
_equalAlterEventTrigStmt(const AlterEventTrigStmt *a, const AlterEventTrigStmt *b)
|
2287
|
-
{
|
2288
|
-
COMPARE_STRING_FIELD(trigname);
|
2289
|
-
COMPARE_SCALAR_FIELD(tgenabled);
|
2290
|
-
|
2291
|
-
return true;
|
2292
|
-
}
|
2293
|
-
|
2294
|
-
static bool
|
2295
|
-
_equalCreatePLangStmt(const CreatePLangStmt *a, const CreatePLangStmt *b)
|
2296
|
-
{
|
2297
|
-
COMPARE_SCALAR_FIELD(replace);
|
2298
|
-
COMPARE_STRING_FIELD(plname);
|
2299
|
-
COMPARE_NODE_FIELD(plhandler);
|
2300
|
-
COMPARE_NODE_FIELD(plinline);
|
2301
|
-
COMPARE_NODE_FIELD(plvalidator);
|
2302
|
-
COMPARE_SCALAR_FIELD(pltrusted);
|
2303
|
-
|
2304
|
-
return true;
|
2305
|
-
}
|
2306
|
-
|
2307
|
-
static bool
|
2308
|
-
_equalCreateRoleStmt(const CreateRoleStmt *a, const CreateRoleStmt *b)
|
2309
|
-
{
|
2310
|
-
COMPARE_SCALAR_FIELD(stmt_type);
|
2311
|
-
COMPARE_STRING_FIELD(role);
|
2312
|
-
COMPARE_NODE_FIELD(options);
|
2313
|
-
|
2314
|
-
return true;
|
2315
|
-
}
|
2316
|
-
|
2317
|
-
static bool
|
2318
|
-
_equalAlterRoleStmt(const AlterRoleStmt *a, const AlterRoleStmt *b)
|
2319
|
-
{
|
2320
|
-
COMPARE_NODE_FIELD(role);
|
2321
|
-
COMPARE_NODE_FIELD(options);
|
2322
|
-
COMPARE_SCALAR_FIELD(action);
|
2323
|
-
|
2324
|
-
return true;
|
2325
|
-
}
|
2326
|
-
|
2327
|
-
static bool
|
2328
|
-
_equalAlterRoleSetStmt(const AlterRoleSetStmt *a, const AlterRoleSetStmt *b)
|
2329
|
-
{
|
2330
|
-
COMPARE_NODE_FIELD(role);
|
2331
|
-
COMPARE_STRING_FIELD(database);
|
2332
|
-
COMPARE_NODE_FIELD(setstmt);
|
2333
|
-
|
2334
|
-
return true;
|
2335
|
-
}
|
2336
|
-
|
2337
|
-
static bool
|
2338
|
-
_equalDropRoleStmt(const DropRoleStmt *a, const DropRoleStmt *b)
|
2339
|
-
{
|
2340
|
-
COMPARE_NODE_FIELD(roles);
|
2341
|
-
COMPARE_SCALAR_FIELD(missing_ok);
|
2342
|
-
|
2343
|
-
return true;
|
2344
|
-
}
|
2345
|
-
|
2346
|
-
static bool
|
2347
|
-
_equalLockStmt(const LockStmt *a, const LockStmt *b)
|
2348
|
-
{
|
2349
|
-
COMPARE_NODE_FIELD(relations);
|
2350
|
-
COMPARE_SCALAR_FIELD(mode);
|
2351
|
-
COMPARE_SCALAR_FIELD(nowait);
|
2352
|
-
|
2353
|
-
return true;
|
2354
|
-
}
|
2355
|
-
|
2356
|
-
static bool
|
2357
|
-
_equalConstraintsSetStmt(const ConstraintsSetStmt *a, const ConstraintsSetStmt *b)
|
2358
|
-
{
|
2359
|
-
COMPARE_NODE_FIELD(constraints);
|
2360
|
-
COMPARE_SCALAR_FIELD(deferred);
|
2361
|
-
|
2362
|
-
return true;
|
2363
|
-
}
|
2364
|
-
|
2365
|
-
static bool
|
2366
|
-
_equalReindexStmt(const ReindexStmt *a, const ReindexStmt *b)
|
2367
|
-
{
|
2368
|
-
COMPARE_SCALAR_FIELD(kind);
|
2369
|
-
COMPARE_NODE_FIELD(relation);
|
2370
|
-
COMPARE_STRING_FIELD(name);
|
2371
|
-
COMPARE_SCALAR_FIELD(options);
|
2372
|
-
COMPARE_SCALAR_FIELD(concurrent);
|
2373
|
-
|
2374
|
-
return true;
|
2375
|
-
}
|
2376
|
-
|
2377
|
-
static bool
|
2378
|
-
_equalCreateSchemaStmt(const CreateSchemaStmt *a, const CreateSchemaStmt *b)
|
2379
|
-
{
|
2380
|
-
COMPARE_STRING_FIELD(schemaname);
|
2381
|
-
COMPARE_NODE_FIELD(authrole);
|
2382
|
-
COMPARE_NODE_FIELD(schemaElts);
|
2383
|
-
COMPARE_SCALAR_FIELD(if_not_exists);
|
2384
|
-
|
2385
|
-
return true;
|
2386
|
-
}
|
2387
|
-
|
2388
|
-
static bool
|
2389
|
-
_equalCreateConversionStmt(const CreateConversionStmt *a, const CreateConversionStmt *b)
|
2390
|
-
{
|
2391
|
-
COMPARE_NODE_FIELD(conversion_name);
|
2392
|
-
COMPARE_STRING_FIELD(for_encoding_name);
|
2393
|
-
COMPARE_STRING_FIELD(to_encoding_name);
|
2394
|
-
COMPARE_NODE_FIELD(func_name);
|
2395
|
-
COMPARE_SCALAR_FIELD(def);
|
2396
|
-
|
2397
|
-
return true;
|
2398
|
-
}
|
2399
|
-
|
2400
|
-
static bool
|
2401
|
-
_equalCreateCastStmt(const CreateCastStmt *a, const CreateCastStmt *b)
|
2402
|
-
{
|
2403
|
-
COMPARE_NODE_FIELD(sourcetype);
|
2404
|
-
COMPARE_NODE_FIELD(targettype);
|
2405
|
-
COMPARE_NODE_FIELD(func);
|
2406
|
-
COMPARE_SCALAR_FIELD(context);
|
2407
|
-
COMPARE_SCALAR_FIELD(inout);
|
2408
|
-
|
2409
|
-
return true;
|
2410
|
-
}
|
2411
|
-
|
2412
|
-
static bool
|
2413
|
-
_equalPrepareStmt(const PrepareStmt *a, const PrepareStmt *b)
|
2414
|
-
{
|
2415
|
-
COMPARE_STRING_FIELD(name);
|
2416
|
-
COMPARE_NODE_FIELD(argtypes);
|
2417
|
-
COMPARE_NODE_FIELD(query);
|
2418
|
-
|
2419
|
-
return true;
|
2420
|
-
}
|
2421
|
-
|
2422
|
-
static bool
|
2423
|
-
_equalExecuteStmt(const ExecuteStmt *a, const ExecuteStmt *b)
|
2424
|
-
{
|
2425
|
-
COMPARE_STRING_FIELD(name);
|
2426
|
-
COMPARE_NODE_FIELD(params);
|
2427
|
-
|
2428
|
-
return true;
|
2429
|
-
}
|
2430
|
-
|
2431
|
-
static bool
|
2432
|
-
_equalDeallocateStmt(const DeallocateStmt *a, const DeallocateStmt *b)
|
2433
|
-
{
|
2434
|
-
COMPARE_STRING_FIELD(name);
|
2435
|
-
|
2436
|
-
return true;
|
2437
|
-
}
|
2438
|
-
|
2439
|
-
static bool
|
2440
|
-
_equalDropOwnedStmt(const DropOwnedStmt *a, const DropOwnedStmt *b)
|
2441
|
-
{
|
2442
|
-
COMPARE_NODE_FIELD(roles);
|
2443
|
-
COMPARE_SCALAR_FIELD(behavior);
|
2444
|
-
|
2445
|
-
return true;
|
2446
|
-
}
|
2447
|
-
|
2448
|
-
static bool
|
2449
|
-
_equalReassignOwnedStmt(const ReassignOwnedStmt *a, const ReassignOwnedStmt *b)
|
2450
|
-
{
|
2451
|
-
COMPARE_NODE_FIELD(roles);
|
2452
|
-
COMPARE_NODE_FIELD(newrole);
|
2453
|
-
|
2454
|
-
return true;
|
2455
|
-
}
|
2456
|
-
|
2457
|
-
static bool
|
2458
|
-
_equalAlterTSDictionaryStmt(const AlterTSDictionaryStmt *a, const AlterTSDictionaryStmt *b)
|
2459
|
-
{
|
2460
|
-
COMPARE_NODE_FIELD(dictname);
|
2461
|
-
COMPARE_NODE_FIELD(options);
|
2462
|
-
|
2463
|
-
return true;
|
2464
|
-
}
|
2465
|
-
|
2466
|
-
static bool
|
2467
|
-
_equalAlterTSConfigurationStmt(const AlterTSConfigurationStmt *a,
|
2468
|
-
const AlterTSConfigurationStmt *b)
|
2469
|
-
{
|
2470
|
-
COMPARE_SCALAR_FIELD(kind);
|
2471
|
-
COMPARE_NODE_FIELD(cfgname);
|
2472
|
-
COMPARE_NODE_FIELD(tokentype);
|
2473
|
-
COMPARE_NODE_FIELD(dicts);
|
2474
|
-
COMPARE_SCALAR_FIELD(override);
|
2475
|
-
COMPARE_SCALAR_FIELD(replace);
|
2476
|
-
COMPARE_SCALAR_FIELD(missing_ok);
|
2477
|
-
|
2478
|
-
return true;
|
2479
|
-
}
|
2480
|
-
|
2481
|
-
static bool
|
2482
|
-
_equalCreatePublicationStmt(const CreatePublicationStmt *a,
|
2483
|
-
const CreatePublicationStmt *b)
|
2484
|
-
{
|
2485
|
-
COMPARE_STRING_FIELD(pubname);
|
2486
|
-
COMPARE_NODE_FIELD(options);
|
2487
|
-
COMPARE_NODE_FIELD(tables);
|
2488
|
-
COMPARE_SCALAR_FIELD(for_all_tables);
|
2489
|
-
|
2490
|
-
return true;
|
2491
|
-
}
|
2492
|
-
|
2493
|
-
static bool
|
2494
|
-
_equalAlterPublicationStmt(const AlterPublicationStmt *a,
|
2495
|
-
const AlterPublicationStmt *b)
|
2496
|
-
{
|
2497
|
-
COMPARE_STRING_FIELD(pubname);
|
2498
|
-
COMPARE_NODE_FIELD(options);
|
2499
|
-
COMPARE_NODE_FIELD(tables);
|
2500
|
-
COMPARE_SCALAR_FIELD(for_all_tables);
|
2501
|
-
COMPARE_SCALAR_FIELD(tableAction);
|
2502
|
-
|
2503
|
-
return true;
|
2504
|
-
}
|
2505
|
-
|
2506
|
-
static bool
|
2507
|
-
_equalCreateSubscriptionStmt(const CreateSubscriptionStmt *a,
|
2508
|
-
const CreateSubscriptionStmt *b)
|
2509
|
-
{
|
2510
|
-
COMPARE_STRING_FIELD(subname);
|
2511
|
-
COMPARE_STRING_FIELD(conninfo);
|
2512
|
-
COMPARE_NODE_FIELD(publication);
|
2513
|
-
COMPARE_NODE_FIELD(options);
|
2514
|
-
|
2515
|
-
return true;
|
2516
|
-
}
|
2517
|
-
|
2518
|
-
static bool
|
2519
|
-
_equalAlterSubscriptionStmt(const AlterSubscriptionStmt *a,
|
2520
|
-
const AlterSubscriptionStmt *b)
|
2521
|
-
{
|
2522
|
-
COMPARE_SCALAR_FIELD(kind);
|
2523
|
-
COMPARE_STRING_FIELD(subname);
|
2524
|
-
COMPARE_STRING_FIELD(conninfo);
|
2525
|
-
COMPARE_NODE_FIELD(publication);
|
2526
|
-
COMPARE_NODE_FIELD(options);
|
2527
|
-
|
2528
|
-
return true;
|
2529
|
-
}
|
2530
|
-
|
2531
|
-
static bool
|
2532
|
-
_equalDropSubscriptionStmt(const DropSubscriptionStmt *a,
|
2533
|
-
const DropSubscriptionStmt *b)
|
2534
|
-
{
|
2535
|
-
COMPARE_STRING_FIELD(subname);
|
2536
|
-
COMPARE_SCALAR_FIELD(missing_ok);
|
2537
|
-
COMPARE_SCALAR_FIELD(behavior);
|
2538
|
-
|
2539
|
-
return true;
|
2540
|
-
}
|
2541
|
-
|
2542
|
-
static bool
|
2543
|
-
_equalCreatePolicyStmt(const CreatePolicyStmt *a, const CreatePolicyStmt *b)
|
2544
|
-
{
|
2545
|
-
COMPARE_STRING_FIELD(policy_name);
|
2546
|
-
COMPARE_NODE_FIELD(table);
|
2547
|
-
COMPARE_STRING_FIELD(cmd_name);
|
2548
|
-
COMPARE_SCALAR_FIELD(permissive);
|
2549
|
-
COMPARE_NODE_FIELD(roles);
|
2550
|
-
COMPARE_NODE_FIELD(qual);
|
2551
|
-
COMPARE_NODE_FIELD(with_check);
|
2552
|
-
|
2553
|
-
return true;
|
2554
|
-
}
|
2555
|
-
|
2556
|
-
static bool
|
2557
|
-
_equalAlterPolicyStmt(const AlterPolicyStmt *a, const AlterPolicyStmt *b)
|
2558
|
-
{
|
2559
|
-
COMPARE_STRING_FIELD(policy_name);
|
2560
|
-
COMPARE_NODE_FIELD(table);
|
2561
|
-
COMPARE_NODE_FIELD(roles);
|
2562
|
-
COMPARE_NODE_FIELD(qual);
|
2563
|
-
COMPARE_NODE_FIELD(with_check);
|
2564
|
-
|
2565
|
-
return true;
|
2566
|
-
}
|
2567
|
-
|
2568
|
-
static bool
|
2569
|
-
_equalAExpr(const A_Expr *a, const A_Expr *b)
|
2570
|
-
{
|
2571
|
-
COMPARE_SCALAR_FIELD(kind);
|
2572
|
-
COMPARE_NODE_FIELD(name);
|
2573
|
-
COMPARE_NODE_FIELD(lexpr);
|
2574
|
-
COMPARE_NODE_FIELD(rexpr);
|
2575
|
-
COMPARE_LOCATION_FIELD(location);
|
2576
|
-
|
2577
|
-
return true;
|
2578
|
-
}
|
2579
|
-
|
2580
|
-
static bool
|
2581
|
-
_equalColumnRef(const ColumnRef *a, const ColumnRef *b)
|
2582
|
-
{
|
2583
|
-
COMPARE_NODE_FIELD(fields);
|
2584
|
-
COMPARE_LOCATION_FIELD(location);
|
2585
|
-
|
2586
|
-
return true;
|
2587
|
-
}
|
2588
|
-
|
2589
|
-
static bool
|
2590
|
-
_equalParamRef(const ParamRef *a, const ParamRef *b)
|
2591
|
-
{
|
2592
|
-
COMPARE_SCALAR_FIELD(number);
|
2593
|
-
COMPARE_LOCATION_FIELD(location);
|
2594
|
-
|
2595
|
-
return true;
|
2596
|
-
}
|
2597
|
-
|
2598
|
-
static bool
|
2599
|
-
_equalAConst(const A_Const *a, const A_Const *b)
|
2600
|
-
{
|
2601
|
-
if (!equal(&a->val, &b->val)) /* hack for in-line Value field */
|
2602
|
-
return false;
|
2603
|
-
COMPARE_LOCATION_FIELD(location);
|
2604
|
-
|
2605
|
-
return true;
|
2606
|
-
}
|
2607
|
-
|
2608
|
-
static bool
|
2609
|
-
_equalFuncCall(const FuncCall *a, const FuncCall *b)
|
2610
|
-
{
|
2611
|
-
COMPARE_NODE_FIELD(funcname);
|
2612
|
-
COMPARE_NODE_FIELD(args);
|
2613
|
-
COMPARE_NODE_FIELD(agg_order);
|
2614
|
-
COMPARE_NODE_FIELD(agg_filter);
|
2615
|
-
COMPARE_SCALAR_FIELD(agg_within_group);
|
2616
|
-
COMPARE_SCALAR_FIELD(agg_star);
|
2617
|
-
COMPARE_SCALAR_FIELD(agg_distinct);
|
2618
|
-
COMPARE_SCALAR_FIELD(func_variadic);
|
2619
|
-
COMPARE_NODE_FIELD(over);
|
2620
|
-
COMPARE_LOCATION_FIELD(location);
|
2621
|
-
|
2622
|
-
return true;
|
2623
|
-
}
|
2624
|
-
|
2625
|
-
static bool
|
2626
|
-
_equalAStar(const A_Star *a, const A_Star *b)
|
2627
|
-
{
|
2628
|
-
return true;
|
2629
|
-
}
|
2630
|
-
|
2631
|
-
static bool
|
2632
|
-
_equalAIndices(const A_Indices *a, const A_Indices *b)
|
2633
|
-
{
|
2634
|
-
COMPARE_SCALAR_FIELD(is_slice);
|
2635
|
-
COMPARE_NODE_FIELD(lidx);
|
2636
|
-
COMPARE_NODE_FIELD(uidx);
|
2637
|
-
|
2638
|
-
return true;
|
2639
|
-
}
|
2640
|
-
|
2641
|
-
static bool
|
2642
|
-
_equalA_Indirection(const A_Indirection *a, const A_Indirection *b)
|
2643
|
-
{
|
2644
|
-
COMPARE_NODE_FIELD(arg);
|
2645
|
-
COMPARE_NODE_FIELD(indirection);
|
2646
|
-
|
2647
|
-
return true;
|
2648
|
-
}
|
2649
|
-
|
2650
|
-
static bool
|
2651
|
-
_equalA_ArrayExpr(const A_ArrayExpr *a, const A_ArrayExpr *b)
|
2652
|
-
{
|
2653
|
-
COMPARE_NODE_FIELD(elements);
|
2654
|
-
COMPARE_LOCATION_FIELD(location);
|
2655
|
-
|
2656
|
-
return true;
|
2657
|
-
}
|
2658
|
-
|
2659
|
-
static bool
|
2660
|
-
_equalResTarget(const ResTarget *a, const ResTarget *b)
|
2661
|
-
{
|
2662
|
-
COMPARE_STRING_FIELD(name);
|
2663
|
-
COMPARE_NODE_FIELD(indirection);
|
2664
|
-
COMPARE_NODE_FIELD(val);
|
2665
|
-
COMPARE_LOCATION_FIELD(location);
|
2666
|
-
|
2667
|
-
return true;
|
2668
|
-
}
|
2669
|
-
|
2670
|
-
static bool
|
2671
|
-
_equalMultiAssignRef(const MultiAssignRef *a, const MultiAssignRef *b)
|
2672
|
-
{
|
2673
|
-
COMPARE_NODE_FIELD(source);
|
2674
|
-
COMPARE_SCALAR_FIELD(colno);
|
2675
|
-
COMPARE_SCALAR_FIELD(ncolumns);
|
2676
|
-
|
2677
|
-
return true;
|
2678
|
-
}
|
2679
|
-
|
2680
|
-
static bool
|
2681
|
-
_equalTypeName(const TypeName *a, const TypeName *b)
|
2682
|
-
{
|
2683
|
-
COMPARE_NODE_FIELD(names);
|
2684
|
-
COMPARE_SCALAR_FIELD(typeOid);
|
2685
|
-
COMPARE_SCALAR_FIELD(setof);
|
2686
|
-
COMPARE_SCALAR_FIELD(pct_type);
|
2687
|
-
COMPARE_NODE_FIELD(typmods);
|
2688
|
-
COMPARE_SCALAR_FIELD(typemod);
|
2689
|
-
COMPARE_NODE_FIELD(arrayBounds);
|
2690
|
-
COMPARE_LOCATION_FIELD(location);
|
2691
|
-
|
2692
|
-
return true;
|
2693
|
-
}
|
2694
|
-
|
2695
|
-
static bool
|
2696
|
-
_equalTypeCast(const TypeCast *a, const TypeCast *b)
|
2697
|
-
{
|
2698
|
-
COMPARE_NODE_FIELD(arg);
|
2699
|
-
COMPARE_NODE_FIELD(typeName);
|
2700
|
-
COMPARE_LOCATION_FIELD(location);
|
2701
|
-
|
2702
|
-
return true;
|
2703
|
-
}
|
2704
|
-
|
2705
|
-
static bool
|
2706
|
-
_equalCollateClause(const CollateClause *a, const CollateClause *b)
|
2707
|
-
{
|
2708
|
-
COMPARE_NODE_FIELD(arg);
|
2709
|
-
COMPARE_NODE_FIELD(collname);
|
2710
|
-
COMPARE_LOCATION_FIELD(location);
|
2711
|
-
|
2712
|
-
return true;
|
2713
|
-
}
|
2714
|
-
|
2715
|
-
static bool
|
2716
|
-
_equalSortBy(const SortBy *a, const SortBy *b)
|
2717
|
-
{
|
2718
|
-
COMPARE_NODE_FIELD(node);
|
2719
|
-
COMPARE_SCALAR_FIELD(sortby_dir);
|
2720
|
-
COMPARE_SCALAR_FIELD(sortby_nulls);
|
2721
|
-
COMPARE_NODE_FIELD(useOp);
|
2722
|
-
COMPARE_LOCATION_FIELD(location);
|
2723
|
-
|
2724
|
-
return true;
|
2725
|
-
}
|
2726
|
-
|
2727
|
-
static bool
|
2728
|
-
_equalWindowDef(const WindowDef *a, const WindowDef *b)
|
2729
|
-
{
|
2730
|
-
COMPARE_STRING_FIELD(name);
|
2731
|
-
COMPARE_STRING_FIELD(refname);
|
2732
|
-
COMPARE_NODE_FIELD(partitionClause);
|
2733
|
-
COMPARE_NODE_FIELD(orderClause);
|
2734
|
-
COMPARE_SCALAR_FIELD(frameOptions);
|
2735
|
-
COMPARE_NODE_FIELD(startOffset);
|
2736
|
-
COMPARE_NODE_FIELD(endOffset);
|
2737
|
-
COMPARE_LOCATION_FIELD(location);
|
2738
|
-
|
2739
|
-
return true;
|
2740
|
-
}
|
2741
|
-
|
2742
|
-
static bool
|
2743
|
-
_equalRangeSubselect(const RangeSubselect *a, const RangeSubselect *b)
|
2744
|
-
{
|
2745
|
-
COMPARE_SCALAR_FIELD(lateral);
|
2746
|
-
COMPARE_NODE_FIELD(subquery);
|
2747
|
-
COMPARE_NODE_FIELD(alias);
|
2748
|
-
|
2749
|
-
return true;
|
2750
|
-
}
|
2751
|
-
|
2752
|
-
static bool
|
2753
|
-
_equalRangeFunction(const RangeFunction *a, const RangeFunction *b)
|
2754
|
-
{
|
2755
|
-
COMPARE_SCALAR_FIELD(lateral);
|
2756
|
-
COMPARE_SCALAR_FIELD(ordinality);
|
2757
|
-
COMPARE_SCALAR_FIELD(is_rowsfrom);
|
2758
|
-
COMPARE_NODE_FIELD(functions);
|
2759
|
-
COMPARE_NODE_FIELD(alias);
|
2760
|
-
COMPARE_NODE_FIELD(coldeflist);
|
2761
|
-
|
2762
|
-
return true;
|
2763
|
-
}
|
2764
|
-
|
2765
|
-
static bool
|
2766
|
-
_equalRangeTableSample(const RangeTableSample *a, const RangeTableSample *b)
|
2767
|
-
{
|
2768
|
-
COMPARE_NODE_FIELD(relation);
|
2769
|
-
COMPARE_NODE_FIELD(method);
|
2770
|
-
COMPARE_NODE_FIELD(args);
|
2771
|
-
COMPARE_NODE_FIELD(repeatable);
|
2772
|
-
COMPARE_LOCATION_FIELD(location);
|
2773
|
-
|
2774
|
-
return true;
|
2775
|
-
}
|
2776
|
-
|
2777
|
-
static bool
|
2778
|
-
_equalRangeTableFunc(const RangeTableFunc *a, const RangeTableFunc *b)
|
2779
|
-
{
|
2780
|
-
COMPARE_SCALAR_FIELD(lateral);
|
2781
|
-
COMPARE_NODE_FIELD(docexpr);
|
2782
|
-
COMPARE_NODE_FIELD(rowexpr);
|
2783
|
-
COMPARE_NODE_FIELD(namespaces);
|
2784
|
-
COMPARE_NODE_FIELD(columns);
|
2785
|
-
COMPARE_NODE_FIELD(alias);
|
2786
|
-
COMPARE_LOCATION_FIELD(location);
|
2787
|
-
|
2788
|
-
return true;
|
2789
|
-
}
|
2790
|
-
|
2791
|
-
static bool
|
2792
|
-
_equalRangeTableFuncCol(const RangeTableFuncCol *a, const RangeTableFuncCol *b)
|
2793
|
-
{
|
2794
|
-
COMPARE_STRING_FIELD(colname);
|
2795
|
-
COMPARE_NODE_FIELD(typeName);
|
2796
|
-
COMPARE_SCALAR_FIELD(for_ordinality);
|
2797
|
-
COMPARE_SCALAR_FIELD(is_not_null);
|
2798
|
-
COMPARE_NODE_FIELD(colexpr);
|
2799
|
-
COMPARE_NODE_FIELD(coldefexpr);
|
2800
|
-
COMPARE_LOCATION_FIELD(location);
|
2801
|
-
|
2802
|
-
return true;
|
2803
|
-
}
|
2804
|
-
|
2805
|
-
|
2806
|
-
static bool
|
2807
|
-
_equalIndexElem(const IndexElem *a, const IndexElem *b)
|
2808
|
-
{
|
2809
|
-
COMPARE_STRING_FIELD(name);
|
2810
|
-
COMPARE_NODE_FIELD(expr);
|
2811
|
-
COMPARE_STRING_FIELD(indexcolname);
|
2812
|
-
COMPARE_NODE_FIELD(collation);
|
2813
|
-
COMPARE_NODE_FIELD(opclass);
|
2814
|
-
COMPARE_NODE_FIELD(opclassopts);
|
2815
|
-
COMPARE_SCALAR_FIELD(ordering);
|
2816
|
-
COMPARE_SCALAR_FIELD(nulls_ordering);
|
2817
|
-
|
2818
|
-
return true;
|
2819
|
-
}
|
2820
|
-
|
2821
|
-
static bool
|
2822
|
-
_equalColumnDef(const ColumnDef *a, const ColumnDef *b)
|
2823
|
-
{
|
2824
|
-
COMPARE_STRING_FIELD(colname);
|
2825
|
-
COMPARE_NODE_FIELD(typeName);
|
2826
|
-
COMPARE_SCALAR_FIELD(inhcount);
|
2827
|
-
COMPARE_SCALAR_FIELD(is_local);
|
2828
|
-
COMPARE_SCALAR_FIELD(is_not_null);
|
2829
|
-
COMPARE_SCALAR_FIELD(is_from_type);
|
2830
|
-
COMPARE_SCALAR_FIELD(storage);
|
2831
|
-
COMPARE_NODE_FIELD(raw_default);
|
2832
|
-
COMPARE_NODE_FIELD(cooked_default);
|
2833
|
-
COMPARE_SCALAR_FIELD(identity);
|
2834
|
-
COMPARE_NODE_FIELD(identitySequence);
|
2835
|
-
COMPARE_SCALAR_FIELD(generated);
|
2836
|
-
COMPARE_NODE_FIELD(collClause);
|
2837
|
-
COMPARE_SCALAR_FIELD(collOid);
|
2838
|
-
COMPARE_NODE_FIELD(constraints);
|
2839
|
-
COMPARE_NODE_FIELD(fdwoptions);
|
2840
|
-
COMPARE_LOCATION_FIELD(location);
|
2841
|
-
|
2842
|
-
return true;
|
2843
|
-
}
|
2844
|
-
|
2845
|
-
static bool
|
2846
|
-
_equalConstraint(const Constraint *a, const Constraint *b)
|
2847
|
-
{
|
2848
|
-
COMPARE_SCALAR_FIELD(contype);
|
2849
|
-
COMPARE_STRING_FIELD(conname);
|
2850
|
-
COMPARE_SCALAR_FIELD(deferrable);
|
2851
|
-
COMPARE_SCALAR_FIELD(initdeferred);
|
2852
|
-
COMPARE_LOCATION_FIELD(location);
|
2853
|
-
COMPARE_SCALAR_FIELD(is_no_inherit);
|
2854
|
-
COMPARE_NODE_FIELD(raw_expr);
|
2855
|
-
COMPARE_STRING_FIELD(cooked_expr);
|
2856
|
-
COMPARE_SCALAR_FIELD(generated_when);
|
2857
|
-
COMPARE_NODE_FIELD(keys);
|
2858
|
-
COMPARE_NODE_FIELD(including);
|
2859
|
-
COMPARE_NODE_FIELD(exclusions);
|
2860
|
-
COMPARE_NODE_FIELD(options);
|
2861
|
-
COMPARE_STRING_FIELD(indexname);
|
2862
|
-
COMPARE_STRING_FIELD(indexspace);
|
2863
|
-
COMPARE_SCALAR_FIELD(reset_default_tblspc);
|
2864
|
-
COMPARE_STRING_FIELD(access_method);
|
2865
|
-
COMPARE_NODE_FIELD(where_clause);
|
2866
|
-
COMPARE_NODE_FIELD(pktable);
|
2867
|
-
COMPARE_NODE_FIELD(fk_attrs);
|
2868
|
-
COMPARE_NODE_FIELD(pk_attrs);
|
2869
|
-
COMPARE_SCALAR_FIELD(fk_matchtype);
|
2870
|
-
COMPARE_SCALAR_FIELD(fk_upd_action);
|
2871
|
-
COMPARE_SCALAR_FIELD(fk_del_action);
|
2872
|
-
COMPARE_NODE_FIELD(old_conpfeqop);
|
2873
|
-
COMPARE_SCALAR_FIELD(old_pktable_oid);
|
2874
|
-
COMPARE_SCALAR_FIELD(skip_validation);
|
2875
|
-
COMPARE_SCALAR_FIELD(initially_valid);
|
2876
|
-
|
2877
|
-
return true;
|
2878
|
-
}
|
2879
|
-
|
2880
|
-
static bool
|
2881
|
-
_equalDefElem(const DefElem *a, const DefElem *b)
|
2882
|
-
{
|
2883
|
-
COMPARE_STRING_FIELD(defnamespace);
|
2884
|
-
COMPARE_STRING_FIELD(defname);
|
2885
|
-
COMPARE_NODE_FIELD(arg);
|
2886
|
-
COMPARE_SCALAR_FIELD(defaction);
|
2887
|
-
COMPARE_LOCATION_FIELD(location);
|
2888
|
-
|
2889
|
-
return true;
|
2890
|
-
}
|
2891
|
-
|
2892
|
-
static bool
|
2893
|
-
_equalLockingClause(const LockingClause *a, const LockingClause *b)
|
2894
|
-
{
|
2895
|
-
COMPARE_NODE_FIELD(lockedRels);
|
2896
|
-
COMPARE_SCALAR_FIELD(strength);
|
2897
|
-
COMPARE_SCALAR_FIELD(waitPolicy);
|
2898
|
-
|
2899
|
-
return true;
|
2900
|
-
}
|
2901
|
-
|
2902
|
-
static bool
|
2903
|
-
_equalRangeTblEntry(const RangeTblEntry *a, const RangeTblEntry *b)
|
2904
|
-
{
|
2905
|
-
COMPARE_SCALAR_FIELD(rtekind);
|
2906
|
-
COMPARE_SCALAR_FIELD(relid);
|
2907
|
-
COMPARE_SCALAR_FIELD(relkind);
|
2908
|
-
COMPARE_SCALAR_FIELD(rellockmode);
|
2909
|
-
COMPARE_NODE_FIELD(tablesample);
|
2910
|
-
COMPARE_NODE_FIELD(subquery);
|
2911
|
-
COMPARE_SCALAR_FIELD(security_barrier);
|
2912
|
-
COMPARE_SCALAR_FIELD(jointype);
|
2913
|
-
COMPARE_SCALAR_FIELD(joinmergedcols);
|
2914
|
-
COMPARE_NODE_FIELD(joinaliasvars);
|
2915
|
-
COMPARE_NODE_FIELD(joinleftcols);
|
2916
|
-
COMPARE_NODE_FIELD(joinrightcols);
|
2917
|
-
COMPARE_NODE_FIELD(functions);
|
2918
|
-
COMPARE_SCALAR_FIELD(funcordinality);
|
2919
|
-
COMPARE_NODE_FIELD(tablefunc);
|
2920
|
-
COMPARE_NODE_FIELD(values_lists);
|
2921
|
-
COMPARE_STRING_FIELD(ctename);
|
2922
|
-
COMPARE_SCALAR_FIELD(ctelevelsup);
|
2923
|
-
COMPARE_SCALAR_FIELD(self_reference);
|
2924
|
-
COMPARE_NODE_FIELD(coltypes);
|
2925
|
-
COMPARE_NODE_FIELD(coltypmods);
|
2926
|
-
COMPARE_NODE_FIELD(colcollations);
|
2927
|
-
COMPARE_STRING_FIELD(enrname);
|
2928
|
-
COMPARE_SCALAR_FIELD(enrtuples);
|
2929
|
-
COMPARE_NODE_FIELD(alias);
|
2930
|
-
COMPARE_NODE_FIELD(eref);
|
2931
|
-
COMPARE_SCALAR_FIELD(lateral);
|
2932
|
-
COMPARE_SCALAR_FIELD(inh);
|
2933
|
-
COMPARE_SCALAR_FIELD(inFromCl);
|
2934
|
-
COMPARE_SCALAR_FIELD(requiredPerms);
|
2935
|
-
COMPARE_SCALAR_FIELD(checkAsUser);
|
2936
|
-
COMPARE_BITMAPSET_FIELD(selectedCols);
|
2937
|
-
COMPARE_BITMAPSET_FIELD(insertedCols);
|
2938
|
-
COMPARE_BITMAPSET_FIELD(updatedCols);
|
2939
|
-
COMPARE_BITMAPSET_FIELD(extraUpdatedCols);
|
2940
|
-
COMPARE_NODE_FIELD(securityQuals);
|
2941
|
-
|
2942
|
-
return true;
|
2943
|
-
}
|
2944
|
-
|
2945
|
-
static bool
|
2946
|
-
_equalRangeTblFunction(const RangeTblFunction *a, const RangeTblFunction *b)
|
2947
|
-
{
|
2948
|
-
COMPARE_NODE_FIELD(funcexpr);
|
2949
|
-
COMPARE_SCALAR_FIELD(funccolcount);
|
2950
|
-
COMPARE_NODE_FIELD(funccolnames);
|
2951
|
-
COMPARE_NODE_FIELD(funccoltypes);
|
2952
|
-
COMPARE_NODE_FIELD(funccoltypmods);
|
2953
|
-
COMPARE_NODE_FIELD(funccolcollations);
|
2954
|
-
COMPARE_BITMAPSET_FIELD(funcparams);
|
2955
|
-
|
2956
|
-
return true;
|
2957
|
-
}
|
2958
|
-
|
2959
|
-
static bool
|
2960
|
-
_equalTableSampleClause(const TableSampleClause *a, const TableSampleClause *b)
|
2961
|
-
{
|
2962
|
-
COMPARE_SCALAR_FIELD(tsmhandler);
|
2963
|
-
COMPARE_NODE_FIELD(args);
|
2964
|
-
COMPARE_NODE_FIELD(repeatable);
|
2965
|
-
|
2966
|
-
return true;
|
2967
|
-
}
|
2968
|
-
|
2969
|
-
static bool
|
2970
|
-
_equalWithCheckOption(const WithCheckOption *a, const WithCheckOption *b)
|
2971
|
-
{
|
2972
|
-
COMPARE_SCALAR_FIELD(kind);
|
2973
|
-
COMPARE_STRING_FIELD(relname);
|
2974
|
-
COMPARE_STRING_FIELD(polname);
|
2975
|
-
COMPARE_NODE_FIELD(qual);
|
2976
|
-
COMPARE_SCALAR_FIELD(cascaded);
|
2977
|
-
|
2978
|
-
return true;
|
2979
|
-
}
|
2980
|
-
|
2981
|
-
static bool
|
2982
|
-
_equalSortGroupClause(const SortGroupClause *a, const SortGroupClause *b)
|
2983
|
-
{
|
2984
|
-
COMPARE_SCALAR_FIELD(tleSortGroupRef);
|
2985
|
-
COMPARE_SCALAR_FIELD(eqop);
|
2986
|
-
COMPARE_SCALAR_FIELD(sortop);
|
2987
|
-
COMPARE_SCALAR_FIELD(nulls_first);
|
2988
|
-
COMPARE_SCALAR_FIELD(hashable);
|
2989
|
-
|
2990
|
-
return true;
|
2991
|
-
}
|
2992
|
-
|
2993
|
-
static bool
|
2994
|
-
_equalGroupingSet(const GroupingSet *a, const GroupingSet *b)
|
2995
|
-
{
|
2996
|
-
COMPARE_SCALAR_FIELD(kind);
|
2997
|
-
COMPARE_NODE_FIELD(content);
|
2998
|
-
COMPARE_LOCATION_FIELD(location);
|
2999
|
-
|
3000
|
-
return true;
|
3001
|
-
}
|
3002
|
-
|
3003
|
-
static bool
|
3004
|
-
_equalWindowClause(const WindowClause *a, const WindowClause *b)
|
3005
|
-
{
|
3006
|
-
COMPARE_STRING_FIELD(name);
|
3007
|
-
COMPARE_STRING_FIELD(refname);
|
3008
|
-
COMPARE_NODE_FIELD(partitionClause);
|
3009
|
-
COMPARE_NODE_FIELD(orderClause);
|
3010
|
-
COMPARE_SCALAR_FIELD(frameOptions);
|
3011
|
-
COMPARE_NODE_FIELD(startOffset);
|
3012
|
-
COMPARE_NODE_FIELD(endOffset);
|
3013
|
-
COMPARE_SCALAR_FIELD(startInRangeFunc);
|
3014
|
-
COMPARE_SCALAR_FIELD(endInRangeFunc);
|
3015
|
-
COMPARE_SCALAR_FIELD(inRangeColl);
|
3016
|
-
COMPARE_SCALAR_FIELD(inRangeAsc);
|
3017
|
-
COMPARE_SCALAR_FIELD(inRangeNullsFirst);
|
3018
|
-
COMPARE_SCALAR_FIELD(winref);
|
3019
|
-
COMPARE_SCALAR_FIELD(copiedOrder);
|
3020
|
-
|
3021
|
-
return true;
|
3022
|
-
}
|
3023
|
-
|
3024
|
-
static bool
|
3025
|
-
_equalRowMarkClause(const RowMarkClause *a, const RowMarkClause *b)
|
3026
|
-
{
|
3027
|
-
COMPARE_SCALAR_FIELD(rti);
|
3028
|
-
COMPARE_SCALAR_FIELD(strength);
|
3029
|
-
COMPARE_SCALAR_FIELD(waitPolicy);
|
3030
|
-
COMPARE_SCALAR_FIELD(pushedDown);
|
3031
|
-
|
3032
|
-
return true;
|
3033
|
-
}
|
3034
|
-
|
3035
|
-
static bool
|
3036
|
-
_equalWithClause(const WithClause *a, const WithClause *b)
|
3037
|
-
{
|
3038
|
-
COMPARE_NODE_FIELD(ctes);
|
3039
|
-
COMPARE_SCALAR_FIELD(recursive);
|
3040
|
-
COMPARE_LOCATION_FIELD(location);
|
3041
|
-
|
3042
|
-
return true;
|
3043
|
-
}
|
3044
|
-
|
3045
|
-
static bool
|
3046
|
-
_equalInferClause(const InferClause *a, const InferClause *b)
|
3047
|
-
{
|
3048
|
-
COMPARE_NODE_FIELD(indexElems);
|
3049
|
-
COMPARE_NODE_FIELD(whereClause);
|
3050
|
-
COMPARE_STRING_FIELD(conname);
|
3051
|
-
COMPARE_LOCATION_FIELD(location);
|
3052
|
-
|
3053
|
-
return true;
|
3054
|
-
}
|
3055
|
-
|
3056
|
-
static bool
|
3057
|
-
_equalOnConflictClause(const OnConflictClause *a, const OnConflictClause *b)
|
3058
|
-
{
|
3059
|
-
COMPARE_SCALAR_FIELD(action);
|
3060
|
-
COMPARE_NODE_FIELD(infer);
|
3061
|
-
COMPARE_NODE_FIELD(targetList);
|
3062
|
-
COMPARE_NODE_FIELD(whereClause);
|
3063
|
-
COMPARE_LOCATION_FIELD(location);
|
3064
|
-
|
3065
|
-
return true;
|
3066
|
-
}
|
3067
|
-
|
3068
|
-
static bool
|
3069
|
-
_equalCommonTableExpr(const CommonTableExpr *a, const CommonTableExpr *b)
|
3070
|
-
{
|
3071
|
-
COMPARE_STRING_FIELD(ctename);
|
3072
|
-
COMPARE_NODE_FIELD(aliascolnames);
|
3073
|
-
COMPARE_SCALAR_FIELD(ctematerialized);
|
3074
|
-
COMPARE_NODE_FIELD(ctequery);
|
3075
|
-
COMPARE_LOCATION_FIELD(location);
|
3076
|
-
COMPARE_SCALAR_FIELD(cterecursive);
|
3077
|
-
COMPARE_SCALAR_FIELD(cterefcount);
|
3078
|
-
COMPARE_NODE_FIELD(ctecolnames);
|
3079
|
-
COMPARE_NODE_FIELD(ctecoltypes);
|
3080
|
-
COMPARE_NODE_FIELD(ctecoltypmods);
|
3081
|
-
COMPARE_NODE_FIELD(ctecolcollations);
|
3082
|
-
|
3083
|
-
return true;
|
3084
|
-
}
|
3085
|
-
|
3086
|
-
static bool
|
3087
|
-
_equalXmlSerialize(const XmlSerialize *a, const XmlSerialize *b)
|
3088
|
-
{
|
3089
|
-
COMPARE_SCALAR_FIELD(xmloption);
|
3090
|
-
COMPARE_NODE_FIELD(expr);
|
3091
|
-
COMPARE_NODE_FIELD(typeName);
|
3092
|
-
COMPARE_LOCATION_FIELD(location);
|
3093
|
-
|
3094
|
-
return true;
|
3095
|
-
}
|
3096
|
-
|
3097
|
-
static bool
|
3098
|
-
_equalRoleSpec(const RoleSpec *a, const RoleSpec *b)
|
3099
|
-
{
|
3100
|
-
COMPARE_SCALAR_FIELD(roletype);
|
3101
|
-
COMPARE_STRING_FIELD(rolename);
|
3102
|
-
COMPARE_LOCATION_FIELD(location);
|
3103
|
-
|
3104
|
-
return true;
|
3105
|
-
}
|
3106
|
-
|
3107
|
-
static bool
|
3108
|
-
_equalTriggerTransition(const TriggerTransition *a, const TriggerTransition *b)
|
3109
|
-
{
|
3110
|
-
COMPARE_STRING_FIELD(name);
|
3111
|
-
COMPARE_SCALAR_FIELD(isNew);
|
3112
|
-
COMPARE_SCALAR_FIELD(isTable);
|
3113
|
-
|
3114
|
-
return true;
|
3115
|
-
}
|
3116
|
-
|
3117
|
-
static bool
|
3118
|
-
_equalPartitionElem(const PartitionElem *a, const PartitionElem *b)
|
3119
|
-
{
|
3120
|
-
COMPARE_STRING_FIELD(name);
|
3121
|
-
COMPARE_NODE_FIELD(expr);
|
3122
|
-
COMPARE_NODE_FIELD(collation);
|
3123
|
-
COMPARE_NODE_FIELD(opclass);
|
3124
|
-
COMPARE_LOCATION_FIELD(location);
|
3125
|
-
|
3126
|
-
return true;
|
3127
|
-
}
|
3128
|
-
|
3129
|
-
static bool
|
3130
|
-
_equalPartitionSpec(const PartitionSpec *a, const PartitionSpec *b)
|
3131
|
-
{
|
3132
|
-
COMPARE_STRING_FIELD(strategy);
|
3133
|
-
COMPARE_NODE_FIELD(partParams);
|
3134
|
-
COMPARE_LOCATION_FIELD(location);
|
3135
|
-
|
3136
|
-
return true;
|
3137
|
-
}
|
3138
|
-
|
3139
|
-
static bool
|
3140
|
-
_equalPartitionBoundSpec(const PartitionBoundSpec *a, const PartitionBoundSpec *b)
|
3141
|
-
{
|
3142
|
-
COMPARE_SCALAR_FIELD(strategy);
|
3143
|
-
COMPARE_SCALAR_FIELD(is_default);
|
3144
|
-
COMPARE_SCALAR_FIELD(modulus);
|
3145
|
-
COMPARE_SCALAR_FIELD(remainder);
|
3146
|
-
COMPARE_NODE_FIELD(listdatums);
|
3147
|
-
COMPARE_NODE_FIELD(lowerdatums);
|
3148
|
-
COMPARE_NODE_FIELD(upperdatums);
|
3149
|
-
COMPARE_LOCATION_FIELD(location);
|
3150
|
-
|
3151
|
-
return true;
|
3152
|
-
}
|
3153
|
-
|
3154
|
-
static bool
|
3155
|
-
_equalPartitionRangeDatum(const PartitionRangeDatum *a, const PartitionRangeDatum *b)
|
3156
|
-
{
|
3157
|
-
COMPARE_SCALAR_FIELD(kind);
|
3158
|
-
COMPARE_NODE_FIELD(value);
|
3159
|
-
COMPARE_LOCATION_FIELD(location);
|
3160
|
-
|
3161
|
-
return true;
|
3162
|
-
}
|
3163
|
-
|
3164
|
-
static bool
|
3165
|
-
_equalPartitionCmd(const PartitionCmd *a, const PartitionCmd *b)
|
3166
|
-
{
|
3167
|
-
COMPARE_NODE_FIELD(name);
|
3168
|
-
COMPARE_NODE_FIELD(bound);
|
3169
|
-
|
3170
|
-
return true;
|
3171
|
-
}
|
3172
|
-
|
3173
|
-
/*
|
3174
|
-
* Stuff from pg_list.h
|
3175
|
-
*/
|
3176
|
-
|
3177
|
-
static bool
|
3178
|
-
_equalList(const List *a, const List *b)
|
3179
|
-
{
|
3180
|
-
const ListCell *item_a;
|
3181
|
-
const ListCell *item_b;
|
3182
|
-
|
3183
|
-
/*
|
3184
|
-
* Try to reject by simple scalar checks before grovelling through all the
|
3185
|
-
* list elements...
|
3186
|
-
*/
|
3187
|
-
COMPARE_SCALAR_FIELD(type);
|
3188
|
-
COMPARE_SCALAR_FIELD(length);
|
3189
|
-
|
3190
|
-
/*
|
3191
|
-
* We place the switch outside the loop for the sake of efficiency; this
|
3192
|
-
* may not be worth doing...
|
3193
|
-
*/
|
3194
|
-
switch (a->type)
|
3195
|
-
{
|
3196
|
-
case T_List:
|
3197
|
-
forboth(item_a, a, item_b, b)
|
3198
|
-
{
|
3199
|
-
if (!equal(lfirst(item_a), lfirst(item_b)))
|
3200
|
-
return false;
|
3201
|
-
}
|
3202
|
-
break;
|
3203
|
-
case T_IntList:
|
3204
|
-
forboth(item_a, a, item_b, b)
|
3205
|
-
{
|
3206
|
-
if (lfirst_int(item_a) != lfirst_int(item_b))
|
3207
|
-
return false;
|
3208
|
-
}
|
3209
|
-
break;
|
3210
|
-
case T_OidList:
|
3211
|
-
forboth(item_a, a, item_b, b)
|
3212
|
-
{
|
3213
|
-
if (lfirst_oid(item_a) != lfirst_oid(item_b))
|
3214
|
-
return false;
|
3215
|
-
}
|
3216
|
-
break;
|
3217
|
-
default:
|
3218
|
-
elog(ERROR, "unrecognized list node type: %d",
|
3219
|
-
(int) a->type);
|
3220
|
-
return false; /* keep compiler quiet */
|
3221
|
-
}
|
3222
|
-
|
3223
|
-
/*
|
3224
|
-
* If we got here, we should have run out of elements of both lists
|
3225
|
-
*/
|
3226
|
-
Assert(item_a == NULL);
|
3227
|
-
Assert(item_b == NULL);
|
3228
|
-
|
3229
|
-
return true;
|
3230
|
-
}
|
3231
|
-
|
3232
|
-
/*
|
3233
|
-
* Stuff from value.h
|
3234
|
-
*/
|
3235
|
-
|
3236
|
-
static bool
|
3237
|
-
_equalValue(const Value *a, const Value *b)
|
3238
|
-
{
|
3239
|
-
COMPARE_SCALAR_FIELD(type);
|
3240
|
-
|
3241
|
-
switch (a->type)
|
3242
|
-
{
|
3243
|
-
case T_Integer:
|
3244
|
-
COMPARE_SCALAR_FIELD(val.ival);
|
3245
|
-
break;
|
3246
|
-
case T_Float:
|
3247
|
-
case T_String:
|
3248
|
-
case T_BitString:
|
3249
|
-
COMPARE_STRING_FIELD(val.str);
|
3250
|
-
break;
|
3251
|
-
case T_Null:
|
3252
|
-
/* nothing to do */
|
3253
|
-
break;
|
3254
|
-
default:
|
3255
|
-
elog(ERROR, "unrecognized node type: %d", (int) a->type);
|
3256
|
-
break;
|
3257
|
-
}
|
3258
|
-
|
3259
|
-
return true;
|
3260
|
-
}
|
3261
|
-
|
3262
|
-
/*
|
3263
|
-
* equal
|
3264
|
-
* returns whether two nodes are equal
|
3265
|
-
*/
|
3266
|
-
bool
|
3267
|
-
equal(const void *a, const void *b)
|
3268
|
-
{
|
3269
|
-
bool retval;
|
3270
|
-
|
3271
|
-
if (a == b)
|
3272
|
-
return true;
|
3273
|
-
|
3274
|
-
/*
|
3275
|
-
* note that a!=b, so only one of them can be NULL
|
3276
|
-
*/
|
3277
|
-
if (a == NULL || b == NULL)
|
3278
|
-
return false;
|
3279
|
-
|
3280
|
-
/*
|
3281
|
-
* are they the same type of nodes?
|
3282
|
-
*/
|
3283
|
-
if (nodeTag(a) != nodeTag(b))
|
3284
|
-
return false;
|
3285
|
-
|
3286
|
-
/* Guard against stack overflow due to overly complex expressions */
|
3287
|
-
check_stack_depth();
|
3288
|
-
|
3289
|
-
switch (nodeTag(a))
|
3290
|
-
{
|
3291
|
-
/*
|
3292
|
-
* PRIMITIVE NODES
|
3293
|
-
*/
|
3294
|
-
case T_Alias:
|
3295
|
-
retval = _equalAlias(a, b);
|
3296
|
-
break;
|
3297
|
-
case T_RangeVar:
|
3298
|
-
retval = _equalRangeVar(a, b);
|
3299
|
-
break;
|
3300
|
-
case T_TableFunc:
|
3301
|
-
retval = _equalTableFunc(a, b);
|
3302
|
-
break;
|
3303
|
-
case T_IntoClause:
|
3304
|
-
retval = _equalIntoClause(a, b);
|
3305
|
-
break;
|
3306
|
-
case T_Var:
|
3307
|
-
retval = _equalVar(a, b);
|
3308
|
-
break;
|
3309
|
-
case T_Const:
|
3310
|
-
retval = _equalConst(a, b);
|
3311
|
-
break;
|
3312
|
-
case T_Param:
|
3313
|
-
retval = _equalParam(a, b);
|
3314
|
-
break;
|
3315
|
-
case T_Aggref:
|
3316
|
-
retval = _equalAggref(a, b);
|
3317
|
-
break;
|
3318
|
-
case T_GroupingFunc:
|
3319
|
-
retval = _equalGroupingFunc(a, b);
|
3320
|
-
break;
|
3321
|
-
case T_WindowFunc:
|
3322
|
-
retval = _equalWindowFunc(a, b);
|
3323
|
-
break;
|
3324
|
-
case T_SubscriptingRef:
|
3325
|
-
retval = _equalSubscriptingRef(a, b);
|
3326
|
-
break;
|
3327
|
-
case T_FuncExpr:
|
3328
|
-
retval = _equalFuncExpr(a, b);
|
3329
|
-
break;
|
3330
|
-
case T_NamedArgExpr:
|
3331
|
-
retval = _equalNamedArgExpr(a, b);
|
3332
|
-
break;
|
3333
|
-
case T_OpExpr:
|
3334
|
-
retval = _equalOpExpr(a, b);
|
3335
|
-
break;
|
3336
|
-
case T_DistinctExpr:
|
3337
|
-
retval = _equalDistinctExpr(a, b);
|
3338
|
-
break;
|
3339
|
-
case T_NullIfExpr:
|
3340
|
-
retval = _equalNullIfExpr(a, b);
|
3341
|
-
break;
|
3342
|
-
case T_ScalarArrayOpExpr:
|
3343
|
-
retval = _equalScalarArrayOpExpr(a, b);
|
3344
|
-
break;
|
3345
|
-
case T_BoolExpr:
|
3346
|
-
retval = _equalBoolExpr(a, b);
|
3347
|
-
break;
|
3348
|
-
case T_SubLink:
|
3349
|
-
retval = _equalSubLink(a, b);
|
3350
|
-
break;
|
3351
|
-
case T_SubPlan:
|
3352
|
-
retval = _equalSubPlan(a, b);
|
3353
|
-
break;
|
3354
|
-
case T_AlternativeSubPlan:
|
3355
|
-
retval = _equalAlternativeSubPlan(a, b);
|
3356
|
-
break;
|
3357
|
-
case T_FieldSelect:
|
3358
|
-
retval = _equalFieldSelect(a, b);
|
3359
|
-
break;
|
3360
|
-
case T_FieldStore:
|
3361
|
-
retval = _equalFieldStore(a, b);
|
3362
|
-
break;
|
3363
|
-
case T_RelabelType:
|
3364
|
-
retval = _equalRelabelType(a, b);
|
3365
|
-
break;
|
3366
|
-
case T_CoerceViaIO:
|
3367
|
-
retval = _equalCoerceViaIO(a, b);
|
3368
|
-
break;
|
3369
|
-
case T_ArrayCoerceExpr:
|
3370
|
-
retval = _equalArrayCoerceExpr(a, b);
|
3371
|
-
break;
|
3372
|
-
case T_ConvertRowtypeExpr:
|
3373
|
-
retval = _equalConvertRowtypeExpr(a, b);
|
3374
|
-
break;
|
3375
|
-
case T_CollateExpr:
|
3376
|
-
retval = _equalCollateExpr(a, b);
|
3377
|
-
break;
|
3378
|
-
case T_CaseExpr:
|
3379
|
-
retval = _equalCaseExpr(a, b);
|
3380
|
-
break;
|
3381
|
-
case T_CaseWhen:
|
3382
|
-
retval = _equalCaseWhen(a, b);
|
3383
|
-
break;
|
3384
|
-
case T_CaseTestExpr:
|
3385
|
-
retval = _equalCaseTestExpr(a, b);
|
3386
|
-
break;
|
3387
|
-
case T_ArrayExpr:
|
3388
|
-
retval = _equalArrayExpr(a, b);
|
3389
|
-
break;
|
3390
|
-
case T_RowExpr:
|
3391
|
-
retval = _equalRowExpr(a, b);
|
3392
|
-
break;
|
3393
|
-
case T_RowCompareExpr:
|
3394
|
-
retval = _equalRowCompareExpr(a, b);
|
3395
|
-
break;
|
3396
|
-
case T_CoalesceExpr:
|
3397
|
-
retval = _equalCoalesceExpr(a, b);
|
3398
|
-
break;
|
3399
|
-
case T_MinMaxExpr:
|
3400
|
-
retval = _equalMinMaxExpr(a, b);
|
3401
|
-
break;
|
3402
|
-
case T_SQLValueFunction:
|
3403
|
-
retval = _equalSQLValueFunction(a, b);
|
3404
|
-
break;
|
3405
|
-
case T_XmlExpr:
|
3406
|
-
retval = _equalXmlExpr(a, b);
|
3407
|
-
break;
|
3408
|
-
case T_NullTest:
|
3409
|
-
retval = _equalNullTest(a, b);
|
3410
|
-
break;
|
3411
|
-
case T_BooleanTest:
|
3412
|
-
retval = _equalBooleanTest(a, b);
|
3413
|
-
break;
|
3414
|
-
case T_CoerceToDomain:
|
3415
|
-
retval = _equalCoerceToDomain(a, b);
|
3416
|
-
break;
|
3417
|
-
case T_CoerceToDomainValue:
|
3418
|
-
retval = _equalCoerceToDomainValue(a, b);
|
3419
|
-
break;
|
3420
|
-
case T_SetToDefault:
|
3421
|
-
retval = _equalSetToDefault(a, b);
|
3422
|
-
break;
|
3423
|
-
case T_CurrentOfExpr:
|
3424
|
-
retval = _equalCurrentOfExpr(a, b);
|
3425
|
-
break;
|
3426
|
-
case T_NextValueExpr:
|
3427
|
-
retval = _equalNextValueExpr(a, b);
|
3428
|
-
break;
|
3429
|
-
case T_InferenceElem:
|
3430
|
-
retval = _equalInferenceElem(a, b);
|
3431
|
-
break;
|
3432
|
-
case T_TargetEntry:
|
3433
|
-
retval = _equalTargetEntry(a, b);
|
3434
|
-
break;
|
3435
|
-
case T_RangeTblRef:
|
3436
|
-
retval = _equalRangeTblRef(a, b);
|
3437
|
-
break;
|
3438
|
-
case T_FromExpr:
|
3439
|
-
retval = _equalFromExpr(a, b);
|
3440
|
-
break;
|
3441
|
-
case T_OnConflictExpr:
|
3442
|
-
retval = _equalOnConflictExpr(a, b);
|
3443
|
-
break;
|
3444
|
-
case T_JoinExpr:
|
3445
|
-
retval = _equalJoinExpr(a, b);
|
3446
|
-
break;
|
3447
|
-
|
3448
|
-
/*
|
3449
|
-
* RELATION NODES
|
3450
|
-
*/
|
3451
|
-
case T_PathKey:
|
3452
|
-
retval = _equalPathKey(a, b);
|
3453
|
-
break;
|
3454
|
-
case T_RestrictInfo:
|
3455
|
-
retval = _equalRestrictInfo(a, b);
|
3456
|
-
break;
|
3457
|
-
case T_PlaceHolderVar:
|
3458
|
-
retval = _equalPlaceHolderVar(a, b);
|
3459
|
-
break;
|
3460
|
-
case T_SpecialJoinInfo:
|
3461
|
-
retval = _equalSpecialJoinInfo(a, b);
|
3462
|
-
break;
|
3463
|
-
case T_AppendRelInfo:
|
3464
|
-
retval = _equalAppendRelInfo(a, b);
|
3465
|
-
break;
|
3466
|
-
case T_PlaceHolderInfo:
|
3467
|
-
retval = _equalPlaceHolderInfo(a, b);
|
3468
|
-
break;
|
256
|
+
switch (nodeTag(a))
|
257
|
+
{
|
258
|
+
#include "equalfuncs.switch.c"
|
3469
259
|
|
3470
260
|
case T_List:
|
3471
261
|
case T_IntList:
|
3472
262
|
case T_OidList:
|
263
|
+
case T_XidList:
|
3473
264
|
retval = _equalList(a, b);
|
3474
265
|
break;
|
3475
266
|
|
3476
|
-
case T_Integer:
|
3477
|
-
case T_Float:
|
3478
|
-
case T_String:
|
3479
|
-
case T_BitString:
|
3480
|
-
case T_Null:
|
3481
|
-
retval = _equalValue(a, b);
|
3482
|
-
break;
|
3483
|
-
|
3484
|
-
/*
|
3485
|
-
* EXTENSIBLE NODES
|
3486
|
-
*/
|
3487
|
-
case T_ExtensibleNode:
|
3488
|
-
retval = _equalExtensibleNode(a, b);
|
3489
|
-
break;
|
3490
|
-
|
3491
|
-
/*
|
3492
|
-
* PARSE NODES
|
3493
|
-
*/
|
3494
|
-
case T_Query:
|
3495
|
-
retval = _equalQuery(a, b);
|
3496
|
-
break;
|
3497
|
-
case T_RawStmt:
|
3498
|
-
retval = _equalRawStmt(a, b);
|
3499
|
-
break;
|
3500
|
-
case T_InsertStmt:
|
3501
|
-
retval = _equalInsertStmt(a, b);
|
3502
|
-
break;
|
3503
|
-
case T_DeleteStmt:
|
3504
|
-
retval = _equalDeleteStmt(a, b);
|
3505
|
-
break;
|
3506
|
-
case T_UpdateStmt:
|
3507
|
-
retval = _equalUpdateStmt(a, b);
|
3508
|
-
break;
|
3509
|
-
case T_SelectStmt:
|
3510
|
-
retval = _equalSelectStmt(a, b);
|
3511
|
-
break;
|
3512
|
-
case T_SetOperationStmt:
|
3513
|
-
retval = _equalSetOperationStmt(a, b);
|
3514
|
-
break;
|
3515
|
-
case T_AlterTableStmt:
|
3516
|
-
retval = _equalAlterTableStmt(a, b);
|
3517
|
-
break;
|
3518
|
-
case T_AlterTableCmd:
|
3519
|
-
retval = _equalAlterTableCmd(a, b);
|
3520
|
-
break;
|
3521
|
-
case T_AlterCollationStmt:
|
3522
|
-
retval = _equalAlterCollationStmt(a, b);
|
3523
|
-
break;
|
3524
|
-
case T_AlterDomainStmt:
|
3525
|
-
retval = _equalAlterDomainStmt(a, b);
|
3526
|
-
break;
|
3527
|
-
case T_GrantStmt:
|
3528
|
-
retval = _equalGrantStmt(a, b);
|
3529
|
-
break;
|
3530
|
-
case T_GrantRoleStmt:
|
3531
|
-
retval = _equalGrantRoleStmt(a, b);
|
3532
|
-
break;
|
3533
|
-
case T_AlterDefaultPrivilegesStmt:
|
3534
|
-
retval = _equalAlterDefaultPrivilegesStmt(a, b);
|
3535
|
-
break;
|
3536
|
-
case T_DeclareCursorStmt:
|
3537
|
-
retval = _equalDeclareCursorStmt(a, b);
|
3538
|
-
break;
|
3539
|
-
case T_ClosePortalStmt:
|
3540
|
-
retval = _equalClosePortalStmt(a, b);
|
3541
|
-
break;
|
3542
|
-
case T_CallStmt:
|
3543
|
-
retval = _equalCallStmt(a, b);
|
3544
|
-
break;
|
3545
|
-
case T_ClusterStmt:
|
3546
|
-
retval = _equalClusterStmt(a, b);
|
3547
|
-
break;
|
3548
|
-
case T_CopyStmt:
|
3549
|
-
retval = _equalCopyStmt(a, b);
|
3550
|
-
break;
|
3551
|
-
case T_CreateStmt:
|
3552
|
-
retval = _equalCreateStmt(a, b);
|
3553
|
-
break;
|
3554
|
-
case T_TableLikeClause:
|
3555
|
-
retval = _equalTableLikeClause(a, b);
|
3556
|
-
break;
|
3557
|
-
case T_DefineStmt:
|
3558
|
-
retval = _equalDefineStmt(a, b);
|
3559
|
-
break;
|
3560
|
-
case T_DropStmt:
|
3561
|
-
retval = _equalDropStmt(a, b);
|
3562
|
-
break;
|
3563
|
-
case T_TruncateStmt:
|
3564
|
-
retval = _equalTruncateStmt(a, b);
|
3565
|
-
break;
|
3566
|
-
case T_CommentStmt:
|
3567
|
-
retval = _equalCommentStmt(a, b);
|
3568
|
-
break;
|
3569
|
-
case T_SecLabelStmt:
|
3570
|
-
retval = _equalSecLabelStmt(a, b);
|
3571
|
-
break;
|
3572
|
-
case T_FetchStmt:
|
3573
|
-
retval = _equalFetchStmt(a, b);
|
3574
|
-
break;
|
3575
|
-
case T_IndexStmt:
|
3576
|
-
retval = _equalIndexStmt(a, b);
|
3577
|
-
break;
|
3578
|
-
case T_CreateStatsStmt:
|
3579
|
-
retval = _equalCreateStatsStmt(a, b);
|
3580
|
-
break;
|
3581
|
-
case T_AlterStatsStmt:
|
3582
|
-
retval = _equalAlterStatsStmt(a, b);
|
3583
|
-
break;
|
3584
|
-
case T_CreateFunctionStmt:
|
3585
|
-
retval = _equalCreateFunctionStmt(a, b);
|
3586
|
-
break;
|
3587
|
-
case T_FunctionParameter:
|
3588
|
-
retval = _equalFunctionParameter(a, b);
|
3589
|
-
break;
|
3590
|
-
case T_AlterFunctionStmt:
|
3591
|
-
retval = _equalAlterFunctionStmt(a, b);
|
3592
|
-
break;
|
3593
|
-
case T_DoStmt:
|
3594
|
-
retval = _equalDoStmt(a, b);
|
3595
|
-
break;
|
3596
|
-
case T_RenameStmt:
|
3597
|
-
retval = _equalRenameStmt(a, b);
|
3598
|
-
break;
|
3599
|
-
case T_AlterObjectDependsStmt:
|
3600
|
-
retval = _equalAlterObjectDependsStmt(a, b);
|
3601
|
-
break;
|
3602
|
-
case T_AlterObjectSchemaStmt:
|
3603
|
-
retval = _equalAlterObjectSchemaStmt(a, b);
|
3604
|
-
break;
|
3605
|
-
case T_AlterOwnerStmt:
|
3606
|
-
retval = _equalAlterOwnerStmt(a, b);
|
3607
|
-
break;
|
3608
|
-
case T_AlterOperatorStmt:
|
3609
|
-
retval = _equalAlterOperatorStmt(a, b);
|
3610
|
-
break;
|
3611
|
-
case T_AlterTypeStmt:
|
3612
|
-
retval = _equalAlterTypeStmt(a, b);
|
3613
|
-
break;
|
3614
|
-
case T_RuleStmt:
|
3615
|
-
retval = _equalRuleStmt(a, b);
|
3616
|
-
break;
|
3617
|
-
case T_NotifyStmt:
|
3618
|
-
retval = _equalNotifyStmt(a, b);
|
3619
|
-
break;
|
3620
|
-
case T_ListenStmt:
|
3621
|
-
retval = _equalListenStmt(a, b);
|
3622
|
-
break;
|
3623
|
-
case T_UnlistenStmt:
|
3624
|
-
retval = _equalUnlistenStmt(a, b);
|
3625
|
-
break;
|
3626
|
-
case T_TransactionStmt:
|
3627
|
-
retval = _equalTransactionStmt(a, b);
|
3628
|
-
break;
|
3629
|
-
case T_CompositeTypeStmt:
|
3630
|
-
retval = _equalCompositeTypeStmt(a, b);
|
3631
|
-
break;
|
3632
|
-
case T_CreateEnumStmt:
|
3633
|
-
retval = _equalCreateEnumStmt(a, b);
|
3634
|
-
break;
|
3635
|
-
case T_CreateRangeStmt:
|
3636
|
-
retval = _equalCreateRangeStmt(a, b);
|
3637
|
-
break;
|
3638
|
-
case T_AlterEnumStmt:
|
3639
|
-
retval = _equalAlterEnumStmt(a, b);
|
3640
|
-
break;
|
3641
|
-
case T_ViewStmt:
|
3642
|
-
retval = _equalViewStmt(a, b);
|
3643
|
-
break;
|
3644
|
-
case T_LoadStmt:
|
3645
|
-
retval = _equalLoadStmt(a, b);
|
3646
|
-
break;
|
3647
|
-
case T_CreateDomainStmt:
|
3648
|
-
retval = _equalCreateDomainStmt(a, b);
|
3649
|
-
break;
|
3650
|
-
case T_CreateOpClassStmt:
|
3651
|
-
retval = _equalCreateOpClassStmt(a, b);
|
3652
|
-
break;
|
3653
|
-
case T_CreateOpClassItem:
|
3654
|
-
retval = _equalCreateOpClassItem(a, b);
|
3655
|
-
break;
|
3656
|
-
case T_CreateOpFamilyStmt:
|
3657
|
-
retval = _equalCreateOpFamilyStmt(a, b);
|
3658
|
-
break;
|
3659
|
-
case T_AlterOpFamilyStmt:
|
3660
|
-
retval = _equalAlterOpFamilyStmt(a, b);
|
3661
|
-
break;
|
3662
|
-
case T_CreatedbStmt:
|
3663
|
-
retval = _equalCreatedbStmt(a, b);
|
3664
|
-
break;
|
3665
|
-
case T_AlterDatabaseStmt:
|
3666
|
-
retval = _equalAlterDatabaseStmt(a, b);
|
3667
|
-
break;
|
3668
|
-
case T_AlterDatabaseSetStmt:
|
3669
|
-
retval = _equalAlterDatabaseSetStmt(a, b);
|
3670
|
-
break;
|
3671
|
-
case T_DropdbStmt:
|
3672
|
-
retval = _equalDropdbStmt(a, b);
|
3673
|
-
break;
|
3674
|
-
case T_VacuumStmt:
|
3675
|
-
retval = _equalVacuumStmt(a, b);
|
3676
|
-
break;
|
3677
|
-
case T_VacuumRelation:
|
3678
|
-
retval = _equalVacuumRelation(a, b);
|
3679
|
-
break;
|
3680
|
-
case T_ExplainStmt:
|
3681
|
-
retval = _equalExplainStmt(a, b);
|
3682
|
-
break;
|
3683
|
-
case T_CreateTableAsStmt:
|
3684
|
-
retval = _equalCreateTableAsStmt(a, b);
|
3685
|
-
break;
|
3686
|
-
case T_RefreshMatViewStmt:
|
3687
|
-
retval = _equalRefreshMatViewStmt(a, b);
|
3688
|
-
break;
|
3689
|
-
case T_ReplicaIdentityStmt:
|
3690
|
-
retval = _equalReplicaIdentityStmt(a, b);
|
3691
|
-
break;
|
3692
|
-
case T_AlterSystemStmt:
|
3693
|
-
retval = _equalAlterSystemStmt(a, b);
|
3694
|
-
break;
|
3695
|
-
case T_CreateSeqStmt:
|
3696
|
-
retval = _equalCreateSeqStmt(a, b);
|
3697
|
-
break;
|
3698
|
-
case T_AlterSeqStmt:
|
3699
|
-
retval = _equalAlterSeqStmt(a, b);
|
3700
|
-
break;
|
3701
|
-
case T_VariableSetStmt:
|
3702
|
-
retval = _equalVariableSetStmt(a, b);
|
3703
|
-
break;
|
3704
|
-
case T_VariableShowStmt:
|
3705
|
-
retval = _equalVariableShowStmt(a, b);
|
3706
|
-
break;
|
3707
|
-
case T_DiscardStmt:
|
3708
|
-
retval = _equalDiscardStmt(a, b);
|
3709
|
-
break;
|
3710
|
-
case T_CreateTableSpaceStmt:
|
3711
|
-
retval = _equalCreateTableSpaceStmt(a, b);
|
3712
|
-
break;
|
3713
|
-
case T_DropTableSpaceStmt:
|
3714
|
-
retval = _equalDropTableSpaceStmt(a, b);
|
3715
|
-
break;
|
3716
|
-
case T_AlterTableSpaceOptionsStmt:
|
3717
|
-
retval = _equalAlterTableSpaceOptionsStmt(a, b);
|
3718
|
-
break;
|
3719
|
-
case T_AlterTableMoveAllStmt:
|
3720
|
-
retval = _equalAlterTableMoveAllStmt(a, b);
|
3721
|
-
break;
|
3722
|
-
case T_CreateExtensionStmt:
|
3723
|
-
retval = _equalCreateExtensionStmt(a, b);
|
3724
|
-
break;
|
3725
|
-
case T_AlterExtensionStmt:
|
3726
|
-
retval = _equalAlterExtensionStmt(a, b);
|
3727
|
-
break;
|
3728
|
-
case T_AlterExtensionContentsStmt:
|
3729
|
-
retval = _equalAlterExtensionContentsStmt(a, b);
|
3730
|
-
break;
|
3731
|
-
case T_CreateFdwStmt:
|
3732
|
-
retval = _equalCreateFdwStmt(a, b);
|
3733
|
-
break;
|
3734
|
-
case T_AlterFdwStmt:
|
3735
|
-
retval = _equalAlterFdwStmt(a, b);
|
3736
|
-
break;
|
3737
|
-
case T_CreateForeignServerStmt:
|
3738
|
-
retval = _equalCreateForeignServerStmt(a, b);
|
3739
|
-
break;
|
3740
|
-
case T_AlterForeignServerStmt:
|
3741
|
-
retval = _equalAlterForeignServerStmt(a, b);
|
3742
|
-
break;
|
3743
|
-
case T_CreateUserMappingStmt:
|
3744
|
-
retval = _equalCreateUserMappingStmt(a, b);
|
3745
|
-
break;
|
3746
|
-
case T_AlterUserMappingStmt:
|
3747
|
-
retval = _equalAlterUserMappingStmt(a, b);
|
3748
|
-
break;
|
3749
|
-
case T_DropUserMappingStmt:
|
3750
|
-
retval = _equalDropUserMappingStmt(a, b);
|
3751
|
-
break;
|
3752
|
-
case T_CreateForeignTableStmt:
|
3753
|
-
retval = _equalCreateForeignTableStmt(a, b);
|
3754
|
-
break;
|
3755
|
-
case T_ImportForeignSchemaStmt:
|
3756
|
-
retval = _equalImportForeignSchemaStmt(a, b);
|
3757
|
-
break;
|
3758
|
-
case T_CreateTransformStmt:
|
3759
|
-
retval = _equalCreateTransformStmt(a, b);
|
3760
|
-
break;
|
3761
|
-
case T_CreateAmStmt:
|
3762
|
-
retval = _equalCreateAmStmt(a, b);
|
3763
|
-
break;
|
3764
|
-
case T_CreateTrigStmt:
|
3765
|
-
retval = _equalCreateTrigStmt(a, b);
|
3766
|
-
break;
|
3767
|
-
case T_CreateEventTrigStmt:
|
3768
|
-
retval = _equalCreateEventTrigStmt(a, b);
|
3769
|
-
break;
|
3770
|
-
case T_AlterEventTrigStmt:
|
3771
|
-
retval = _equalAlterEventTrigStmt(a, b);
|
3772
|
-
break;
|
3773
|
-
case T_CreatePLangStmt:
|
3774
|
-
retval = _equalCreatePLangStmt(a, b);
|
3775
|
-
break;
|
3776
|
-
case T_CreateRoleStmt:
|
3777
|
-
retval = _equalCreateRoleStmt(a, b);
|
3778
|
-
break;
|
3779
|
-
case T_AlterRoleStmt:
|
3780
|
-
retval = _equalAlterRoleStmt(a, b);
|
3781
|
-
break;
|
3782
|
-
case T_AlterRoleSetStmt:
|
3783
|
-
retval = _equalAlterRoleSetStmt(a, b);
|
3784
|
-
break;
|
3785
|
-
case T_DropRoleStmt:
|
3786
|
-
retval = _equalDropRoleStmt(a, b);
|
3787
|
-
break;
|
3788
|
-
case T_LockStmt:
|
3789
|
-
retval = _equalLockStmt(a, b);
|
3790
|
-
break;
|
3791
|
-
case T_ConstraintsSetStmt:
|
3792
|
-
retval = _equalConstraintsSetStmt(a, b);
|
3793
|
-
break;
|
3794
|
-
case T_ReindexStmt:
|
3795
|
-
retval = _equalReindexStmt(a, b);
|
3796
|
-
break;
|
3797
|
-
case T_CheckPointStmt:
|
3798
|
-
retval = true;
|
3799
|
-
break;
|
3800
|
-
case T_CreateSchemaStmt:
|
3801
|
-
retval = _equalCreateSchemaStmt(a, b);
|
3802
|
-
break;
|
3803
|
-
case T_CreateConversionStmt:
|
3804
|
-
retval = _equalCreateConversionStmt(a, b);
|
3805
|
-
break;
|
3806
|
-
case T_CreateCastStmt:
|
3807
|
-
retval = _equalCreateCastStmt(a, b);
|
3808
|
-
break;
|
3809
|
-
case T_PrepareStmt:
|
3810
|
-
retval = _equalPrepareStmt(a, b);
|
3811
|
-
break;
|
3812
|
-
case T_ExecuteStmt:
|
3813
|
-
retval = _equalExecuteStmt(a, b);
|
3814
|
-
break;
|
3815
|
-
case T_DeallocateStmt:
|
3816
|
-
retval = _equalDeallocateStmt(a, b);
|
3817
|
-
break;
|
3818
|
-
case T_DropOwnedStmt:
|
3819
|
-
retval = _equalDropOwnedStmt(a, b);
|
3820
|
-
break;
|
3821
|
-
case T_ReassignOwnedStmt:
|
3822
|
-
retval = _equalReassignOwnedStmt(a, b);
|
3823
|
-
break;
|
3824
|
-
case T_AlterTSDictionaryStmt:
|
3825
|
-
retval = _equalAlterTSDictionaryStmt(a, b);
|
3826
|
-
break;
|
3827
|
-
case T_AlterTSConfigurationStmt:
|
3828
|
-
retval = _equalAlterTSConfigurationStmt(a, b);
|
3829
|
-
break;
|
3830
|
-
case T_CreatePolicyStmt:
|
3831
|
-
retval = _equalCreatePolicyStmt(a, b);
|
3832
|
-
break;
|
3833
|
-
case T_AlterPolicyStmt:
|
3834
|
-
retval = _equalAlterPolicyStmt(a, b);
|
3835
|
-
break;
|
3836
|
-
case T_CreatePublicationStmt:
|
3837
|
-
retval = _equalCreatePublicationStmt(a, b);
|
3838
|
-
break;
|
3839
|
-
case T_AlterPublicationStmt:
|
3840
|
-
retval = _equalAlterPublicationStmt(a, b);
|
3841
|
-
break;
|
3842
|
-
case T_CreateSubscriptionStmt:
|
3843
|
-
retval = _equalCreateSubscriptionStmt(a, b);
|
3844
|
-
break;
|
3845
|
-
case T_AlterSubscriptionStmt:
|
3846
|
-
retval = _equalAlterSubscriptionStmt(a, b);
|
3847
|
-
break;
|
3848
|
-
case T_DropSubscriptionStmt:
|
3849
|
-
retval = _equalDropSubscriptionStmt(a, b);
|
3850
|
-
break;
|
3851
|
-
case T_A_Expr:
|
3852
|
-
retval = _equalAExpr(a, b);
|
3853
|
-
break;
|
3854
|
-
case T_ColumnRef:
|
3855
|
-
retval = _equalColumnRef(a, b);
|
3856
|
-
break;
|
3857
|
-
case T_ParamRef:
|
3858
|
-
retval = _equalParamRef(a, b);
|
3859
|
-
break;
|
3860
|
-
case T_A_Const:
|
3861
|
-
retval = _equalAConst(a, b);
|
3862
|
-
break;
|
3863
|
-
case T_FuncCall:
|
3864
|
-
retval = _equalFuncCall(a, b);
|
3865
|
-
break;
|
3866
|
-
case T_A_Star:
|
3867
|
-
retval = _equalAStar(a, b);
|
3868
|
-
break;
|
3869
|
-
case T_A_Indices:
|
3870
|
-
retval = _equalAIndices(a, b);
|
3871
|
-
break;
|
3872
|
-
case T_A_Indirection:
|
3873
|
-
retval = _equalA_Indirection(a, b);
|
3874
|
-
break;
|
3875
|
-
case T_A_ArrayExpr:
|
3876
|
-
retval = _equalA_ArrayExpr(a, b);
|
3877
|
-
break;
|
3878
|
-
case T_ResTarget:
|
3879
|
-
retval = _equalResTarget(a, b);
|
3880
|
-
break;
|
3881
|
-
case T_MultiAssignRef:
|
3882
|
-
retval = _equalMultiAssignRef(a, b);
|
3883
|
-
break;
|
3884
|
-
case T_TypeCast:
|
3885
|
-
retval = _equalTypeCast(a, b);
|
3886
|
-
break;
|
3887
|
-
case T_CollateClause:
|
3888
|
-
retval = _equalCollateClause(a, b);
|
3889
|
-
break;
|
3890
|
-
case T_SortBy:
|
3891
|
-
retval = _equalSortBy(a, b);
|
3892
|
-
break;
|
3893
|
-
case T_WindowDef:
|
3894
|
-
retval = _equalWindowDef(a, b);
|
3895
|
-
break;
|
3896
|
-
case T_RangeSubselect:
|
3897
|
-
retval = _equalRangeSubselect(a, b);
|
3898
|
-
break;
|
3899
|
-
case T_RangeFunction:
|
3900
|
-
retval = _equalRangeFunction(a, b);
|
3901
|
-
break;
|
3902
|
-
case T_RangeTableSample:
|
3903
|
-
retval = _equalRangeTableSample(a, b);
|
3904
|
-
break;
|
3905
|
-
case T_RangeTableFunc:
|
3906
|
-
retval = _equalRangeTableFunc(a, b);
|
3907
|
-
break;
|
3908
|
-
case T_RangeTableFuncCol:
|
3909
|
-
retval = _equalRangeTableFuncCol(a, b);
|
3910
|
-
break;
|
3911
|
-
case T_TypeName:
|
3912
|
-
retval = _equalTypeName(a, b);
|
3913
|
-
break;
|
3914
|
-
case T_IndexElem:
|
3915
|
-
retval = _equalIndexElem(a, b);
|
3916
|
-
break;
|
3917
|
-
case T_ColumnDef:
|
3918
|
-
retval = _equalColumnDef(a, b);
|
3919
|
-
break;
|
3920
|
-
case T_Constraint:
|
3921
|
-
retval = _equalConstraint(a, b);
|
3922
|
-
break;
|
3923
|
-
case T_DefElem:
|
3924
|
-
retval = _equalDefElem(a, b);
|
3925
|
-
break;
|
3926
|
-
case T_LockingClause:
|
3927
|
-
retval = _equalLockingClause(a, b);
|
3928
|
-
break;
|
3929
|
-
case T_RangeTblEntry:
|
3930
|
-
retval = _equalRangeTblEntry(a, b);
|
3931
|
-
break;
|
3932
|
-
case T_RangeTblFunction:
|
3933
|
-
retval = _equalRangeTblFunction(a, b);
|
3934
|
-
break;
|
3935
|
-
case T_TableSampleClause:
|
3936
|
-
retval = _equalTableSampleClause(a, b);
|
3937
|
-
break;
|
3938
|
-
case T_WithCheckOption:
|
3939
|
-
retval = _equalWithCheckOption(a, b);
|
3940
|
-
break;
|
3941
|
-
case T_SortGroupClause:
|
3942
|
-
retval = _equalSortGroupClause(a, b);
|
3943
|
-
break;
|
3944
|
-
case T_GroupingSet:
|
3945
|
-
retval = _equalGroupingSet(a, b);
|
3946
|
-
break;
|
3947
|
-
case T_WindowClause:
|
3948
|
-
retval = _equalWindowClause(a, b);
|
3949
|
-
break;
|
3950
|
-
case T_RowMarkClause:
|
3951
|
-
retval = _equalRowMarkClause(a, b);
|
3952
|
-
break;
|
3953
|
-
case T_WithClause:
|
3954
|
-
retval = _equalWithClause(a, b);
|
3955
|
-
break;
|
3956
|
-
case T_InferClause:
|
3957
|
-
retval = _equalInferClause(a, b);
|
3958
|
-
break;
|
3959
|
-
case T_OnConflictClause:
|
3960
|
-
retval = _equalOnConflictClause(a, b);
|
3961
|
-
break;
|
3962
|
-
case T_CommonTableExpr:
|
3963
|
-
retval = _equalCommonTableExpr(a, b);
|
3964
|
-
break;
|
3965
|
-
case T_ObjectWithArgs:
|
3966
|
-
retval = _equalObjectWithArgs(a, b);
|
3967
|
-
break;
|
3968
|
-
case T_AccessPriv:
|
3969
|
-
retval = _equalAccessPriv(a, b);
|
3970
|
-
break;
|
3971
|
-
case T_XmlSerialize:
|
3972
|
-
retval = _equalXmlSerialize(a, b);
|
3973
|
-
break;
|
3974
|
-
case T_RoleSpec:
|
3975
|
-
retval = _equalRoleSpec(a, b);
|
3976
|
-
break;
|
3977
|
-
case T_TriggerTransition:
|
3978
|
-
retval = _equalTriggerTransition(a, b);
|
3979
|
-
break;
|
3980
|
-
case T_PartitionElem:
|
3981
|
-
retval = _equalPartitionElem(a, b);
|
3982
|
-
break;
|
3983
|
-
case T_PartitionSpec:
|
3984
|
-
retval = _equalPartitionSpec(a, b);
|
3985
|
-
break;
|
3986
|
-
case T_PartitionBoundSpec:
|
3987
|
-
retval = _equalPartitionBoundSpec(a, b);
|
3988
|
-
break;
|
3989
|
-
case T_PartitionRangeDatum:
|
3990
|
-
retval = _equalPartitionRangeDatum(a, b);
|
3991
|
-
break;
|
3992
|
-
case T_PartitionCmd:
|
3993
|
-
retval = _equalPartitionCmd(a, b);
|
3994
|
-
break;
|
3995
|
-
|
3996
267
|
default:
|
3997
268
|
elog(ERROR, "unrecognized node type: %d",
|
3998
269
|
(int) nodeTag(a));
|