pg_query 4.2.1 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +61 -0
- data/README.md +7 -9
- data/Rakefile +5 -6
- data/ext/pg_query/ext_symbols_freebsd.sym +1 -0
- data/ext/pg_query/ext_symbols_freebsd_with_ruby_abi_version.sym +2 -0
- data/ext/pg_query/ext_symbols_openbsd.sym +1 -0
- data/ext/pg_query/ext_symbols_openbsd_with_ruby_abi_version.sym +2 -0
- data/ext/pg_query/ext_symbols_with_ruby_abi_version.sym +2 -0
- data/ext/pg_query/extconf.rb +33 -9
- data/ext/pg_query/include/pg_query.h +28 -3
- data/ext/pg_query/include/pg_query_enum_defs.c +599 -167
- data/ext/pg_query/include/pg_query_fingerprint_conds.c +640 -520
- data/ext/pg_query/include/pg_query_fingerprint_defs.c +6400 -4633
- data/ext/pg_query/include/pg_query_outfuncs_conds.c +433 -343
- data/ext/pg_query/include/pg_query_outfuncs_defs.c +1472 -1152
- data/ext/pg_query/include/pg_query_readfuncs_conds.c +154 -124
- data/ext/pg_query/include/pg_query_readfuncs_defs.c +1886 -1506
- data/ext/pg_query/include/postgres/access/amapi.h +303 -0
- data/ext/pg_query/include/postgres/access/attmap.h +54 -0
- data/ext/pg_query/include/postgres/access/attnum.h +64 -0
- data/ext/pg_query/include/postgres/access/brin_internal.h +116 -0
- data/ext/pg_query/include/postgres/access/brin_tuple.h +112 -0
- data/ext/pg_query/include/postgres/access/clog.h +62 -0
- data/ext/pg_query/include/postgres/access/commit_ts.h +73 -0
- data/ext/pg_query/include/postgres/access/detoast.h +82 -0
- data/ext/pg_query/include/postgres/access/genam.h +246 -0
- data/ext/pg_query/include/postgres/access/gin.h +91 -0
- data/ext/pg_query/include/postgres/access/htup.h +89 -0
- data/ext/pg_query/include/postgres/access/htup_details.h +811 -0
- data/ext/pg_query/include/postgres/access/itup.h +170 -0
- data/ext/pg_query/include/postgres/access/parallel.h +81 -0
- data/ext/pg_query/include/postgres/access/printtup.h +35 -0
- data/ext/pg_query/include/postgres/access/relation.h +28 -0
- data/ext/pg_query/include/postgres/access/relscan.h +191 -0
- data/ext/pg_query/include/postgres/access/rmgrlist.h +49 -0
- data/ext/pg_query/include/postgres/access/sdir.h +67 -0
- data/ext/pg_query/include/postgres/access/skey.h +151 -0
- data/ext/pg_query/include/postgres/access/slru.h +218 -0
- data/ext/pg_query/include/postgres/access/stratnum.h +85 -0
- data/ext/pg_query/include/postgres/access/sysattr.h +29 -0
- data/ext/pg_query/include/postgres/access/table.h +28 -0
- data/ext/pg_query/include/postgres/access/tableam.h +2110 -0
- data/ext/pg_query/include/postgres/access/tidstore.h +50 -0
- data/ext/pg_query/include/postgres/access/toast_compression.h +73 -0
- data/ext/pg_query/include/postgres/access/transam.h +418 -0
- data/ext/pg_query/include/postgres/access/tsmapi.h +82 -0
- data/ext/pg_query/include/postgres/access/tupconvert.h +54 -0
- data/ext/pg_query/include/postgres/access/tupdesc.h +154 -0
- data/ext/pg_query/include/postgres/access/tupmacs.h +207 -0
- data/ext/pg_query/include/postgres/access/twophase.h +65 -0
- data/ext/pg_query/include/postgres/access/xact.h +530 -0
- data/ext/pg_query/include/postgres/access/xlog.h +310 -0
- data/ext/pg_query/include/postgres/access/xlog_internal.h +405 -0
- data/ext/pg_query/include/postgres/access/xlogbackup.h +43 -0
- data/ext/pg_query/include/postgres/access/xlogdefs.h +82 -0
- data/ext/pg_query/include/postgres/access/xlogprefetcher.h +55 -0
- data/ext/pg_query/include/postgres/access/xlogreader.h +444 -0
- data/ext/pg_query/include/postgres/access/xlogrecord.h +248 -0
- data/ext/pg_query/include/postgres/access/xlogrecovery.h +158 -0
- data/ext/pg_query/include/postgres/archive/archive_module.h +67 -0
- data/ext/pg_query/include/postgres/c.h +1374 -0
- data/ext/pg_query/include/postgres/catalog/catalog.h +47 -0
- data/ext/pg_query/include/postgres/catalog/catversion.h +62 -0
- data/ext/pg_query/include/postgres/catalog/dependency.h +228 -0
- data/ext/pg_query/include/postgres/catalog/genbki.h +149 -0
- data/ext/pg_query/include/postgres/catalog/index.h +218 -0
- data/ext/pg_query/include/postgres/catalog/indexing.h +54 -0
- data/ext/pg_query/include/postgres/catalog/namespace.h +189 -0
- data/ext/pg_query/include/postgres/catalog/objectaccess.h +267 -0
- data/ext/pg_query/include/postgres/catalog/objectaddress.h +93 -0
- data/ext/pg_query/include/postgres/catalog/pg_aggregate.h +182 -0
- data/ext/pg_query/include/postgres/catalog/pg_aggregate_d.h +78 -0
- data/ext/pg_query/include/postgres/catalog/pg_am.h +66 -0
- data/ext/pg_query/include/postgres/catalog/pg_am_d.h +47 -0
- data/ext/pg_query/include/postgres/catalog/pg_attribute.h +240 -0
- data/ext/pg_query/include/postgres/catalog/pg_attribute_d.h +62 -0
- data/ext/pg_query/include/postgres/catalog/pg_authid.h +66 -0
- data/ext/pg_query/include/postgres/catalog/pg_authid_d.h +60 -0
- data/ext/pg_query/include/postgres/catalog/pg_class.h +235 -0
- data/ext/pg_query/include/postgres/catalog/pg_class_d.h +134 -0
- data/ext/pg_query/include/postgres/catalog/pg_collation.h +106 -0
- data/ext/pg_query/include/postgres/catalog/pg_collation_d.h +66 -0
- data/ext/pg_query/include/postgres/catalog/pg_constraint.h +278 -0
- data/ext/pg_query/include/postgres/catalog/pg_constraint_d.h +74 -0
- data/ext/pg_query/include/postgres/catalog/pg_control.h +260 -0
- data/ext/pg_query/include/postgres/catalog/pg_conversion.h +79 -0
- data/ext/pg_query/include/postgres/catalog/pg_conversion_d.h +38 -0
- data/ext/pg_query/include/postgres/catalog/pg_database.h +129 -0
- data/ext/pg_query/include/postgres/catalog/pg_database_d.h +53 -0
- data/ext/pg_query/include/postgres/catalog/pg_depend.h +77 -0
- data/ext/pg_query/include/postgres/catalog/pg_depend_d.h +36 -0
- data/ext/pg_query/include/postgres/catalog/pg_event_trigger.h +60 -0
- data/ext/pg_query/include/postgres/catalog/pg_event_trigger_d.h +36 -0
- data/ext/pg_query/include/postgres/catalog/pg_index.h +92 -0
- data/ext/pg_query/include/postgres/catalog/pg_index_d.h +59 -0
- data/ext/pg_query/include/postgres/catalog/pg_language.h +75 -0
- data/ext/pg_query/include/postgres/catalog/pg_language_d.h +41 -0
- data/ext/pg_query/include/postgres/catalog/pg_namespace.h +67 -0
- data/ext/pg_query/include/postgres/catalog/pg_namespace_d.h +36 -0
- data/ext/pg_query/include/postgres/catalog/pg_opclass.h +91 -0
- data/ext/pg_query/include/postgres/catalog/pg_opclass_d.h +51 -0
- data/ext/pg_query/include/postgres/catalog/pg_operator.h +124 -0
- data/ext/pg_query/include/postgres/catalog/pg_operator_d.h +142 -0
- data/ext/pg_query/include/postgres/catalog/pg_opfamily.h +67 -0
- data/ext/pg_query/include/postgres/catalog/pg_opfamily_d.h +51 -0
- data/ext/pg_query/include/postgres/catalog/pg_partitioned_table.h +76 -0
- data/ext/pg_query/include/postgres/catalog/pg_partitioned_table_d.h +36 -0
- data/ext/pg_query/include/postgres/catalog/pg_proc.h +223 -0
- data/ext/pg_query/include/postgres/catalog/pg_proc_d.h +101 -0
- data/ext/pg_query/include/postgres/catalog/pg_publication.h +161 -0
- data/ext/pg_query/include/postgres/catalog/pg_publication_d.h +38 -0
- data/ext/pg_query/include/postgres/catalog/pg_replication_origin.h +65 -0
- data/ext/pg_query/include/postgres/catalog/pg_replication_origin_d.h +33 -0
- data/ext/pg_query/include/postgres/catalog/pg_statistic.h +288 -0
- data/ext/pg_query/include/postgres/catalog/pg_statistic_d.h +199 -0
- data/ext/pg_query/include/postgres/catalog/pg_statistic_ext.h +91 -0
- data/ext/pg_query/include/postgres/catalog/pg_statistic_ext_d.h +45 -0
- data/ext/pg_query/include/postgres/catalog/pg_transform.h +51 -0
- data/ext/pg_query/include/postgres/catalog/pg_transform_d.h +34 -0
- data/ext/pg_query/include/postgres/catalog/pg_trigger.h +153 -0
- data/ext/pg_query/include/postgres/catalog/pg_trigger_d.h +109 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_config.h +56 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_config_d.h +34 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_dict.h +62 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_dict_d.h +35 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_parser.h +63 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_parser_d.h +37 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_template.h +54 -0
- data/ext/pg_query/include/postgres/catalog/pg_ts_template_d.h +34 -0
- data/ext/pg_query/include/postgres/catalog/pg_type.h +407 -0
- data/ext/pg_query/include/postgres/catalog/pg_type_d.h +324 -0
- data/ext/pg_query/include/postgres/catalog/storage.h +50 -0
- data/ext/pg_query/include/postgres/catalog/syscache_ids.h +104 -0
- data/ext/pg_query/include/postgres/commands/async.h +49 -0
- data/ext/pg_query/include/postgres/commands/dbcommands.h +37 -0
- data/ext/pg_query/include/postgres/commands/defrem.h +161 -0
- data/ext/pg_query/include/postgres/commands/event_trigger.h +97 -0
- data/ext/pg_query/include/postgres/commands/explain.h +145 -0
- data/ext/pg_query/include/postgres/commands/prepare.h +61 -0
- data/ext/pg_query/include/postgres/commands/tablespace.h +69 -0
- data/ext/pg_query/include/postgres/commands/trigger.h +288 -0
- data/ext/pg_query/include/postgres/commands/user.h +43 -0
- data/ext/pg_query/include/postgres/commands/vacuum.h +388 -0
- data/ext/pg_query/include/postgres/common/cryptohash.h +39 -0
- data/ext/pg_query/include/postgres/common/file_perm.h +56 -0
- data/ext/pg_query/include/postgres/common/file_utils.h +65 -0
- data/ext/pg_query/include/postgres/common/hashfn.h +119 -0
- data/ext/pg_query/include/postgres/common/hashfn_unstable.h +407 -0
- data/ext/pg_query/include/postgres/common/int.h +512 -0
- data/ext/pg_query/include/postgres/common/keywords.h +29 -0
- data/ext/pg_query/include/postgres/common/kwlookup.h +44 -0
- data/ext/pg_query/include/postgres/common/pg_prng.h +62 -0
- data/ext/pg_query/include/postgres/common/relpath.h +97 -0
- data/ext/pg_query/include/postgres/common/scram-common.h +70 -0
- data/ext/pg_query/include/postgres/common/sha2.h +32 -0
- data/ext/pg_query/include/postgres/common/string.h +44 -0
- data/ext/pg_query/include/postgres/common/unicode_east_asian_fw_table.h +124 -0
- data/ext/pg_query/include/postgres/common/unicode_nonspacing_table.h +326 -0
- data/ext/pg_query/include/postgres/copyfuncs.funcs.c +5261 -0
- data/ext/pg_query/include/postgres/copyfuncs.switch.c +989 -0
- data/ext/pg_query/include/postgres/datatype/timestamp.h +269 -0
- data/ext/pg_query/include/postgres/equalfuncs.funcs.c +3310 -0
- data/ext/pg_query/include/postgres/equalfuncs.switch.c +836 -0
- data/ext/pg_query/include/postgres/executor/execdesc.h +70 -0
- data/ext/pg_query/include/postgres/executor/executor.h +681 -0
- data/ext/pg_query/include/postgres/executor/functions.h +56 -0
- data/ext/pg_query/include/postgres/executor/instrument.h +120 -0
- data/ext/pg_query/include/postgres/executor/spi.h +207 -0
- data/ext/pg_query/include/postgres/executor/tablefunc.h +67 -0
- data/ext/pg_query/include/postgres/executor/tuptable.h +523 -0
- data/ext/pg_query/include/postgres/fmgr.h +800 -0
- data/ext/pg_query/include/postgres/foreign/fdwapi.h +294 -0
- data/ext/pg_query/include/postgres/funcapi.h +360 -0
- data/ext/pg_query/include/postgres/gram.h +1168 -0
- data/ext/pg_query/include/postgres/gramparse.h +75 -0
- data/ext/pg_query/include/postgres/jit/jit.h +106 -0
- data/ext/pg_query/include/postgres/kwlist_d.h +1164 -0
- data/ext/pg_query/include/postgres/lib/dshash.h +130 -0
- data/ext/pg_query/include/postgres/lib/ilist.h +1159 -0
- data/ext/pg_query/include/postgres/lib/pairingheap.h +102 -0
- data/ext/pg_query/include/postgres/lib/simplehash.h +1206 -0
- data/ext/pg_query/include/postgres/lib/sort_template.h +445 -0
- data/ext/pg_query/include/postgres/lib/stringinfo.h +243 -0
- data/ext/pg_query/include/postgres/libpq/auth.h +37 -0
- data/ext/pg_query/include/postgres/libpq/crypt.h +47 -0
- data/ext/pg_query/include/postgres/libpq/hba.h +186 -0
- data/ext/pg_query/include/postgres/libpq/libpq-be.h +361 -0
- data/ext/pg_query/include/postgres/libpq/libpq.h +143 -0
- data/ext/pg_query/include/postgres/libpq/pqcomm.h +169 -0
- data/ext/pg_query/include/postgres/libpq/pqformat.h +209 -0
- data/ext/pg_query/include/postgres/libpq/pqsignal.h +54 -0
- data/ext/pg_query/include/postgres/libpq/protocol.h +89 -0
- data/ext/pg_query/include/postgres/libpq/sasl.h +136 -0
- data/ext/pg_query/include/postgres/libpq/scram.h +37 -0
- data/ext/pg_query/include/postgres/mb/pg_wchar.h +793 -0
- data/ext/pg_query/include/postgres/mb/stringinfo_mb.h +24 -0
- data/ext/pg_query/include/postgres/miscadmin.h +527 -0
- data/ext/pg_query/include/postgres/nodes/bitmapset.h +140 -0
- data/ext/pg_query/include/postgres/nodes/execnodes.h +2855 -0
- data/ext/pg_query/include/postgres/nodes/extensible.h +164 -0
- data/ext/pg_query/include/postgres/nodes/lockoptions.h +61 -0
- data/ext/pg_query/include/postgres/nodes/makefuncs.h +127 -0
- data/ext/pg_query/include/postgres/nodes/memnodes.h +152 -0
- data/ext/pg_query/include/postgres/nodes/miscnodes.h +56 -0
- data/ext/pg_query/include/postgres/nodes/nodeFuncs.h +222 -0
- data/ext/pg_query/include/postgres/nodes/nodes.h +435 -0
- data/ext/pg_query/include/postgres/nodes/nodetags.h +491 -0
- data/ext/pg_query/include/postgres/nodes/params.h +170 -0
- data/ext/pg_query/include/postgres/nodes/parsenodes.h +4233 -0
- data/ext/pg_query/include/postgres/nodes/pathnodes.h +3438 -0
- data/ext/pg_query/include/postgres/nodes/pg_list.h +686 -0
- data/ext/pg_query/include/postgres/nodes/plannodes.h +1593 -0
- data/ext/pg_query/include/postgres/nodes/primnodes.h +2339 -0
- data/ext/pg_query/include/postgres/nodes/print.h +34 -0
- data/ext/pg_query/include/postgres/nodes/queryjumble.h +86 -0
- data/ext/pg_query/include/postgres/nodes/replnodes.h +132 -0
- data/ext/pg_query/include/postgres/nodes/supportnodes.h +346 -0
- data/ext/pg_query/include/postgres/nodes/tidbitmap.h +75 -0
- data/ext/pg_query/include/postgres/nodes/value.h +90 -0
- data/ext/pg_query/include/postgres/optimizer/cost.h +216 -0
- data/ext/pg_query/include/postgres/optimizer/geqo.h +90 -0
- data/ext/pg_query/include/postgres/optimizer/geqo_gene.h +45 -0
- data/ext/pg_query/include/postgres/optimizer/optimizer.h +205 -0
- data/ext/pg_query/include/postgres/optimizer/paths.h +271 -0
- data/ext/pg_query/include/postgres/optimizer/planmain.h +123 -0
- data/ext/pg_query/include/postgres/parser/analyze.h +66 -0
- data/ext/pg_query/include/postgres/parser/kwlist.h +518 -0
- data/ext/pg_query/include/postgres/parser/parse_agg.h +65 -0
- data/ext/pg_query/include/postgres/parser/parse_coerce.h +105 -0
- data/ext/pg_query/include/postgres/parser/parse_expr.h +25 -0
- data/ext/pg_query/include/postgres/parser/parse_func.h +74 -0
- data/ext/pg_query/include/postgres/parser/parse_node.h +358 -0
- data/ext/pg_query/include/postgres/parser/parse_oper.h +68 -0
- data/ext/pg_query/include/postgres/parser/parse_relation.h +129 -0
- data/ext/pg_query/include/postgres/parser/parse_type.h +61 -0
- data/ext/pg_query/include/postgres/parser/parser.h +68 -0
- data/ext/pg_query/include/postgres/parser/parsetree.h +61 -0
- data/ext/pg_query/include/postgres/parser/scanner.h +152 -0
- data/ext/pg_query/include/postgres/parser/scansup.h +27 -0
- data/ext/pg_query/include/postgres/partitioning/partdefs.h +26 -0
- data/ext/pg_query/include/postgres/pg_config.h +985 -0
- data/ext/pg_query/include/postgres/pg_config_manual.h +385 -0
- data/ext/pg_query/include/postgres/pg_config_os.h +8 -0
- data/ext/pg_query/include/postgres/pg_getopt.h +56 -0
- data/ext/pg_query/include/postgres/pg_trace.h +17 -0
- data/ext/pg_query/include/postgres/pgstat.h +780 -0
- data/ext/pg_query/include/postgres/pgtime.h +94 -0
- data/ext/pg_query/include/postgres/pl_gram.h +385 -0
- data/ext/pg_query/include/postgres/pl_reserved_kwlist.h +52 -0
- data/ext/pg_query/include/postgres/pl_reserved_kwlist_d.h +114 -0
- data/ext/pg_query/include/postgres/pl_unreserved_kwlist.h +112 -0
- data/ext/pg_query/include/postgres/pl_unreserved_kwlist_d.h +246 -0
- data/ext/pg_query/include/postgres/plerrcodes.h +998 -0
- data/ext/pg_query/include/postgres/plpgsql.h +1342 -0
- data/ext/pg_query/include/postgres/port/atomics/arch-arm.h +32 -0
- data/ext/pg_query/include/postgres/port/atomics/arch-hppa.h +17 -0
- data/ext/pg_query/include/postgres/port/atomics/arch-ppc.h +256 -0
- data/ext/pg_query/include/postgres/port/atomics/arch-x86.h +254 -0
- data/ext/pg_query/include/postgres/port/atomics/fallback.h +170 -0
- data/ext/pg_query/include/postgres/port/atomics/generic-gcc.h +323 -0
- data/ext/pg_query/include/postgres/port/atomics/generic-msvc.h +119 -0
- data/ext/pg_query/include/postgres/port/atomics/generic-sunpro.h +121 -0
- data/ext/pg_query/include/postgres/port/atomics/generic.h +437 -0
- data/ext/pg_query/include/postgres/port/atomics.h +606 -0
- data/ext/pg_query/include/postgres/port/pg_bitutils.h +421 -0
- data/ext/pg_query/include/postgres/port/pg_bswap.h +161 -0
- data/ext/pg_query/include/postgres/port/pg_crc32c.h +110 -0
- data/ext/pg_query/include/postgres/port/pg_iovec.h +117 -0
- data/ext/pg_query/include/postgres/port/simd.h +422 -0
- data/ext/pg_query/include/postgres/port/win32/arpa/inet.h +3 -0
- data/ext/pg_query/include/postgres/port/win32/dlfcn.h +1 -0
- data/ext/pg_query/include/postgres/port/win32/grp.h +1 -0
- data/ext/pg_query/include/postgres/port/win32/netdb.h +7 -0
- data/ext/pg_query/include/postgres/port/win32/netinet/in.h +3 -0
- data/ext/pg_query/include/postgres/port/win32/netinet/tcp.h +7 -0
- data/ext/pg_query/include/postgres/port/win32/pwd.h +3 -0
- data/ext/pg_query/include/postgres/port/win32/sys/resource.h +20 -0
- data/ext/pg_query/include/postgres/port/win32/sys/select.h +3 -0
- data/ext/pg_query/include/postgres/port/win32/sys/socket.h +34 -0
- data/ext/pg_query/include/postgres/port/win32/sys/un.h +17 -0
- data/ext/pg_query/include/postgres/port/win32/sys/wait.h +3 -0
- data/ext/pg_query/include/postgres/port/win32.h +59 -0
- data/ext/pg_query/include/postgres/port/win32_msvc/dirent.h +34 -0
- data/ext/pg_query/include/postgres/port/win32_msvc/sys/file.h +1 -0
- data/ext/pg_query/include/postgres/port/win32_msvc/sys/param.h +1 -0
- data/ext/pg_query/include/postgres/port/win32_msvc/sys/time.h +1 -0
- data/ext/pg_query/include/postgres/port/win32_msvc/unistd.h +9 -0
- data/ext/pg_query/include/postgres/port/win32_msvc/utime.h +3 -0
- data/ext/pg_query/include/postgres/port/win32_port.h +582 -0
- data/ext/pg_query/include/postgres/port.h +555 -0
- data/ext/pg_query/include/postgres/portability/instr_time.h +197 -0
- data/ext/pg_query/include/postgres/postgres.h +579 -0
- data/ext/pg_query/include/postgres/postgres_ext.h +73 -0
- data/ext/pg_query/include/postgres/postmaster/autovacuum.h +69 -0
- data/ext/pg_query/include/postgres/postmaster/bgworker.h +164 -0
- data/ext/pg_query/include/postgres/postmaster/bgworker_internals.h +60 -0
- data/ext/pg_query/include/postgres/postmaster/bgwriter.h +45 -0
- data/ext/pg_query/include/postgres/postmaster/interrupt.h +32 -0
- data/ext/pg_query/include/postgres/postmaster/pgarch.h +36 -0
- data/ext/pg_query/include/postgres/postmaster/postmaster.h +101 -0
- data/ext/pg_query/include/postgres/postmaster/startup.h +41 -0
- data/ext/pg_query/include/postgres/postmaster/syslogger.h +101 -0
- data/ext/pg_query/include/postgres/postmaster/walsummarizer.h +35 -0
- data/ext/pg_query/include/postgres/postmaster/walwriter.h +23 -0
- data/ext/pg_query/include/postgres/regex/regex.h +272 -0
- data/ext/pg_query/include/postgres/replication/logicallauncher.h +34 -0
- data/ext/pg_query/include/postgres/replication/logicalproto.h +274 -0
- data/ext/pg_query/include/postgres/replication/logicalworker.h +33 -0
- data/ext/pg_query/include/postgres/replication/origin.h +73 -0
- data/ext/pg_query/include/postgres/replication/reorderbuffer.h +734 -0
- data/ext/pg_query/include/postgres/replication/slot.h +289 -0
- data/ext/pg_query/include/postgres/replication/slotsync.h +38 -0
- data/ext/pg_query/include/postgres/replication/syncrep.h +109 -0
- data/ext/pg_query/include/postgres/replication/walreceiver.h +504 -0
- data/ext/pg_query/include/postgres/replication/walsender.h +76 -0
- data/ext/pg_query/include/postgres/rewrite/prs2lock.h +46 -0
- data/ext/pg_query/include/postgres/rewrite/rewriteHandler.h +41 -0
- data/ext/pg_query/include/postgres/rewrite/rewriteManip.h +96 -0
- data/ext/pg_query/include/postgres/rewrite/rewriteSupport.h +26 -0
- data/ext/pg_query/include/postgres/storage/block.h +108 -0
- data/ext/pg_query/include/postgres/storage/buf.h +46 -0
- data/ext/pg_query/include/postgres/storage/bufmgr.h +411 -0
- data/ext/pg_query/include/postgres/storage/bufpage.h +510 -0
- data/ext/pg_query/include/postgres/storage/condition_variable.h +73 -0
- data/ext/pg_query/include/postgres/storage/dsm.h +61 -0
- data/ext/pg_query/include/postgres/storage/dsm_impl.h +79 -0
- data/ext/pg_query/include/postgres/storage/fd.h +219 -0
- data/ext/pg_query/include/postgres/storage/fileset.h +40 -0
- data/ext/pg_query/include/postgres/storage/ipc.h +87 -0
- data/ext/pg_query/include/postgres/storage/item.h +19 -0
- data/ext/pg_query/include/postgres/storage/itemid.h +184 -0
- data/ext/pg_query/include/postgres/storage/itemptr.h +245 -0
- data/ext/pg_query/include/postgres/storage/large_object.h +100 -0
- data/ext/pg_query/include/postgres/storage/latch.h +196 -0
- data/ext/pg_query/include/postgres/storage/lmgr.h +126 -0
- data/ext/pg_query/include/postgres/storage/lock.h +624 -0
- data/ext/pg_query/include/postgres/storage/lockdefs.h +61 -0
- data/ext/pg_query/include/postgres/storage/lwlock.h +228 -0
- data/ext/pg_query/include/postgres/storage/lwlocknames.h +47 -0
- data/ext/pg_query/include/postgres/storage/off.h +57 -0
- data/ext/pg_query/include/postgres/storage/pg_sema.h +61 -0
- data/ext/pg_query/include/postgres/storage/pg_shmem.h +93 -0
- data/ext/pg_query/include/postgres/storage/pmsignal.h +105 -0
- data/ext/pg_query/include/postgres/storage/predicate.h +83 -0
- data/ext/pg_query/include/postgres/storage/proc.h +488 -0
- data/ext/pg_query/include/postgres/storage/procarray.h +103 -0
- data/ext/pg_query/include/postgres/storage/proclist_types.h +53 -0
- data/ext/pg_query/include/postgres/storage/procnumber.h +43 -0
- data/ext/pg_query/include/postgres/storage/procsignal.h +75 -0
- data/ext/pg_query/include/postgres/storage/read_stream.h +65 -0
- data/ext/pg_query/include/postgres/storage/relfilelocator.h +100 -0
- data/ext/pg_query/include/postgres/storage/s_lock.h +847 -0
- data/ext/pg_query/include/postgres/storage/sharedfileset.h +37 -0
- data/ext/pg_query/include/postgres/storage/shm_mq.h +86 -0
- data/ext/pg_query/include/postgres/storage/shm_toc.h +58 -0
- data/ext/pg_query/include/postgres/storage/shmem.h +59 -0
- data/ext/pg_query/include/postgres/storage/sinval.h +153 -0
- data/ext/pg_query/include/postgres/storage/smgr.h +130 -0
- data/ext/pg_query/include/postgres/storage/spin.h +77 -0
- data/ext/pg_query/include/postgres/storage/standby.h +109 -0
- data/ext/pg_query/include/postgres/storage/standbydefs.h +74 -0
- data/ext/pg_query/include/postgres/storage/sync.h +66 -0
- data/ext/pg_query/include/postgres/tcop/cmdtag.h +62 -0
- data/ext/pg_query/include/postgres/tcop/cmdtaglist.h +219 -0
- data/ext/pg_query/include/postgres/tcop/deparse_utility.h +108 -0
- data/ext/pg_query/include/postgres/tcop/dest.h +148 -0
- data/ext/pg_query/include/postgres/tcop/fastpath.h +20 -0
- data/ext/pg_query/include/postgres/tcop/pquery.h +51 -0
- data/ext/pg_query/include/postgres/tcop/tcopprot.h +98 -0
- data/ext/pg_query/include/postgres/tcop/utility.h +112 -0
- data/ext/pg_query/include/postgres/tsearch/ts_cache.h +96 -0
- data/ext/pg_query/include/postgres/utils/acl.h +290 -0
- data/ext/pg_query/include/postgres/utils/aclchk_internal.h +45 -0
- data/ext/pg_query/include/postgres/utils/array.h +481 -0
- data/ext/pg_query/include/postgres/utils/ascii.h +84 -0
- data/ext/pg_query/include/postgres/utils/backend_progress.h +46 -0
- data/ext/pg_query/include/postgres/utils/backend_status.h +340 -0
- data/ext/pg_query/include/postgres/utils/builtins.h +139 -0
- data/ext/pg_query/include/postgres/utils/bytea.h +28 -0
- data/ext/pg_query/include/postgres/utils/catcache.h +231 -0
- data/ext/pg_query/include/postgres/utils/date.h +118 -0
- data/ext/pg_query/include/postgres/utils/datetime.h +367 -0
- data/ext/pg_query/include/postgres/utils/datum.h +76 -0
- data/ext/pg_query/include/postgres/utils/dsa.h +166 -0
- data/ext/pg_query/include/postgres/utils/elog.h +540 -0
- data/ext/pg_query/include/postgres/utils/errcodes.h +352 -0
- data/ext/pg_query/include/postgres/utils/expandeddatum.h +170 -0
- data/ext/pg_query/include/postgres/utils/expandedrecord.h +241 -0
- data/ext/pg_query/include/postgres/utils/float.h +357 -0
- data/ext/pg_query/include/postgres/utils/fmgroids.h +3347 -0
- data/ext/pg_query/include/postgres/utils/fmgrprotos.h +2904 -0
- data/ext/pg_query/include/postgres/utils/fmgrtab.h +49 -0
- data/ext/pg_query/include/postgres/utils/guc.h +456 -0
- data/ext/pg_query/include/postgres/utils/guc_hooks.h +184 -0
- data/ext/pg_query/include/postgres/utils/guc_tables.h +323 -0
- data/ext/pg_query/include/postgres/utils/hsearch.h +153 -0
- data/ext/pg_query/include/postgres/utils/injection_point.h +44 -0
- data/ext/pg_query/include/postgres/utils/inval.h +68 -0
- data/ext/pg_query/include/postgres/utils/logtape.h +77 -0
- data/ext/pg_query/include/postgres/utils/lsyscache.h +215 -0
- data/ext/pg_query/include/postgres/utils/memdebug.h +82 -0
- data/ext/pg_query/include/postgres/utils/memutils.h +193 -0
- data/ext/pg_query/include/postgres/utils/memutils_internal.h +176 -0
- data/ext/pg_query/include/postgres/utils/memutils_memorychunk.h +253 -0
- data/ext/pg_query/include/postgres/utils/numeric.h +110 -0
- data/ext/pg_query/include/postgres/utils/palloc.h +151 -0
- data/ext/pg_query/include/postgres/utils/partcache.h +103 -0
- data/ext/pg_query/include/postgres/utils/pg_locale.h +136 -0
- data/ext/pg_query/include/postgres/utils/pgstat_internal.h +827 -0
- data/ext/pg_query/include/postgres/utils/plancache.h +238 -0
- data/ext/pg_query/include/postgres/utils/portal.h +252 -0
- data/ext/pg_query/include/postgres/utils/probes.h +114 -0
- data/ext/pg_query/include/postgres/utils/ps_status.h +47 -0
- data/ext/pg_query/include/postgres/utils/queryenvironment.h +74 -0
- data/ext/pg_query/include/postgres/utils/regproc.h +39 -0
- data/ext/pg_query/include/postgres/utils/rel.h +711 -0
- data/ext/pg_query/include/postgres/utils/relcache.h +155 -0
- data/ext/pg_query/include/postgres/utils/reltrigger.h +81 -0
- data/ext/pg_query/include/postgres/utils/resowner.h +167 -0
- data/ext/pg_query/include/postgres/utils/ruleutils.h +52 -0
- data/ext/pg_query/include/postgres/utils/sharedtuplestore.h +61 -0
- data/ext/pg_query/include/postgres/utils/snapmgr.h +130 -0
- data/ext/pg_query/include/postgres/utils/snapshot.h +219 -0
- data/ext/pg_query/include/postgres/utils/sortsupport.h +391 -0
- data/ext/pg_query/include/postgres/utils/syscache.h +136 -0
- data/ext/pg_query/include/postgres/utils/timeout.h +96 -0
- data/ext/pg_query/include/postgres/utils/timestamp.h +147 -0
- data/ext/pg_query/include/postgres/utils/tuplesort.h +472 -0
- data/ext/pg_query/include/postgres/utils/tuplestore.h +88 -0
- data/ext/pg_query/include/postgres/utils/typcache.h +210 -0
- data/ext/pg_query/include/postgres/utils/varlena.h +53 -0
- data/ext/pg_query/include/postgres/utils/wait_event.h +108 -0
- data/ext/pg_query/include/postgres/utils/wait_event_types.h +218 -0
- data/ext/pg_query/include/postgres/utils/xml.h +94 -0
- data/ext/pg_query/include/postgres/varatt.h +358 -0
- data/ext/pg_query/include/protobuf/pg_query.pb-c.h +7723 -6368
- data/ext/pg_query/include/protobuf/pg_query.pb.h +120022 -87031
- data/ext/pg_query/pg_query.c +10 -1
- data/ext/pg_query/pg_query.pb-c.c +22595 -17738
- data/ext/pg_query/pg_query_deparse.c +1 -10635
- data/ext/pg_query/pg_query_fingerprint.c +12 -8
- data/ext/pg_query/pg_query_fingerprint.h +1 -1
- data/ext/pg_query/pg_query_internal.h +1 -1
- data/ext/pg_query/pg_query_json_plpgsql.c +1 -0
- data/ext/pg_query/pg_query_normalize.c +43 -2
- data/ext/pg_query/pg_query_outfuncs_json.c +9 -1
- data/ext/pg_query/pg_query_outfuncs_protobuf.c +3 -2
- data/ext/pg_query/pg_query_parse.c +47 -5
- data/ext/pg_query/pg_query_parse_plpgsql.c +19 -18
- data/ext/pg_query/pg_query_readfuncs_protobuf.c +3 -2
- data/ext/pg_query/pg_query_ruby.c +5 -0
- data/ext/pg_query/pg_query_scan.c +2 -2
- data/ext/pg_query/pg_query_split.c +3 -3
- data/ext/pg_query/postgres_deparse.c +11496 -0
- data/ext/pg_query/postgres_deparse.h +9 -0
- data/ext/pg_query/src_backend_catalog_namespace.c +243 -63
- 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 +140 -156
- data/ext/pg_query/src_backend_nodes_copyfuncs.c +96 -6202
- data/ext/pg_query/src_backend_nodes_equalfuncs.c +95 -4068
- data/ext/pg_query/src_backend_nodes_extensible.c +6 -29
- data/ext/pg_query/src_backend_nodes_list.c +16 -8
- data/ext/pg_query/src_backend_nodes_makefuncs.c +134 -1
- data/ext/pg_query/src_backend_nodes_nodeFuncs.c +391 -133
- data/ext/pg_query/src_backend_nodes_value.c +1 -1
- data/ext/pg_query/src_backend_parser_gram.c +43710 -39953
- data/ext/pg_query/src_backend_parser_parser.c +34 -8
- data/ext/pg_query/src_backend_parser_scan.c +6971 -3373
- 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 +99 -96
- data/ext/pg_query/src_backend_utils_activity_pgstat_database.c +2 -2
- data/ext/pg_query/src_backend_utils_adt_datum.c +2 -2
- 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 +488 -0
- data/ext/pg_query/src_backend_utils_adt_ruleutils.c +177 -30
- data/ext/pg_query/src_backend_utils_error_assert.c +4 -7
- data/ext/pg_query/src_backend_utils_error_elog.c +397 -270
- data/ext/pg_query/src_backend_utils_fmgr_fmgr.c +36 -2
- data/ext/pg_query/src_backend_utils_init_globals.c +20 -5
- data/ext/pg_query/src_backend_utils_mb_mbutils.c +31 -84
- data/ext/pg_query/src_backend_utils_misc_guc_tables.c +502 -0
- data/ext/pg_query/src_backend_utils_mmgr_alignedalloc.c +166 -0
- data/ext/pg_query/src_backend_utils_mmgr_aset.c +704 -497
- data/ext/pg_query/src_backend_utils_mmgr_bump.c +728 -0
- data/ext/pg_query/src_backend_utils_mmgr_generation.c +1115 -0
- data/ext/pg_query/src_backend_utils_mmgr_mcxt.c +637 -233
- data/ext/pg_query/src_backend_utils_mmgr_slab.c +1079 -0
- data/ext/pg_query/src_common_encnames.c +46 -44
- data/ext/pg_query/src_common_hashfn.c +1 -1
- data/ext/pg_query/src_common_keywords.c +1 -1
- data/ext/pg_query/src_common_kwlist_d.h +586 -517
- data/ext/pg_query/src_common_kwlookup.c +1 -1
- data/ext/pg_query/src_common_psprintf.c +3 -3
- data/ext/pg_query/src_common_stringinfo.c +21 -4
- data/ext/pg_query/src_common_wchar.c +100 -116
- data/ext/pg_query/src_pl_plpgsql_src_pl_comp.c +99 -5
- data/ext/pg_query/src_pl_plpgsql_src_pl_funcs.c +3 -1
- data/ext/pg_query/src_pl_plpgsql_src_pl_gram.c +829 -763
- 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 +48 -46
- data/ext/pg_query/src_port_pg_bitutils.c +251 -32
- data/ext/pg_query/src_port_pgstrcasecmp.c +57 -1
- data/ext/pg_query/src_port_snprintf.c +20 -27
- data/ext/pg_query/src_port_strerror.c +1 -3
- data/ext/pg_query/src_port_strlcpy.c +79 -0
- data/lib/pg_query/fingerprint.rb +5 -8
- data/lib/pg_query/node.rb +16 -11
- data/lib/pg_query/param_refs.rb +2 -2
- data/lib/pg_query/parse.rb +6 -8
- data/lib/pg_query/parse_error.rb +1 -0
- data/lib/pg_query/pg_query_pb.rb +173 -3196
- data/lib/pg_query/scan.rb +1 -0
- data/lib/pg_query/treewalker.rb +52 -11
- data/lib/pg_query/truncate.rb +18 -20
- data/lib/pg_query/version.rb +1 -1
- metadata +443 -442
- data/ext/pg_query/guc-file.c +0 -0
- data/ext/pg_query/include/access/amapi.h +0 -290
- data/ext/pg_query/include/access/attmap.h +0 -52
- data/ext/pg_query/include/access/attnum.h +0 -64
- data/ext/pg_query/include/access/clog.h +0 -63
- data/ext/pg_query/include/access/commit_ts.h +0 -74
- data/ext/pg_query/include/access/detoast.h +0 -82
- data/ext/pg_query/include/access/genam.h +0 -231
- data/ext/pg_query/include/access/gin.h +0 -78
- data/ext/pg_query/include/access/htup.h +0 -89
- data/ext/pg_query/include/access/htup_details.h +0 -807
- data/ext/pg_query/include/access/itup.h +0 -167
- data/ext/pg_query/include/access/parallel.h +0 -82
- data/ext/pg_query/include/access/printtup.h +0 -35
- data/ext/pg_query/include/access/relation.h +0 -28
- data/ext/pg_query/include/access/relscan.h +0 -191
- data/ext/pg_query/include/access/rmgrlist.h +0 -49
- data/ext/pg_query/include/access/sdir.h +0 -58
- data/ext/pg_query/include/access/skey.h +0 -151
- data/ext/pg_query/include/access/stratnum.h +0 -85
- data/ext/pg_query/include/access/sysattr.h +0 -29
- data/ext/pg_query/include/access/table.h +0 -28
- data/ext/pg_query/include/access/tableam.h +0 -2077
- data/ext/pg_query/include/access/toast_compression.h +0 -73
- data/ext/pg_query/include/access/transam.h +0 -375
- data/ext/pg_query/include/access/tupconvert.h +0 -51
- data/ext/pg_query/include/access/tupdesc.h +0 -154
- data/ext/pg_query/include/access/tupmacs.h +0 -247
- data/ext/pg_query/include/access/twophase.h +0 -65
- data/ext/pg_query/include/access/xact.h +0 -523
- data/ext/pg_query/include/access/xlog.h +0 -303
- data/ext/pg_query/include/access/xlog_internal.h +0 -366
- data/ext/pg_query/include/access/xlogdefs.h +0 -101
- data/ext/pg_query/include/access/xlogprefetcher.h +0 -55
- data/ext/pg_query/include/access/xlogreader.h +0 -443
- data/ext/pg_query/include/access/xlogrecord.h +0 -236
- data/ext/pg_query/include/access/xlogrecovery.h +0 -157
- data/ext/pg_query/include/c.h +0 -1391
- data/ext/pg_query/include/catalog/catalog.h +0 -44
- data/ext/pg_query/include/catalog/catversion.h +0 -58
- data/ext/pg_query/include/catalog/dependency.h +0 -269
- data/ext/pg_query/include/catalog/genbki.h +0 -142
- data/ext/pg_query/include/catalog/index.h +0 -214
- data/ext/pg_query/include/catalog/indexing.h +0 -54
- data/ext/pg_query/include/catalog/namespace.h +0 -190
- data/ext/pg_query/include/catalog/objectaccess.h +0 -265
- data/ext/pg_query/include/catalog/objectaddress.h +0 -89
- data/ext/pg_query/include/catalog/pg_aggregate.h +0 -180
- data/ext/pg_query/include/catalog/pg_aggregate_d.h +0 -78
- data/ext/pg_query/include/catalog/pg_am.h +0 -63
- data/ext/pg_query/include/catalog/pg_am_d.h +0 -47
- data/ext/pg_query/include/catalog/pg_attribute.h +0 -221
- data/ext/pg_query/include/catalog/pg_attribute_d.h +0 -62
- data/ext/pg_query/include/catalog/pg_authid.h +0 -63
- data/ext/pg_query/include/catalog/pg_authid_d.h +0 -57
- data/ext/pg_query/include/catalog/pg_class.h +0 -230
- data/ext/pg_query/include/catalog/pg_class_d.h +0 -132
- data/ext/pg_query/include/catalog/pg_collation.h +0 -98
- data/ext/pg_query/include/catalog/pg_collation_d.h +0 -62
- data/ext/pg_query/include/catalog/pg_constraint.h +0 -273
- data/ext/pg_query/include/catalog/pg_constraint_d.h +0 -73
- data/ext/pg_query/include/catalog/pg_control.h +0 -250
- data/ext/pg_query/include/catalog/pg_conversion.h +0 -75
- data/ext/pg_query/include/catalog/pg_conversion_d.h +0 -38
- data/ext/pg_query/include/catalog/pg_depend.h +0 -77
- data/ext/pg_query/include/catalog/pg_depend_d.h +0 -36
- data/ext/pg_query/include/catalog/pg_event_trigger.h +0 -57
- data/ext/pg_query/include/catalog/pg_event_trigger_d.h +0 -36
- data/ext/pg_query/include/catalog/pg_index.h +0 -90
- data/ext/pg_query/include/catalog/pg_index_d.h +0 -59
- data/ext/pg_query/include/catalog/pg_language.h +0 -72
- data/ext/pg_query/include/catalog/pg_language_d.h +0 -41
- data/ext/pg_query/include/catalog/pg_namespace.h +0 -64
- data/ext/pg_query/include/catalog/pg_namespace_d.h +0 -36
- data/ext/pg_query/include/catalog/pg_opclass.h +0 -88
- data/ext/pg_query/include/catalog/pg_opclass_d.h +0 -51
- data/ext/pg_query/include/catalog/pg_operator.h +0 -107
- data/ext/pg_query/include/catalog/pg_operator_d.h +0 -142
- data/ext/pg_query/include/catalog/pg_opfamily.h +0 -63
- data/ext/pg_query/include/catalog/pg_opfamily_d.h +0 -49
- data/ext/pg_query/include/catalog/pg_parameter_acl.h +0 -60
- data/ext/pg_query/include/catalog/pg_parameter_acl_d.h +0 -34
- data/ext/pg_query/include/catalog/pg_partitioned_table.h +0 -74
- data/ext/pg_query/include/catalog/pg_partitioned_table_d.h +0 -36
- data/ext/pg_query/include/catalog/pg_proc.h +0 -220
- data/ext/pg_query/include/catalog/pg_proc_d.h +0 -101
- data/ext/pg_query/include/catalog/pg_publication.h +0 -161
- data/ext/pg_query/include/catalog/pg_publication_d.h +0 -38
- data/ext/pg_query/include/catalog/pg_replication_origin.h +0 -62
- data/ext/pg_query/include/catalog/pg_replication_origin_d.h +0 -33
- data/ext/pg_query/include/catalog/pg_statistic.h +0 -282
- data/ext/pg_query/include/catalog/pg_statistic_d.h +0 -195
- data/ext/pg_query/include/catalog/pg_statistic_ext.h +0 -88
- data/ext/pg_query/include/catalog/pg_statistic_ext_d.h +0 -45
- data/ext/pg_query/include/catalog/pg_transform.h +0 -48
- data/ext/pg_query/include/catalog/pg_transform_d.h +0 -34
- data/ext/pg_query/include/catalog/pg_trigger.h +0 -153
- data/ext/pg_query/include/catalog/pg_trigger_d.h +0 -109
- data/ext/pg_query/include/catalog/pg_ts_config.h +0 -53
- data/ext/pg_query/include/catalog/pg_ts_config_d.h +0 -34
- data/ext/pg_query/include/catalog/pg_ts_dict.h +0 -59
- data/ext/pg_query/include/catalog/pg_ts_dict_d.h +0 -35
- data/ext/pg_query/include/catalog/pg_ts_parser.h +0 -60
- data/ext/pg_query/include/catalog/pg_ts_parser_d.h +0 -37
- data/ext/pg_query/include/catalog/pg_ts_template.h +0 -51
- data/ext/pg_query/include/catalog/pg_ts_template_d.h +0 -34
- data/ext/pg_query/include/catalog/pg_type.h +0 -404
- data/ext/pg_query/include/catalog/pg_type_d.h +0 -324
- data/ext/pg_query/include/catalog/storage.h +0 -50
- data/ext/pg_query/include/commands/async.h +0 -53
- data/ext/pg_query/include/commands/dbcommands.h +0 -36
- data/ext/pg_query/include/commands/defrem.h +0 -160
- data/ext/pg_query/include/commands/event_trigger.h +0 -88
- data/ext/pg_query/include/commands/explain.h +0 -127
- data/ext/pg_query/include/commands/prepare.h +0 -61
- data/ext/pg_query/include/commands/tablespace.h +0 -69
- data/ext/pg_query/include/commands/trigger.h +0 -287
- data/ext/pg_query/include/commands/user.h +0 -37
- data/ext/pg_query/include/commands/vacuum.h +0 -340
- data/ext/pg_query/include/commands/variable.h +0 -38
- data/ext/pg_query/include/common/file_perm.h +0 -56
- data/ext/pg_query/include/common/hashfn.h +0 -104
- data/ext/pg_query/include/common/ip.h +0 -31
- data/ext/pg_query/include/common/keywords.h +0 -29
- data/ext/pg_query/include/common/kwlookup.h +0 -44
- data/ext/pg_query/include/common/pg_prng.h +0 -60
- data/ext/pg_query/include/common/relpath.h +0 -90
- data/ext/pg_query/include/common/string.h +0 -42
- data/ext/pg_query/include/common/unicode_combining_table.h +0 -308
- data/ext/pg_query/include/common/unicode_east_asian_fw_table.h +0 -125
- data/ext/pg_query/include/datatype/timestamp.h +0 -236
- data/ext/pg_query/include/executor/execdesc.h +0 -70
- data/ext/pg_query/include/executor/executor.h +0 -663
- data/ext/pg_query/include/executor/functions.h +0 -55
- data/ext/pg_query/include/executor/instrument.h +0 -118
- data/ext/pg_query/include/executor/spi.h +0 -213
- data/ext/pg_query/include/executor/tablefunc.h +0 -67
- data/ext/pg_query/include/executor/tuptable.h +0 -487
- data/ext/pg_query/include/fmgr.h +0 -781
- data/ext/pg_query/include/funcapi.h +0 -360
- data/ext/pg_query/include/getaddrinfo.h +0 -162
- data/ext/pg_query/include/jit/jit.h +0 -105
- data/ext/pg_query/include/kwlist_d.h +0 -1095
- data/ext/pg_query/include/lib/dshash.h +0 -112
- data/ext/pg_query/include/lib/ilist.h +0 -746
- data/ext/pg_query/include/lib/pairingheap.h +0 -102
- data/ext/pg_query/include/lib/simplehash.h +0 -1184
- data/ext/pg_query/include/lib/sort_template.h +0 -432
- data/ext/pg_query/include/lib/stringinfo.h +0 -161
- data/ext/pg_query/include/libpq/auth.h +0 -31
- data/ext/pg_query/include/libpq/crypt.h +0 -47
- data/ext/pg_query/include/libpq/hba.h +0 -179
- data/ext/pg_query/include/libpq/libpq-be.h +0 -343
- data/ext/pg_query/include/libpq/libpq.h +0 -144
- data/ext/pg_query/include/libpq/pqcomm.h +0 -194
- data/ext/pg_query/include/libpq/pqformat.h +0 -210
- data/ext/pg_query/include/libpq/pqsignal.h +0 -42
- data/ext/pg_query/include/mb/pg_wchar.h +0 -755
- data/ext/pg_query/include/mb/stringinfo_mb.h +0 -24
- data/ext/pg_query/include/miscadmin.h +0 -495
- data/ext/pg_query/include/nodes/bitmapset.h +0 -122
- data/ext/pg_query/include/nodes/execnodes.h +0 -2715
- data/ext/pg_query/include/nodes/extensible.h +0 -162
- data/ext/pg_query/include/nodes/lockoptions.h +0 -61
- data/ext/pg_query/include/nodes/makefuncs.h +0 -109
- data/ext/pg_query/include/nodes/memnodes.h +0 -110
- data/ext/pg_query/include/nodes/nodeFuncs.h +0 -162
- data/ext/pg_query/include/nodes/nodes.h +0 -861
- data/ext/pg_query/include/nodes/params.h +0 -170
- data/ext/pg_query/include/nodes/parsenodes.h +0 -3812
- data/ext/pg_query/include/nodes/pathnodes.h +0 -2734
- data/ext/pg_query/include/nodes/pg_list.h +0 -612
- data/ext/pg_query/include/nodes/plannodes.h +0 -1349
- data/ext/pg_query/include/nodes/primnodes.h +0 -1593
- data/ext/pg_query/include/nodes/print.h +0 -34
- data/ext/pg_query/include/nodes/tidbitmap.h +0 -75
- data/ext/pg_query/include/nodes/value.h +0 -80
- data/ext/pg_query/include/optimizer/cost.h +0 -213
- data/ext/pg_query/include/optimizer/geqo.h +0 -90
- data/ext/pg_query/include/optimizer/geqo_gene.h +0 -45
- data/ext/pg_query/include/optimizer/optimizer.h +0 -202
- data/ext/pg_query/include/optimizer/paths.h +0 -257
- data/ext/pg_query/include/optimizer/planmain.h +0 -120
- data/ext/pg_query/include/parser/analyze.h +0 -63
- data/ext/pg_query/include/parser/gram.h +0 -1101
- data/ext/pg_query/include/parser/gramparse.h +0 -75
- data/ext/pg_query/include/parser/kwlist.h +0 -487
- data/ext/pg_query/include/parser/parse_agg.h +0 -63
- data/ext/pg_query/include/parser/parse_coerce.h +0 -100
- data/ext/pg_query/include/parser/parse_expr.h +0 -25
- data/ext/pg_query/include/parser/parse_func.h +0 -74
- data/ext/pg_query/include/parser/parse_node.h +0 -339
- data/ext/pg_query/include/parser/parse_oper.h +0 -65
- data/ext/pg_query/include/parser/parse_relation.h +0 -124
- data/ext/pg_query/include/parser/parse_type.h +0 -60
- data/ext/pg_query/include/parser/parser.h +0 -68
- data/ext/pg_query/include/parser/parsetree.h +0 -61
- data/ext/pg_query/include/parser/scanner.h +0 -152
- data/ext/pg_query/include/parser/scansup.h +0 -27
- data/ext/pg_query/include/partitioning/partdefs.h +0 -26
- data/ext/pg_query/include/pg_config.h +0 -1037
- data/ext/pg_query/include/pg_config_manual.h +0 -410
- data/ext/pg_query/include/pg_config_os.h +0 -8
- data/ext/pg_query/include/pg_getopt.h +0 -56
- data/ext/pg_query/include/pg_trace.h +0 -17
- data/ext/pg_query/include/pgstat.h +0 -699
- data/ext/pg_query/include/pgtime.h +0 -94
- data/ext/pg_query/include/pl_gram.h +0 -383
- data/ext/pg_query/include/pl_reserved_kwlist.h +0 -52
- data/ext/pg_query/include/pl_reserved_kwlist_d.h +0 -114
- data/ext/pg_query/include/pl_unreserved_kwlist.h +0 -111
- data/ext/pg_query/include/pl_unreserved_kwlist_d.h +0 -244
- data/ext/pg_query/include/plerrcodes.h +0 -998
- data/ext/pg_query/include/plpgsql.h +0 -1345
- data/ext/pg_query/include/port/atomics/arch-arm.h +0 -32
- data/ext/pg_query/include/port/atomics/arch-ppc.h +0 -254
- data/ext/pg_query/include/port/atomics/arch-x86.h +0 -252
- data/ext/pg_query/include/port/atomics/fallback.h +0 -170
- data/ext/pg_query/include/port/atomics/generic-gcc.h +0 -286
- data/ext/pg_query/include/port/atomics/generic.h +0 -401
- data/ext/pg_query/include/port/atomics.h +0 -524
- data/ext/pg_query/include/port/pg_bitutils.h +0 -302
- data/ext/pg_query/include/port/pg_bswap.h +0 -161
- data/ext/pg_query/include/port/pg_crc32c.h +0 -101
- data/ext/pg_query/include/port.h +0 -553
- data/ext/pg_query/include/portability/instr_time.h +0 -256
- data/ext/pg_query/include/postgres.h +0 -808
- data/ext/pg_query/include/postgres_ext.h +0 -74
- data/ext/pg_query/include/postmaster/autovacuum.h +0 -83
- data/ext/pg_query/include/postmaster/auxprocess.h +0 -20
- data/ext/pg_query/include/postmaster/bgworker.h +0 -162
- data/ext/pg_query/include/postmaster/bgworker_internals.h +0 -64
- data/ext/pg_query/include/postmaster/bgwriter.h +0 -45
- data/ext/pg_query/include/postmaster/fork_process.h +0 -17
- data/ext/pg_query/include/postmaster/interrupt.h +0 -32
- data/ext/pg_query/include/postmaster/pgarch.h +0 -73
- data/ext/pg_query/include/postmaster/postmaster.h +0 -78
- data/ext/pg_query/include/postmaster/startup.h +0 -39
- data/ext/pg_query/include/postmaster/syslogger.h +0 -103
- data/ext/pg_query/include/postmaster/walwriter.h +0 -21
- data/ext/pg_query/include/regex/regex.h +0 -186
- data/ext/pg_query/include/replication/logicallauncher.h +0 -29
- data/ext/pg_query/include/replication/logicalproto.h +0 -254
- data/ext/pg_query/include/replication/logicalworker.h +0 -19
- data/ext/pg_query/include/replication/origin.h +0 -73
- data/ext/pg_query/include/replication/reorderbuffer.h +0 -685
- data/ext/pg_query/include/replication/slot.h +0 -230
- data/ext/pg_query/include/replication/syncrep.h +0 -115
- data/ext/pg_query/include/replication/walreceiver.h +0 -472
- data/ext/pg_query/include/replication/walsender.h +0 -74
- data/ext/pg_query/include/rewrite/prs2lock.h +0 -46
- data/ext/pg_query/include/rewrite/rewriteHandler.h +0 -38
- data/ext/pg_query/include/rewrite/rewriteManip.h +0 -87
- data/ext/pg_query/include/rewrite/rewriteSupport.h +0 -26
- data/ext/pg_query/include/storage/backendid.h +0 -37
- data/ext/pg_query/include/storage/block.h +0 -115
- data/ext/pg_query/include/storage/buf.h +0 -46
- data/ext/pg_query/include/storage/bufmgr.h +0 -297
- data/ext/pg_query/include/storage/bufpage.h +0 -457
- data/ext/pg_query/include/storage/condition_variable.h +0 -73
- data/ext/pg_query/include/storage/dsm.h +0 -64
- data/ext/pg_query/include/storage/dsm_impl.h +0 -76
- data/ext/pg_query/include/storage/fd.h +0 -198
- data/ext/pg_query/include/storage/fileset.h +0 -40
- data/ext/pg_query/include/storage/ipc.h +0 -84
- data/ext/pg_query/include/storage/item.h +0 -19
- data/ext/pg_query/include/storage/itemid.h +0 -184
- data/ext/pg_query/include/storage/itemptr.h +0 -208
- data/ext/pg_query/include/storage/large_object.h +0 -100
- data/ext/pg_query/include/storage/latch.h +0 -186
- data/ext/pg_query/include/storage/lmgr.h +0 -115
- data/ext/pg_query/include/storage/lock.h +0 -616
- data/ext/pg_query/include/storage/lockdefs.h +0 -59
- data/ext/pg_query/include/storage/lwlock.h +0 -206
- data/ext/pg_query/include/storage/lwlocknames.h +0 -50
- data/ext/pg_query/include/storage/off.h +0 -57
- data/ext/pg_query/include/storage/pg_sema.h +0 -61
- data/ext/pg_query/include/storage/pg_shmem.h +0 -92
- data/ext/pg_query/include/storage/pmsignal.h +0 -105
- data/ext/pg_query/include/storage/predicate.h +0 -87
- data/ext/pg_query/include/storage/proc.h +0 -461
- data/ext/pg_query/include/storage/procarray.h +0 -98
- data/ext/pg_query/include/storage/proclist_types.h +0 -51
- data/ext/pg_query/include/storage/procsignal.h +0 -71
- data/ext/pg_query/include/storage/relfilenode.h +0 -99
- data/ext/pg_query/include/storage/s_lock.h +0 -1110
- data/ext/pg_query/include/storage/sharedfileset.h +0 -37
- data/ext/pg_query/include/storage/shm_mq.h +0 -86
- data/ext/pg_query/include/storage/shm_toc.h +0 -58
- data/ext/pg_query/include/storage/shmem.h +0 -81
- data/ext/pg_query/include/storage/sinval.h +0 -153
- data/ext/pg_query/include/storage/sinvaladt.h +0 -43
- data/ext/pg_query/include/storage/smgr.h +0 -111
- data/ext/pg_query/include/storage/spin.h +0 -77
- data/ext/pg_query/include/storage/standby.h +0 -98
- data/ext/pg_query/include/storage/standbydefs.h +0 -74
- data/ext/pg_query/include/storage/sync.h +0 -66
- data/ext/pg_query/include/tcop/cmdtag.h +0 -58
- data/ext/pg_query/include/tcop/cmdtaglist.h +0 -218
- data/ext/pg_query/include/tcop/deparse_utility.h +0 -108
- data/ext/pg_query/include/tcop/dest.h +0 -149
- data/ext/pg_query/include/tcop/fastpath.h +0 -20
- data/ext/pg_query/include/tcop/pquery.h +0 -51
- data/ext/pg_query/include/tcop/tcopprot.h +0 -97
- data/ext/pg_query/include/tcop/utility.h +0 -112
- data/ext/pg_query/include/tsearch/ts_cache.h +0 -98
- data/ext/pg_query/include/utils/acl.h +0 -333
- data/ext/pg_query/include/utils/aclchk_internal.h +0 -45
- data/ext/pg_query/include/utils/array.h +0 -464
- data/ext/pg_query/include/utils/backend_progress.h +0 -44
- data/ext/pg_query/include/utils/backend_status.h +0 -321
- data/ext/pg_query/include/utils/builtins.h +0 -127
- data/ext/pg_query/include/utils/bytea.h +0 -28
- data/ext/pg_query/include/utils/catcache.h +0 -231
- data/ext/pg_query/include/utils/date.h +0 -90
- data/ext/pg_query/include/utils/datetime.h +0 -344
- data/ext/pg_query/include/utils/datum.h +0 -76
- data/ext/pg_query/include/utils/dsa.h +0 -123
- data/ext/pg_query/include/utils/dynahash.h +0 -20
- data/ext/pg_query/include/utils/elog.h +0 -470
- data/ext/pg_query/include/utils/errcodes.h +0 -354
- data/ext/pg_query/include/utils/expandeddatum.h +0 -159
- data/ext/pg_query/include/utils/expandedrecord.h +0 -231
- data/ext/pg_query/include/utils/float.h +0 -356
- data/ext/pg_query/include/utils/fmgroids.h +0 -3261
- data/ext/pg_query/include/utils/fmgrprotos.h +0 -2829
- data/ext/pg_query/include/utils/fmgrtab.h +0 -49
- data/ext/pg_query/include/utils/guc.h +0 -469
- data/ext/pg_query/include/utils/guc_tables.h +0 -276
- data/ext/pg_query/include/utils/hsearch.h +0 -153
- data/ext/pg_query/include/utils/inval.h +0 -68
- data/ext/pg_query/include/utils/lsyscache.h +0 -208
- data/ext/pg_query/include/utils/memdebug.h +0 -82
- data/ext/pg_query/include/utils/memutils.h +0 -230
- data/ext/pg_query/include/utils/numeric.h +0 -90
- data/ext/pg_query/include/utils/palloc.h +0 -158
- data/ext/pg_query/include/utils/partcache.h +0 -102
- data/ext/pg_query/include/utils/pg_locale.h +0 -127
- data/ext/pg_query/include/utils/pg_lsn.h +0 -29
- data/ext/pg_query/include/utils/pgstat_internal.h +0 -784
- data/ext/pg_query/include/utils/pidfile.h +0 -56
- data/ext/pg_query/include/utils/plancache.h +0 -236
- data/ext/pg_query/include/utils/portal.h +0 -252
- data/ext/pg_query/include/utils/probes.h +0 -114
- data/ext/pg_query/include/utils/ps_status.h +0 -25
- data/ext/pg_query/include/utils/queryenvironment.h +0 -74
- data/ext/pg_query/include/utils/queryjumble.h +0 -88
- data/ext/pg_query/include/utils/regproc.h +0 -39
- data/ext/pg_query/include/utils/rel.h +0 -695
- data/ext/pg_query/include/utils/relcache.h +0 -153
- data/ext/pg_query/include/utils/reltrigger.h +0 -81
- data/ext/pg_query/include/utils/resowner.h +0 -86
- data/ext/pg_query/include/utils/rls.h +0 -50
- data/ext/pg_query/include/utils/ruleutils.h +0 -47
- data/ext/pg_query/include/utils/sharedtuplestore.h +0 -61
- data/ext/pg_query/include/utils/snapmgr.h +0 -179
- data/ext/pg_query/include/utils/snapshot.h +0 -219
- data/ext/pg_query/include/utils/sortsupport.h +0 -391
- data/ext/pg_query/include/utils/syscache.h +0 -224
- data/ext/pg_query/include/utils/timeout.h +0 -95
- data/ext/pg_query/include/utils/timestamp.h +0 -117
- data/ext/pg_query/include/utils/tuplesort.h +0 -291
- data/ext/pg_query/include/utils/tuplestore.h +0 -91
- data/ext/pg_query/include/utils/typcache.h +0 -209
- data/ext/pg_query/include/utils/tzparser.h +0 -39
- data/ext/pg_query/include/utils/varlena.h +0 -41
- data/ext/pg_query/include/utils/wait_event.h +0 -289
- data/ext/pg_query/include/utils/xml.h +0 -84
- data/ext/pg_query/src_backend_postmaster_postmaster.c +0 -2201
- data/ext/pg_query/src_backend_storage_lmgr_s_lock.c +0 -371
- data/ext/pg_query/src_backend_utils_hash_dynahash.c +0 -1116
- data/ext/pg_query/src_backend_utils_misc_guc.c +0 -1993
- data/ext/pg_query/src_common_pg_prng.c +0 -152
- data/ext/pg_query/src_common_string.c +0 -92
- data/ext/pg_query/src_port_pgsleep.c +0 -69
- data/ext/pg_query/src_port_strnlen.c +0 -39
- /data/ext/pg_query/{pg_query_ruby.sym → ext_symbols.sym} +0 -0
- /data/ext/pg_query/include/{access → postgres/access}/rmgr.h +0 -0
- /data/ext/pg_query/include/{pg_config_ext.h → postgres/pg_config_ext.h} +0 -0
@@ -1,1993 +0,0 @@
|
|
1
|
-
/*--------------------------------------------------------------------
|
2
|
-
* Symbols referenced in this file:
|
3
|
-
* - log_min_messages
|
4
|
-
* - client_min_messages
|
5
|
-
* - backtrace_functions
|
6
|
-
* - backtrace_symbol_list
|
7
|
-
* - check_function_bodies
|
8
|
-
*--------------------------------------------------------------------
|
9
|
-
*/
|
10
|
-
|
11
|
-
/*--------------------------------------------------------------------
|
12
|
-
* guc.c
|
13
|
-
*
|
14
|
-
* Support for grand unified configuration scheme, including SET
|
15
|
-
* command, configuration file, and command line options.
|
16
|
-
* See src/backend/utils/misc/README for more information.
|
17
|
-
*
|
18
|
-
*
|
19
|
-
* Copyright (c) 2000-2022, PostgreSQL Global Development Group
|
20
|
-
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
21
|
-
*
|
22
|
-
* IDENTIFICATION
|
23
|
-
* src/backend/utils/misc/guc.c
|
24
|
-
*
|
25
|
-
*--------------------------------------------------------------------
|
26
|
-
*/
|
27
|
-
#include "postgres.h"
|
28
|
-
|
29
|
-
#include <ctype.h>
|
30
|
-
#include <float.h>
|
31
|
-
#include <math.h>
|
32
|
-
#include <limits.h>
|
33
|
-
#ifdef HAVE_POLL_H
|
34
|
-
#include <poll.h>
|
35
|
-
#endif
|
36
|
-
#ifndef WIN32
|
37
|
-
#include <sys/mman.h>
|
38
|
-
#endif
|
39
|
-
#include <sys/stat.h>
|
40
|
-
#ifdef HAVE_SYSLOG
|
41
|
-
#include <syslog.h>
|
42
|
-
#endif
|
43
|
-
#include <unistd.h>
|
44
|
-
|
45
|
-
#include "access/commit_ts.h"
|
46
|
-
#include "access/gin.h"
|
47
|
-
#include "access/rmgr.h"
|
48
|
-
#include "access/tableam.h"
|
49
|
-
#include "access/toast_compression.h"
|
50
|
-
#include "access/transam.h"
|
51
|
-
#include "access/twophase.h"
|
52
|
-
#include "access/xact.h"
|
53
|
-
#include "access/xlog_internal.h"
|
54
|
-
#include "access/xlogprefetcher.h"
|
55
|
-
#include "access/xlogrecovery.h"
|
56
|
-
#include "catalog/namespace.h"
|
57
|
-
#include "catalog/objectaccess.h"
|
58
|
-
#include "catalog/pg_authid.h"
|
59
|
-
#include "catalog/pg_parameter_acl.h"
|
60
|
-
#include "catalog/storage.h"
|
61
|
-
#include "commands/async.h"
|
62
|
-
#include "commands/prepare.h"
|
63
|
-
#include "commands/tablespace.h"
|
64
|
-
#include "commands/trigger.h"
|
65
|
-
#include "commands/user.h"
|
66
|
-
#include "commands/vacuum.h"
|
67
|
-
#include "commands/variable.h"
|
68
|
-
#include "common/string.h"
|
69
|
-
#include "funcapi.h"
|
70
|
-
#include "jit/jit.h"
|
71
|
-
#include "libpq/auth.h"
|
72
|
-
#include "libpq/libpq.h"
|
73
|
-
#include "libpq/pqformat.h"
|
74
|
-
#include "miscadmin.h"
|
75
|
-
#include "optimizer/cost.h"
|
76
|
-
#include "optimizer/geqo.h"
|
77
|
-
#include "optimizer/optimizer.h"
|
78
|
-
#include "optimizer/paths.h"
|
79
|
-
#include "optimizer/planmain.h"
|
80
|
-
#include "parser/parse_expr.h"
|
81
|
-
#include "parser/parse_type.h"
|
82
|
-
#include "parser/parser.h"
|
83
|
-
#include "parser/scansup.h"
|
84
|
-
#include "pgstat.h"
|
85
|
-
#include "postmaster/autovacuum.h"
|
86
|
-
#include "postmaster/bgworker_internals.h"
|
87
|
-
#include "postmaster/bgwriter.h"
|
88
|
-
#include "postmaster/postmaster.h"
|
89
|
-
#include "postmaster/startup.h"
|
90
|
-
#include "postmaster/syslogger.h"
|
91
|
-
#include "postmaster/walwriter.h"
|
92
|
-
#include "replication/logicallauncher.h"
|
93
|
-
#include "replication/reorderbuffer.h"
|
94
|
-
#include "replication/slot.h"
|
95
|
-
#include "replication/syncrep.h"
|
96
|
-
#include "replication/walreceiver.h"
|
97
|
-
#include "replication/walsender.h"
|
98
|
-
#include "storage/bufmgr.h"
|
99
|
-
#include "storage/dsm_impl.h"
|
100
|
-
#include "storage/fd.h"
|
101
|
-
#include "storage/large_object.h"
|
102
|
-
#include "storage/pg_shmem.h"
|
103
|
-
#include "storage/predicate.h"
|
104
|
-
#include "storage/proc.h"
|
105
|
-
#include "storage/standby.h"
|
106
|
-
#include "tcop/tcopprot.h"
|
107
|
-
#include "tsearch/ts_cache.h"
|
108
|
-
#include "utils/acl.h"
|
109
|
-
#include "utils/backend_status.h"
|
110
|
-
#include "utils/builtins.h"
|
111
|
-
#include "utils/bytea.h"
|
112
|
-
#include "utils/float.h"
|
113
|
-
#include "utils/guc_tables.h"
|
114
|
-
#include "utils/memutils.h"
|
115
|
-
#include "utils/pg_locale.h"
|
116
|
-
#include "utils/pg_lsn.h"
|
117
|
-
#include "utils/plancache.h"
|
118
|
-
#include "utils/portal.h"
|
119
|
-
#include "utils/ps_status.h"
|
120
|
-
#include "utils/queryjumble.h"
|
121
|
-
#include "utils/rls.h"
|
122
|
-
#include "utils/snapmgr.h"
|
123
|
-
#include "utils/tzparser.h"
|
124
|
-
#include "utils/inval.h"
|
125
|
-
#include "utils/varlena.h"
|
126
|
-
#include "utils/xml.h"
|
127
|
-
|
128
|
-
#ifndef PG_KRB_SRVTAB
|
129
|
-
#define PG_KRB_SRVTAB ""
|
130
|
-
#endif
|
131
|
-
|
132
|
-
#define CONFIG_FILENAME "postgresql.conf"
|
133
|
-
#define HBA_FILENAME "pg_hba.conf"
|
134
|
-
#define IDENT_FILENAME "pg_ident.conf"
|
135
|
-
|
136
|
-
#ifdef EXEC_BACKEND
|
137
|
-
#define CONFIG_EXEC_PARAMS "global/config_exec_params"
|
138
|
-
#define CONFIG_EXEC_PARAMS_NEW "global/config_exec_params.new"
|
139
|
-
#endif
|
140
|
-
|
141
|
-
/*
|
142
|
-
* Precision with which REAL type guc values are to be printed for GUC
|
143
|
-
* serialization.
|
144
|
-
*/
|
145
|
-
#define REALTYPE_PRECISION 17
|
146
|
-
|
147
|
-
/* XXX these should appear in other modules' header files */
|
148
|
-
extern bool Log_disconnections;
|
149
|
-
extern int CommitDelay;
|
150
|
-
extern int CommitSiblings;
|
151
|
-
extern char *default_tablespace;
|
152
|
-
extern char *temp_tablespaces;
|
153
|
-
extern bool ignore_checksum_failure;
|
154
|
-
extern bool ignore_invalid_pages;
|
155
|
-
extern bool synchronize_seqscans;
|
156
|
-
|
157
|
-
#ifdef TRACE_SYNCSCAN
|
158
|
-
extern bool trace_syncscan;
|
159
|
-
#endif
|
160
|
-
#ifdef DEBUG_BOUNDED_SORT
|
161
|
-
extern bool optimize_bounded_sort;
|
162
|
-
#endif
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
/* global variables for check hook support */
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
static void do_serialize(char **destptr, Size *maxbytes, const char *fmt,...) pg_attribute_printf(3, 4);
|
174
|
-
|
175
|
-
static void set_config_sourcefile(const char *name, char *sourcefile,
|
176
|
-
int sourceline);
|
177
|
-
static bool call_bool_check_hook(struct config_bool *conf, bool *newval,
|
178
|
-
void **extra, GucSource source, int elevel);
|
179
|
-
static bool call_int_check_hook(struct config_int *conf, int *newval,
|
180
|
-
void **extra, GucSource source, int elevel);
|
181
|
-
static bool call_real_check_hook(struct config_real *conf, double *newval,
|
182
|
-
void **extra, GucSource source, int elevel);
|
183
|
-
static bool call_string_check_hook(struct config_string *conf, char **newval,
|
184
|
-
void **extra, GucSource source, int elevel);
|
185
|
-
static bool call_enum_check_hook(struct config_enum *conf, int *newval,
|
186
|
-
void **extra, GucSource source, int elevel);
|
187
|
-
|
188
|
-
static bool check_log_destination(char **newval, void **extra, GucSource source);
|
189
|
-
static void assign_log_destination(const char *newval, void *extra);
|
190
|
-
|
191
|
-
static bool check_wal_consistency_checking(char **newval, void **extra,
|
192
|
-
GucSource source);
|
193
|
-
static void assign_wal_consistency_checking(const char *newval, void *extra);
|
194
|
-
|
195
|
-
#ifdef HAVE_SYSLOG
|
196
|
-
|
197
|
-
#else
|
198
|
-
static int syslog_facility = 0;
|
199
|
-
#endif
|
200
|
-
|
201
|
-
static void assign_syslog_facility(int newval, void *extra);
|
202
|
-
static void assign_syslog_ident(const char *newval, void *extra);
|
203
|
-
static void assign_session_replication_role(int newval, void *extra);
|
204
|
-
static bool check_temp_buffers(int *newval, void **extra, GucSource source);
|
205
|
-
static bool check_bonjour(bool *newval, void **extra, GucSource source);
|
206
|
-
static bool check_ssl(bool *newval, void **extra, GucSource source);
|
207
|
-
static bool check_stage_log_stats(bool *newval, void **extra, GucSource source);
|
208
|
-
static bool check_log_stats(bool *newval, void **extra, GucSource source);
|
209
|
-
static bool check_canonical_path(char **newval, void **extra, GucSource source);
|
210
|
-
static bool check_timezone_abbreviations(char **newval, void **extra, GucSource source);
|
211
|
-
static void assign_timezone_abbreviations(const char *newval, void *extra);
|
212
|
-
static void pg_timezone_abbrev_initialize(void);
|
213
|
-
static const char *show_archive_command(void);
|
214
|
-
static void assign_tcp_keepalives_idle(int newval, void *extra);
|
215
|
-
static void assign_tcp_keepalives_interval(int newval, void *extra);
|
216
|
-
static void assign_tcp_keepalives_count(int newval, void *extra);
|
217
|
-
static void assign_tcp_user_timeout(int newval, void *extra);
|
218
|
-
static const char *show_tcp_keepalives_idle(void);
|
219
|
-
static const char *show_tcp_keepalives_interval(void);
|
220
|
-
static const char *show_tcp_keepalives_count(void);
|
221
|
-
static const char *show_tcp_user_timeout(void);
|
222
|
-
static bool check_maxconnections(int *newval, void **extra, GucSource source);
|
223
|
-
static bool check_max_worker_processes(int *newval, void **extra, GucSource source);
|
224
|
-
static bool check_autovacuum_max_workers(int *newval, void **extra, GucSource source);
|
225
|
-
static bool check_max_wal_senders(int *newval, void **extra, GucSource source);
|
226
|
-
static bool check_autovacuum_work_mem(int *newval, void **extra, GucSource source);
|
227
|
-
static bool check_effective_io_concurrency(int *newval, void **extra, GucSource source);
|
228
|
-
static bool check_maintenance_io_concurrency(int *newval, void **extra, GucSource source);
|
229
|
-
static bool check_huge_page_size(int *newval, void **extra, GucSource source);
|
230
|
-
static bool check_client_connection_check_interval(int *newval, void **extra, GucSource source);
|
231
|
-
static void assign_maintenance_io_concurrency(int newval, void *extra);
|
232
|
-
static bool check_application_name(char **newval, void **extra, GucSource source);
|
233
|
-
static void assign_application_name(const char *newval, void *extra);
|
234
|
-
static bool check_cluster_name(char **newval, void **extra, GucSource source);
|
235
|
-
static const char *show_unix_socket_permissions(void);
|
236
|
-
static const char *show_log_file_mode(void);
|
237
|
-
static const char *show_data_directory_mode(void);
|
238
|
-
static const char *show_in_hot_standby(void);
|
239
|
-
static bool check_backtrace_functions(char **newval, void **extra, GucSource source);
|
240
|
-
static void assign_backtrace_functions(const char *newval, void *extra);
|
241
|
-
static bool check_recovery_target_timeline(char **newval, void **extra, GucSource source);
|
242
|
-
static void assign_recovery_target_timeline(const char *newval, void *extra);
|
243
|
-
static bool check_recovery_target(char **newval, void **extra, GucSource source);
|
244
|
-
static void assign_recovery_target(const char *newval, void *extra);
|
245
|
-
static bool check_recovery_target_xid(char **newval, void **extra, GucSource source);
|
246
|
-
static void assign_recovery_target_xid(const char *newval, void *extra);
|
247
|
-
static bool check_recovery_target_time(char **newval, void **extra, GucSource source);
|
248
|
-
static void assign_recovery_target_time(const char *newval, void *extra);
|
249
|
-
static bool check_recovery_target_name(char **newval, void **extra, GucSource source);
|
250
|
-
static void assign_recovery_target_name(const char *newval, void *extra);
|
251
|
-
static bool check_recovery_target_lsn(char **newval, void **extra, GucSource source);
|
252
|
-
static void assign_recovery_target_lsn(const char *newval, void *extra);
|
253
|
-
static bool check_primary_slot_name(char **newval, void **extra, GucSource source);
|
254
|
-
static bool check_default_with_oids(bool *newval, void **extra, GucSource source);
|
255
|
-
|
256
|
-
/* Private functions in guc-file.l that need to be called from guc.c */
|
257
|
-
static ConfigVariable *ProcessConfigFileInternal(GucContext context,
|
258
|
-
bool applySettings, int elevel);
|
259
|
-
|
260
|
-
/*
|
261
|
-
* Track whether there were any deferred checks for custom resource managers
|
262
|
-
* specified in wal_consistency_checking.
|
263
|
-
*/
|
264
|
-
|
265
|
-
|
266
|
-
/*
|
267
|
-
* Options for enum values defined in this module.
|
268
|
-
*
|
269
|
-
* NOTE! Option values may not contain double quotes!
|
270
|
-
*/
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
StaticAssertDecl(lengthof(bytea_output_options) == (BYTEA_OUTPUT_HEX + 2),
|
275
|
-
"array length mismatch");
|
276
|
-
|
277
|
-
/*
|
278
|
-
* We have different sets for client and server message level options because
|
279
|
-
* they sort slightly different (see "log" level), and because "fatal"/"panic"
|
280
|
-
* aren't sensible for client_min_messages.
|
281
|
-
*/
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
StaticAssertDecl(lengthof(intervalstyle_options) == (INTSTYLE_ISO_8601 + 2),
|
289
|
-
"array length mismatch");
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
StaticAssertDecl(lengthof(log_error_verbosity_options) == (PGERROR_VERBOSE + 2),
|
294
|
-
"array length mismatch");
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
StaticAssertDecl(lengthof(log_statement_options) == (LOGSTMT_ALL + 2),
|
299
|
-
"array length mismatch");
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
StaticAssertDecl(lengthof(session_replication_role_options) == (SESSION_REPLICATION_ROLE_LOCAL + 2),
|
306
|
-
"array length mismatch");
|
307
|
-
|
308
|
-
#ifdef HAVE_SYSLOG
|
309
|
-
#else
|
310
|
-
#endif
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
StaticAssertDecl(lengthof(track_function_options) == (TRACK_FUNC_ALL + 2),
|
315
|
-
"array length mismatch");
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
StaticAssertDecl(lengthof(stats_fetch_consistency) == (PGSTAT_FETCH_CONSISTENCY_SNAPSHOT + 2),
|
320
|
-
"array length mismatch");
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
StaticAssertDecl(lengthof(xmlbinary_options) == (XMLBINARY_HEX + 2),
|
325
|
-
"array length mismatch");
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
StaticAssertDecl(lengthof(xmloption_options) == (XMLOPTION_CONTENT + 2),
|
330
|
-
"array length mismatch");
|
331
|
-
|
332
|
-
/*
|
333
|
-
* Although only "on", "off", and "safe_encoding" are documented, we
|
334
|
-
* accept all the likely variants of "on" and "off".
|
335
|
-
*/
|
336
|
-
|
337
|
-
|
338
|
-
/*
|
339
|
-
* Although only "on", "off", and "auto" are documented, we accept
|
340
|
-
* all the likely variants of "on" and "off".
|
341
|
-
*/
|
342
|
-
|
343
|
-
|
344
|
-
/*
|
345
|
-
* Although only "on", "off", and "partition" are documented, we
|
346
|
-
* accept all the likely variants of "on" and "off".
|
347
|
-
*/
|
348
|
-
|
349
|
-
|
350
|
-
/*
|
351
|
-
* Although only "on", "off", "remote_apply", "remote_write", and "local" are
|
352
|
-
* documented, we accept all the likely variants of "on" and "off".
|
353
|
-
*/
|
354
|
-
|
355
|
-
|
356
|
-
/*
|
357
|
-
* Although only "on", "off", "try" are documented, we accept all the likely
|
358
|
-
* variants of "on" and "off".
|
359
|
-
*/
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
StaticAssertDecl(lengthof(ssl_protocol_versions_info) == (PG_TLS1_3_VERSION + 2),
|
373
|
-
"array length mismatch");
|
374
|
-
|
375
|
-
#ifdef HAVE_SYNCFS
|
376
|
-
#endif
|
377
|
-
|
378
|
-
#ifndef WIN32
|
379
|
-
#endif
|
380
|
-
#ifndef EXEC_BACKEND
|
381
|
-
#endif
|
382
|
-
#ifdef WIN32
|
383
|
-
#endif
|
384
|
-
|
385
|
-
#ifdef USE_LZ4
|
386
|
-
#endif
|
387
|
-
|
388
|
-
#ifdef USE_LZ4
|
389
|
-
#endif
|
390
|
-
#ifdef USE_ZSTD
|
391
|
-
#endif
|
392
|
-
|
393
|
-
/*
|
394
|
-
* Options for enum values stored in other modules
|
395
|
-
*/
|
396
|
-
extern const struct config_enum_entry wal_level_options[];
|
397
|
-
extern const struct config_enum_entry archive_mode_options[];
|
398
|
-
extern const struct config_enum_entry recovery_target_action_options[];
|
399
|
-
extern const struct config_enum_entry sync_method_options[];
|
400
|
-
extern const struct config_enum_entry dynamic_shared_memory_options[];
|
401
|
-
|
402
|
-
/*
|
403
|
-
* GUC option variables that are exported from this module
|
404
|
-
*/
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
/* this is sort of all three above
|
415
|
-
* together */
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
__thread bool check_function_bodies = true;
|
421
|
-
|
422
|
-
|
423
|
-
/*
|
424
|
-
* This GUC exists solely for backward compatibility, check its definition for
|
425
|
-
* details.
|
426
|
-
*/
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
__thread int log_min_messages = WARNING;
|
432
|
-
|
433
|
-
__thread int client_min_messages = NOTICE;
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
__thread char *backtrace_functions;
|
444
|
-
|
445
|
-
__thread char *backtrace_symbol_list;
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
/*
|
468
|
-
* SSL renegotiation was been removed in PostgreSQL 9.5, but we tolerate it
|
469
|
-
* being set to zero (meaning never renegotiate) for backward compatibility.
|
470
|
-
* This avoids breaking compatibility with clients that have never supported
|
471
|
-
* renegotiation and therefore always try to zero it.
|
472
|
-
*/
|
473
|
-
|
474
|
-
|
475
|
-
/*
|
476
|
-
* This really belongs in pg_shmem.c, but is defined here so that it doesn't
|
477
|
-
* need to be duplicated in all the different implementations of pg_shmem.c.
|
478
|
-
*/
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
/*
|
483
|
-
* These variables are all dummies that don't do anything, except in some
|
484
|
-
* cases provide the value for SHOW to display. The real state is elsewhere
|
485
|
-
* and is kept in sync by assign_hooks.
|
486
|
-
*/
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
/* should be static, but commands/variable.c needs to get at this */
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
/*
|
525
|
-
* Displayable names for context types (enum GucContext)
|
526
|
-
*
|
527
|
-
* Note: these strings are deliberately not localized.
|
528
|
-
*/
|
529
|
-
|
530
|
-
|
531
|
-
StaticAssertDecl(lengthof(GucContext_Names) == (PGC_USERSET + 1),
|
532
|
-
"array length mismatch");
|
533
|
-
|
534
|
-
/*
|
535
|
-
* Displayable names for source types (enum GucSource)
|
536
|
-
*
|
537
|
-
* Note: these strings are deliberately not localized.
|
538
|
-
*/
|
539
|
-
|
540
|
-
|
541
|
-
StaticAssertDecl(lengthof(GucSource_Names) == (PGC_S_SESSION + 1),
|
542
|
-
"array length mismatch");
|
543
|
-
|
544
|
-
/*
|
545
|
-
* Displayable names for the groupings defined in enum config_group
|
546
|
-
*/
|
547
|
-
|
548
|
-
|
549
|
-
StaticAssertDecl(lengthof(config_group_names) == (DEVELOPER_OPTIONS + 2),
|
550
|
-
"array length mismatch");
|
551
|
-
|
552
|
-
/*
|
553
|
-
* Displayable names for GUC variable types (enum config_type)
|
554
|
-
*
|
555
|
-
* Note: these strings are deliberately not localized.
|
556
|
-
*/
|
557
|
-
|
558
|
-
|
559
|
-
StaticAssertDecl(lengthof(config_type_names) == (PGC_ENUM + 1),
|
560
|
-
"array length mismatch");
|
561
|
-
|
562
|
-
/*
|
563
|
-
* Unit conversion tables.
|
564
|
-
*
|
565
|
-
* There are two tables, one for memory units, and another for time units.
|
566
|
-
* For each supported conversion from one unit to another, we have an entry
|
567
|
-
* in the table.
|
568
|
-
*
|
569
|
-
* To keep things simple, and to avoid possible roundoff error,
|
570
|
-
* conversions are never chained. There needs to be a direct conversion
|
571
|
-
* between all units (of the same type).
|
572
|
-
*
|
573
|
-
* The conversions for each base unit must be kept in order from greatest to
|
574
|
-
* smallest human-friendly unit; convert_xxx_from_base_unit() rely on that.
|
575
|
-
* (The order of the base-unit groups does not matter.)
|
576
|
-
*/
|
577
|
-
#define MAX_UNIT_LEN 3 /* length of longest recognized unit string */
|
578
|
-
|
579
|
-
typedef struct
|
580
|
-
{
|
581
|
-
char unit[MAX_UNIT_LEN + 1]; /* unit, as a string, like "kB" or
|
582
|
-
* "min" */
|
583
|
-
int base_unit; /* GUC_UNIT_XXX */
|
584
|
-
double multiplier; /* Factor for converting unit -> base_unit */
|
585
|
-
} unit_conversion;
|
586
|
-
|
587
|
-
/* Ensure that the constants in the tables don't overflow or underflow */
|
588
|
-
#if BLCKSZ < 1024 || BLCKSZ > (1024*1024)
|
589
|
-
#error BLCKSZ must be between 1KB and 1MB
|
590
|
-
#endif
|
591
|
-
#if XLOG_BLCKSZ < 1024 || XLOG_BLCKSZ > (1024*1024)
|
592
|
-
#error XLOG_BLCKSZ must be between 1KB and 1MB
|
593
|
-
#endif
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
/*
|
604
|
-
* Contents of GUC tables
|
605
|
-
*
|
606
|
-
* See src/backend/utils/misc/README for design notes.
|
607
|
-
*
|
608
|
-
* TO ADD AN OPTION:
|
609
|
-
*
|
610
|
-
* 1. Declare a global variable of type bool, int, double, or char*
|
611
|
-
* and make use of it.
|
612
|
-
*
|
613
|
-
* 2. Decide at what times it's safe to set the option. See guc.h for
|
614
|
-
* details.
|
615
|
-
*
|
616
|
-
* 3. Decide on a name, a default value, upper and lower bounds (if
|
617
|
-
* applicable), etc.
|
618
|
-
*
|
619
|
-
* 4. Add a record below.
|
620
|
-
*
|
621
|
-
* 5. Add it to src/backend/utils/misc/postgresql.conf.sample, if
|
622
|
-
* appropriate.
|
623
|
-
*
|
624
|
-
* 6. Don't forget to document the option (at least in config.sgml).
|
625
|
-
*
|
626
|
-
* 7. If it's a new GUC_LIST_QUOTE option, you must add it to
|
627
|
-
* variable_is_guc_list_quote() in src/bin/pg_dump/dumputils.c.
|
628
|
-
*/
|
629
|
-
|
630
|
-
|
631
|
-
/******** option records follow ********/
|
632
|
-
|
633
|
-
#ifdef USE_ASSERT_CHECKING
|
634
|
-
#else
|
635
|
-
#endif
|
636
|
-
#ifdef BTREE_BUILD_STATS
|
637
|
-
#endif
|
638
|
-
#ifdef WIN32
|
639
|
-
#else
|
640
|
-
#endif
|
641
|
-
#ifdef LOCK_DEBUG
|
642
|
-
#endif
|
643
|
-
#ifdef TRACE_SORT
|
644
|
-
#endif
|
645
|
-
#ifdef TRACE_SYNCSCAN
|
646
|
-
#endif
|
647
|
-
#ifdef DEBUG_BOUNDED_SORT
|
648
|
-
#endif
|
649
|
-
#ifdef WAL_DEBUG
|
650
|
-
#endif
|
651
|
-
|
652
|
-
|
653
|
-
#ifdef LOCK_DEBUG
|
654
|
-
#endif
|
655
|
-
#ifdef USE_PREFETCH
|
656
|
-
#else
|
657
|
-
#endif
|
658
|
-
#ifdef USE_PREFETCH
|
659
|
-
#else
|
660
|
-
#endif
|
661
|
-
#ifdef DISCARD_CACHES_ENABLED
|
662
|
-
#if defined(CLOBBER_CACHE_RECURSIVELY)
|
663
|
-
#else
|
664
|
-
#endif
|
665
|
-
#else /* not DISCARD_CACHES_ENABLED */
|
666
|
-
#endif /* not DISCARD_CACHES_ENABLED */
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
#ifdef HAVE_UNIX_SOCKETS
|
673
|
-
#else
|
674
|
-
#endif
|
675
|
-
#ifdef USE_SSL
|
676
|
-
#else
|
677
|
-
#endif
|
678
|
-
#ifdef USE_OPENSSL
|
679
|
-
#else
|
680
|
-
#endif
|
681
|
-
#ifdef USE_SSL
|
682
|
-
#else
|
683
|
-
#endif
|
684
|
-
|
685
|
-
|
686
|
-
#ifdef HAVE_SYSLOG
|
687
|
-
#else
|
688
|
-
#endif
|
689
|
-
|
690
|
-
/******** end of options list ********/
|
691
|
-
|
692
|
-
|
693
|
-
/*
|
694
|
-
* To allow continued support of obsolete names for GUC variables, we apply
|
695
|
-
* the following mappings to any unrecognized name. Note that an old name
|
696
|
-
* should be mapped to a new one only if the new variable has very similar
|
697
|
-
* semantics to the old.
|
698
|
-
*/
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
/*
|
703
|
-
* Actual lookup of variables is done through this single, sorted array.
|
704
|
-
*/
|
705
|
-
|
706
|
-
|
707
|
-
/* Current number of variables contained in the vector */
|
708
|
-
|
709
|
-
|
710
|
-
/* Vector capacity */
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
/* true if need to do commit/abort work */
|
715
|
-
|
716
|
-
/* true to enable GUC_REPORT */
|
717
|
-
|
718
|
-
/* true if any GUC_REPORT reports are needed */
|
719
|
-
|
720
|
-
/* 1 when in main transaction */
|
721
|
-
|
722
|
-
|
723
|
-
static int guc_var_compare(const void *a, const void *b);
|
724
|
-
static int guc_name_compare(const char *namea, const char *nameb);
|
725
|
-
static void InitializeGUCOptionsFromEnvironment(void);
|
726
|
-
static void InitializeOneGUCOption(struct config_generic *gconf);
|
727
|
-
static void push_old_value(struct config_generic *gconf, GucAction action);
|
728
|
-
static void ReportGUCOption(struct config_generic *record);
|
729
|
-
static void reapply_stacked_values(struct config_generic *variable,
|
730
|
-
struct config_string *pHolder,
|
731
|
-
GucStack *stack,
|
732
|
-
const char *curvalue,
|
733
|
-
GucContext curscontext, GucSource cursource,
|
734
|
-
Oid cursrole);
|
735
|
-
static void ShowGUCConfigOption(const char *name, DestReceiver *dest);
|
736
|
-
static void ShowAllGUCConfig(DestReceiver *dest);
|
737
|
-
static char *_ShowOption(struct config_generic *record, bool use_units);
|
738
|
-
static bool validate_option_array_item(const char *name, const char *value,
|
739
|
-
bool skipIfNoPermissions);
|
740
|
-
static void write_auto_conf_file(int fd, const char *filename, ConfigVariable *head_p);
|
741
|
-
static void replace_auto_config_value(ConfigVariable **head_p, ConfigVariable **tail_p,
|
742
|
-
const char *name, const char *value);
|
743
|
-
|
744
|
-
|
745
|
-
/*
|
746
|
-
* Some infrastructure for checking malloc/strdup/realloc calls
|
747
|
-
*/
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
/*
|
756
|
-
* Detect whether strval is referenced anywhere in a GUC string item
|
757
|
-
*/
|
758
|
-
|
759
|
-
|
760
|
-
/*
|
761
|
-
* Support for assigning to a field of a string GUC item. Free the prior
|
762
|
-
* value if it's not referenced anywhere else in the item (including stacked
|
763
|
-
* states).
|
764
|
-
*/
|
765
|
-
|
766
|
-
|
767
|
-
/*
|
768
|
-
* Detect whether an "extra" struct is referenced anywhere in a GUC item
|
769
|
-
*/
|
770
|
-
|
771
|
-
|
772
|
-
/*
|
773
|
-
* Support for assigning to an "extra" field of a GUC item. Free the prior
|
774
|
-
* value if it's not referenced anywhere else in the item (including stacked
|
775
|
-
* states).
|
776
|
-
*/
|
777
|
-
|
778
|
-
|
779
|
-
/*
|
780
|
-
* Support for copying a variable's active value into a stack entry.
|
781
|
-
* The "extra" field associated with the active value is copied, too.
|
782
|
-
*
|
783
|
-
* NB: be sure stringval and extra fields of a new stack entry are
|
784
|
-
* initialized to NULL before this is used, else we'll try to free() them.
|
785
|
-
*/
|
786
|
-
|
787
|
-
|
788
|
-
/*
|
789
|
-
* Support for discarding a no-longer-needed value in a stack entry.
|
790
|
-
* The "extra" field associated with the stack entry is cleared, too.
|
791
|
-
*/
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
/*
|
796
|
-
* Fetch the sorted array pointer (exported for help_config.c's use ONLY)
|
797
|
-
*/
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
/*
|
802
|
-
* Build the sorted array. This is split out so that it could be
|
803
|
-
* re-executed after startup (e.g., we could allow loadable modules to
|
804
|
-
* add vars, and then we'd need to re-sort).
|
805
|
-
*/
|
806
|
-
|
807
|
-
|
808
|
-
/*
|
809
|
-
* Add a new GUC variable to the list of known variables. The
|
810
|
-
* list is expanded if needed.
|
811
|
-
*/
|
812
|
-
|
813
|
-
|
814
|
-
/*
|
815
|
-
* Decide whether a proposed custom variable name is allowed.
|
816
|
-
*
|
817
|
-
* It must be two or more identifiers separated by dots, where the rules
|
818
|
-
* for what is an identifier agree with scan.l. (If you change this rule,
|
819
|
-
* adjust the errdetail in find_option().)
|
820
|
-
*/
|
821
|
-
|
822
|
-
|
823
|
-
/*
|
824
|
-
* Create and add a placeholder variable for a custom variable name.
|
825
|
-
*/
|
826
|
-
|
827
|
-
|
828
|
-
/*
|
829
|
-
* Look up option "name". If it exists, return a pointer to its record.
|
830
|
-
* Otherwise, if create_placeholders is true and name is a valid-looking
|
831
|
-
* custom variable name, we'll create and return a placeholder record.
|
832
|
-
* Otherwise, if skip_errors is true, then we silently return NULL for
|
833
|
-
* an unrecognized or invalid name. Otherwise, the error is reported at
|
834
|
-
* error level elevel (and we return NULL if that's less than ERROR).
|
835
|
-
*
|
836
|
-
* Note: internal errors, primarily out-of-memory, draw an elevel-level
|
837
|
-
* report and NULL return regardless of skip_errors. Hence, callers must
|
838
|
-
* handle a NULL return whenever elevel < ERROR, but they should not need
|
839
|
-
* to emit any additional error message. (In practice, internal errors
|
840
|
-
* can only happen when create_placeholders is true, so callers passing
|
841
|
-
* false need not think terribly hard about this.)
|
842
|
-
*/
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
/*
|
847
|
-
* comparator for qsorting and bsearching guc_variables array
|
848
|
-
*/
|
849
|
-
|
850
|
-
|
851
|
-
/*
|
852
|
-
* the bare comparison function for GUC names
|
853
|
-
*/
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
/*
|
858
|
-
* Convert a GUC name to the form that should be used in pg_parameter_acl.
|
859
|
-
*
|
860
|
-
* We need to canonicalize entries since, for example, case should not be
|
861
|
-
* significant. In addition, we apply the map_old_guc_names[] mapping so that
|
862
|
-
* any obsolete names will be converted when stored in a new PG version.
|
863
|
-
* Note however that this function does not verify legality of the name.
|
864
|
-
*
|
865
|
-
* The result is a palloc'd string.
|
866
|
-
*/
|
867
|
-
|
868
|
-
|
869
|
-
/*
|
870
|
-
* Check whether we should allow creation of a pg_parameter_acl entry
|
871
|
-
* for the given name. (This can be applied either before or after
|
872
|
-
* canonicalizing it.)
|
873
|
-
*/
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
/*
|
878
|
-
* Initialize GUC options during program startup.
|
879
|
-
*
|
880
|
-
* Note that we cannot read the config file yet, since we have not yet
|
881
|
-
* processed command-line switches.
|
882
|
-
*/
|
883
|
-
|
884
|
-
|
885
|
-
/*
|
886
|
-
* If any custom resource managers were specified in the
|
887
|
-
* wal_consistency_checking GUC, processing was deferred. Now that
|
888
|
-
* shared_preload_libraries have been loaded, process wal_consistency_checking
|
889
|
-
* again.
|
890
|
-
*/
|
891
|
-
|
892
|
-
|
893
|
-
/*
|
894
|
-
* Assign any GUC values that can come from the server's environment.
|
895
|
-
*
|
896
|
-
* This is called from InitializeGUCOptions, and also from ProcessConfigFile
|
897
|
-
* to deal with the possibility that a setting has been removed from
|
898
|
-
* postgresql.conf and should now get a value from the environment.
|
899
|
-
* (The latter is a kludge that should probably go away someday; if so,
|
900
|
-
* fold this back into InitializeGUCOptions.)
|
901
|
-
*/
|
902
|
-
|
903
|
-
|
904
|
-
/*
|
905
|
-
* Initialize one GUC option variable to its compiled-in default.
|
906
|
-
*
|
907
|
-
* Note: the reason for calling check_hooks is not that we think the boot_val
|
908
|
-
* might fail, but that the hooks might wish to compute an "extra" struct.
|
909
|
-
*/
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
/*
|
914
|
-
* Select the configuration files and data directory to be used, and
|
915
|
-
* do the initial read of postgresql.conf.
|
916
|
-
*
|
917
|
-
* This is called after processing command-line switches.
|
918
|
-
* userDoption is the -D switch value if any (NULL if unspecified).
|
919
|
-
* progname is just for use in error messages.
|
920
|
-
*
|
921
|
-
* Returns true on success; on failure, prints a suitable error message
|
922
|
-
* to stderr and returns false.
|
923
|
-
*/
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
/*
|
928
|
-
* Reset all options to their saved default values (implements RESET ALL)
|
929
|
-
*/
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
/*
|
934
|
-
* push_old_value
|
935
|
-
* Push previous state during transactional assignment to a GUC variable.
|
936
|
-
*/
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
/*
|
941
|
-
* Do GUC processing at main transaction start.
|
942
|
-
*/
|
943
|
-
|
944
|
-
|
945
|
-
/*
|
946
|
-
* Enter a new nesting level for GUC values. This is called at subtransaction
|
947
|
-
* start, and when entering a function that has proconfig settings, and in
|
948
|
-
* some other places where we want to set GUC variables transiently.
|
949
|
-
* NOTE we must not risk error here, else subtransaction start will be unhappy.
|
950
|
-
*/
|
951
|
-
|
952
|
-
|
953
|
-
/*
|
954
|
-
* Do GUC processing at transaction or subtransaction commit or abort, or
|
955
|
-
* when exiting a function that has proconfig settings, or when undoing a
|
956
|
-
* transient assignment to some GUC variables. (The name is thus a bit of
|
957
|
-
* a misnomer; perhaps it should be ExitGUCNestLevel or some such.)
|
958
|
-
* During abort, we discard all GUC settings that were applied at nesting
|
959
|
-
* levels >= nestLevel. nestLevel == 1 corresponds to the main transaction.
|
960
|
-
*/
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
/*
|
965
|
-
* Start up automatic reporting of changes to variables marked GUC_REPORT.
|
966
|
-
* This is executed at completion of backend startup.
|
967
|
-
*/
|
968
|
-
|
969
|
-
|
970
|
-
/*
|
971
|
-
* ReportChangedGUCOptions: report recently-changed GUC_REPORT variables
|
972
|
-
*
|
973
|
-
* This is called just before we wait for a new client query.
|
974
|
-
*
|
975
|
-
* By handling things this way, we ensure that a ParameterStatus message
|
976
|
-
* is sent at most once per variable per query, even if the variable
|
977
|
-
* changed multiple times within the query. That's quite possible when
|
978
|
-
* using features such as function SET clauses. Function SET clauses
|
979
|
-
* also tend to cause values to change intraquery but eventually revert
|
980
|
-
* to their prevailing values; ReportGUCOption is responsible for avoiding
|
981
|
-
* redundant reports in such cases.
|
982
|
-
*/
|
983
|
-
|
984
|
-
|
985
|
-
/*
|
986
|
-
* ReportGUCOption: if appropriate, transmit option value to frontend
|
987
|
-
*
|
988
|
-
* We need not transmit the value if it's the same as what we last
|
989
|
-
* transmitted. However, clear the NEEDS_REPORT flag in any case.
|
990
|
-
*/
|
991
|
-
|
992
|
-
|
993
|
-
/*
|
994
|
-
* Convert a value from one of the human-friendly units ("kB", "min" etc.)
|
995
|
-
* to the given base unit. 'value' and 'unit' are the input value and unit
|
996
|
-
* to convert from (there can be trailing spaces in the unit string).
|
997
|
-
* The converted value is stored in *base_value.
|
998
|
-
* It's caller's responsibility to round off the converted value as necessary
|
999
|
-
* and check for out-of-range.
|
1000
|
-
*
|
1001
|
-
* Returns true on success, false if the input unit is not recognized.
|
1002
|
-
*/
|
1003
|
-
|
1004
|
-
|
1005
|
-
/*
|
1006
|
-
* Convert an integer value in some base unit to a human-friendly unit.
|
1007
|
-
*
|
1008
|
-
* The output unit is chosen so that it's the greatest unit that can represent
|
1009
|
-
* the value without loss. For example, if the base unit is GUC_UNIT_KB, 1024
|
1010
|
-
* is converted to 1 MB, but 1025 is represented as 1025 kB.
|
1011
|
-
*/
|
1012
|
-
|
1013
|
-
|
1014
|
-
/*
|
1015
|
-
* Convert a floating-point value in some base unit to a human-friendly unit.
|
1016
|
-
*
|
1017
|
-
* Same as above, except we have to do the math a bit differently, and
|
1018
|
-
* there's a possibility that we don't find any exact divisor.
|
1019
|
-
*/
|
1020
|
-
|
1021
|
-
|
1022
|
-
/*
|
1023
|
-
* Return the name of a GUC's base unit (e.g. "ms") given its flags.
|
1024
|
-
* Return NULL if the GUC is unitless.
|
1025
|
-
*/
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
/*
|
1030
|
-
* Try to parse value as an integer. The accepted formats are the
|
1031
|
-
* usual decimal, octal, or hexadecimal formats, as well as floating-point
|
1032
|
-
* formats (which will be rounded to integer after any units conversion).
|
1033
|
-
* Optionally, the value can be followed by a unit name if "flags" indicates
|
1034
|
-
* a unit is allowed.
|
1035
|
-
*
|
1036
|
-
* If the string parses okay, return true, else false.
|
1037
|
-
* If okay and result is not NULL, return the value in *result.
|
1038
|
-
* If not okay and hintmsg is not NULL, *hintmsg is set to a suitable
|
1039
|
-
* HINT message, or NULL if no hint provided.
|
1040
|
-
*/
|
1041
|
-
|
1042
|
-
|
1043
|
-
/*
|
1044
|
-
* Try to parse value as a floating point number in the usual format.
|
1045
|
-
* Optionally, the value can be followed by a unit name if "flags" indicates
|
1046
|
-
* a unit is allowed.
|
1047
|
-
*
|
1048
|
-
* If the string parses okay, return true, else false.
|
1049
|
-
* If okay and result is not NULL, return the value in *result.
|
1050
|
-
* If not okay and hintmsg is not NULL, *hintmsg is set to a suitable
|
1051
|
-
* HINT message, or NULL if no hint provided.
|
1052
|
-
*/
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
/*
|
1057
|
-
* Lookup the name for an enum option with the selected value.
|
1058
|
-
* Should only ever be called with known-valid values, so throws
|
1059
|
-
* an elog(ERROR) if the enum option is not found.
|
1060
|
-
*
|
1061
|
-
* The returned string is a pointer to static data and not
|
1062
|
-
* allocated for modification.
|
1063
|
-
*/
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
/*
|
1068
|
-
* Lookup the value for an enum option with the selected name
|
1069
|
-
* (case-insensitive).
|
1070
|
-
* If the enum option is found, sets the retval value and returns
|
1071
|
-
* true. If it's not found, return false and retval is set to 0.
|
1072
|
-
*/
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
/*
|
1077
|
-
* Return a list of all available options for an enum, excluding
|
1078
|
-
* hidden ones, separated by the given separator.
|
1079
|
-
* If prefix is non-NULL, it is added before the first enum value.
|
1080
|
-
* If suffix is non-NULL, it is added to the end of the string.
|
1081
|
-
*/
|
1082
|
-
|
1083
|
-
|
1084
|
-
/*
|
1085
|
-
* Parse and validate a proposed value for the specified configuration
|
1086
|
-
* parameter.
|
1087
|
-
*
|
1088
|
-
* This does built-in checks (such as range limits for an integer parameter)
|
1089
|
-
* and also calls any check hook the parameter may have.
|
1090
|
-
*
|
1091
|
-
* record: GUC variable's info record
|
1092
|
-
* name: variable name (should match the record of course)
|
1093
|
-
* value: proposed value, as a string
|
1094
|
-
* source: identifies source of value (check hooks may need this)
|
1095
|
-
* elevel: level to log any error reports at
|
1096
|
-
* newval: on success, converted parameter value is returned here
|
1097
|
-
* newextra: on success, receives any "extra" data returned by check hook
|
1098
|
-
* (caller must initialize *newextra to NULL)
|
1099
|
-
*
|
1100
|
-
* Returns true if OK, false if not (or throws error, if elevel >= ERROR)
|
1101
|
-
*/
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
/*
|
1106
|
-
* set_config_option: sets option `name' to given value.
|
1107
|
-
*
|
1108
|
-
* The value should be a string, which will be parsed and converted to
|
1109
|
-
* the appropriate data type. The context and source parameters indicate
|
1110
|
-
* in which context this function is being called, so that it can apply the
|
1111
|
-
* access restrictions properly.
|
1112
|
-
*
|
1113
|
-
* If value is NULL, set the option to its default value (normally the
|
1114
|
-
* reset_val, but if source == PGC_S_DEFAULT we instead use the boot_val).
|
1115
|
-
*
|
1116
|
-
* action indicates whether to set the value globally in the session, locally
|
1117
|
-
* to the current top transaction, or just for the duration of a function call.
|
1118
|
-
*
|
1119
|
-
* If changeVal is false then don't really set the option but do all
|
1120
|
-
* the checks to see if it would work.
|
1121
|
-
*
|
1122
|
-
* elevel should normally be passed as zero, allowing this function to make
|
1123
|
-
* its standard choice of ereport level. However some callers need to be
|
1124
|
-
* able to override that choice; they should pass the ereport level to use.
|
1125
|
-
*
|
1126
|
-
* is_reload should be true only when called from read_nondefault_variables()
|
1127
|
-
* or RestoreGUCState(), where we are trying to load some other process's
|
1128
|
-
* GUC settings into a new process.
|
1129
|
-
*
|
1130
|
-
* Return value:
|
1131
|
-
* +1: the value is valid and was successfully applied.
|
1132
|
-
* 0: the name or value is invalid (but see below).
|
1133
|
-
* -1: the value was not applied because of context, priority, or changeVal.
|
1134
|
-
*
|
1135
|
-
* If there is an error (non-existing option, invalid value) then an
|
1136
|
-
* ereport(ERROR) is thrown *unless* this is called for a source for which
|
1137
|
-
* we don't want an ERROR (currently, those are defaults, the config file,
|
1138
|
-
* and per-database or per-user settings, as well as callers who specify
|
1139
|
-
* a less-than-ERROR elevel). In those cases we write a suitable error
|
1140
|
-
* message via ereport() and return 0.
|
1141
|
-
*
|
1142
|
-
* See also SetConfigOption for an external interface.
|
1143
|
-
*/
|
1144
|
-
|
1145
|
-
|
1146
|
-
/*
|
1147
|
-
* set_config_option_ext: sets option `name' to given value.
|
1148
|
-
*
|
1149
|
-
* This API adds the ability to explicitly specify which role OID
|
1150
|
-
* is considered to be setting the value. Most external callers can use
|
1151
|
-
* set_config_option() and let it determine that based on the GucSource,
|
1152
|
-
* but there are a few that are supplying a value that was determined
|
1153
|
-
* in some special way and need to override the decision. Also, when
|
1154
|
-
* restoring a previously-assigned value, it's important to supply the
|
1155
|
-
* same role OID that set the value originally; so all guc.c callers
|
1156
|
-
* that are doing that type of thing need to call this directly.
|
1157
|
-
*
|
1158
|
-
* Generally, srole should be GetUserId() when the source is a SQL operation,
|
1159
|
-
* or BOOTSTRAP_SUPERUSERID if the source is a config file or similar.
|
1160
|
-
*/
|
1161
|
-
#define newval (newval_union.boolval)
|
1162
|
-
#undef newval
|
1163
|
-
#define newval (newval_union.intval)
|
1164
|
-
#undef newval
|
1165
|
-
#define newval (newval_union.realval)
|
1166
|
-
#undef newval
|
1167
|
-
#define newval (newval_union.stringval)
|
1168
|
-
#undef newval
|
1169
|
-
#define newval (newval_union.enumval)
|
1170
|
-
#undef newval
|
1171
|
-
|
1172
|
-
|
1173
|
-
/*
|
1174
|
-
* Set the fields for source file and line number the setting came from.
|
1175
|
-
*/
|
1176
|
-
|
1177
|
-
|
1178
|
-
/*
|
1179
|
-
* Set a config option to the given value.
|
1180
|
-
*
|
1181
|
-
* See also set_config_option; this is just the wrapper to be called from
|
1182
|
-
* outside GUC. (This function should be used when possible, because its API
|
1183
|
-
* is more stable than set_config_option's.)
|
1184
|
-
*
|
1185
|
-
* Note: there is no support here for setting source file/line, as it
|
1186
|
-
* is currently not needed.
|
1187
|
-
*/
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
/*
|
1193
|
-
* Fetch the current value of the option `name', as a string.
|
1194
|
-
*
|
1195
|
-
* If the option doesn't exist, return NULL if missing_ok is true (NOTE that
|
1196
|
-
* this cannot be distinguished from a string variable with a NULL value!),
|
1197
|
-
* otherwise throw an ereport and don't return.
|
1198
|
-
*
|
1199
|
-
* If restrict_privileged is true, we also enforce that only superusers and
|
1200
|
-
* members of the pg_read_all_settings role can see GUC_SUPERUSER_ONLY
|
1201
|
-
* variables. This should only be passed as true in user-driven calls.
|
1202
|
-
*
|
1203
|
-
* The string is *not* allocated for modification and is really only
|
1204
|
-
* valid until the next call to configuration related functions.
|
1205
|
-
*/
|
1206
|
-
|
1207
|
-
|
1208
|
-
/*
|
1209
|
-
* Get the RESET value associated with the given option.
|
1210
|
-
*
|
1211
|
-
* Note: this is not re-entrant, due to use of static result buffer;
|
1212
|
-
* not to mention that a string variable could have its reset_val changed.
|
1213
|
-
* Beware of assuming the result value is good for very long.
|
1214
|
-
*/
|
1215
|
-
|
1216
|
-
|
1217
|
-
/*
|
1218
|
-
* Get the GUC flags associated with the given option.
|
1219
|
-
*
|
1220
|
-
* If the option doesn't exist, return 0 if missing_ok is true,
|
1221
|
-
* otherwise throw an ereport and don't return.
|
1222
|
-
*/
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
/*
|
1227
|
-
* flatten_set_variable_args
|
1228
|
-
* Given a parsenode List as emitted by the grammar for SET,
|
1229
|
-
* convert to the flat string representation used by GUC.
|
1230
|
-
*
|
1231
|
-
* We need to be told the name of the variable the args are for, because
|
1232
|
-
* the flattening rules vary (ugh).
|
1233
|
-
*
|
1234
|
-
* The result is NULL if args is NIL (i.e., SET ... TO DEFAULT), otherwise
|
1235
|
-
* a palloc'd string.
|
1236
|
-
*/
|
1237
|
-
|
1238
|
-
|
1239
|
-
/*
|
1240
|
-
* Write updated configuration parameter values into a temporary file.
|
1241
|
-
* This function traverses the list of parameters and quotes the string
|
1242
|
-
* values before writing them.
|
1243
|
-
*/
|
1244
|
-
|
1245
|
-
|
1246
|
-
/*
|
1247
|
-
* Update the given list of configuration parameters, adding, replacing
|
1248
|
-
* or deleting the entry for item "name" (delete if "value" == NULL).
|
1249
|
-
*/
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
/*
|
1254
|
-
* Execute ALTER SYSTEM statement.
|
1255
|
-
*
|
1256
|
-
* Read the old PG_AUTOCONF_FILENAME file, merge in the new variable value,
|
1257
|
-
* and write out an updated file. If the command is ALTER SYSTEM RESET ALL,
|
1258
|
-
* we can skip reading the old file and just write an empty file.
|
1259
|
-
*
|
1260
|
-
* An LWLock is used to serialize updates of the configuration file.
|
1261
|
-
*
|
1262
|
-
* In case of an error, we leave the original automatic
|
1263
|
-
* configuration file (PG_AUTOCONF_FILENAME) intact.
|
1264
|
-
*/
|
1265
|
-
|
1266
|
-
|
1267
|
-
/*
|
1268
|
-
* SET command
|
1269
|
-
*/
|
1270
|
-
|
1271
|
-
|
1272
|
-
/*
|
1273
|
-
* Get the value to assign for a VariableSetStmt, or NULL if it's RESET.
|
1274
|
-
* The result is palloc'd.
|
1275
|
-
*
|
1276
|
-
* This is exported for use by actions such as ALTER ROLE SET.
|
1277
|
-
*/
|
1278
|
-
|
1279
|
-
|
1280
|
-
/*
|
1281
|
-
* SetPGVariable - SET command exported as an easily-C-callable function.
|
1282
|
-
*
|
1283
|
-
* This provides access to SET TO value, as well as SET TO DEFAULT (expressed
|
1284
|
-
* by passing args == NIL), but not SET FROM CURRENT functionality.
|
1285
|
-
*/
|
1286
|
-
|
1287
|
-
|
1288
|
-
/*
|
1289
|
-
* SET command wrapped as a SQL callable function.
|
1290
|
-
*/
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
/*
|
1295
|
-
* Common code for DefineCustomXXXVariable subroutines: allocate the
|
1296
|
-
* new variable's config struct and fill in generic fields.
|
1297
|
-
*/
|
1298
|
-
|
1299
|
-
|
1300
|
-
/*
|
1301
|
-
* Common code for DefineCustomXXXVariable subroutines: insert the new
|
1302
|
-
* variable into the GUC variable array, replacing any placeholder.
|
1303
|
-
*/
|
1304
|
-
|
1305
|
-
|
1306
|
-
/*
|
1307
|
-
* Recursive subroutine for define_custom_variable: reapply non-reset values
|
1308
|
-
*
|
1309
|
-
* We recurse so that the values are applied in the same order as originally.
|
1310
|
-
* At each recursion level, apply the upper-level value (passed in) in the
|
1311
|
-
* fashion implied by the stack entry.
|
1312
|
-
*/
|
1313
|
-
|
1314
|
-
|
1315
|
-
/*
|
1316
|
-
* Functions for extensions to call to define their custom GUC variables.
|
1317
|
-
*/
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
/*
|
1329
|
-
* Mark the given GUC prefix as "reserved".
|
1330
|
-
*
|
1331
|
-
* This deletes any existing placeholders matching the prefix,
|
1332
|
-
* and then prevents new ones from being created.
|
1333
|
-
* Extensions should call this after they've defined all of their custom
|
1334
|
-
* GUCs, to help catch misspelled config-file entries.
|
1335
|
-
*/
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
/*
|
1340
|
-
* SHOW command
|
1341
|
-
*/
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
/*
|
1348
|
-
* SHOW command
|
1349
|
-
*/
|
1350
|
-
|
1351
|
-
|
1352
|
-
/*
|
1353
|
-
* SHOW ALL command
|
1354
|
-
*/
|
1355
|
-
|
1356
|
-
|
1357
|
-
/*
|
1358
|
-
* Return an array of modified GUC options to show in EXPLAIN.
|
1359
|
-
*
|
1360
|
-
* We only report options related to query planning (marked with GUC_EXPLAIN),
|
1361
|
-
* with values different from their built-in defaults.
|
1362
|
-
*/
|
1363
|
-
|
1364
|
-
|
1365
|
-
/*
|
1366
|
-
* Return GUC variable value by name; optionally return canonical form of
|
1367
|
-
* name. If the GUC is unset, then throw an error unless missing_ok is true,
|
1368
|
-
* in which case return NULL. Return value is palloc'd (but *varname isn't).
|
1369
|
-
*/
|
1370
|
-
|
1371
|
-
|
1372
|
-
/*
|
1373
|
-
* Return some of the flags associated to the specified GUC in the shape of
|
1374
|
-
* a text array, and NULL if it does not exist. An empty array is returned
|
1375
|
-
* if the GUC exists without any meaningful flags to show.
|
1376
|
-
*/
|
1377
|
-
#define MAX_GUC_FLAGS 5
|
1378
|
-
|
1379
|
-
/*
|
1380
|
-
* Return GUC variable value by variable number; optionally return canonical
|
1381
|
-
* form of name. Return value is palloc'd.
|
1382
|
-
*/
|
1383
|
-
|
1384
|
-
|
1385
|
-
/*
|
1386
|
-
* Return the total number of GUC variables
|
1387
|
-
*/
|
1388
|
-
|
1389
|
-
|
1390
|
-
/*
|
1391
|
-
* show_config_by_name - equiv to SHOW X command but implemented as
|
1392
|
-
* a function.
|
1393
|
-
*/
|
1394
|
-
|
1395
|
-
|
1396
|
-
/*
|
1397
|
-
* show_config_by_name_missing_ok - equiv to SHOW X command but implemented as
|
1398
|
-
* a function. If X does not exist, suppress the error and just return NULL
|
1399
|
-
* if missing_ok is true.
|
1400
|
-
*/
|
1401
|
-
|
1402
|
-
|
1403
|
-
/*
|
1404
|
-
* show_all_settings - equiv to SHOW ALL command but implemented as
|
1405
|
-
* a Table Function.
|
1406
|
-
*/
|
1407
|
-
#define NUM_PG_SETTINGS_ATTS 17
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
/*
|
1412
|
-
* show_all_file_settings
|
1413
|
-
*
|
1414
|
-
* Returns a table of all parameter settings in all configuration files
|
1415
|
-
* which includes the config file pathname, the line number, a sequence number
|
1416
|
-
* indicating the order in which the settings were encountered, the parameter
|
1417
|
-
* name and value, a bool showing if the value could be applied, and possibly
|
1418
|
-
* an associated error message. (For problems such as syntax errors, the
|
1419
|
-
* parameter name/value might be NULL.)
|
1420
|
-
*
|
1421
|
-
* Note: no filtering is done here, instead we depend on the GRANT system
|
1422
|
-
* to prevent unprivileged users from accessing this function or the view
|
1423
|
-
* built on top of it.
|
1424
|
-
*/
|
1425
|
-
#define NUM_PG_FILE_SETTINGS_ATTS 7
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
#ifdef EXEC_BACKEND
|
1431
|
-
|
1432
|
-
/*
|
1433
|
-
* These routines dump out all non-default GUC options into a binary
|
1434
|
-
* file that is read by all exec'ed backends. The format is:
|
1435
|
-
*
|
1436
|
-
* variable name, string, null terminated
|
1437
|
-
* variable value, string, null terminated
|
1438
|
-
* variable sourcefile, string, null terminated (empty if none)
|
1439
|
-
* variable sourceline, integer
|
1440
|
-
* variable source, integer
|
1441
|
-
* variable scontext, integer
|
1442
|
-
* variable srole, OID
|
1443
|
-
*/
|
1444
|
-
static void
|
1445
|
-
write_one_nondefault_variable(FILE *fp, struct config_generic *gconf)
|
1446
|
-
{
|
1447
|
-
if (gconf->source == PGC_S_DEFAULT)
|
1448
|
-
return;
|
1449
|
-
|
1450
|
-
fprintf(fp, "%s", gconf->name);
|
1451
|
-
fputc(0, fp);
|
1452
|
-
|
1453
|
-
switch (gconf->vartype)
|
1454
|
-
{
|
1455
|
-
case PGC_BOOL:
|
1456
|
-
{
|
1457
|
-
struct config_bool *conf = (struct config_bool *) gconf;
|
1458
|
-
|
1459
|
-
if (*conf->variable)
|
1460
|
-
fprintf(fp, "true");
|
1461
|
-
else
|
1462
|
-
fprintf(fp, "false");
|
1463
|
-
}
|
1464
|
-
break;
|
1465
|
-
|
1466
|
-
case PGC_INT:
|
1467
|
-
{
|
1468
|
-
struct config_int *conf = (struct config_int *) gconf;
|
1469
|
-
|
1470
|
-
fprintf(fp, "%d", *conf->variable);
|
1471
|
-
}
|
1472
|
-
break;
|
1473
|
-
|
1474
|
-
case PGC_REAL:
|
1475
|
-
{
|
1476
|
-
struct config_real *conf = (struct config_real *) gconf;
|
1477
|
-
|
1478
|
-
fprintf(fp, "%.17g", *conf->variable);
|
1479
|
-
}
|
1480
|
-
break;
|
1481
|
-
|
1482
|
-
case PGC_STRING:
|
1483
|
-
{
|
1484
|
-
struct config_string *conf = (struct config_string *) gconf;
|
1485
|
-
|
1486
|
-
fprintf(fp, "%s", *conf->variable);
|
1487
|
-
}
|
1488
|
-
break;
|
1489
|
-
|
1490
|
-
case PGC_ENUM:
|
1491
|
-
{
|
1492
|
-
struct config_enum *conf = (struct config_enum *) gconf;
|
1493
|
-
|
1494
|
-
fprintf(fp, "%s",
|
1495
|
-
config_enum_lookup_by_value(conf, *conf->variable));
|
1496
|
-
}
|
1497
|
-
break;
|
1498
|
-
}
|
1499
|
-
|
1500
|
-
fputc(0, fp);
|
1501
|
-
|
1502
|
-
if (gconf->sourcefile)
|
1503
|
-
fprintf(fp, "%s", gconf->sourcefile);
|
1504
|
-
fputc(0, fp);
|
1505
|
-
|
1506
|
-
fwrite(&gconf->sourceline, 1, sizeof(gconf->sourceline), fp);
|
1507
|
-
fwrite(&gconf->source, 1, sizeof(gconf->source), fp);
|
1508
|
-
fwrite(&gconf->scontext, 1, sizeof(gconf->scontext), fp);
|
1509
|
-
fwrite(&gconf->srole, 1, sizeof(gconf->srole), fp);
|
1510
|
-
}
|
1511
|
-
|
1512
|
-
void
|
1513
|
-
write_nondefault_variables(GucContext context)
|
1514
|
-
{
|
1515
|
-
int elevel;
|
1516
|
-
FILE *fp;
|
1517
|
-
int i;
|
1518
|
-
|
1519
|
-
Assert(context == PGC_POSTMASTER || context == PGC_SIGHUP);
|
1520
|
-
|
1521
|
-
elevel = (context == PGC_SIGHUP) ? LOG : ERROR;
|
1522
|
-
|
1523
|
-
/*
|
1524
|
-
* Open file
|
1525
|
-
*/
|
1526
|
-
fp = AllocateFile(CONFIG_EXEC_PARAMS_NEW, "w");
|
1527
|
-
if (!fp)
|
1528
|
-
{
|
1529
|
-
ereport(elevel,
|
1530
|
-
(errcode_for_file_access(),
|
1531
|
-
errmsg("could not write to file \"%s\": %m",
|
1532
|
-
CONFIG_EXEC_PARAMS_NEW)));
|
1533
|
-
return;
|
1534
|
-
}
|
1535
|
-
|
1536
|
-
for (i = 0; i < num_guc_variables; i++)
|
1537
|
-
{
|
1538
|
-
write_one_nondefault_variable(fp, guc_variables[i]);
|
1539
|
-
}
|
1540
|
-
|
1541
|
-
if (FreeFile(fp))
|
1542
|
-
{
|
1543
|
-
ereport(elevel,
|
1544
|
-
(errcode_for_file_access(),
|
1545
|
-
errmsg("could not write to file \"%s\": %m",
|
1546
|
-
CONFIG_EXEC_PARAMS_NEW)));
|
1547
|
-
return;
|
1548
|
-
}
|
1549
|
-
|
1550
|
-
/*
|
1551
|
-
* Put new file in place. This could delay on Win32, but we don't hold
|
1552
|
-
* any exclusive locks.
|
1553
|
-
*/
|
1554
|
-
rename(CONFIG_EXEC_PARAMS_NEW, CONFIG_EXEC_PARAMS);
|
1555
|
-
}
|
1556
|
-
|
1557
|
-
|
1558
|
-
/*
|
1559
|
-
* Read string, including null byte from file
|
1560
|
-
*
|
1561
|
-
* Return NULL on EOF and nothing read
|
1562
|
-
*/
|
1563
|
-
static char *
|
1564
|
-
read_string_with_null(FILE *fp)
|
1565
|
-
{
|
1566
|
-
int i = 0,
|
1567
|
-
ch,
|
1568
|
-
maxlen = 256;
|
1569
|
-
char *str = NULL;
|
1570
|
-
|
1571
|
-
do
|
1572
|
-
{
|
1573
|
-
if ((ch = fgetc(fp)) == EOF)
|
1574
|
-
{
|
1575
|
-
if (i == 0)
|
1576
|
-
return NULL;
|
1577
|
-
else
|
1578
|
-
elog(FATAL, "invalid format of exec config params file");
|
1579
|
-
}
|
1580
|
-
if (i == 0)
|
1581
|
-
str = guc_malloc(FATAL, maxlen);
|
1582
|
-
else if (i == maxlen)
|
1583
|
-
str = guc_realloc(FATAL, str, maxlen *= 2);
|
1584
|
-
str[i++] = ch;
|
1585
|
-
} while (ch != 0);
|
1586
|
-
|
1587
|
-
return str;
|
1588
|
-
}
|
1589
|
-
|
1590
|
-
|
1591
|
-
/*
|
1592
|
-
* This routine loads a previous postmaster dump of its non-default
|
1593
|
-
* settings.
|
1594
|
-
*/
|
1595
|
-
void
|
1596
|
-
read_nondefault_variables(void)
|
1597
|
-
{
|
1598
|
-
FILE *fp;
|
1599
|
-
char *varname,
|
1600
|
-
*varvalue,
|
1601
|
-
*varsourcefile;
|
1602
|
-
int varsourceline;
|
1603
|
-
GucSource varsource;
|
1604
|
-
GucContext varscontext;
|
1605
|
-
Oid varsrole;
|
1606
|
-
|
1607
|
-
/*
|
1608
|
-
* Open file
|
1609
|
-
*/
|
1610
|
-
fp = AllocateFile(CONFIG_EXEC_PARAMS, "r");
|
1611
|
-
if (!fp)
|
1612
|
-
{
|
1613
|
-
/* File not found is fine */
|
1614
|
-
if (errno != ENOENT)
|
1615
|
-
ereport(FATAL,
|
1616
|
-
(errcode_for_file_access(),
|
1617
|
-
errmsg("could not read from file \"%s\": %m",
|
1618
|
-
CONFIG_EXEC_PARAMS)));
|
1619
|
-
return;
|
1620
|
-
}
|
1621
|
-
|
1622
|
-
for (;;)
|
1623
|
-
{
|
1624
|
-
struct config_generic *record;
|
1625
|
-
|
1626
|
-
if ((varname = read_string_with_null(fp)) == NULL)
|
1627
|
-
break;
|
1628
|
-
|
1629
|
-
if ((record = find_option(varname, true, false, FATAL)) == NULL)
|
1630
|
-
elog(FATAL, "failed to locate variable \"%s\" in exec config params file", varname);
|
1631
|
-
|
1632
|
-
if ((varvalue = read_string_with_null(fp)) == NULL)
|
1633
|
-
elog(FATAL, "invalid format of exec config params file");
|
1634
|
-
if ((varsourcefile = read_string_with_null(fp)) == NULL)
|
1635
|
-
elog(FATAL, "invalid format of exec config params file");
|
1636
|
-
if (fread(&varsourceline, 1, sizeof(varsourceline), fp) != sizeof(varsourceline))
|
1637
|
-
elog(FATAL, "invalid format of exec config params file");
|
1638
|
-
if (fread(&varsource, 1, sizeof(varsource), fp) != sizeof(varsource))
|
1639
|
-
elog(FATAL, "invalid format of exec config params file");
|
1640
|
-
if (fread(&varscontext, 1, sizeof(varscontext), fp) != sizeof(varscontext))
|
1641
|
-
elog(FATAL, "invalid format of exec config params file");
|
1642
|
-
if (fread(&varsrole, 1, sizeof(varsrole), fp) != sizeof(varsrole))
|
1643
|
-
elog(FATAL, "invalid format of exec config params file");
|
1644
|
-
|
1645
|
-
(void) set_config_option_ext(varname, varvalue,
|
1646
|
-
varscontext, varsource, varsrole,
|
1647
|
-
GUC_ACTION_SET, true, 0, true);
|
1648
|
-
if (varsourcefile[0])
|
1649
|
-
set_config_sourcefile(varname, varsourcefile, varsourceline);
|
1650
|
-
|
1651
|
-
free(varname);
|
1652
|
-
free(varvalue);
|
1653
|
-
free(varsourcefile);
|
1654
|
-
}
|
1655
|
-
|
1656
|
-
FreeFile(fp);
|
1657
|
-
}
|
1658
|
-
#endif /* EXEC_BACKEND */
|
1659
|
-
|
1660
|
-
/*
|
1661
|
-
* can_skip_gucvar:
|
1662
|
-
* Decide whether SerializeGUCState can skip sending this GUC variable,
|
1663
|
-
* or whether RestoreGUCState can skip resetting this GUC to default.
|
1664
|
-
*
|
1665
|
-
* It is somewhat magical and fragile that the same test works for both cases.
|
1666
|
-
* Realize in particular that we are very likely selecting different sets of
|
1667
|
-
* GUCs on the leader and worker sides! Be sure you've understood the
|
1668
|
-
* comments here and in RestoreGUCState thoroughly before changing this.
|
1669
|
-
*/
|
1670
|
-
|
1671
|
-
|
1672
|
-
/*
|
1673
|
-
* estimate_variable_size:
|
1674
|
-
* Compute space needed for dumping the given GUC variable.
|
1675
|
-
*
|
1676
|
-
* It's OK to overestimate, but not to underestimate.
|
1677
|
-
*/
|
1678
|
-
|
1679
|
-
|
1680
|
-
/*
|
1681
|
-
* EstimateGUCStateSpace:
|
1682
|
-
* Returns the size needed to store the GUC state for the current process
|
1683
|
-
*/
|
1684
|
-
|
1685
|
-
|
1686
|
-
/*
|
1687
|
-
* do_serialize:
|
1688
|
-
* Copies the formatted string into the destination. Moves ahead the
|
1689
|
-
* destination pointer, and decrements the maxbytes by that many bytes. If
|
1690
|
-
* maxbytes is not sufficient to copy the string, error out.
|
1691
|
-
*/
|
1692
|
-
|
1693
|
-
|
1694
|
-
/* Binary copy version of do_serialize() */
|
1695
|
-
|
1696
|
-
|
1697
|
-
/*
|
1698
|
-
* serialize_variable:
|
1699
|
-
* Dumps name, value and other information of a GUC variable into destptr.
|
1700
|
-
*/
|
1701
|
-
|
1702
|
-
|
1703
|
-
/*
|
1704
|
-
* SerializeGUCState:
|
1705
|
-
* Dumps the complete GUC state onto the memory location at start_address.
|
1706
|
-
*/
|
1707
|
-
|
1708
|
-
|
1709
|
-
/*
|
1710
|
-
* read_gucstate:
|
1711
|
-
* Actually it does not read anything, just returns the srcptr. But it does
|
1712
|
-
* move the srcptr past the terminating zero byte, so that the caller is ready
|
1713
|
-
* to read the next string.
|
1714
|
-
*/
|
1715
|
-
|
1716
|
-
|
1717
|
-
/* Binary read version of read_gucstate(). Copies into dest */
|
1718
|
-
|
1719
|
-
|
1720
|
-
/*
|
1721
|
-
* Callback used to add a context message when reporting errors that occur
|
1722
|
-
* while trying to restore GUCs in parallel workers.
|
1723
|
-
*/
|
1724
|
-
|
1725
|
-
|
1726
|
-
/*
|
1727
|
-
* RestoreGUCState:
|
1728
|
-
* Reads the GUC state at the specified address and sets this process's
|
1729
|
-
* GUCs to match.
|
1730
|
-
*
|
1731
|
-
* Note that this provides the worker with only a very shallow view of the
|
1732
|
-
* leader's GUC state: we'll know about the currently active values, but not
|
1733
|
-
* about stacked or reset values. That's fine since the worker is just
|
1734
|
-
* executing one part of a query, within which the active values won't change
|
1735
|
-
* and the stacked values are invisible.
|
1736
|
-
*/
|
1737
|
-
|
1738
|
-
|
1739
|
-
/*
|
1740
|
-
* A little "long argument" simulation, although not quite GNU
|
1741
|
-
* compliant. Takes a string of the form "some-option=some value" and
|
1742
|
-
* returns name = "some_option" and value = "some value" in malloc'ed
|
1743
|
-
* storage. Note that '-' is converted to '_' in the option name. If
|
1744
|
-
* there is no '=' in the input string then value will be NULL.
|
1745
|
-
*/
|
1746
|
-
|
1747
|
-
|
1748
|
-
|
1749
|
-
/*
|
1750
|
-
* Handle options fetched from pg_db_role_setting.setconfig,
|
1751
|
-
* pg_proc.proconfig, etc. Caller must specify proper context/source/action.
|
1752
|
-
*
|
1753
|
-
* The array parameter must be an array of TEXT (it must not be NULL).
|
1754
|
-
*/
|
1755
|
-
|
1756
|
-
|
1757
|
-
|
1758
|
-
/*
|
1759
|
-
* Add an entry to an option array. The array parameter may be NULL
|
1760
|
-
* to indicate the current table entry is NULL.
|
1761
|
-
*/
|
1762
|
-
|
1763
|
-
|
1764
|
-
|
1765
|
-
/*
|
1766
|
-
* Delete an entry from an option array. The array parameter may be NULL
|
1767
|
-
* to indicate the current table entry is NULL. Also, if the return value
|
1768
|
-
* is NULL then a null should be stored.
|
1769
|
-
*/
|
1770
|
-
|
1771
|
-
|
1772
|
-
|
1773
|
-
/*
|
1774
|
-
* Given a GUC array, delete all settings from it that our permission
|
1775
|
-
* level allows: if superuser, delete them all; if regular user, only
|
1776
|
-
* those that are PGC_USERSET or we have permission to set
|
1777
|
-
*/
|
1778
|
-
|
1779
|
-
|
1780
|
-
/*
|
1781
|
-
* Validate a proposed option setting for GUCArrayAdd/Delete/Reset.
|
1782
|
-
*
|
1783
|
-
* name is the option name. value is the proposed value for the Add case,
|
1784
|
-
* or NULL for the Delete/Reset cases. If skipIfNoPermissions is true, it's
|
1785
|
-
* not an error to have no permissions to set the option.
|
1786
|
-
*
|
1787
|
-
* Returns true if OK, false if skipIfNoPermissions is true and user does not
|
1788
|
-
* have permission to change this option (all other error cases result in an
|
1789
|
-
* error being thrown).
|
1790
|
-
*/
|
1791
|
-
|
1792
|
-
|
1793
|
-
|
1794
|
-
/*
|
1795
|
-
* Called by check_hooks that want to override the normal
|
1796
|
-
* ERRCODE_INVALID_PARAMETER_VALUE SQLSTATE for check hook failures.
|
1797
|
-
*
|
1798
|
-
* Note that GUC_check_errmsg() etc are just macros that result in a direct
|
1799
|
-
* assignment to the associated variables. That is ugly, but forced by the
|
1800
|
-
* limitations of C's macro mechanisms.
|
1801
|
-
*/
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1805
|
-
/*
|
1806
|
-
* Convenience functions to manage calling a variable's check_hook.
|
1807
|
-
* These mostly take care of the protocol for letting check hooks supply
|
1808
|
-
* portions of the error report on failure.
|
1809
|
-
*/
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
/*
|
1823
|
-
* check_hook, assign_hook and show_hook subroutines
|
1824
|
-
*/
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
#ifdef HAVE_SYSLOG
|
1831
|
-
#endif
|
1832
|
-
#ifdef WIN32
|
1833
|
-
#endif
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
#ifdef HAVE_SYSLOG
|
1838
|
-
#endif
|
1839
|
-
|
1840
|
-
#ifdef HAVE_SYSLOG
|
1841
|
-
#endif
|
1842
|
-
|
1843
|
-
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1848
|
-
#ifndef USE_BONJOUR
|
1849
|
-
#endif
|
1850
|
-
|
1851
|
-
#ifndef USE_SSL
|
1852
|
-
#endif
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1859
|
-
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1863
|
-
|
1864
|
-
/*
|
1865
|
-
* pg_timezone_abbrev_initialize --- set default value if not done already
|
1866
|
-
*
|
1867
|
-
* This is called after initial loading of postgresql.conf. If no
|
1868
|
-
* timezone_abbreviations setting was found therein, select default.
|
1869
|
-
* If a non-default value is already installed, nothing will happen.
|
1870
|
-
*
|
1871
|
-
* This can also be called from ProcessConfigFile to establish the default
|
1872
|
-
* value after a postgresql.conf entry for it is removed.
|
1873
|
-
*/
|
1874
|
-
|
1875
|
-
|
1876
|
-
|
1877
|
-
|
1878
|
-
|
1879
|
-
|
1880
|
-
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1903
|
-
|
1904
|
-
#ifndef USE_PREFETCH
|
1905
|
-
#endif /* USE_PREFETCH */
|
1906
|
-
|
1907
|
-
#ifndef USE_PREFETCH
|
1908
|
-
#endif /* USE_PREFETCH */
|
1909
|
-
|
1910
|
-
#if !(defined(MAP_HUGE_MASK) && defined(MAP_HUGE_SHIFT))
|
1911
|
-
#endif
|
1912
|
-
|
1913
|
-
|
1914
|
-
|
1915
|
-
#ifdef USE_PREFETCH
|
1916
|
-
#endif
|
1917
|
-
|
1918
|
-
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1926
|
-
|
1927
|
-
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
1932
|
-
/*
|
1933
|
-
* We split the input string, where commas separate function names
|
1934
|
-
* and certain whitespace chars are ignored, into a \0-separated (and
|
1935
|
-
* \0\0-terminated) list of function names. This formulation allows
|
1936
|
-
* easy scanning when an error is thrown while avoiding the use of
|
1937
|
-
* non-reentrant strtok(), as well as keeping the output data in a
|
1938
|
-
* single palloc() chunk.
|
1939
|
-
*/
|
1940
|
-
|
1941
|
-
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
/*
|
1949
|
-
* Recovery target settings: Only one of the several recovery_target* settings
|
1950
|
-
* may be set. Setting a second one results in an error. The global variable
|
1951
|
-
* recoveryTarget tracks which kind of recovery target was chosen. Other
|
1952
|
-
* variables store the actual target value (for example a string or a xid).
|
1953
|
-
* The assign functions of the parameters check whether a competing parameter
|
1954
|
-
* was already set. But we want to allow setting the same parameter multiple
|
1955
|
-
* times. We also want to allow unsetting a parameter and setting a different
|
1956
|
-
* one, so we unset recoveryTarget when the parameter is set to an empty
|
1957
|
-
* string.
|
1958
|
-
*/
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
1963
|
-
|
1964
|
-
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
1968
|
-
|
1969
|
-
|
1970
|
-
/*
|
1971
|
-
* The interpretation of the recovery_target_time string can depend on the
|
1972
|
-
* time zone setting, so we need to wait until after all GUC processing is
|
1973
|
-
* done before we can do the final parsing of the string. This check function
|
1974
|
-
* only does a parsing pass to catch syntax errors, but we store the string
|
1975
|
-
* and parse it again when we need to use it.
|
1976
|
-
*/
|
1977
|
-
|
1978
|
-
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
1982
|
-
|
1983
|
-
|
1984
|
-
|
1985
|
-
|
1986
|
-
|
1987
|
-
|
1988
|
-
|
1989
|
-
|
1990
|
-
|
1991
|
-
|
1992
|
-
|
1993
|
-
#include "guc-file.c"
|