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
@@ -5,7 +5,7 @@
|
|
5
5
|
* functions for internal use.
|
6
6
|
*
|
7
7
|
*
|
8
|
-
* Portions Copyright (c) 2022-
|
8
|
+
* Portions Copyright (c) 2022-2024, PostgreSQL Global Development Group
|
9
9
|
* Portions Copyright (c) 1994, Regents of the University of California
|
10
10
|
*
|
11
11
|
* src/include/utils/memutils_internal.h
|
@@ -19,9 +19,9 @@
|
|
19
19
|
#include "utils/memutils.h"
|
20
20
|
|
21
21
|
/* These functions implement the MemoryContext API for AllocSet context. */
|
22
|
-
extern void *AllocSetAlloc(MemoryContext context, Size size);
|
22
|
+
extern void *AllocSetAlloc(MemoryContext context, Size size, int flags);
|
23
23
|
extern void AllocSetFree(void *pointer);
|
24
|
-
extern void *AllocSetRealloc(void *pointer, Size size);
|
24
|
+
extern void *AllocSetRealloc(void *pointer, Size size, int flags);
|
25
25
|
extern void AllocSetReset(MemoryContext context);
|
26
26
|
extern void AllocSetDelete(MemoryContext context);
|
27
27
|
extern MemoryContext AllocSetGetChunkContext(void *pointer);
|
@@ -36,9 +36,9 @@ extern void AllocSetCheck(MemoryContext context);
|
|
36
36
|
#endif
|
37
37
|
|
38
38
|
/* These functions implement the MemoryContext API for Generation context. */
|
39
|
-
extern void *GenerationAlloc(MemoryContext context, Size size);
|
39
|
+
extern void *GenerationAlloc(MemoryContext context, Size size, int flags);
|
40
40
|
extern void GenerationFree(void *pointer);
|
41
|
-
extern void *GenerationRealloc(void *pointer, Size size);
|
41
|
+
extern void *GenerationRealloc(void *pointer, Size size, int flags);
|
42
42
|
extern void GenerationReset(MemoryContext context);
|
43
43
|
extern void GenerationDelete(MemoryContext context);
|
44
44
|
extern MemoryContext GenerationGetChunkContext(void *pointer);
|
@@ -54,9 +54,9 @@ extern void GenerationCheck(MemoryContext context);
|
|
54
54
|
|
55
55
|
|
56
56
|
/* These functions implement the MemoryContext API for Slab context. */
|
57
|
-
extern void *SlabAlloc(MemoryContext context, Size size);
|
57
|
+
extern void *SlabAlloc(MemoryContext context, Size size, int flags);
|
58
58
|
extern void SlabFree(void *pointer);
|
59
|
-
extern void *SlabRealloc(void *pointer, Size size);
|
59
|
+
extern void *SlabRealloc(void *pointer, Size size, int flags);
|
60
60
|
extern void SlabReset(MemoryContext context);
|
61
61
|
extern void SlabDelete(MemoryContext context);
|
62
62
|
extern MemoryContext SlabGetChunkContext(void *pointer);
|
@@ -75,10 +75,26 @@ extern void SlabCheck(MemoryContext context);
|
|
75
75
|
* part of a fully-fledged MemoryContext type.
|
76
76
|
*/
|
77
77
|
extern void AlignedAllocFree(void *pointer);
|
78
|
-
extern void *AlignedAllocRealloc(void *pointer, Size size);
|
78
|
+
extern void *AlignedAllocRealloc(void *pointer, Size size, int flags);
|
79
79
|
extern MemoryContext AlignedAllocGetChunkContext(void *pointer);
|
80
80
|
extern Size AlignedAllocGetChunkSpace(void *pointer);
|
81
81
|
|
82
|
+
/* These functions implement the MemoryContext API for the Bump context. */
|
83
|
+
extern void *BumpAlloc(MemoryContext context, Size size, int flags);
|
84
|
+
extern void BumpFree(void *pointer);
|
85
|
+
extern void *BumpRealloc(void *pointer, Size size, int flags);
|
86
|
+
extern void BumpReset(MemoryContext context);
|
87
|
+
extern void BumpDelete(MemoryContext context);
|
88
|
+
extern MemoryContext BumpGetChunkContext(void *pointer);
|
89
|
+
extern Size BumpGetChunkSpace(void *pointer);
|
90
|
+
extern bool BumpIsEmpty(MemoryContext context);
|
91
|
+
extern void BumpStats(MemoryContext context, MemoryStatsPrintFunc printfunc,
|
92
|
+
void *passthru, MemoryContextCounters *totals,
|
93
|
+
bool print_to_stderr);
|
94
|
+
#ifdef MEMORY_CONTEXT_CHECKING
|
95
|
+
extern void BumpCheck(MemoryContext context);
|
96
|
+
#endif
|
97
|
+
|
82
98
|
/*
|
83
99
|
* How many extra bytes do we need to request in order to ensure that we can
|
84
100
|
* align a pointer to 'alignto'. Since palloc'd pointers are already aligned
|
@@ -104,21 +120,29 @@ extern Size AlignedAllocGetChunkSpace(void *pointer);
|
|
104
120
|
*/
|
105
121
|
typedef enum MemoryContextMethodID
|
106
122
|
{
|
107
|
-
|
108
|
-
|
109
|
-
|
123
|
+
MCTX_0_RESERVED_UNUSEDMEM_ID, /* 0000 occurs in never-used memory */
|
124
|
+
MCTX_1_RESERVED_GLIBC_ID, /* glibc malloc'd chunks usually match 0001 */
|
125
|
+
MCTX_2_RESERVED_GLIBC_ID, /* glibc malloc'd chunks > 128kB match 0010 */
|
110
126
|
MCTX_ASET_ID,
|
111
127
|
MCTX_GENERATION_ID,
|
112
128
|
MCTX_SLAB_ID,
|
113
129
|
MCTX_ALIGNED_REDIRECT_ID,
|
114
|
-
|
130
|
+
MCTX_BUMP_ID,
|
131
|
+
MCTX_8_UNUSED_ID,
|
132
|
+
MCTX_9_UNUSED_ID,
|
133
|
+
MCTX_10_UNUSED_ID,
|
134
|
+
MCTX_11_UNUSED_ID,
|
135
|
+
MCTX_12_UNUSED_ID,
|
136
|
+
MCTX_13_UNUSED_ID,
|
137
|
+
MCTX_14_UNUSED_ID,
|
138
|
+
MCTX_15_RESERVED_WIPEDMEM_ID /* 1111 occurs in wipe_mem'd memory */
|
115
139
|
} MemoryContextMethodID;
|
116
140
|
|
117
141
|
/*
|
118
142
|
* The number of bits that 8-byte memory chunk headers can use to encode the
|
119
143
|
* MemoryContextMethodID.
|
120
144
|
*/
|
121
|
-
#define MEMORY_CONTEXT_METHODID_BITS
|
145
|
+
#define MEMORY_CONTEXT_METHODID_BITS 4
|
122
146
|
#define MEMORY_CONTEXT_METHODID_MASK \
|
123
147
|
((((uint64) 1) << MEMORY_CONTEXT_METHODID_BITS) - 1)
|
124
148
|
|
@@ -133,4 +157,20 @@ extern void MemoryContextCreate(MemoryContext node,
|
|
133
157
|
MemoryContext parent,
|
134
158
|
const char *name);
|
135
159
|
|
160
|
+
extern void *MemoryContextAllocationFailure(MemoryContext context, Size size,
|
161
|
+
int flags);
|
162
|
+
|
163
|
+
extern void MemoryContextSizeFailure(MemoryContext context, Size size,
|
164
|
+
int flags) pg_attribute_noreturn();
|
165
|
+
|
166
|
+
static inline void
|
167
|
+
MemoryContextCheckSize(MemoryContext context, Size size, int flags)
|
168
|
+
{
|
169
|
+
if (unlikely(!AllocSizeIsValid(size)))
|
170
|
+
{
|
171
|
+
if (!(flags & MCXT_ALLOC_HUGE) || !AllocHugeSizeIsValid(size))
|
172
|
+
MemoryContextSizeFailure(context, size, flags);
|
173
|
+
}
|
174
|
+
}
|
175
|
+
|
136
176
|
#endif /* MEMUTILS_INTERNAL_H */
|
@@ -12,7 +12,7 @@
|
|
12
12
|
* Although MemoryChunks are used by each of our MemoryContexts, future
|
13
13
|
* implementations may choose to implement their own method for storing chunk
|
14
14
|
* headers. The only requirement is that the header ends with an 8-byte value
|
15
|
-
* which the least significant
|
15
|
+
* which the least significant 4-bits of are set to the MemoryContextMethodID
|
16
16
|
* of the given context.
|
17
17
|
*
|
18
18
|
* By default, a MemoryChunk is 8 bytes in size, however, when
|
@@ -25,15 +25,23 @@
|
|
25
25
|
* used to encode 4 separate pieces of information. Starting with the least
|
26
26
|
* significant bits of 'hdrmask', the bit space is reserved as follows:
|
27
27
|
*
|
28
|
-
* 1.
|
28
|
+
* 1. 4-bits to indicate the MemoryContextMethodID as defined by
|
29
29
|
* MEMORY_CONTEXT_METHODID_MASK
|
30
30
|
* 2. 1-bit to denote an "external" chunk (see below)
|
31
31
|
* 3. 30-bits reserved for the MemoryContext to use for anything it
|
32
|
-
* requires. Most
|
32
|
+
* requires. Most MemoryContexts likely want to store the size of the
|
33
33
|
* chunk here.
|
34
34
|
* 4. 30-bits for the number of bytes that must be subtracted from the chunk
|
35
35
|
* to obtain the address of the block that the chunk is stored on.
|
36
36
|
*
|
37
|
+
* If you're paying close attention, you'll notice this adds up to 65 bits
|
38
|
+
* rather than 64 bits. This is because the highest-order bit of #3 is the
|
39
|
+
* same bit as the lowest-order bit of #4. We can do this as we insist that
|
40
|
+
* the chunk and block pointers are both MAXALIGNed, therefore the relative
|
41
|
+
* offset between those will always be a MAXALIGNed value which means the
|
42
|
+
* lowest order bit is always 0. When fetching the chunk to block offset we
|
43
|
+
* mask out the lowest-order bit to ensure it's still zero.
|
44
|
+
*
|
37
45
|
* In some cases, for example when memory allocations become large, it's
|
38
46
|
* possible fields 3 and 4 above are not large enough to store the values
|
39
47
|
* required for the chunk. In this case, the MemoryContext can choose to mark
|
@@ -68,7 +76,7 @@
|
|
68
76
|
* PointerGetMemoryChunk
|
69
77
|
* MemoryChunkGetPointer
|
70
78
|
*
|
71
|
-
* Portions Copyright (c) 2022-
|
79
|
+
* Portions Copyright (c) 2022-2024, PostgreSQL Global Development Group
|
72
80
|
* Portions Copyright (c) 1994, Regents of the University of California
|
73
81
|
*
|
74
82
|
* src/include/utils/memutils_memorychunk.h
|
@@ -93,10 +101,16 @@
|
|
93
101
|
*/
|
94
102
|
#define MEMORYCHUNK_MAX_BLOCKOFFSET UINT64CONST(0x3FFFFFFF)
|
95
103
|
|
104
|
+
/*
|
105
|
+
* As above, but mask out the lowest-order (always zero) bit as this is shared
|
106
|
+
* with the MemoryChunkGetValue field.
|
107
|
+
*/
|
108
|
+
#define MEMORYCHUNK_BLOCKOFFSET_MASK UINT64CONST(0x3FFFFFFE)
|
109
|
+
|
96
110
|
/* define the least significant base-0 bit of each portion of the hdrmask */
|
97
111
|
#define MEMORYCHUNK_EXTERNAL_BASEBIT MEMORY_CONTEXT_METHODID_BITS
|
98
112
|
#define MEMORYCHUNK_VALUE_BASEBIT (MEMORYCHUNK_EXTERNAL_BASEBIT + 1)
|
99
|
-
#define MEMORYCHUNK_BLOCKOFFSET_BASEBIT (MEMORYCHUNK_VALUE_BASEBIT +
|
113
|
+
#define MEMORYCHUNK_BLOCKOFFSET_BASEBIT (MEMORYCHUNK_VALUE_BASEBIT + 29)
|
100
114
|
|
101
115
|
/*
|
102
116
|
* A magic number for storing in the free bits of an external chunk. This
|
@@ -131,11 +145,11 @@ typedef struct MemoryChunk
|
|
131
145
|
(((hdrmask) >> MEMORYCHUNK_VALUE_BASEBIT) & MEMORYCHUNK_MAX_VALUE)
|
132
146
|
|
133
147
|
/*
|
134
|
-
*
|
135
|
-
*
|
148
|
+
* Shift the block offset down to the 0th bit position and mask off the single
|
149
|
+
* bit that's shared with the MemoryChunkGetValue field.
|
136
150
|
*/
|
137
151
|
#define HdrMaskBlockOffset(hdrmask) \
|
138
|
-
(((hdrmask) >> MEMORYCHUNK_BLOCKOFFSET_BASEBIT) &
|
152
|
+
(((hdrmask) >> MEMORYCHUNK_BLOCKOFFSET_BASEBIT) & MEMORYCHUNK_BLOCKOFFSET_MASK)
|
139
153
|
|
140
154
|
/* For external chunks only, check the magic number matches */
|
141
155
|
#define HdrMaskCheckMagic(hdrmask) \
|
@@ -149,6 +163,7 @@ typedef struct MemoryChunk
|
|
149
163
|
* The number of bytes between 'block' and 'chunk' must be <=
|
150
164
|
* MEMORYCHUNK_MAX_BLOCKOFFSET.
|
151
165
|
* 'value' must be <= MEMORYCHUNK_MAX_VALUE.
|
166
|
+
* Both 'chunk' and 'block' must be MAXALIGNed pointers.
|
152
167
|
*/
|
153
168
|
static inline void
|
154
169
|
MemoryChunkSetHdrMask(MemoryChunk *chunk, void *block,
|
@@ -157,7 +172,7 @@ MemoryChunkSetHdrMask(MemoryChunk *chunk, void *block,
|
|
157
172
|
Size blockoffset = (char *) chunk - (char *) block;
|
158
173
|
|
159
174
|
Assert((char *) chunk >= (char *) block);
|
160
|
-
Assert(blockoffset
|
175
|
+
Assert((blockoffset & MEMORYCHUNK_BLOCKOFFSET_MASK) == blockoffset);
|
161
176
|
Assert(value <= MEMORYCHUNK_MAX_VALUE);
|
162
177
|
Assert((int) methodid <= MEMORY_CONTEXT_METHODID_MASK);
|
163
178
|
|
@@ -225,6 +240,7 @@ MemoryChunkGetBlock(MemoryChunk *chunk)
|
|
225
240
|
}
|
226
241
|
|
227
242
|
/* cleanup all internal definitions */
|
243
|
+
#undef MEMORYCHUNK_BLOCKOFFSET_MASK
|
228
244
|
#undef MEMORYCHUNK_EXTERNAL_BASEBIT
|
229
245
|
#undef MEMORYCHUNK_VALUE_BASEBIT
|
230
246
|
#undef MEMORYCHUNK_BLOCKOFFSET_BASEBIT
|
@@ -5,7 +5,7 @@
|
|
5
5
|
*
|
6
6
|
* Original coding 1998, Jan Wieck. Heavily revised 2003, Tom Lane.
|
7
7
|
*
|
8
|
-
* Copyright (c) 1998-
|
8
|
+
* Copyright (c) 1998-2024, PostgreSQL Global Development Group
|
9
9
|
*
|
10
10
|
* src/include/utils/numeric.h
|
11
11
|
*
|
@@ -14,6 +14,7 @@
|
|
14
14
|
#ifndef _PG_NUMERIC_H_
|
15
15
|
#define _PG_NUMERIC_H_
|
16
16
|
|
17
|
+
#include "common/pg_prng.h"
|
17
18
|
#include "fmgr.h"
|
18
19
|
|
19
20
|
/*
|
@@ -101,5 +102,9 @@ extern Numeric numeric_div_opt_error(Numeric num1, Numeric num2,
|
|
101
102
|
extern Numeric numeric_mod_opt_error(Numeric num1, Numeric num2,
|
102
103
|
bool *have_error);
|
103
104
|
extern int32 numeric_int4_opt_error(Numeric num, bool *have_error);
|
105
|
+
extern int64 numeric_int8_opt_error(Numeric num, bool *have_error);
|
106
|
+
|
107
|
+
extern Numeric random_numeric(pg_prng_state *state,
|
108
|
+
Numeric rmin, Numeric rmax);
|
104
109
|
|
105
110
|
#endif /* _PG_NUMERIC_H_ */
|
@@ -18,7 +18,7 @@
|
|
18
18
|
* everything that should be freed. See utils/mmgr/README for more info.
|
19
19
|
*
|
20
20
|
*
|
21
|
-
* Portions Copyright (c) 1996-
|
21
|
+
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
22
22
|
* Portions Copyright (c) 1994, Regents of the University of California
|
23
23
|
*
|
24
24
|
* src/include/utils/palloc.h
|
@@ -70,7 +70,6 @@ extern PGDLLIMPORT __thread MemoryContext CurrentMemoryContext;
|
|
70
70
|
*/
|
71
71
|
extern void *MemoryContextAlloc(MemoryContext context, Size size);
|
72
72
|
extern void *MemoryContextAllocZero(MemoryContext context, Size size);
|
73
|
-
extern void *MemoryContextAllocZeroAligned(MemoryContext context, Size size);
|
74
73
|
extern void *MemoryContextAllocExtended(MemoryContext context,
|
75
74
|
Size size, int flags);
|
76
75
|
extern void *MemoryContextAllocAligned(MemoryContext context,
|
@@ -109,19 +108,6 @@ extern void pfree(void *pointer);
|
|
109
108
|
#define repalloc_array(pointer, type, count) ((type *) repalloc(pointer, sizeof(type) * (count)))
|
110
109
|
#define repalloc0_array(pointer, type, oldcount, count) ((type *) repalloc0(pointer, sizeof(type) * (oldcount), sizeof(type) * (count)))
|
111
110
|
|
112
|
-
/*
|
113
|
-
* The result of palloc() is always word-aligned, so we can skip testing
|
114
|
-
* alignment of the pointer when deciding which MemSet variant to use.
|
115
|
-
* Note that this variant does not offer any advantage, and should not be
|
116
|
-
* used, unless its "sz" argument is a compile-time constant; therefore, the
|
117
|
-
* issue that it evaluates the argument multiple times isn't a problem in
|
118
|
-
* practice.
|
119
|
-
*/
|
120
|
-
#define palloc0fast(sz) \
|
121
|
-
( MemSetTest(0, sz) ? \
|
122
|
-
MemoryContextAllocZeroAligned(CurrentMemoryContext, sz) : \
|
123
|
-
MemoryContextAllocZero(CurrentMemoryContext, sz) )
|
124
|
-
|
125
111
|
/* Higher-limit allocators. */
|
126
112
|
extern void *MemoryContextAllocHuge(MemoryContext context, Size size);
|
127
113
|
extern pg_nodiscard void *repalloc_huge(void *pointer, Size size);
|
@@ -4,7 +4,7 @@
|
|
4
4
|
*
|
5
5
|
* src/include/utils/pg_locale.h
|
6
6
|
*
|
7
|
-
* Copyright (c) 2002-
|
7
|
+
* Copyright (c) 2002-2024, PostgreSQL Global Development Group
|
8
8
|
*
|
9
9
|
*-----------------------------------------------------------------------
|
10
10
|
*/
|
@@ -67,9 +67,7 @@ extern void cache_locale_time(void);
|
|
67
67
|
|
68
68
|
|
69
69
|
/*
|
70
|
-
* We
|
71
|
-
* function signatures for all builds, while not having to create a
|
72
|
-
* fake version of the standard type locale_t in the global namespace.
|
70
|
+
* We use a discriminated union to hold either a locale_t or an ICU collator.
|
73
71
|
* pg_locale_t is occasionally checked for truth, so make it a pointer.
|
74
72
|
*/
|
75
73
|
struct pg_locale_struct
|
@@ -78,9 +76,11 @@ struct pg_locale_struct
|
|
78
76
|
bool deterministic;
|
79
77
|
union
|
80
78
|
{
|
81
|
-
|
79
|
+
struct
|
80
|
+
{
|
81
|
+
const char *locale;
|
82
|
+
} builtin;
|
82
83
|
locale_t lt;
|
83
|
-
#endif
|
84
84
|
#ifdef USE_ICU
|
85
85
|
struct
|
86
86
|
{
|
@@ -88,7 +88,6 @@ struct pg_locale_struct
|
|
88
88
|
UCollator *ucol;
|
89
89
|
} icu;
|
90
90
|
#endif
|
91
|
-
int dummy; /* in case we have neither LOCALE_T nor ICU */
|
92
91
|
} info;
|
93
92
|
};
|
94
93
|
|
@@ -118,6 +117,8 @@ extern size_t pg_strxfrm_prefix(char *dest, const char *src, size_t destsize,
|
|
118
117
|
extern size_t pg_strnxfrm_prefix(char *dest, size_t destsize, const char *src,
|
119
118
|
size_t srclen, pg_locale_t locale);
|
120
119
|
|
120
|
+
extern int builtin_locale_encoding(const char *locale);
|
121
|
+
extern const char *builtin_validate_locale(int encoding, const char *locale);
|
121
122
|
extern void icu_validate_locale(const char *loc_str);
|
122
123
|
extern char *icu_language_tag(const char *loc_str, int elevel);
|
123
124
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
* only be needed by files implementing statistics support (rather than ones
|
6
6
|
* reporting / querying stats).
|
7
7
|
*
|
8
|
-
* Copyright (c) 2001-
|
8
|
+
* Copyright (c) 2001-2024, PostgreSQL Global Development Group
|
9
9
|
*
|
10
10
|
* src/include/utils/pgstat_internal.h
|
11
11
|
* ----------
|
@@ -14,7 +14,7 @@
|
|
14
14
|
#define PGSTAT_INTERNAL_H
|
15
15
|
|
16
16
|
|
17
|
-
#include "common/
|
17
|
+
#include "common/hashfn_unstable.h"
|
18
18
|
#include "lib/dshash.h"
|
19
19
|
#include "lib/ilist.h"
|
20
20
|
#include "pgstat.h"
|
@@ -269,13 +269,13 @@ typedef struct PgStat_KindInfo
|
|
269
269
|
* definitions.
|
270
270
|
*/
|
271
271
|
static const char *const slru_names[] = {
|
272
|
-
"
|
273
|
-
"
|
274
|
-
"
|
275
|
-
"
|
276
|
-
"
|
277
|
-
"
|
278
|
-
"
|
272
|
+
"commit_timestamp",
|
273
|
+
"multixact_member",
|
274
|
+
"multixact_offset",
|
275
|
+
"notify",
|
276
|
+
"serializable",
|
277
|
+
"subtransaction",
|
278
|
+
"transaction",
|
279
279
|
"other" /* has to be last */
|
280
280
|
};
|
281
281
|
|
@@ -776,16 +776,10 @@ pgstat_cmp_hash_key(const void *a, const void *b, size_t size, void *arg)
|
|
776
776
|
static inline uint32
|
777
777
|
pgstat_hash_hash_key(const void *d, size_t size, void *arg)
|
778
778
|
{
|
779
|
-
const
|
780
|
-
uint32 hash;
|
779
|
+
const char *key = (const char *) d;
|
781
780
|
|
782
781
|
Assert(size == sizeof(PgStat_HashKey) && arg == NULL);
|
783
|
-
|
784
|
-
hash = murmurhash32(key->kind);
|
785
|
-
hash = hash_combine(hash, murmurhash32(key->dboid));
|
786
|
-
hash = hash_combine(hash, murmurhash32(key->objoid));
|
787
|
-
|
788
|
-
return hash;
|
782
|
+
return fasthash32(key, size, 0);
|
789
783
|
}
|
790
784
|
|
791
785
|
/*
|
@@ -5,7 +5,7 @@
|
|
5
5
|
*
|
6
6
|
* See plancache.c for comments.
|
7
7
|
*
|
8
|
-
* Portions Copyright (c) 1996-
|
8
|
+
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
9
9
|
* Portions Copyright (c) 1994, Regents of the University of California
|
10
10
|
*
|
11
11
|
* src/include/utils/plancache.h
|
@@ -31,7 +31,7 @@ typedef enum
|
|
31
31
|
{
|
32
32
|
PLAN_CACHE_MODE_AUTO,
|
33
33
|
PLAN_CACHE_MODE_FORCE_GENERIC_PLAN,
|
34
|
-
PLAN_CACHE_MODE_FORCE_CUSTOM_PLAN
|
34
|
+
PLAN_CACHE_MODE_FORCE_CUSTOM_PLAN,
|
35
35
|
} PlanCacheMode;
|
36
36
|
|
37
37
|
/* GUC parameter */
|
@@ -111,7 +111,7 @@ typedef struct CachedPlanSource
|
|
111
111
|
List *query_list; /* list of Query nodes, or NIL if not valid */
|
112
112
|
List *relationOids; /* OIDs of relations the queries depend on */
|
113
113
|
List *invalItems; /* other dependencies, as PlanInvalItems */
|
114
|
-
struct
|
114
|
+
struct SearchPathMatcher *search_path; /* search_path used for parsing
|
115
115
|
* and planning */
|
116
116
|
MemoryContext query_context; /* context holding the above, or NULL */
|
117
117
|
Oid rewriteRoleId; /* Role ID we did rewriting for */
|
@@ -188,6 +188,8 @@ typedef struct CachedExpression
|
|
188
188
|
extern void InitPlanCache(void);
|
189
189
|
extern void ResetPlanCache(void);
|
190
190
|
|
191
|
+
extern void ReleaseAllPlanCacheRefsInOwner(ResourceOwner owner);
|
192
|
+
|
191
193
|
extern CachedPlanSource *CreateCachedPlan(struct RawStmt *raw_parse_tree,
|
192
194
|
const char *query_string,
|
193
195
|
CommandTag commandTag);
|
@@ -36,7 +36,7 @@
|
|
36
36
|
* to look like NO SCROLL cursors.
|
37
37
|
*
|
38
38
|
*
|
39
|
-
* Portions Copyright (c) 1996-
|
39
|
+
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
40
40
|
* Portions Copyright (c) 1994, Regents of the University of California
|
41
41
|
*
|
42
42
|
* src/include/utils/portal.h
|
@@ -64,9 +64,9 @@
|
|
64
64
|
* supports holdable cursors (the Executor results can be dumped into a
|
65
65
|
* tuplestore for access after transaction completion).
|
66
66
|
*
|
67
|
-
* PORTAL_ONE_RETURNING: the portal contains a single INSERT/UPDATE/DELETE
|
68
|
-
* query with a RETURNING clause (plus possibly auxiliary queries added
|
69
|
-
* rule rewriting). On first execution, we run the portal to completion
|
67
|
+
* PORTAL_ONE_RETURNING: the portal contains a single INSERT/UPDATE/DELETE/
|
68
|
+
* MERGE query with a RETURNING clause (plus possibly auxiliary queries added
|
69
|
+
* by rule rewriting). On first execution, we run the portal to completion
|
70
70
|
* and dump the primary query's results into the portal tuplestore; the
|
71
71
|
* results are then returned to the client as demanded. (We can't support
|
72
72
|
* suspension of the query partway through, because the AFTER TRIGGER code
|
@@ -92,7 +92,7 @@ typedef enum PortalStrategy
|
|
92
92
|
PORTAL_ONE_RETURNING,
|
93
93
|
PORTAL_ONE_MOD_WITH,
|
94
94
|
PORTAL_UTIL_SELECT,
|
95
|
-
PORTAL_MULTI_QUERY
|
95
|
+
PORTAL_MULTI_QUERY,
|
96
96
|
} PortalStrategy;
|
97
97
|
|
98
98
|
/*
|
@@ -107,7 +107,7 @@ typedef enum PortalStatus
|
|
107
107
|
PORTAL_READY, /* PortalStart complete, can run it */
|
108
108
|
PORTAL_ACTIVE, /* portal is running (can't delete it) */
|
109
109
|
PORTAL_DONE, /* portal is finished (don't re-run it) */
|
110
|
-
PORTAL_FAILED /* portal got error (can't re-run it) */
|
110
|
+
PORTAL_FAILED, /* portal got error (can't re-run it) */
|
111
111
|
} PortalStatus;
|
112
112
|
|
113
113
|
typedef struct PortalData *Portal;
|
@@ -170,9 +170,9 @@ typedef struct PortalData
|
|
170
170
|
Snapshot portalSnapshot; /* active snapshot, or NULL if none */
|
171
171
|
|
172
172
|
/*
|
173
|
-
* Where we store tuples for a held cursor or a PORTAL_ONE_RETURNING
|
174
|
-
* PORTAL_UTIL_SELECT query. (A cursor held past
|
175
|
-
* transaction no longer has any active executor state.)
|
173
|
+
* Where we store tuples for a held cursor or a PORTAL_ONE_RETURNING,
|
174
|
+
* PORTAL_ONE_MOD_WITH, or PORTAL_UTIL_SELECT query. (A cursor held past
|
175
|
+
* the end of its transaction no longer has any active executor state.)
|
176
176
|
*/
|
177
177
|
Tuplestorestate *holdStore; /* store for holdable cursors */
|
178
178
|
MemoryContext holdContext; /* memory containing holdStore */
|
@@ -4,7 +4,7 @@
|
|
4
4
|
* Access to functions to mutate the query environment and retrieve the
|
5
5
|
* actual data related to entries (if any).
|
6
6
|
*
|
7
|
-
* Portions Copyright (c) 1996-
|
7
|
+
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
8
8
|
* Portions Copyright (c) 1994, Regents of the University of California
|
9
9
|
*
|
10
10
|
* src/include/utils/queryenvironment.h
|
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
typedef enum EphemeralNameRelationType
|
21
21
|
{
|
22
|
-
ENR_NAMED_TUPLESTORE /* named tuplestore relation; e.g., deltas */
|
22
|
+
ENR_NAMED_TUPLESTORE, /* named tuplestore relation; e.g., deltas */
|
23
23
|
} EphemeralNameRelationType;
|
24
24
|
|
25
25
|
/*
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* regproc.h
|
4
4
|
* Functions for the built-in types regproc, regclass, regtype, etc.
|
5
5
|
*
|
6
|
-
* Portions Copyright (c) 1996-
|
6
|
+
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
7
7
|
* Portions Copyright (c) 1994, Regents of the University of California
|
8
8
|
*
|
9
9
|
* src/include/utils/regproc.h
|
@@ -4,7 +4,7 @@
|
|
4
4
|
* POSTGRES relation descriptor (a/k/a relcache entry) definitions.
|
5
5
|
*
|
6
6
|
*
|
7
|
-
* Portions Copyright (c) 1996-
|
7
|
+
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
8
8
|
* Portions Copyright (c) 1994, Regents of the University of California
|
9
9
|
*
|
10
10
|
* src/include/utils/rel.h
|
@@ -57,7 +57,7 @@ typedef struct RelationData
|
|
57
57
|
RelFileLocator rd_locator; /* relation physical identifier */
|
58
58
|
SMgrRelation rd_smgr; /* cached file handle, or NULL */
|
59
59
|
int rd_refcnt; /* reference count */
|
60
|
-
|
60
|
+
ProcNumber rd_backend; /* owning backend's proc number, if temp rel */
|
61
61
|
bool rd_islocaltemp; /* rel is a temp rel of this session */
|
62
62
|
bool rd_isnailed; /* rel is nailed in cache */
|
63
63
|
bool rd_isvalid; /* relcache entry is valid */
|
@@ -150,7 +150,8 @@ typedef struct RelationData
|
|
150
150
|
|
151
151
|
/* data managed by RelationGetIndexList: */
|
152
152
|
List *rd_indexlist; /* list of OIDs of indexes on relation */
|
153
|
-
Oid rd_pkindex; /* OID of primary key, if any */
|
153
|
+
Oid rd_pkindex; /* OID of (deferrable?) primary key, if any */
|
154
|
+
bool rd_ispkdeferrable; /* is rd_pkindex a deferrable PK? */
|
154
155
|
Oid rd_replidindex; /* OID of replica identity index, if any */
|
155
156
|
|
156
157
|
/* data managed by RelationGetStatExtList: */
|
@@ -329,7 +330,7 @@ typedef enum StdRdOptIndexCleanup
|
|
329
330
|
{
|
330
331
|
STDRD_OPTION_VACUUM_INDEX_CLEANUP_AUTO = 0,
|
331
332
|
STDRD_OPTION_VACUUM_INDEX_CLEANUP_OFF,
|
332
|
-
STDRD_OPTION_VACUUM_INDEX_CLEANUP_ON
|
333
|
+
STDRD_OPTION_VACUUM_INDEX_CLEANUP_ON,
|
333
334
|
} StdRdOptIndexCleanup;
|
334
335
|
|
335
336
|
typedef struct StdRdOptions
|
@@ -402,7 +403,7 @@ typedef enum ViewOptCheckOption
|
|
402
403
|
{
|
403
404
|
VIEW_OPTION_CHECK_OPTION_NOT_SET,
|
404
405
|
VIEW_OPTION_CHECK_OPTION_LOCAL,
|
405
|
-
VIEW_OPTION_CHECK_OPTION_CASCADED
|
406
|
+
VIEW_OPTION_CHECK_OPTION_CASCADED,
|
406
407
|
} ViewOptCheckOption;
|
407
408
|
|
408
409
|
/*
|
@@ -561,18 +562,15 @@ typedef struct ViewOptions
|
|
561
562
|
*
|
562
563
|
* Very little code is authorized to touch rel->rd_smgr directly. Instead
|
563
564
|
* use this function to fetch its value.
|
564
|
-
*
|
565
|
-
* Note: since a relcache flush can cause the file handle to be closed again,
|
566
|
-
* it's unwise to hold onto the pointer returned by this function for any
|
567
|
-
* long period. Recommended practice is to just re-execute RelationGetSmgr
|
568
|
-
* each time you need to access the SMgrRelation. It's quite cheap in
|
569
|
-
* comparison to whatever an smgr function is going to do.
|
570
565
|
*/
|
571
566
|
static inline SMgrRelation
|
572
567
|
RelationGetSmgr(Relation rel)
|
573
568
|
{
|
574
569
|
if (unlikely(rel->rd_smgr == NULL))
|
575
|
-
|
570
|
+
{
|
571
|
+
rel->rd_smgr = smgropen(rel->rd_locator, rel->rd_backend);
|
572
|
+
smgrpin(rel->rd_smgr);
|
573
|
+
}
|
576
574
|
return rel->rd_smgr;
|
577
575
|
}
|
578
576
|
|
@@ -584,10 +582,11 @@ static inline void
|
|
584
582
|
RelationCloseSmgr(Relation relation)
|
585
583
|
{
|
586
584
|
if (relation->rd_smgr != NULL)
|
585
|
+
{
|
586
|
+
smgrunpin(relation->rd_smgr);
|
587
587
|
smgrclose(relation->rd_smgr);
|
588
|
-
|
589
|
-
|
590
|
-
Assert(relation->rd_smgr == NULL);
|
588
|
+
relation->rd_smgr = NULL;
|
589
|
+
}
|
591
590
|
}
|
592
591
|
#endif /* !FRONTEND */
|
593
592
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
* Relation descriptor cache definitions.
|
5
5
|
*
|
6
6
|
*
|
7
|
-
* Portions Copyright (c) 1996-
|
7
|
+
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
8
8
|
* Portions Copyright (c) 1994, Regents of the University of California
|
9
9
|
*
|
10
10
|
* src/include/utils/relcache.h
|
@@ -51,7 +51,6 @@ extern Oid RelationGetReplicaIndex(Relation relation);
|
|
51
51
|
extern List *RelationGetIndexExpressions(Relation relation);
|
52
52
|
extern List *RelationGetDummyIndexExpressions(Relation relation);
|
53
53
|
extern List *RelationGetIndexPredicate(Relation relation);
|
54
|
-
extern Datum *RelationGetIndexRawAttOptions(Relation indexrel);
|
55
54
|
extern bytea **RelationGetIndexAttOptions(Relation relation, bool copy);
|
56
55
|
|
57
56
|
/*
|
@@ -63,7 +62,7 @@ typedef enum IndexAttrBitmapKind
|
|
63
62
|
INDEX_ATTR_BITMAP_PRIMARY_KEY,
|
64
63
|
INDEX_ATTR_BITMAP_IDENTITY_KEY,
|
65
64
|
INDEX_ATTR_BITMAP_HOT_BLOCKING,
|
66
|
-
INDEX_ATTR_BITMAP_SUMMARIZED
|
65
|
+
INDEX_ATTR_BITMAP_SUMMARIZED,
|
67
66
|
} IndexAttrBitmapKind;
|
68
67
|
|
69
68
|
extern Bitmapset *RelationGetIndexAttrBitmap(Relation relation,
|
@@ -130,8 +129,6 @@ extern void RelationCacheInvalidateEntry(Oid relationId);
|
|
130
129
|
|
131
130
|
extern void RelationCacheInvalidate(bool debug_discard);
|
132
131
|
|
133
|
-
extern void RelationCloseSmgrByOid(Oid relationId);
|
134
|
-
|
135
132
|
#ifdef USE_ASSERT_CHECKING
|
136
133
|
extern void AssertPendingSyncs_RelationCache(void);
|
137
134
|
#else
|
@@ -4,7 +4,7 @@
|
|
4
4
|
* POSTGRES relation trigger definitions.
|
5
5
|
*
|
6
6
|
*
|
7
|
-
* Portions Copyright (c) 1996-
|
7
|
+
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
8
8
|
* Portions Copyright (c) 1994, Regents of the University of California
|
9
9
|
*
|
10
10
|
* src/include/utils/reltrigger.h
|