pg_query 5.1.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/README.md +1 -1
- data/Rakefile +2 -2
- data/ext/pg_query/include/pg_query.h +4 -3
- data/ext/pg_query/include/pg_query_enum_defs.c +424 -154
- data/ext/pg_query/include/pg_query_fingerprint_conds.c +68 -4
- data/ext/pg_query/include/pg_query_fingerprint_defs.c +2952 -1845
- data/ext/pg_query/include/pg_query_outfuncs_conds.c +51 -3
- data/ext/pg_query/include/pg_query_outfuncs_defs.c +210 -23
- data/ext/pg_query/include/pg_query_readfuncs_conds.c +17 -1
- data/ext/pg_query/include/pg_query_readfuncs_defs.c +271 -52
- data/ext/pg_query/include/postgres/access/amapi.h +10 -3
- data/ext/pg_query/include/postgres/access/attmap.h +1 -1
- data/ext/pg_query/include/postgres/access/attnum.h +1 -1
- 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 +2 -3
- data/ext/pg_query/include/postgres/access/commit_ts.h +2 -3
- data/ext/pg_query/include/postgres/access/detoast.h +1 -1
- data/ext/pg_query/include/postgres/access/genam.h +8 -4
- data/ext/pg_query/include/postgres/access/gin.h +1 -1
- data/ext/pg_query/include/postgres/access/htup.h +1 -1
- data/ext/pg_query/include/postgres/access/htup_details.h +11 -11
- data/ext/pg_query/include/postgres/access/itup.h +3 -3
- data/ext/pg_query/include/postgres/access/parallel.h +1 -2
- data/ext/pg_query/include/postgres/access/printtup.h +1 -1
- data/ext/pg_query/include/postgres/access/relation.h +1 -1
- data/ext/pg_query/include/postgres/access/relscan.h +1 -1
- data/ext/pg_query/include/postgres/access/rmgrlist.h +1 -1
- data/ext/pg_query/include/postgres/access/sdir.h +1 -1
- data/ext/pg_query/include/postgres/access/skey.h +1 -1
- data/ext/pg_query/include/postgres/access/slru.h +221 -0
- data/ext/pg_query/include/postgres/access/stratnum.h +1 -1
- data/ext/pg_query/include/postgres/access/sysattr.h +1 -1
- data/ext/pg_query/include/postgres/access/table.h +1 -1
- data/ext/pg_query/include/postgres/access/tableam.h +33 -24
- data/ext/pg_query/include/postgres/access/tidstore.h +50 -0
- data/ext/pg_query/include/postgres/access/toast_compression.h +2 -2
- data/ext/pg_query/include/postgres/access/transam.h +7 -7
- data/ext/pg_query/include/postgres/access/tsmapi.h +1 -1
- data/ext/pg_query/include/postgres/access/tupconvert.h +1 -1
- data/ext/pg_query/include/postgres/access/tupdesc.h +5 -5
- data/ext/pg_query/include/postgres/access/tupmacs.h +1 -1
- data/ext/pg_query/include/postgres/access/twophase.h +2 -2
- data/ext/pg_query/include/postgres/access/xact.h +5 -5
- data/ext/pg_query/include/postgres/access/xlog.h +20 -12
- data/ext/pg_query/include/postgres/access/xlog_internal.h +4 -3
- data/ext/pg_query/include/postgres/access/xlogbackup.h +3 -1
- data/ext/pg_query/include/postgres/access/xlogdefs.h +5 -5
- data/ext/pg_query/include/postgres/access/xlogprefetcher.h +2 -2
- data/ext/pg_query/include/postgres/access/xlogreader.h +2 -2
- data/ext/pg_query/include/postgres/access/xlogrecord.h +3 -3
- data/ext/pg_query/include/postgres/access/xlogrecovery.h +4 -4
- data/ext/pg_query/include/postgres/archive/archive_module.h +9 -1
- data/ext/pg_query/include/postgres/c.h +31 -36
- data/ext/pg_query/include/postgres/catalog/catalog.h +3 -1
- data/ext/pg_query/include/postgres/catalog/catversion.h +2 -2
- data/ext/pg_query/include/postgres/catalog/dependency.h +17 -59
- data/ext/pg_query/include/postgres/catalog/genbki.h +12 -6
- data/ext/pg_query/include/postgres/catalog/index.h +22 -18
- data/ext/pg_query/include/postgres/catalog/indexing.h +1 -1
- data/ext/pg_query/include/postgres/catalog/namespace.h +18 -19
- data/ext/pg_query/include/postgres/catalog/objectaccess.h +2 -2
- data/ext/pg_query/include/postgres/catalog/objectaddress.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_aggregate.h +4 -2
- data/ext/pg_query/include/postgres/catalog/pg_aggregate_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_am.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_am_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_attribute.h +31 -14
- data/ext/pg_query/include/postgres/catalog/pg_attribute_d.h +3 -3
- data/ext/pg_query/include/postgres/catalog/pg_authid.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_authid_d.h +2 -1
- data/ext/pg_query/include/postgres/catalog/pg_class.h +10 -5
- data/ext/pg_query/include/postgres/catalog/pg_class_d.h +4 -2
- data/ext/pg_query/include/postgres/catalog/pg_collation.h +11 -5
- data/ext/pg_query/include/postgres/catalog/pg_collation_d.h +5 -2
- data/ext/pg_query/include/postgres/catalog/pg_constraint.h +15 -10
- data/ext/pg_query/include/postgres/catalog/pg_constraint_d.h +2 -1
- data/ext/pg_query/include/postgres/catalog/pg_control.h +5 -3
- data/ext/pg_query/include/postgres/catalog/pg_conversion.h +8 -4
- data/ext/pg_query/include/postgres/catalog/pg_conversion_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_database.h +9 -4
- data/ext/pg_query/include/postgres/catalog/pg_database_d.h +13 -12
- data/ext/pg_query/include/postgres/catalog/pg_depend.h +3 -3
- data/ext/pg_query/include/postgres/catalog/pg_depend_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_event_trigger.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_event_trigger_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_index.h +5 -3
- data/ext/pg_query/include/postgres/catalog/pg_index_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_language.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_language_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_namespace.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_namespace_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_opclass.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_opclass_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_operator.h +20 -3
- data/ext/pg_query/include/postgres/catalog/pg_operator_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_opfamily.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_opfamily_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_partitioned_table.h +4 -2
- data/ext/pg_query/include/postgres/catalog/pg_partitioned_table_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_proc.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_proc_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_publication.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_publication_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_replication_origin.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_replication_origin_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_statistic.h +10 -4
- data/ext/pg_query/include/postgres/catalog/pg_statistic_d.h +7 -3
- data/ext/pg_query/include/postgres/catalog/pg_statistic_ext.h +10 -7
- data/ext/pg_query/include/postgres/catalog/pg_statistic_ext_d.h +3 -3
- data/ext/pg_query/include/postgres/catalog/pg_transform.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_transform_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_trigger.h +4 -4
- data/ext/pg_query/include/postgres/catalog/pg_trigger_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_ts_config.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_ts_config_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_ts_dict.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_ts_dict_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_ts_parser.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_ts_parser_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_ts_template.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_ts_template_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/pg_type.h +6 -3
- data/ext/pg_query/include/postgres/catalog/pg_type_d.h +1 -1
- data/ext/pg_query/include/postgres/catalog/storage.h +1 -1
- data/ext/pg_query/include/postgres/catalog/syscache_ids.h +104 -0
- data/ext/pg_query/include/postgres/commands/async.h +2 -6
- data/ext/pg_query/include/postgres/commands/dbcommands.h +1 -1
- data/ext/pg_query/include/postgres/commands/defrem.h +6 -6
- data/ext/pg_query/include/postgres/commands/event_trigger.h +5 -2
- data/ext/pg_query/include/postgres/commands/explain.h +19 -3
- data/ext/pg_query/include/postgres/commands/prepare.h +1 -1
- data/ext/pg_query/include/postgres/commands/tablespace.h +1 -1
- data/ext/pg_query/include/postgres/commands/trigger.h +1 -1
- data/ext/pg_query/include/postgres/commands/vacuum.h +28 -26
- data/ext/pg_query/include/postgres/common/cryptohash.h +2 -2
- data/ext/pg_query/include/postgres/common/file_perm.h +1 -1
- data/ext/pg_query/include/postgres/common/file_utils.h +65 -0
- data/ext/pg_query/include/postgres/common/hashfn.h +16 -1
- data/ext/pg_query/include/postgres/common/hashfn_unstable.h +453 -0
- data/ext/pg_query/include/postgres/common/int.h +79 -4
- data/ext/pg_query/include/postgres/common/keywords.h +1 -1
- data/ext/pg_query/include/postgres/common/kwlookup.h +1 -1
- data/ext/pg_query/include/postgres/common/pg_prng.h +2 -1
- data/ext/pg_query/include/postgres/common/relpath.h +4 -4
- data/ext/pg_query/include/postgres/common/scram-common.h +1 -1
- data/ext/pg_query/include/postgres/common/sha2.h +1 -1
- data/ext/pg_query/include/postgres/common/string.h +1 -1
- data/ext/pg_query/include/postgres/common/unicode_east_asian_fw_table.h +2 -3
- data/ext/pg_query/include/postgres/copyfuncs.funcs.c +278 -30
- data/ext/pg_query/include/postgres/copyfuncs.switch.c +55 -4
- data/ext/pg_query/include/postgres/datatype/timestamp.h +28 -2
- data/ext/pg_query/include/postgres/equalfuncs.funcs.c +239 -26
- data/ext/pg_query/include/postgres/equalfuncs.switch.c +55 -4
- data/ext/pg_query/include/postgres/executor/execdesc.h +1 -1
- data/ext/pg_query/include/postgres/executor/executor.h +6 -5
- data/ext/pg_query/include/postgres/executor/functions.h +2 -1
- data/ext/pg_query/include/postgres/executor/instrument.h +5 -3
- data/ext/pg_query/include/postgres/executor/spi.h +2 -8
- data/ext/pg_query/include/postgres/executor/tablefunc.h +1 -1
- data/ext/pg_query/include/postgres/executor/tuptable.h +31 -2
- data/ext/pg_query/include/postgres/fmgr.h +2 -2
- data/ext/pg_query/include/postgres/foreign/fdwapi.h +1 -1
- data/ext/pg_query/include/postgres/funcapi.h +2 -2
- data/ext/pg_query/include/postgres/gram.h +871 -830
- data/ext/pg_query/include/postgres/gramparse.h +1 -1
- data/ext/pg_query/include/postgres/jit/jit.h +4 -3
- data/ext/pg_query/include/postgres/kwlist_d.h +511 -466
- data/ext/pg_query/include/postgres/lib/dshash.h +25 -10
- data/ext/pg_query/include/postgres/lib/ilist.h +1 -1
- data/ext/pg_query/include/postgres/lib/pairingheap.h +1 -1
- data/ext/pg_query/include/postgres/lib/simplehash.h +40 -18
- data/ext/pg_query/include/postgres/lib/sort_template.h +14 -1
- data/ext/pg_query/include/postgres/lib/stringinfo.h +93 -11
- data/ext/pg_query/include/postgres/libpq/auth.h +1 -1
- data/ext/pg_query/include/postgres/libpq/crypt.h +2 -2
- data/ext/pg_query/include/postgres/libpq/hba.h +4 -4
- data/ext/pg_query/include/postgres/libpq/libpq-be.h +29 -25
- data/ext/pg_query/include/postgres/libpq/libpq.h +6 -7
- data/ext/pg_query/include/postgres/libpq/pqcomm.h +26 -20
- data/ext/pg_query/include/postgres/libpq/pqformat.h +2 -3
- data/ext/pg_query/include/postgres/libpq/pqsignal.h +1 -1
- data/ext/pg_query/include/postgres/libpq/protocol.h +89 -0
- data/ext/pg_query/include/postgres/libpq/sasl.h +1 -1
- data/ext/pg_query/include/postgres/libpq/scram.h +1 -1
- data/ext/pg_query/include/postgres/mb/pg_wchar.h +102 -82
- data/ext/pg_query/include/postgres/mb/stringinfo_mb.h +1 -1
- data/ext/pg_query/include/postgres/miscadmin.h +64 -52
- data/ext/pg_query/include/postgres/nodes/bitmapset.h +17 -3
- data/ext/pg_query/include/postgres/nodes/execnodes.h +109 -25
- data/ext/pg_query/include/postgres/nodes/extensible.h +1 -1
- data/ext/pg_query/include/postgres/nodes/lockoptions.h +4 -4
- data/ext/pg_query/include/postgres/nodes/makefuncs.h +8 -2
- data/ext/pg_query/include/postgres/nodes/memnodes.h +43 -4
- data/ext/pg_query/include/postgres/nodes/miscnodes.h +1 -1
- data/ext/pg_query/include/postgres/nodes/nodeFuncs.h +1 -1
- data/ext/pg_query/include/postgres/nodes/nodes.h +30 -41
- data/ext/pg_query/include/postgres/nodes/nodetags.h +464 -444
- data/ext/pg_query/include/postgres/nodes/params.h +1 -1
- data/ext/pg_query/include/postgres/nodes/parsenodes.h +358 -175
- data/ext/pg_query/include/postgres/nodes/pathnodes.h +60 -9
- data/ext/pg_query/include/postgres/nodes/pg_list.h +62 -11
- data/ext/pg_query/include/postgres/nodes/plannodes.h +11 -10
- data/ext/pg_query/include/postgres/nodes/primnodes.h +344 -50
- data/ext/pg_query/include/postgres/nodes/print.h +1 -1
- data/ext/pg_query/include/postgres/nodes/queryjumble.h +2 -2
- data/ext/pg_query/include/postgres/nodes/replnodes.h +23 -2
- data/ext/pg_query/include/postgres/nodes/supportnodes.h +1 -1
- data/ext/pg_query/include/postgres/nodes/tidbitmap.h +1 -1
- data/ext/pg_query/include/postgres/nodes/value.h +1 -1
- data/ext/pg_query/include/postgres/optimizer/cost.h +5 -4
- data/ext/pg_query/include/postgres/optimizer/geqo.h +1 -1
- data/ext/pg_query/include/postgres/optimizer/geqo_gene.h +1 -1
- data/ext/pg_query/include/postgres/optimizer/optimizer.h +5 -2
- data/ext/pg_query/include/postgres/optimizer/paths.h +13 -8
- data/ext/pg_query/include/postgres/optimizer/planmain.h +7 -1
- data/ext/pg_query/include/postgres/parser/analyze.h +3 -1
- data/ext/pg_query/include/postgres/parser/kwlist.h +22 -2
- data/ext/pg_query/include/postgres/parser/parse_agg.h +1 -1
- data/ext/pg_query/include/postgres/parser/parse_coerce.h +2 -2
- data/ext/pg_query/include/postgres/parser/parse_expr.h +1 -1
- data/ext/pg_query/include/postgres/parser/parse_func.h +2 -2
- data/ext/pg_query/include/postgres/parser/parse_node.h +3 -2
- data/ext/pg_query/include/postgres/parser/parse_oper.h +4 -1
- data/ext/pg_query/include/postgres/parser/parse_relation.h +1 -1
- data/ext/pg_query/include/postgres/parser/parse_type.h +2 -2
- data/ext/pg_query/include/postgres/parser/parser.h +3 -3
- data/ext/pg_query/include/postgres/parser/parsetree.h +1 -1
- data/ext/pg_query/include/postgres/parser/scanner.h +1 -1
- data/ext/pg_query/include/postgres/parser/scansup.h +1 -1
- data/ext/pg_query/include/postgres/partitioning/partdefs.h +1 -1
- data/ext/pg_query/include/postgres/pg_config.h +34 -34
- data/ext/pg_query/include/postgres/pg_config_manual.h +21 -8
- data/ext/pg_query/include/postgres/pg_getopt.h +1 -1
- data/ext/pg_query/include/postgres/pg_trace.h +1 -1
- data/ext/pg_query/include/postgres/pgstat.h +13 -11
- data/ext/pg_query/include/postgres/pgtime.h +1 -1
- data/ext/pg_query/include/postgres/pl_reserved_kwlist.h +1 -1
- data/ext/pg_query/include/postgres/pl_reserved_kwlist_d.h +1 -1
- data/ext/pg_query/include/postgres/pl_unreserved_kwlist.h +1 -1
- data/ext/pg_query/include/postgres/pl_unreserved_kwlist_d.h +1 -1
- data/ext/pg_query/include/postgres/plerrcodes.h +4 -4
- data/ext/pg_query/include/postgres/plpgsql.h +15 -13
- data/ext/pg_query/include/postgres/port/atomics/arch-arm.h +1 -1
- data/ext/pg_query/include/postgres/port/atomics/arch-hppa.h +1 -1
- data/ext/pg_query/include/postgres/port/atomics/arch-ppc.h +3 -1
- data/ext/pg_query/include/postgres/port/atomics/arch-x86.h +3 -1
- data/ext/pg_query/include/postgres/port/atomics/fallback.h +1 -1
- data/ext/pg_query/include/postgres/port/atomics/generic-gcc.h +38 -1
- data/ext/pg_query/include/postgres/port/atomics/generic-msvc.h +19 -1
- data/ext/pg_query/include/postgres/port/atomics/generic-sunpro.h +16 -1
- data/ext/pg_query/include/postgres/port/atomics/generic.h +38 -2
- data/ext/pg_query/include/postgres/port/atomics.h +93 -6
- data/ext/pg_query/include/postgres/port/pg_bitutils.h +91 -9
- data/ext/pg_query/include/postgres/port/pg_bswap.h +1 -1
- data/ext/pg_query/include/postgres/port/pg_crc32c.h +10 -1
- data/ext/pg_query/include/postgres/port/pg_iovec.h +117 -0
- data/ext/pg_query/include/postgres/port/simd.h +48 -1
- data/ext/pg_query/include/postgres/port/win32/sys/socket.h +8 -0
- data/ext/pg_query/include/postgres/port/win32_port.h +1 -11
- data/ext/pg_query/include/postgres/port.h +7 -3
- data/ext/pg_query/include/postgres/portability/instr_time.h +1 -1
- data/ext/pg_query/include/postgres/postgres.h +1 -1
- data/ext/pg_query/include/postgres/postmaster/autovacuum.h +5 -16
- data/ext/pg_query/include/postgres/postmaster/bgworker.h +8 -6
- data/ext/pg_query/include/postgres/postmaster/bgworker_internals.h +3 -7
- data/ext/pg_query/include/postgres/postmaster/bgwriter.h +3 -3
- data/ext/pg_query/include/postgres/postmaster/interrupt.h +1 -1
- data/ext/pg_query/include/postgres/postmaster/pgarch.h +2 -2
- data/ext/pg_query/include/postgres/postmaster/postmaster.h +25 -5
- data/ext/pg_query/include/postgres/postmaster/startup.h +2 -2
- data/ext/pg_query/include/postgres/postmaster/syslogger.h +2 -4
- data/ext/pg_query/include/postgres/postmaster/walsummarizer.h +35 -0
- data/ext/pg_query/include/postgres/postmaster/walwriter.h +2 -2
- data/ext/pg_query/include/postgres/regex/regex.h +92 -9
- data/ext/pg_query/include/postgres/replication/logicallauncher.h +1 -1
- data/ext/pg_query/include/postgres/replication/logicalproto.h +2 -2
- data/ext/pg_query/include/postgres/replication/logicalworker.h +2 -1
- data/ext/pg_query/include/postgres/replication/origin.h +1 -1
- data/ext/pg_query/include/postgres/replication/reorderbuffer.h +18 -28
- data/ext/pg_query/include/postgres/replication/slot.h +41 -5
- data/ext/pg_query/include/postgres/replication/slotsync.h +38 -0
- data/ext/pg_query/include/postgres/replication/syncrep.h +1 -1
- data/ext/pg_query/include/postgres/replication/walreceiver.h +37 -11
- data/ext/pg_query/include/postgres/replication/walsender.h +5 -3
- data/ext/pg_query/include/postgres/rewrite/prs2lock.h +1 -1
- data/ext/pg_query/include/postgres/rewrite/rewriteHandler.h +7 -1
- data/ext/pg_query/include/postgres/rewrite/rewriteManip.h +2 -2
- data/ext/pg_query/include/postgres/rewrite/rewriteSupport.h +1 -1
- data/ext/pg_query/include/postgres/storage/block.h +1 -1
- data/ext/pg_query/include/postgres/storage/buf.h +1 -1
- data/ext/pg_query/include/postgres/storage/bufmgr.h +59 -41
- data/ext/pg_query/include/postgres/storage/bufpage.h +1 -1
- data/ext/pg_query/include/postgres/storage/condition_variable.h +1 -1
- data/ext/pg_query/include/postgres/storage/dsm.h +1 -1
- data/ext/pg_query/include/postgres/storage/dsm_impl.h +2 -2
- data/ext/pg_query/include/postgres/storage/fd.h +30 -13
- data/ext/pg_query/include/postgres/storage/fileset.h +1 -1
- data/ext/pg_query/include/postgres/storage/ipc.h +4 -1
- data/ext/pg_query/include/postgres/storage/item.h +1 -1
- data/ext/pg_query/include/postgres/storage/itemid.h +1 -1
- data/ext/pg_query/include/postgres/storage/itemptr.h +1 -1
- data/ext/pg_query/include/postgres/storage/large_object.h +1 -1
- data/ext/pg_query/include/postgres/storage/latch.h +4 -2
- data/ext/pg_query/include/postgres/storage/lmgr.h +8 -2
- data/ext/pg_query/include/postgres/storage/lock.h +19 -19
- data/ext/pg_query/include/postgres/storage/lockdefs.h +1 -1
- data/ext/pg_query/include/postgres/storage/lwlock.h +17 -9
- data/ext/pg_query/include/postgres/storage/lwlocknames.h +7 -10
- data/ext/pg_query/include/postgres/storage/off.h +1 -1
- data/ext/pg_query/include/postgres/storage/pg_sema.h +1 -1
- data/ext/pg_query/include/postgres/storage/pg_shmem.h +5 -4
- data/ext/pg_query/include/postgres/storage/pmsignal.h +2 -2
- data/ext/pg_query/include/postgres/storage/predicate.h +1 -5
- data/ext/pg_query/include/postgres/storage/proc.h +48 -23
- data/ext/pg_query/include/postgres/storage/procarray.h +5 -1
- data/ext/pg_query/include/postgres/storage/proclist_types.h +11 -9
- data/ext/pg_query/include/postgres/storage/procnumber.h +43 -0
- data/ext/pg_query/include/postgres/storage/procsignal.h +8 -6
- data/ext/pg_query/include/postgres/storage/read_stream.h +65 -0
- data/ext/pg_query/include/postgres/storage/relfilelocator.h +16 -15
- data/ext/pg_query/include/postgres/storage/s_lock.h +7 -27
- data/ext/pg_query/include/postgres/storage/sharedfileset.h +1 -1
- data/ext/pg_query/include/postgres/storage/shm_mq.h +2 -2
- data/ext/pg_query/include/postgres/storage/shm_toc.h +1 -1
- data/ext/pg_query/include/postgres/storage/shmem.h +1 -1
- data/ext/pg_query/include/postgres/storage/sinval.h +3 -3
- data/ext/pg_query/include/postgres/storage/smgr.h +41 -27
- data/ext/pg_query/include/postgres/storage/spin.h +1 -1
- data/ext/pg_query/include/postgres/storage/standby.h +13 -3
- data/ext/pg_query/include/postgres/storage/standbydefs.h +2 -2
- data/ext/pg_query/include/postgres/storage/sync.h +4 -4
- data/ext/pg_query/include/postgres/tcop/cmdtag.h +1 -2
- data/ext/pg_query/include/postgres/tcop/cmdtaglist.h +3 -2
- data/ext/pg_query/include/postgres/tcop/deparse_utility.h +2 -2
- data/ext/pg_query/include/postgres/tcop/dest.h +3 -2
- data/ext/pg_query/include/postgres/tcop/fastpath.h +1 -1
- data/ext/pg_query/include/postgres/tcop/pquery.h +1 -1
- data/ext/pg_query/include/postgres/tcop/tcopprot.h +9 -5
- data/ext/pg_query/include/postgres/tcop/utility.h +2 -2
- data/ext/pg_query/include/postgres/tsearch/ts_cache.h +1 -1
- data/ext/pg_query/include/postgres/utils/acl.h +19 -7
- data/ext/pg_query/include/postgres/utils/aclchk_internal.h +1 -1
- data/ext/pg_query/include/postgres/utils/array.h +1 -2
- data/ext/pg_query/include/postgres/utils/ascii.h +84 -0
- data/ext/pg_query/include/postgres/utils/backend_progress.h +3 -2
- data/ext/pg_query/include/postgres/utils/backend_status.h +8 -10
- data/ext/pg_query/include/postgres/utils/builtins.h +4 -1
- data/ext/pg_query/include/postgres/utils/bytea.h +2 -2
- data/ext/pg_query/include/postgres/utils/catcache.h +5 -6
- data/ext/pg_query/include/postgres/utils/date.h +1 -1
- data/ext/pg_query/include/postgres/utils/datetime.h +4 -1
- data/ext/pg_query/include/postgres/utils/datum.h +1 -1
- data/ext/pg_query/include/postgres/utils/dsa.h +44 -5
- data/ext/pg_query/include/postgres/utils/elog.h +3 -8
- data/ext/pg_query/include/postgres/utils/errcodes.h +1 -3
- data/ext/pg_query/include/postgres/utils/expandeddatum.h +1 -1
- data/ext/pg_query/include/postgres/utils/expandedrecord.h +1 -1
- data/ext/pg_query/include/postgres/utils/float.h +1 -1
- data/ext/pg_query/include/postgres/utils/fmgroids.h +49 -16
- data/ext/pg_query/include/postgres/utils/fmgrprotos.h +47 -14
- data/ext/pg_query/include/postgres/utils/fmgrtab.h +1 -1
- data/ext/pg_query/include/postgres/utils/guc.h +20 -6
- data/ext/pg_query/include/postgres/utils/guc_hooks.h +23 -2
- data/ext/pg_query/include/postgres/utils/guc_tables.h +6 -5
- data/ext/pg_query/include/postgres/utils/hsearch.h +2 -2
- data/ext/pg_query/include/postgres/utils/injection_point.h +44 -0
- data/ext/pg_query/include/postgres/utils/inval.h +1 -1
- data/ext/pg_query/include/postgres/utils/logtape.h +5 -5
- data/ext/pg_query/include/postgres/utils/lsyscache.h +6 -3
- data/ext/pg_query/include/postgres/utils/memdebug.h +1 -1
- data/ext/pg_query/include/postgres/utils/memutils.h +12 -5
- data/ext/pg_query/include/postgres/utils/memutils_internal.h +53 -13
- data/ext/pg_query/include/postgres/utils/memutils_memorychunk.h +25 -9
- data/ext/pg_query/include/postgres/utils/numeric.h +6 -1
- data/ext/pg_query/include/postgres/utils/palloc.h +1 -15
- data/ext/pg_query/include/postgres/utils/partcache.h +1 -1
- data/ext/pg_query/include/postgres/utils/pg_locale.h +8 -7
- data/ext/pg_query/include/postgres/utils/pgstat_internal.h +11 -17
- data/ext/pg_query/include/postgres/utils/plancache.h +5 -3
- data/ext/pg_query/include/postgres/utils/portal.h +9 -9
- data/ext/pg_query/include/postgres/utils/queryenvironment.h +2 -2
- data/ext/pg_query/include/postgres/utils/regproc.h +1 -1
- data/ext/pg_query/include/postgres/utils/rel.h +14 -15
- data/ext/pg_query/include/postgres/utils/relcache.h +2 -5
- data/ext/pg_query/include/postgres/utils/reltrigger.h +1 -1
- data/ext/pg_query/include/postgres/utils/resowner.h +90 -9
- data/ext/pg_query/include/postgres/utils/ruleutils.h +1 -1
- data/ext/pg_query/include/postgres/utils/sharedtuplestore.h +1 -1
- data/ext/pg_query/include/postgres/utils/snapmgr.h +1 -52
- data/ext/pg_query/include/postgres/utils/snapshot.h +2 -2
- data/ext/pg_query/include/postgres/utils/sortsupport.h +1 -1
- data/ext/pg_query/include/postgres/utils/syscache.h +2 -98
- data/ext/pg_query/include/postgres/utils/timeout.h +3 -2
- data/ext/pg_query/include/postgres/utils/timestamp.h +1 -1
- data/ext/pg_query/include/postgres/utils/tuplesort.h +36 -9
- data/ext/pg_query/include/postgres/utils/tuplestore.h +2 -5
- data/ext/pg_query/include/postgres/utils/typcache.h +2 -1
- data/ext/pg_query/include/postgres/utils/varlena.h +1 -1
- data/ext/pg_query/include/postgres/utils/wait_event.h +28 -214
- data/ext/pg_query/include/postgres/utils/wait_event_types.h +218 -0
- data/ext/pg_query/include/postgres/utils/xml.h +4 -4
- data/ext/pg_query/include/postgres/varatt.h +1 -1
- data/ext/pg_query/include/protobuf/pg_query.pb-c.h +1546 -792
- data/ext/pg_query/include/protobuf/pg_query.pb.h +58365 -46595
- data/ext/pg_query/pg_query.pb-c.c +6598 -3739
- data/ext/pg_query/pg_query_normalize.c +42 -1
- data/ext/pg_query/pg_query_outfuncs_json.c +3 -1
- data/ext/pg_query/pg_query_parse_plpgsql.c +12 -13
- data/ext/pg_query/pg_query_readfuncs_protobuf.c +2 -2
- data/ext/pg_query/pg_query_ruby_freebsd.sym +0 -1
- data/ext/pg_query/pg_query_scan.c +1 -1
- data/ext/pg_query/postgres_deparse.c +409 -21
- data/ext/pg_query/src_backend_catalog_namespace.c +241 -66
- data/ext/pg_query/src_backend_catalog_pg_proc.c +1 -3
- data/ext/pg_query/src_backend_commands_define.c +2 -3
- data/ext/pg_query/src_backend_nodes_bitmapset.c +137 -94
- data/ext/pg_query/src_backend_nodes_copyfuncs.c +1 -1
- data/ext/pg_query/src_backend_nodes_equalfuncs.c +1 -1
- data/ext/pg_query/src_backend_nodes_extensible.c +1 -1
- data/ext/pg_query/src_backend_nodes_list.c +3 -7
- data/ext/pg_query/src_backend_nodes_makefuncs.c +59 -20
- data/ext/pg_query/src_backend_nodes_nodeFuncs.c +109 -2
- data/ext/pg_query/src_backend_nodes_value.c +1 -1
- data/ext/pg_query/src_backend_parser_gram.c +34490 -32135
- data/ext/pg_query/src_backend_parser_parser.c +8 -8
- data/ext/pg_query/src_backend_parser_scan.c +5637 -3028
- data/ext/pg_query/src_backend_parser_scansup.c +2 -1
- data/ext/pg_query/src_backend_storage_ipc_ipc.c +1 -1
- data/ext/pg_query/src_backend_tcop_postgres.c +34 -10
- data/ext/pg_query/src_backend_utils_activity_pgstat_database.c +2 -2
- data/ext/pg_query/src_backend_utils_adt_datum.c +8 -6
- data/ext/pg_query/src_backend_utils_adt_expandeddatum.c +1 -1
- data/ext/pg_query/src_backend_utils_adt_format_type.c +1 -1
- data/ext/pg_query/src_backend_utils_adt_numutils.c +4 -5
- data/ext/pg_query/src_backend_utils_adt_ruleutils.c +101 -28
- data/ext/pg_query/src_backend_utils_error_assert.c +1 -1
- data/ext/pg_query/src_backend_utils_error_elog.c +47 -42
- data/ext/pg_query/src_backend_utils_fmgr_fmgr.c +4 -2
- data/ext/pg_query/src_backend_utils_init_globals.c +15 -3
- data/ext/pg_query/src_backend_utils_mb_mbutils.c +11 -18
- data/ext/pg_query/src_backend_utils_misc_guc_tables.c +16 -6
- data/ext/pg_query/src_backend_utils_mmgr_alignedalloc.c +8 -5
- data/ext/pg_query/src_backend_utils_mmgr_aset.c +308 -238
- data/ext/pg_query/src_backend_utils_mmgr_bump.c +728 -0
- data/ext/pg_query/src_backend_utils_mmgr_generation.c +273 -197
- data/ext/pg_query/src_backend_utils_mmgr_mcxt.c +270 -215
- data/ext/pg_query/src_backend_utils_mmgr_slab.c +154 -96
- data/ext/pg_query/src_common_encnames.c +43 -44
- data/ext/pg_query/src_common_hashfn.c +1 -1
- data/ext/pg_query/src_common_keywords.c +1 -1
- data/ext/pg_query/src_common_kwlist_d.h +511 -466
- data/ext/pg_query/src_common_kwlookup.c +1 -1
- data/ext/pg_query/src_common_psprintf.c +3 -3
- data/ext/pg_query/src_common_stringinfo.c +18 -1
- data/ext/pg_query/src_common_wchar.c +45 -108
- data/ext/pg_query/src_pl_plpgsql_src_pl_comp.c +99 -5
- data/ext/pg_query/src_pl_plpgsql_src_pl_funcs.c +1 -1
- data/ext/pg_query/src_pl_plpgsql_src_pl_gram.c +242 -143
- data/ext/pg_query/src_pl_plpgsql_src_pl_handler.c +1 -1
- data/ext/pg_query/src_pl_plpgsql_src_pl_reserved_kwlist_d.h +1 -1
- data/ext/pg_query/src_pl_plpgsql_src_pl_scanner.c +19 -1
- data/ext/pg_query/src_pl_plpgsql_src_pl_unreserved_kwlist_d.h +1 -1
- data/ext/pg_query/src_port_pg_bitutils.c +173 -28
- data/ext/pg_query/src_port_pgstrcasecmp.c +29 -1
- data/ext/pg_query/src_port_snprintf.c +1 -1
- data/ext/pg_query/src_port_strerror.c +1 -3
- data/ext/pg_query/src_port_strlcpy.c +1 -1
- data/lib/pg_query/param_refs.rb +1 -1
- data/lib/pg_query/pg_query_pb.rb +26 -3
- data/lib/pg_query/treewalker.rb +38 -11
- data/lib/pg_query/truncate.rb +1 -1
- data/lib/pg_query/version.rb +1 -1
- metadata +25 -11
- data/ext/pg_query/include/postgres/storage/backendid.h +0 -37
- data/ext/pg_query/include/postgres/storage/sinvaladt.h +0 -45
- data/ext/pg_query/src_backend_nodes_nodes.c +0 -38
@@ -9,6 +9,8 @@ static Param * _readParam(OUT_TYPE(Param, Param) msg);
|
|
9
9
|
static Aggref * _readAggref(OUT_TYPE(Aggref, Aggref) msg);
|
10
10
|
static GroupingFunc * _readGroupingFunc(OUT_TYPE(GroupingFunc, GroupingFunc) msg);
|
11
11
|
static WindowFunc * _readWindowFunc(OUT_TYPE(WindowFunc, WindowFunc) msg);
|
12
|
+
static WindowFuncRunCondition * _readWindowFuncRunCondition(OUT_TYPE(WindowFuncRunCondition, WindowFuncRunCondition) msg);
|
13
|
+
static MergeSupportFunc * _readMergeSupportFunc(OUT_TYPE(MergeSupportFunc, MergeSupportFunc) msg);
|
12
14
|
static SubscriptingRef * _readSubscriptingRef(OUT_TYPE(SubscriptingRef, SubscriptingRef) msg);
|
13
15
|
static FuncExpr * _readFuncExpr(OUT_TYPE(FuncExpr, FuncExpr) msg);
|
14
16
|
static NamedArgExpr * _readNamedArgExpr(OUT_TYPE(NamedArgExpr, NamedArgExpr) msg);
|
@@ -42,8 +44,14 @@ static JsonReturning * _readJsonReturning(OUT_TYPE(JsonReturning, JsonReturning)
|
|
42
44
|
static JsonValueExpr * _readJsonValueExpr(OUT_TYPE(JsonValueExpr, JsonValueExpr) msg);
|
43
45
|
static JsonConstructorExpr * _readJsonConstructorExpr(OUT_TYPE(JsonConstructorExpr, JsonConstructorExpr) msg);
|
44
46
|
static JsonIsPredicate * _readJsonIsPredicate(OUT_TYPE(JsonIsPredicate, JsonIsPredicate) msg);
|
47
|
+
static JsonBehavior * _readJsonBehavior(OUT_TYPE(JsonBehavior, JsonBehavior) msg);
|
48
|
+
static JsonExpr * _readJsonExpr(OUT_TYPE(JsonExpr, JsonExpr) msg);
|
49
|
+
static JsonTablePath * _readJsonTablePath(OUT_TYPE(JsonTablePath, JsonTablePath) msg);
|
50
|
+
static JsonTablePathScan * _readJsonTablePathScan(OUT_TYPE(JsonTablePathScan, JsonTablePathScan) msg);
|
51
|
+
static JsonTableSiblingJoin * _readJsonTableSiblingJoin(OUT_TYPE(JsonTableSiblingJoin, JsonTableSiblingJoin) msg);
|
45
52
|
static NullTest * _readNullTest(OUT_TYPE(NullTest, NullTest) msg);
|
46
53
|
static BooleanTest * _readBooleanTest(OUT_TYPE(BooleanTest, BooleanTest) msg);
|
54
|
+
static MergeAction * _readMergeAction(OUT_TYPE(MergeAction, MergeAction) msg);
|
47
55
|
static CoerceToDomain * _readCoerceToDomain(OUT_TYPE(CoerceToDomain, CoerceToDomain) msg);
|
48
56
|
static CoerceToDomainValue * _readCoerceToDomainValue(OUT_TYPE(CoerceToDomainValue, CoerceToDomainValue) msg);
|
49
57
|
static SetToDefault * _readSetToDefault(OUT_TYPE(SetToDefault, SetToDefault) msg);
|
@@ -87,6 +95,7 @@ static PartitionElem * _readPartitionElem(OUT_TYPE(PartitionElem, PartitionElem)
|
|
87
95
|
static PartitionSpec * _readPartitionSpec(OUT_TYPE(PartitionSpec, PartitionSpec) msg);
|
88
96
|
static PartitionBoundSpec * _readPartitionBoundSpec(OUT_TYPE(PartitionBoundSpec, PartitionBoundSpec) msg);
|
89
97
|
static PartitionRangeDatum * _readPartitionRangeDatum(OUT_TYPE(PartitionRangeDatum, PartitionRangeDatum) msg);
|
98
|
+
static SinglePartitionSpec * _readSinglePartitionSpec(OUT_TYPE(SinglePartitionSpec, SinglePartitionSpec) msg);
|
90
99
|
static PartitionCmd * _readPartitionCmd(OUT_TYPE(PartitionCmd, PartitionCmd) msg);
|
91
100
|
static RangeTblEntry * _readRangeTblEntry(OUT_TYPE(RangeTblEntry, RangeTblEntry) msg);
|
92
101
|
static RTEPermissionInfo * _readRTEPermissionInfo(OUT_TYPE(RTEPermissionInfo, RTEPermissionInfo) msg);
|
@@ -104,10 +113,17 @@ static CTESearchClause * _readCTESearchClause(OUT_TYPE(CTESearchClause, CTESearc
|
|
104
113
|
static CTECycleClause * _readCTECycleClause(OUT_TYPE(CTECycleClause, CTECycleClause) msg);
|
105
114
|
static CommonTableExpr * _readCommonTableExpr(OUT_TYPE(CommonTableExpr, CommonTableExpr) msg);
|
106
115
|
static MergeWhenClause * _readMergeWhenClause(OUT_TYPE(MergeWhenClause, MergeWhenClause) msg);
|
107
|
-
static MergeAction * _readMergeAction(OUT_TYPE(MergeAction, MergeAction) msg);
|
108
116
|
static TriggerTransition * _readTriggerTransition(OUT_TYPE(TriggerTransition, TriggerTransition) msg);
|
109
117
|
static JsonOutput * _readJsonOutput(OUT_TYPE(JsonOutput, JsonOutput) msg);
|
118
|
+
static JsonArgument * _readJsonArgument(OUT_TYPE(JsonArgument, JsonArgument) msg);
|
119
|
+
static JsonFuncExpr * _readJsonFuncExpr(OUT_TYPE(JsonFuncExpr, JsonFuncExpr) msg);
|
120
|
+
static JsonTablePathSpec * _readJsonTablePathSpec(OUT_TYPE(JsonTablePathSpec, JsonTablePathSpec) msg);
|
121
|
+
static JsonTable * _readJsonTable(OUT_TYPE(JsonTable, JsonTable) msg);
|
122
|
+
static JsonTableColumn * _readJsonTableColumn(OUT_TYPE(JsonTableColumn, JsonTableColumn) msg);
|
110
123
|
static JsonKeyValue * _readJsonKeyValue(OUT_TYPE(JsonKeyValue, JsonKeyValue) msg);
|
124
|
+
static JsonParseExpr * _readJsonParseExpr(OUT_TYPE(JsonParseExpr, JsonParseExpr) msg);
|
125
|
+
static JsonScalarExpr * _readJsonScalarExpr(OUT_TYPE(JsonScalarExpr, JsonScalarExpr) msg);
|
126
|
+
static JsonSerializeExpr * _readJsonSerializeExpr(OUT_TYPE(JsonSerializeExpr, JsonSerializeExpr) msg);
|
111
127
|
static JsonObjectConstructor * _readJsonObjectConstructor(OUT_TYPE(JsonObjectConstructor, JsonObjectConstructor) msg);
|
112
128
|
static JsonArrayConstructor * _readJsonArrayConstructor(OUT_TYPE(JsonArrayConstructor, JsonArrayConstructor) msg);
|
113
129
|
static JsonArrayQueryConstructor * _readJsonArrayQueryConstructor(OUT_TYPE(JsonArrayQueryConstructor, JsonArrayQueryConstructor) msg);
|
@@ -272,6 +288,7 @@ static TableFunc *
|
|
272
288
|
_readTableFunc(OUT_TYPE(TableFunc, TableFunc) msg)
|
273
289
|
{
|
274
290
|
TableFunc *node = makeNode(TableFunc);
|
291
|
+
READ_ENUM_FIELD(TableFuncType, functype, functype, functype);
|
275
292
|
READ_LIST_FIELD(ns_uris, ns_uris, ns_uris);
|
276
293
|
READ_LIST_FIELD(ns_names, ns_names, ns_names);
|
277
294
|
READ_NODE_PTR_FIELD(docexpr, docexpr, docexpr);
|
@@ -282,7 +299,10 @@ _readTableFunc(OUT_TYPE(TableFunc, TableFunc) msg)
|
|
282
299
|
READ_LIST_FIELD(colcollations, colcollations, colcollations);
|
283
300
|
READ_LIST_FIELD(colexprs, colexprs, colexprs);
|
284
301
|
READ_LIST_FIELD(coldefexprs, coldefexprs, coldefexprs);
|
302
|
+
READ_LIST_FIELD(colvalexprs, colvalexprs, colvalexprs);
|
303
|
+
READ_LIST_FIELD(passingvalexprs, passingvalexprs, passingvalexprs);
|
285
304
|
READ_BITMAPSET_FIELD(notnulls, notnulls, notnulls);
|
305
|
+
READ_NODE_PTR_FIELD(plan, plan, plan);
|
286
306
|
READ_INT_FIELD(ordinalitycol, ordinalitycol, ordinalitycol);
|
287
307
|
READ_INT_FIELD(location, location, location);
|
288
308
|
return node;
|
@@ -344,7 +364,7 @@ _readAggref(OUT_TYPE(Aggref, Aggref) msg)
|
|
344
364
|
READ_LIST_FIELD(args, args, args);
|
345
365
|
READ_LIST_FIELD(aggorder, aggorder, aggorder);
|
346
366
|
READ_LIST_FIELD(aggdistinct, aggdistinct, aggdistinct);
|
347
|
-
|
367
|
+
READ_ABSTRACT_PTR_FIELD(aggfilter, aggfilter, aggfilter, Expr*);
|
348
368
|
READ_BOOL_FIELD(aggstar, aggstar, aggstar);
|
349
369
|
READ_BOOL_FIELD(aggvariadic, aggvariadic, aggvariadic);
|
350
370
|
READ_CHAR_FIELD(aggkind, aggkind, aggkind);
|
@@ -376,7 +396,8 @@ _readWindowFunc(OUT_TYPE(WindowFunc, WindowFunc) msg)
|
|
376
396
|
READ_UINT_FIELD(wincollid, wincollid, wincollid);
|
377
397
|
READ_UINT_FIELD(inputcollid, inputcollid, inputcollid);
|
378
398
|
READ_LIST_FIELD(args, args, args);
|
379
|
-
|
399
|
+
READ_ABSTRACT_PTR_FIELD(aggfilter, aggfilter, aggfilter, Expr*);
|
400
|
+
READ_LIST_FIELD(run_condition, runCondition, runCondition);
|
380
401
|
READ_UINT_FIELD(winref, winref, winref);
|
381
402
|
READ_BOOL_FIELD(winstar, winstar, winstar);
|
382
403
|
READ_BOOL_FIELD(winagg, winagg, winagg);
|
@@ -384,6 +405,27 @@ _readWindowFunc(OUT_TYPE(WindowFunc, WindowFunc) msg)
|
|
384
405
|
return node;
|
385
406
|
}
|
386
407
|
|
408
|
+
static WindowFuncRunCondition *
|
409
|
+
_readWindowFuncRunCondition(OUT_TYPE(WindowFuncRunCondition, WindowFuncRunCondition) msg)
|
410
|
+
{
|
411
|
+
WindowFuncRunCondition *node = makeNode(WindowFuncRunCondition);
|
412
|
+
READ_UINT_FIELD(opno, opno, opno);
|
413
|
+
READ_UINT_FIELD(inputcollid, inputcollid, inputcollid);
|
414
|
+
READ_BOOL_FIELD(wfunc_left, wfunc_left, wfunc_left);
|
415
|
+
READ_ABSTRACT_PTR_FIELD(arg, arg, arg, Expr*);
|
416
|
+
return node;
|
417
|
+
}
|
418
|
+
|
419
|
+
static MergeSupportFunc *
|
420
|
+
_readMergeSupportFunc(OUT_TYPE(MergeSupportFunc, MergeSupportFunc) msg)
|
421
|
+
{
|
422
|
+
MergeSupportFunc *node = makeNode(MergeSupportFunc);
|
423
|
+
READ_UINT_FIELD(msftype, msftype, msftype);
|
424
|
+
READ_UINT_FIELD(msfcollid, msfcollid, msfcollid);
|
425
|
+
READ_INT_FIELD(location, location, location);
|
426
|
+
return node;
|
427
|
+
}
|
428
|
+
|
387
429
|
static SubscriptingRef *
|
388
430
|
_readSubscriptingRef(OUT_TYPE(SubscriptingRef, SubscriptingRef) msg)
|
389
431
|
{
|
@@ -395,8 +437,8 @@ _readSubscriptingRef(OUT_TYPE(SubscriptingRef, SubscriptingRef) msg)
|
|
395
437
|
READ_UINT_FIELD(refcollid, refcollid, refcollid);
|
396
438
|
READ_LIST_FIELD(refupperindexpr, refupperindexpr, refupperindexpr);
|
397
439
|
READ_LIST_FIELD(reflowerindexpr, reflowerindexpr, reflowerindexpr);
|
398
|
-
|
399
|
-
|
440
|
+
READ_ABSTRACT_PTR_FIELD(refexpr, refexpr, refexpr, Expr*);
|
441
|
+
READ_ABSTRACT_PTR_FIELD(refassgnexpr, refassgnexpr, refassgnexpr, Expr*);
|
400
442
|
return node;
|
401
443
|
}
|
402
444
|
|
@@ -420,7 +462,7 @@ static NamedArgExpr *
|
|
420
462
|
_readNamedArgExpr(OUT_TYPE(NamedArgExpr, NamedArgExpr) msg)
|
421
463
|
{
|
422
464
|
NamedArgExpr *node = makeNode(NamedArgExpr);
|
423
|
-
|
465
|
+
READ_ABSTRACT_PTR_FIELD(arg, arg, arg, Expr*);
|
424
466
|
READ_STRING_FIELD(name, name, name);
|
425
467
|
READ_INT_FIELD(argnumber, argnumber, argnumber);
|
426
468
|
READ_INT_FIELD(location, location, location);
|
@@ -539,7 +581,7 @@ static FieldSelect *
|
|
539
581
|
_readFieldSelect(OUT_TYPE(FieldSelect, FieldSelect) msg)
|
540
582
|
{
|
541
583
|
FieldSelect *node = makeNode(FieldSelect);
|
542
|
-
|
584
|
+
READ_ABSTRACT_PTR_FIELD(arg, arg, arg, Expr*);
|
543
585
|
READ_INT_FIELD(fieldnum, fieldnum, fieldnum);
|
544
586
|
READ_UINT_FIELD(resulttype, resulttype, resulttype);
|
545
587
|
READ_INT_FIELD(resulttypmod, resulttypmod, resulttypmod);
|
@@ -551,7 +593,7 @@ static FieldStore *
|
|
551
593
|
_readFieldStore(OUT_TYPE(FieldStore, FieldStore) msg)
|
552
594
|
{
|
553
595
|
FieldStore *node = makeNode(FieldStore);
|
554
|
-
|
596
|
+
READ_ABSTRACT_PTR_FIELD(arg, arg, arg, Expr*);
|
555
597
|
READ_LIST_FIELD(newvals, newvals, newvals);
|
556
598
|
READ_LIST_FIELD(fieldnums, fieldnums, fieldnums);
|
557
599
|
READ_UINT_FIELD(resulttype, resulttype, resulttype);
|
@@ -562,7 +604,7 @@ static RelabelType *
|
|
562
604
|
_readRelabelType(OUT_TYPE(RelabelType, RelabelType) msg)
|
563
605
|
{
|
564
606
|
RelabelType *node = makeNode(RelabelType);
|
565
|
-
|
607
|
+
READ_ABSTRACT_PTR_FIELD(arg, arg, arg, Expr*);
|
566
608
|
READ_UINT_FIELD(resulttype, resulttype, resulttype);
|
567
609
|
READ_INT_FIELD(resulttypmod, resulttypmod, resulttypmod);
|
568
610
|
READ_UINT_FIELD(resultcollid, resultcollid, resultcollid);
|
@@ -575,7 +617,7 @@ static CoerceViaIO *
|
|
575
617
|
_readCoerceViaIO(OUT_TYPE(CoerceViaIO, CoerceViaIO) msg)
|
576
618
|
{
|
577
619
|
CoerceViaIO *node = makeNode(CoerceViaIO);
|
578
|
-
|
620
|
+
READ_ABSTRACT_PTR_FIELD(arg, arg, arg, Expr*);
|
579
621
|
READ_UINT_FIELD(resulttype, resulttype, resulttype);
|
580
622
|
READ_UINT_FIELD(resultcollid, resultcollid, resultcollid);
|
581
623
|
READ_ENUM_FIELD(CoercionForm, coerceformat, coerceformat, coerceformat);
|
@@ -587,8 +629,8 @@ static ArrayCoerceExpr *
|
|
587
629
|
_readArrayCoerceExpr(OUT_TYPE(ArrayCoerceExpr, ArrayCoerceExpr) msg)
|
588
630
|
{
|
589
631
|
ArrayCoerceExpr *node = makeNode(ArrayCoerceExpr);
|
590
|
-
|
591
|
-
|
632
|
+
READ_ABSTRACT_PTR_FIELD(arg, arg, arg, Expr*);
|
633
|
+
READ_ABSTRACT_PTR_FIELD(elemexpr, elemexpr, elemexpr, Expr*);
|
592
634
|
READ_UINT_FIELD(resulttype, resulttype, resulttype);
|
593
635
|
READ_INT_FIELD(resulttypmod, resulttypmod, resulttypmod);
|
594
636
|
READ_UINT_FIELD(resultcollid, resultcollid, resultcollid);
|
@@ -601,7 +643,7 @@ static ConvertRowtypeExpr *
|
|
601
643
|
_readConvertRowtypeExpr(OUT_TYPE(ConvertRowtypeExpr, ConvertRowtypeExpr) msg)
|
602
644
|
{
|
603
645
|
ConvertRowtypeExpr *node = makeNode(ConvertRowtypeExpr);
|
604
|
-
|
646
|
+
READ_ABSTRACT_PTR_FIELD(arg, arg, arg, Expr*);
|
605
647
|
READ_UINT_FIELD(resulttype, resulttype, resulttype);
|
606
648
|
READ_ENUM_FIELD(CoercionForm, convertformat, convertformat, convertformat);
|
607
649
|
READ_INT_FIELD(location, location, location);
|
@@ -612,7 +654,7 @@ static CollateExpr *
|
|
612
654
|
_readCollateExpr(OUT_TYPE(CollateExpr, CollateExpr) msg)
|
613
655
|
{
|
614
656
|
CollateExpr *node = makeNode(CollateExpr);
|
615
|
-
|
657
|
+
READ_ABSTRACT_PTR_FIELD(arg, arg, arg, Expr*);
|
616
658
|
READ_UINT_FIELD(coll_oid, collOid, collOid);
|
617
659
|
READ_INT_FIELD(location, location, location);
|
618
660
|
return node;
|
@@ -624,9 +666,9 @@ _readCaseExpr(OUT_TYPE(CaseExpr, CaseExpr) msg)
|
|
624
666
|
CaseExpr *node = makeNode(CaseExpr);
|
625
667
|
READ_UINT_FIELD(casetype, casetype, casetype);
|
626
668
|
READ_UINT_FIELD(casecollid, casecollid, casecollid);
|
627
|
-
|
669
|
+
READ_ABSTRACT_PTR_FIELD(arg, arg, arg, Expr*);
|
628
670
|
READ_LIST_FIELD(args, args, args);
|
629
|
-
|
671
|
+
READ_ABSTRACT_PTR_FIELD(defresult, defresult, defresult, Expr*);
|
630
672
|
READ_INT_FIELD(location, location, location);
|
631
673
|
return node;
|
632
674
|
}
|
@@ -635,8 +677,8 @@ static CaseWhen *
|
|
635
677
|
_readCaseWhen(OUT_TYPE(CaseWhen, CaseWhen) msg)
|
636
678
|
{
|
637
679
|
CaseWhen *node = makeNode(CaseWhen);
|
638
|
-
|
639
|
-
|
680
|
+
READ_ABSTRACT_PTR_FIELD(expr, expr, expr, Expr*);
|
681
|
+
READ_ABSTRACT_PTR_FIELD(result, result, result, Expr*);
|
640
682
|
READ_INT_FIELD(location, location, location);
|
641
683
|
return node;
|
642
684
|
}
|
@@ -765,8 +807,8 @@ static JsonValueExpr *
|
|
765
807
|
_readJsonValueExpr(OUT_TYPE(JsonValueExpr, JsonValueExpr) msg)
|
766
808
|
{
|
767
809
|
JsonValueExpr *node = makeNode(JsonValueExpr);
|
768
|
-
|
769
|
-
|
810
|
+
READ_ABSTRACT_PTR_FIELD(raw_expr, raw_expr, raw_expr, Expr*);
|
811
|
+
READ_ABSTRACT_PTR_FIELD(formatted_expr, formatted_expr, formatted_expr, Expr*);
|
770
812
|
READ_SPECIFIC_NODE_PTR_FIELD(JsonFormat, json_format, format, format, format);
|
771
813
|
return node;
|
772
814
|
}
|
@@ -777,8 +819,8 @@ _readJsonConstructorExpr(OUT_TYPE(JsonConstructorExpr, JsonConstructorExpr) msg)
|
|
777
819
|
JsonConstructorExpr *node = makeNode(JsonConstructorExpr);
|
778
820
|
READ_ENUM_FIELD(JsonConstructorType, type, type, type);
|
779
821
|
READ_LIST_FIELD(args, args, args);
|
780
|
-
|
781
|
-
|
822
|
+
READ_ABSTRACT_PTR_FIELD(func, func, func, Expr*);
|
823
|
+
READ_ABSTRACT_PTR_FIELD(coercion, coercion, coercion, Expr*);
|
782
824
|
READ_SPECIFIC_NODE_PTR_FIELD(JsonReturning, json_returning, returning, returning, returning);
|
783
825
|
READ_BOOL_FIELD(absent_on_null, absent_on_null, absent_on_null);
|
784
826
|
READ_BOOL_FIELD(unique, unique, unique);
|
@@ -798,11 +840,74 @@ _readJsonIsPredicate(OUT_TYPE(JsonIsPredicate, JsonIsPredicate) msg)
|
|
798
840
|
return node;
|
799
841
|
}
|
800
842
|
|
843
|
+
static JsonBehavior *
|
844
|
+
_readJsonBehavior(OUT_TYPE(JsonBehavior, JsonBehavior) msg)
|
845
|
+
{
|
846
|
+
JsonBehavior *node = makeNode(JsonBehavior);
|
847
|
+
READ_ENUM_FIELD(JsonBehaviorType, btype, btype, btype);
|
848
|
+
READ_NODE_PTR_FIELD(expr, expr, expr);
|
849
|
+
READ_BOOL_FIELD(coerce, coerce, coerce);
|
850
|
+
READ_INT_FIELD(location, location, location);
|
851
|
+
return node;
|
852
|
+
}
|
853
|
+
|
854
|
+
static JsonExpr *
|
855
|
+
_readJsonExpr(OUT_TYPE(JsonExpr, JsonExpr) msg)
|
856
|
+
{
|
857
|
+
JsonExpr *node = makeNode(JsonExpr);
|
858
|
+
READ_ENUM_FIELD(JsonExprOp, op, op, op);
|
859
|
+
READ_STRING_FIELD(column_name, column_name, column_name);
|
860
|
+
READ_NODE_PTR_FIELD(formatted_expr, formatted_expr, formatted_expr);
|
861
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonFormat, json_format, format, format, format);
|
862
|
+
READ_NODE_PTR_FIELD(path_spec, path_spec, path_spec);
|
863
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonReturning, json_returning, returning, returning, returning);
|
864
|
+
READ_LIST_FIELD(passing_names, passing_names, passing_names);
|
865
|
+
READ_LIST_FIELD(passing_values, passing_values, passing_values);
|
866
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonBehavior, json_behavior, on_empty, on_empty, on_empty);
|
867
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonBehavior, json_behavior, on_error, on_error, on_error);
|
868
|
+
READ_BOOL_FIELD(use_io_coercion, use_io_coercion, use_io_coercion);
|
869
|
+
READ_BOOL_FIELD(use_json_coercion, use_json_coercion, use_json_coercion);
|
870
|
+
READ_ENUM_FIELD(JsonWrapper, wrapper, wrapper, wrapper);
|
871
|
+
READ_BOOL_FIELD(omit_quotes, omit_quotes, omit_quotes);
|
872
|
+
READ_UINT_FIELD(collation, collation, collation);
|
873
|
+
READ_INT_FIELD(location, location, location);
|
874
|
+
return node;
|
875
|
+
}
|
876
|
+
|
877
|
+
static JsonTablePath *
|
878
|
+
_readJsonTablePath(OUT_TYPE(JsonTablePath, JsonTablePath) msg)
|
879
|
+
{
|
880
|
+
JsonTablePath *node = makeNode(JsonTablePath);
|
881
|
+
READ_STRING_FIELD(name, name, name);
|
882
|
+
return node;
|
883
|
+
}
|
884
|
+
|
885
|
+
static JsonTablePathScan *
|
886
|
+
_readJsonTablePathScan(OUT_TYPE(JsonTablePathScan, JsonTablePathScan) msg)
|
887
|
+
{
|
888
|
+
JsonTablePathScan *node = makeNode(JsonTablePathScan);
|
889
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonTablePath, json_table_path, path, path, path);
|
890
|
+
READ_BOOL_FIELD(error_on_error, errorOnError, errorOnError);
|
891
|
+
READ_ABSTRACT_PTR_FIELD(child, child, child, JsonTablePlan*);
|
892
|
+
READ_INT_FIELD(col_min, colMin, colMin);
|
893
|
+
READ_INT_FIELD(col_max, colMax, colMax);
|
894
|
+
return node;
|
895
|
+
}
|
896
|
+
|
897
|
+
static JsonTableSiblingJoin *
|
898
|
+
_readJsonTableSiblingJoin(OUT_TYPE(JsonTableSiblingJoin, JsonTableSiblingJoin) msg)
|
899
|
+
{
|
900
|
+
JsonTableSiblingJoin *node = makeNode(JsonTableSiblingJoin);
|
901
|
+
READ_ABSTRACT_PTR_FIELD(lplan, lplan, lplan, JsonTablePlan*);
|
902
|
+
READ_ABSTRACT_PTR_FIELD(rplan, rplan, rplan, JsonTablePlan*);
|
903
|
+
return node;
|
904
|
+
}
|
905
|
+
|
801
906
|
static NullTest *
|
802
907
|
_readNullTest(OUT_TYPE(NullTest, NullTest) msg)
|
803
908
|
{
|
804
909
|
NullTest *node = makeNode(NullTest);
|
805
|
-
|
910
|
+
READ_ABSTRACT_PTR_FIELD(arg, arg, arg, Expr*);
|
806
911
|
READ_ENUM_FIELD(NullTestType, nulltesttype, nulltesttype, nulltesttype);
|
807
912
|
READ_BOOL_FIELD(argisrow, argisrow, argisrow);
|
808
913
|
READ_INT_FIELD(location, location, location);
|
@@ -813,17 +918,30 @@ static BooleanTest *
|
|
813
918
|
_readBooleanTest(OUT_TYPE(BooleanTest, BooleanTest) msg)
|
814
919
|
{
|
815
920
|
BooleanTest *node = makeNode(BooleanTest);
|
816
|
-
|
921
|
+
READ_ABSTRACT_PTR_FIELD(arg, arg, arg, Expr*);
|
817
922
|
READ_ENUM_FIELD(BoolTestType, booltesttype, booltesttype, booltesttype);
|
818
923
|
READ_INT_FIELD(location, location, location);
|
819
924
|
return node;
|
820
925
|
}
|
821
926
|
|
927
|
+
static MergeAction *
|
928
|
+
_readMergeAction(OUT_TYPE(MergeAction, MergeAction) msg)
|
929
|
+
{
|
930
|
+
MergeAction *node = makeNode(MergeAction);
|
931
|
+
READ_ENUM_FIELD(MergeMatchKind, match_kind, matchKind, matchKind);
|
932
|
+
READ_ENUM_FIELD(CmdType, command_type, commandType, commandType);
|
933
|
+
READ_ENUM_FIELD(OverridingKind, override, override, override);
|
934
|
+
READ_NODE_PTR_FIELD(qual, qual, qual);
|
935
|
+
READ_LIST_FIELD(target_list, targetList, targetList);
|
936
|
+
READ_LIST_FIELD(update_colnos, updateColnos, updateColnos);
|
937
|
+
return node;
|
938
|
+
}
|
939
|
+
|
822
940
|
static CoerceToDomain *
|
823
941
|
_readCoerceToDomain(OUT_TYPE(CoerceToDomain, CoerceToDomain) msg)
|
824
942
|
{
|
825
943
|
CoerceToDomain *node = makeNode(CoerceToDomain);
|
826
|
-
|
944
|
+
READ_ABSTRACT_PTR_FIELD(arg, arg, arg, Expr*);
|
827
945
|
READ_UINT_FIELD(resulttype, resulttype, resulttype);
|
828
946
|
READ_INT_FIELD(resulttypmod, resulttypmod, resulttypmod);
|
829
947
|
READ_UINT_FIELD(resultcollid, resultcollid, resultcollid);
|
@@ -887,7 +1005,7 @@ static TargetEntry *
|
|
887
1005
|
_readTargetEntry(OUT_TYPE(TargetEntry, TargetEntry) msg)
|
888
1006
|
{
|
889
1007
|
TargetEntry *node = makeNode(TargetEntry);
|
890
|
-
|
1008
|
+
READ_ABSTRACT_PTR_FIELD(expr, expr, expr, Expr*);
|
891
1009
|
READ_INT_FIELD(resno, resno, resno);
|
892
1010
|
READ_STRING_FIELD(resname, resname, resname);
|
893
1011
|
READ_UINT_FIELD(ressortgroupref, ressortgroupref, ressortgroupref);
|
@@ -969,7 +1087,8 @@ _readQuery(OUT_TYPE(Query, Query) msg)
|
|
969
1087
|
READ_LIST_FIELD(rteperminfos, rteperminfos, rteperminfos);
|
970
1088
|
READ_SPECIFIC_NODE_PTR_FIELD(FromExpr, from_expr, jointree, jointree, jointree);
|
971
1089
|
READ_LIST_FIELD(merge_action_list, mergeActionList, mergeActionList);
|
972
|
-
|
1090
|
+
READ_INT_FIELD(merge_target_relation, mergeTargetRelation, mergeTargetRelation);
|
1091
|
+
READ_NODE_PTR_FIELD(merge_join_condition, mergeJoinCondition, mergeJoinCondition);
|
973
1092
|
READ_LIST_FIELD(target_list, targetList, targetList);
|
974
1093
|
READ_ENUM_FIELD(OverridingKind, override, override, override);
|
975
1094
|
READ_SPECIFIC_NODE_PTR_FIELD(OnConflictExpr, on_conflict_expr, on_conflict, onConflict, onConflict);
|
@@ -1364,6 +1483,13 @@ _readPartitionRangeDatum(OUT_TYPE(PartitionRangeDatum, PartitionRangeDatum) msg)
|
|
1364
1483
|
return node;
|
1365
1484
|
}
|
1366
1485
|
|
1486
|
+
static SinglePartitionSpec *
|
1487
|
+
_readSinglePartitionSpec(OUT_TYPE(SinglePartitionSpec, SinglePartitionSpec) msg)
|
1488
|
+
{
|
1489
|
+
SinglePartitionSpec *node = makeNode(SinglePartitionSpec);
|
1490
|
+
return node;
|
1491
|
+
}
|
1492
|
+
|
1367
1493
|
static PartitionCmd *
|
1368
1494
|
_readPartitionCmd(OUT_TYPE(PartitionCmd, PartitionCmd) msg)
|
1369
1495
|
{
|
@@ -1378,12 +1504,15 @@ static RangeTblEntry *
|
|
1378
1504
|
_readRangeTblEntry(OUT_TYPE(RangeTblEntry, RangeTblEntry) msg)
|
1379
1505
|
{
|
1380
1506
|
RangeTblEntry *node = makeNode(RangeTblEntry);
|
1507
|
+
READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias);
|
1508
|
+
READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, eref, eref, eref);
|
1381
1509
|
READ_ENUM_FIELD(RTEKind, rtekind, rtekind, rtekind);
|
1382
1510
|
READ_UINT_FIELD(relid, relid, relid);
|
1511
|
+
READ_BOOL_FIELD(inh, inh, inh);
|
1383
1512
|
READ_CHAR_FIELD(relkind, relkind, relkind);
|
1384
1513
|
READ_INT_FIELD(rellockmode, rellockmode, rellockmode);
|
1385
|
-
READ_SPECIFIC_NODE_PTR_FIELD(TableSampleClause, table_sample_clause, tablesample, tablesample, tablesample);
|
1386
1514
|
READ_UINT_FIELD(perminfoindex, perminfoindex, perminfoindex);
|
1515
|
+
READ_SPECIFIC_NODE_PTR_FIELD(TableSampleClause, table_sample_clause, tablesample, tablesample, tablesample);
|
1387
1516
|
READ_SPECIFIC_NODE_PTR_FIELD(Query, query, subquery, subquery, subquery);
|
1388
1517
|
READ_BOOL_FIELD(security_barrier, security_barrier, security_barrier);
|
1389
1518
|
READ_ENUM_FIELD(JoinType, jointype, jointype, jointype);
|
@@ -1404,10 +1533,7 @@ _readRangeTblEntry(OUT_TYPE(RangeTblEntry, RangeTblEntry) msg)
|
|
1404
1533
|
READ_LIST_FIELD(colcollations, colcollations, colcollations);
|
1405
1534
|
READ_STRING_FIELD(enrname, enrname, enrname);
|
1406
1535
|
READ_FLOAT_FIELD(enrtuples, enrtuples, enrtuples);
|
1407
|
-
READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias);
|
1408
|
-
READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, eref, eref, eref);
|
1409
1536
|
READ_BOOL_FIELD(lateral, lateral, lateral);
|
1410
|
-
READ_BOOL_FIELD(inh, inh, inh);
|
1411
1537
|
READ_BOOL_FIELD(in_from_cl, inFromCl, inFromCl);
|
1412
1538
|
READ_LIST_FIELD(security_quals, securityQuals, securityQuals);
|
1413
1539
|
return node;
|
@@ -1447,7 +1573,7 @@ _readTableSampleClause(OUT_TYPE(TableSampleClause, TableSampleClause) msg)
|
|
1447
1573
|
TableSampleClause *node = makeNode(TableSampleClause);
|
1448
1574
|
READ_UINT_FIELD(tsmhandler, tsmhandler, tsmhandler);
|
1449
1575
|
READ_LIST_FIELD(args, args, args);
|
1450
|
-
|
1576
|
+
READ_ABSTRACT_PTR_FIELD(repeatable, repeatable, repeatable, Expr*);
|
1451
1577
|
return node;
|
1452
1578
|
}
|
1453
1579
|
|
@@ -1496,7 +1622,6 @@ _readWindowClause(OUT_TYPE(WindowClause, WindowClause) msg)
|
|
1496
1622
|
READ_INT_FIELD(frame_options, frameOptions, frameOptions);
|
1497
1623
|
READ_NODE_PTR_FIELD(start_offset, startOffset, startOffset);
|
1498
1624
|
READ_NODE_PTR_FIELD(end_offset, endOffset, endOffset);
|
1499
|
-
READ_LIST_FIELD(run_condition, runCondition, runCondition);
|
1500
1625
|
READ_UINT_FIELD(start_in_range_func, startInRangeFunc, startInRangeFunc);
|
1501
1626
|
READ_UINT_FIELD(end_in_range_func, endInRangeFunc, endInRangeFunc);
|
1502
1627
|
READ_UINT_FIELD(in_range_coll, inRangeColl, inRangeColl);
|
@@ -1603,7 +1728,7 @@ static MergeWhenClause *
|
|
1603
1728
|
_readMergeWhenClause(OUT_TYPE(MergeWhenClause, MergeWhenClause) msg)
|
1604
1729
|
{
|
1605
1730
|
MergeWhenClause *node = makeNode(MergeWhenClause);
|
1606
|
-
|
1731
|
+
READ_ENUM_FIELD(MergeMatchKind, match_kind, matchKind, matchKind);
|
1607
1732
|
READ_ENUM_FIELD(CmdType, command_type, commandType, commandType);
|
1608
1733
|
READ_ENUM_FIELD(OverridingKind, override, override, override);
|
1609
1734
|
READ_NODE_PTR_FIELD(condition, condition, condition);
|
@@ -1612,19 +1737,6 @@ _readMergeWhenClause(OUT_TYPE(MergeWhenClause, MergeWhenClause) msg)
|
|
1612
1737
|
return node;
|
1613
1738
|
}
|
1614
1739
|
|
1615
|
-
static MergeAction *
|
1616
|
-
_readMergeAction(OUT_TYPE(MergeAction, MergeAction) msg)
|
1617
|
-
{
|
1618
|
-
MergeAction *node = makeNode(MergeAction);
|
1619
|
-
READ_BOOL_FIELD(matched, matched, matched);
|
1620
|
-
READ_ENUM_FIELD(CmdType, command_type, commandType, commandType);
|
1621
|
-
READ_ENUM_FIELD(OverridingKind, override, override, override);
|
1622
|
-
READ_NODE_PTR_FIELD(qual, qual, qual);
|
1623
|
-
READ_LIST_FIELD(target_list, targetList, targetList);
|
1624
|
-
READ_LIST_FIELD(update_colnos, updateColnos, updateColnos);
|
1625
|
-
return node;
|
1626
|
-
}
|
1627
|
-
|
1628
1740
|
static TriggerTransition *
|
1629
1741
|
_readTriggerTransition(OUT_TYPE(TriggerTransition, TriggerTransition) msg)
|
1630
1742
|
{
|
@@ -1644,15 +1756,117 @@ _readJsonOutput(OUT_TYPE(JsonOutput, JsonOutput) msg)
|
|
1644
1756
|
return node;
|
1645
1757
|
}
|
1646
1758
|
|
1759
|
+
static JsonArgument *
|
1760
|
+
_readJsonArgument(OUT_TYPE(JsonArgument, JsonArgument) msg)
|
1761
|
+
{
|
1762
|
+
JsonArgument *node = makeNode(JsonArgument);
|
1763
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonValueExpr, json_value_expr, val, val, val);
|
1764
|
+
READ_STRING_FIELD(name, name, name);
|
1765
|
+
return node;
|
1766
|
+
}
|
1767
|
+
|
1768
|
+
static JsonFuncExpr *
|
1769
|
+
_readJsonFuncExpr(OUT_TYPE(JsonFuncExpr, JsonFuncExpr) msg)
|
1770
|
+
{
|
1771
|
+
JsonFuncExpr *node = makeNode(JsonFuncExpr);
|
1772
|
+
READ_ENUM_FIELD(JsonExprOp, op, op, op);
|
1773
|
+
READ_STRING_FIELD(column_name, column_name, column_name);
|
1774
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonValueExpr, json_value_expr, context_item, context_item, context_item);
|
1775
|
+
READ_NODE_PTR_FIELD(pathspec, pathspec, pathspec);
|
1776
|
+
READ_LIST_FIELD(passing, passing, passing);
|
1777
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonOutput, json_output, output, output, output);
|
1778
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonBehavior, json_behavior, on_empty, on_empty, on_empty);
|
1779
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonBehavior, json_behavior, on_error, on_error, on_error);
|
1780
|
+
READ_ENUM_FIELD(JsonWrapper, wrapper, wrapper, wrapper);
|
1781
|
+
READ_ENUM_FIELD(JsonQuotes, quotes, quotes, quotes);
|
1782
|
+
READ_INT_FIELD(location, location, location);
|
1783
|
+
return node;
|
1784
|
+
}
|
1785
|
+
|
1786
|
+
static JsonTablePathSpec *
|
1787
|
+
_readJsonTablePathSpec(OUT_TYPE(JsonTablePathSpec, JsonTablePathSpec) msg)
|
1788
|
+
{
|
1789
|
+
JsonTablePathSpec *node = makeNode(JsonTablePathSpec);
|
1790
|
+
READ_NODE_PTR_FIELD(string, string, string);
|
1791
|
+
READ_STRING_FIELD(name, name, name);
|
1792
|
+
READ_INT_FIELD(name_location, name_location, name_location);
|
1793
|
+
READ_INT_FIELD(location, location, location);
|
1794
|
+
return node;
|
1795
|
+
}
|
1796
|
+
|
1797
|
+
static JsonTable *
|
1798
|
+
_readJsonTable(OUT_TYPE(JsonTable, JsonTable) msg)
|
1799
|
+
{
|
1800
|
+
JsonTable *node = makeNode(JsonTable);
|
1801
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonValueExpr, json_value_expr, context_item, context_item, context_item);
|
1802
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonTablePathSpec, json_table_path_spec, pathspec, pathspec, pathspec);
|
1803
|
+
READ_LIST_FIELD(passing, passing, passing);
|
1804
|
+
READ_LIST_FIELD(columns, columns, columns);
|
1805
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonBehavior, json_behavior, on_error, on_error, on_error);
|
1806
|
+
READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias);
|
1807
|
+
READ_BOOL_FIELD(lateral, lateral, lateral);
|
1808
|
+
READ_INT_FIELD(location, location, location);
|
1809
|
+
return node;
|
1810
|
+
}
|
1811
|
+
|
1812
|
+
static JsonTableColumn *
|
1813
|
+
_readJsonTableColumn(OUT_TYPE(JsonTableColumn, JsonTableColumn) msg)
|
1814
|
+
{
|
1815
|
+
JsonTableColumn *node = makeNode(JsonTableColumn);
|
1816
|
+
READ_ENUM_FIELD(JsonTableColumnType, coltype, coltype, coltype);
|
1817
|
+
READ_STRING_FIELD(name, name, name);
|
1818
|
+
READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName);
|
1819
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonTablePathSpec, json_table_path_spec, pathspec, pathspec, pathspec);
|
1820
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonFormat, json_format, format, format, format);
|
1821
|
+
READ_ENUM_FIELD(JsonWrapper, wrapper, wrapper, wrapper);
|
1822
|
+
READ_ENUM_FIELD(JsonQuotes, quotes, quotes, quotes);
|
1823
|
+
READ_LIST_FIELD(columns, columns, columns);
|
1824
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonBehavior, json_behavior, on_empty, on_empty, on_empty);
|
1825
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonBehavior, json_behavior, on_error, on_error, on_error);
|
1826
|
+
READ_INT_FIELD(location, location, location);
|
1827
|
+
return node;
|
1828
|
+
}
|
1829
|
+
|
1647
1830
|
static JsonKeyValue *
|
1648
1831
|
_readJsonKeyValue(OUT_TYPE(JsonKeyValue, JsonKeyValue) msg)
|
1649
1832
|
{
|
1650
1833
|
JsonKeyValue *node = makeNode(JsonKeyValue);
|
1651
|
-
|
1834
|
+
READ_ABSTRACT_PTR_FIELD(key, key, key, Expr*);
|
1652
1835
|
READ_SPECIFIC_NODE_PTR_FIELD(JsonValueExpr, json_value_expr, value, value, value);
|
1653
1836
|
return node;
|
1654
1837
|
}
|
1655
1838
|
|
1839
|
+
static JsonParseExpr *
|
1840
|
+
_readJsonParseExpr(OUT_TYPE(JsonParseExpr, JsonParseExpr) msg)
|
1841
|
+
{
|
1842
|
+
JsonParseExpr *node = makeNode(JsonParseExpr);
|
1843
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonValueExpr, json_value_expr, expr, expr, expr);
|
1844
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonOutput, json_output, output, output, output);
|
1845
|
+
READ_BOOL_FIELD(unique_keys, unique_keys, unique_keys);
|
1846
|
+
READ_INT_FIELD(location, location, location);
|
1847
|
+
return node;
|
1848
|
+
}
|
1849
|
+
|
1850
|
+
static JsonScalarExpr *
|
1851
|
+
_readJsonScalarExpr(OUT_TYPE(JsonScalarExpr, JsonScalarExpr) msg)
|
1852
|
+
{
|
1853
|
+
JsonScalarExpr *node = makeNode(JsonScalarExpr);
|
1854
|
+
READ_ABSTRACT_PTR_FIELD(expr, expr, expr, Expr*);
|
1855
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonOutput, json_output, output, output, output);
|
1856
|
+
READ_INT_FIELD(location, location, location);
|
1857
|
+
return node;
|
1858
|
+
}
|
1859
|
+
|
1860
|
+
static JsonSerializeExpr *
|
1861
|
+
_readJsonSerializeExpr(OUT_TYPE(JsonSerializeExpr, JsonSerializeExpr) msg)
|
1862
|
+
{
|
1863
|
+
JsonSerializeExpr *node = makeNode(JsonSerializeExpr);
|
1864
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonValueExpr, json_value_expr, expr, expr, expr);
|
1865
|
+
READ_SPECIFIC_NODE_PTR_FIELD(JsonOutput, json_output, output, output, output);
|
1866
|
+
READ_INT_FIELD(location, location, location);
|
1867
|
+
return node;
|
1868
|
+
}
|
1869
|
+
|
1656
1870
|
static JsonObjectConstructor *
|
1657
1871
|
_readJsonObjectConstructor(OUT_TYPE(JsonObjectConstructor, JsonObjectConstructor) msg)
|
1658
1872
|
{
|
@@ -1778,6 +1992,7 @@ _readMergeStmt(OUT_TYPE(MergeStmt, MergeStmt) msg)
|
|
1778
1992
|
READ_NODE_PTR_FIELD(source_relation, sourceRelation, sourceRelation);
|
1779
1993
|
READ_NODE_PTR_FIELD(join_condition, joinCondition, joinCondition);
|
1780
1994
|
READ_LIST_FIELD(merge_when_clauses, mergeWhenClauses, mergeWhenClauses);
|
1995
|
+
READ_LIST_FIELD(returning_list, returningList, returningList);
|
1781
1996
|
READ_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause);
|
1782
1997
|
return node;
|
1783
1998
|
}
|
@@ -2030,11 +2245,13 @@ _readConstraint(OUT_TYPE(Constraint, Constraint) msg)
|
|
2030
2245
|
READ_STRING_FIELD(conname, conname, conname);
|
2031
2246
|
READ_BOOL_FIELD(deferrable, deferrable, deferrable);
|
2032
2247
|
READ_BOOL_FIELD(initdeferred, initdeferred, initdeferred);
|
2033
|
-
|
2248
|
+
READ_BOOL_FIELD(skip_validation, skip_validation, skip_validation);
|
2249
|
+
READ_BOOL_FIELD(initially_valid, initially_valid, initially_valid);
|
2034
2250
|
READ_BOOL_FIELD(is_no_inherit, is_no_inherit, is_no_inherit);
|
2035
2251
|
READ_NODE_PTR_FIELD(raw_expr, raw_expr, raw_expr);
|
2036
2252
|
READ_STRING_FIELD(cooked_expr, cooked_expr, cooked_expr);
|
2037
2253
|
READ_CHAR_FIELD(generated_when, generated_when, generated_when);
|
2254
|
+
READ_INT_FIELD(inhcount, inhcount, inhcount);
|
2038
2255
|
READ_BOOL_FIELD(nulls_not_distinct, nulls_not_distinct, nulls_not_distinct);
|
2039
2256
|
READ_LIST_FIELD(keys, keys, keys);
|
2040
2257
|
READ_LIST_FIELD(including, including, including);
|
@@ -2054,8 +2271,7 @@ _readConstraint(OUT_TYPE(Constraint, Constraint) msg)
|
|
2054
2271
|
READ_LIST_FIELD(fk_del_set_cols, fk_del_set_cols, fk_del_set_cols);
|
2055
2272
|
READ_LIST_FIELD(old_conpfeqop, old_conpfeqop, old_conpfeqop);
|
2056
2273
|
READ_UINT_FIELD(old_pktable_oid, old_pktable_oid, old_pktable_oid);
|
2057
|
-
|
2058
|
-
READ_BOOL_FIELD(initially_valid, initially_valid, initially_valid);
|
2274
|
+
READ_INT_FIELD(location, location, location);
|
2059
2275
|
return node;
|
2060
2276
|
}
|
2061
2277
|
|
@@ -2585,7 +2801,7 @@ _readAlterStatsStmt(OUT_TYPE(AlterStatsStmt, AlterStatsStmt) msg)
|
|
2585
2801
|
{
|
2586
2802
|
AlterStatsStmt *node = makeNode(AlterStatsStmt);
|
2587
2803
|
READ_LIST_FIELD(defnames, defnames, defnames);
|
2588
|
-
|
2804
|
+
READ_NODE_PTR_FIELD(stxstattarget, stxstattarget, stxstattarget);
|
2589
2805
|
READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok);
|
2590
2806
|
return node;
|
2591
2807
|
}
|
@@ -2778,6 +2994,7 @@ _readTransactionStmt(OUT_TYPE(TransactionStmt, TransactionStmt) msg)
|
|
2778
2994
|
READ_STRING_FIELD(savepoint_name, savepoint_name, savepoint_name);
|
2779
2995
|
READ_STRING_FIELD(gid, gid, gid);
|
2780
2996
|
READ_BOOL_FIELD(chain, chain, chain);
|
2997
|
+
READ_INT_FIELD(location, location, location);
|
2781
2998
|
return node;
|
2782
2999
|
}
|
2783
3000
|
|
@@ -3061,6 +3278,8 @@ _readDeallocateStmt(OUT_TYPE(DeallocateStmt, DeallocateStmt) msg)
|
|
3061
3278
|
{
|
3062
3279
|
DeallocateStmt *node = makeNode(DeallocateStmt);
|
3063
3280
|
READ_STRING_FIELD(name, name, name);
|
3281
|
+
READ_BOOL_FIELD(isall, isall, isall);
|
3282
|
+
READ_INT_FIELD(location, location, location);
|
3064
3283
|
return node;
|
3065
3284
|
}
|
3066
3285
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* amapi.h
|
4
4
|
* API for Postgres index access methods.
|
5
5
|
*
|
6
|
-
* Copyright (c) 2015-
|
6
|
+
* Copyright (c) 2015-2024, PostgreSQL Global Development Group
|
7
7
|
*
|
8
8
|
* src/include/access/amapi.h
|
9
9
|
*
|
@@ -51,7 +51,7 @@ typedef enum IndexAMProperty
|
|
51
51
|
AMPROP_CAN_UNIQUE,
|
52
52
|
AMPROP_CAN_MULTI_COL,
|
53
53
|
AMPROP_CAN_EXCLUDE,
|
54
|
-
AMPROP_CAN_INCLUDE
|
54
|
+
AMPROP_CAN_INCLUDE,
|
55
55
|
} IndexAMProperty;
|
56
56
|
|
57
57
|
/*
|
@@ -113,6 +113,10 @@ typedef bool (*aminsert_function) (Relation indexRelation,
|
|
113
113
|
bool indexUnchanged,
|
114
114
|
struct IndexInfo *indexInfo);
|
115
115
|
|
116
|
+
/* cleanup after insert */
|
117
|
+
typedef void (*aminsertcleanup_function) (Relation indexRelation,
|
118
|
+
struct IndexInfo *indexInfo);
|
119
|
+
|
116
120
|
/* bulk delete */
|
117
121
|
typedef IndexBulkDeleteResult *(*ambulkdelete_function) (IndexVacuumInfo *info,
|
118
122
|
IndexBulkDeleteResult *stats,
|
@@ -191,7 +195,7 @@ typedef void (*amrestrpos_function) (IndexScanDesc scan);
|
|
191
195
|
*/
|
192
196
|
|
193
197
|
/* estimate size of parallel scan descriptor */
|
194
|
-
typedef Size (*amestimateparallelscan_function) (
|
198
|
+
typedef Size (*amestimateparallelscan_function) (int nkeys, int norderbys);
|
195
199
|
|
196
200
|
/* prepare for parallel index scan */
|
197
201
|
typedef void (*aminitparallelscan_function) (void *target);
|
@@ -240,6 +244,8 @@ typedef struct IndexAmRoutine
|
|
240
244
|
bool ampredlocks;
|
241
245
|
/* does AM support parallel scan? */
|
242
246
|
bool amcanparallel;
|
247
|
+
/* does AM support parallel build? */
|
248
|
+
bool amcanbuildparallel;
|
243
249
|
/* does AM support columns included with clause INCLUDE? */
|
244
250
|
bool amcaninclude;
|
245
251
|
/* does AM use maintenance_work_mem? */
|
@@ -261,6 +267,7 @@ typedef struct IndexAmRoutine
|
|
261
267
|
ambuild_function ambuild;
|
262
268
|
ambuildempty_function ambuildempty;
|
263
269
|
aminsert_function aminsert;
|
270
|
+
aminsertcleanup_function aminsertcleanup;
|
264
271
|
ambulkdelete_function ambulkdelete;
|
265
272
|
amvacuumcleanup_function amvacuumcleanup;
|
266
273
|
amcanreturn_function amcanreturn; /* can be NULL */
|