aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/postgresql/src
diff options
context:
space:
mode:
authormonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
committermonster <monster@ydb.tech>2022-07-07 14:41:37 +0300
commit06e5c21a835c0e923506c4ff27929f34e00761c2 (patch)
tree75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /contrib/libs/postgresql/src
parent03f024c4412e3aa613bb543cf1660176320ba8f4 (diff)
downloadydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz
fix ya.make
Diffstat (limited to 'contrib/libs/postgresql/src')
-rw-r--r--contrib/libs/postgresql/src/DEVELOPERS3
-rw-r--r--contrib/libs/postgresql/src/include/c.h1359
-rw-r--r--contrib/libs/postgresql/src/include/catalog/binary_upgrade.h31
-rw-r--r--contrib/libs/postgresql/src/include/catalog/catalog.h42
-rw-r--r--contrib/libs/postgresql/src/include/catalog/catversion.h58
-rw-r--r--contrib/libs/postgresql/src/include/catalog/dependency.h273
-rw-r--r--contrib/libs/postgresql/src/include/catalog/genbki.h130
-rw-r--r--contrib/libs/postgresql/src/include/catalog/heap.h164
-rw-r--r--contrib/libs/postgresql/src/include/catalog/index.h214
-rw-r--r--contrib/libs/postgresql/src/include/catalog/indexing.h54
-rw-r--r--contrib/libs/postgresql/src/include/catalog/namespace.h190
-rw-r--r--contrib/libs/postgresql/src/include/catalog/objectaccess.h197
-rw-r--r--contrib/libs/postgresql/src/include/catalog/objectaddress.h89
-rw-r--r--contrib/libs/postgresql/src/include/catalog/partition.h34
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_aggregate.h181
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_aggregate_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_am.dat37
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_am.h65
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_am_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_amop.h105
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_amop_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_amproc.h75
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_amproc_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_attrdef.h59
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_attrdef_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_attribute.h223
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_attribute_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_auth_members.h50
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_auth_members_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_authid.dat83
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_authid.h67
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_authid_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_cast.h104
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_cast_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_class.dat28
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_class.h207
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_class_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_collation.dat28
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_collation.h84
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_collation_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_constraint.h269
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_constraint_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_control.h252
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_conversion.dat405
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_conversion.h78
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_conversion_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_database.dat22
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_database.h92
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_database_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_db_role_setting.h64
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_db_role_setting_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_default_acl.h74
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_default_acl_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_depend.h80
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_depend_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_description.h74
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_description_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_enum.h69
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_enum_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_event_trigger.h59
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_event_trigger_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_extension.h61
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_extension_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_foreign_data_wrapper.h60
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_foreign_data_wrapper_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_foreign_server.h57
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_foreign_server_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_foreign_table.h50
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_foreign_table_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_index.h91
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_index_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_inherits.h68
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_inherits_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_init_privs.h84
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_init_privs_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_language.dat25
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_language.h74
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_language_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_largeobject.h54
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_largeobject_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_largeobject_metadata.h52
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_largeobject_metadata_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_namespace.dat25
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_namespace.h66
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_namespace_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_opclass.h90
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_opclass_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_operator.h109
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_operator_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_opfamily.dat308
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_opfamily.h65
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_opfamily_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_partitioned_table.h75
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_partitioned_table_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_policy.h60
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_policy_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_proc.h222
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_proc_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_publication.h123
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_publication_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_publication_rel.h48
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_publication_rel_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_range.dat34
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_range.h76
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_range_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_replication_origin.h66
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_replication_origin_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_rewrite.h61
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_rewrite_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_seclabel.h46
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_seclabel_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_sequence.h45
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_sequence_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_shdepend.h80
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_shdepend_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_shdescription.h68
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_shdescription_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_shseclabel.h49
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_shseclabel_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_statistic.h283
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_statistic_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_statistic_ext.h91
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_statistic_ext_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_statistic_ext_data.h59
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_statistic_ext_data_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_subscription.h110
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_subscription_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_subscription_rel.h94
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_subscription_rel_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_tablespace.dat20
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_tablespace.h59
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_tablespace_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_transform.h50
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_transform_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_trigger.h156
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_trigger_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_ts_config.dat18
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_ts_config.h55
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_ts_config_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_ts_config_map.dat54
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_ts_config_map.h50
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_ts_config_map_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_ts_dict.dat19
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_ts_dict.h61
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_ts_dict_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_ts_parser.dat20
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_ts_parser.h62
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_ts_parser_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_ts_template.dat30
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_ts_template.h53
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_ts_template_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_type.h405
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_type_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_user_mapping.h57
-rw-r--r--contrib/libs/postgresql/src/include/catalog/pg_user_mapping_d.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/schemapg.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/storage.h48
-rw-r--r--contrib/libs/postgresql/src/include/catalog/storage_xlog.h59
-rw-r--r--contrib/libs/postgresql/src/include/catalog/system_fk_info.h1
-rw-r--r--contrib/libs/postgresql/src/include/catalog/toasting.h30
-rw-r--r--contrib/libs/postgresql/src/include/fmgr.h777
-rw-r--r--contrib/libs/postgresql/src/include/funcapi.h348
-rw-r--r--contrib/libs/postgresql/src/include/getaddrinfo.h162
-rw-r--r--contrib/libs/postgresql/src/include/miscadmin.h492
-rw-r--r--contrib/libs/postgresql/src/include/pg_config-linux.h1020
-rw-r--r--contrib/libs/postgresql/src/include/pg_config-osx.h37
-rw-r--r--contrib/libs/postgresql/src/include/pg_config-win.h178
-rw-r--r--contrib/libs/postgresql/src/include/pg_config.h9
-rw-r--r--contrib/libs/postgresql/src/include/pg_config_ext.h8
-rw-r--r--contrib/libs/postgresql/src/include/pg_config_manual.h404
-rw-r--r--contrib/libs/postgresql/src/include/pg_config_os-linux.h1
-rw-r--r--contrib/libs/postgresql/src/include/pg_config_os-osx.h1
-rw-r--r--contrib/libs/postgresql/src/include/pg_config_os-win.h1
-rw-r--r--contrib/libs/postgresql/src/include/pg_config_os.h9
-rw-r--r--contrib/libs/postgresql/src/include/pg_getopt.h56
-rw-r--r--contrib/libs/postgresql/src/include/pg_trace.h17
-rw-r--r--contrib/libs/postgresql/src/include/pgstat.h1110
-rw-r--r--contrib/libs/postgresql/src/include/pgtar.h45
-rw-r--r--contrib/libs/postgresql/src/include/pgtime.h84
-rw-r--r--contrib/libs/postgresql/src/include/port.h555
-rw-r--r--contrib/libs/postgresql/src/include/postgres.h808
-rw-r--r--contrib/libs/postgresql/src/include/postgres_ext.h74
-rw-r--r--contrib/libs/postgresql/src/include/postgres_fe.h29
-rw-r--r--contrib/libs/postgresql/src/include/rusagestub.h34
-rw-r--r--contrib/libs/postgresql/src/include/windowapi.h64
185 files changed, 0 insertions, 16494 deletions
diff --git a/contrib/libs/postgresql/src/DEVELOPERS b/contrib/libs/postgresql/src/DEVELOPERS
deleted file mode 100644
index 103c94cd39c..00000000000
--- a/contrib/libs/postgresql/src/DEVELOPERS
+++ /dev/null
@@ -1,3 +0,0 @@
-Read the development information in the wiki at
-<http://wiki.postgresql.org/wiki/Development_information>. All the
-developer tools are located in the src/tools/ directory.
diff --git a/contrib/libs/postgresql/src/include/c.h b/contrib/libs/postgresql/src/include/c.h
deleted file mode 100644
index 1bb3fc67700..00000000000
--- a/contrib/libs/postgresql/src/include/c.h
+++ /dev/null
@@ -1,1359 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * c.h
- * Fundamental C definitions. This is included by every .c file in
- * PostgreSQL (via either postgres.h or postgres_fe.h, as appropriate).
- *
- * Note that the definitions here are not intended to be exposed to clients
- * of the frontend interface libraries --- so we don't worry much about
- * polluting the namespace with lots of stuff...
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/c.h
- *
- *-------------------------------------------------------------------------
- */
-/*
- *----------------------------------------------------------------
- * TABLE OF CONTENTS
- *
- * When adding stuff to this file, please try to put stuff
- * into the relevant section, or add new sections as appropriate.
- *
- * section description
- * ------- ------------------------------------------------
- * 0) pg_config.h and standard system headers
- * 1) compiler characteristics
- * 2) bool, true, false
- * 3) standard system types
- * 4) IsValid macros for system types
- * 5) offsetof, lengthof, alignment
- * 6) assertions
- * 7) widely useful macros
- * 8) random stuff
- * 9) system-specific hacks
- *
- * NOTE: since this file is included by both frontend and backend modules,
- * it's usually wrong to put an "extern" declaration here, unless it's
- * ifdef'd so that it's seen in only one case or the other.
- * typedefs and macros are the kind of thing that might go here.
- *
- *----------------------------------------------------------------
- */
-#ifndef C_H
-#define C_H
-
-#include "postgres_ext.h"
-
-/* Must undef pg_config_ext.h symbols before including pg_config.h */
-#undef PG_INT64_TYPE
-
-#include "pg_config.h"
-#include "pg_config_manual.h" /* must be after pg_config.h */
-#include "pg_config_os.h" /* must be before any system header files */
-
-/* System header files that should be available everywhere in Postgres */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stddef.h>
-#include <stdarg.h>
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#include <stdint.h>
-#include <sys/types.h>
-#include <errno.h>
-#if defined(WIN32) || defined(__CYGWIN__)
-#include <fcntl.h> /* ensure O_BINARY is available */
-#endif
-#include <locale.h>
-#ifdef ENABLE_NLS
-#include <libintl.h>
-#endif
-
-
-/* ----------------------------------------------------------------
- * Section 1: compiler characteristics
- *
- * type prefixes (const, signed, volatile, inline) are handled in pg_config.h.
- * ----------------------------------------------------------------
- */
-
-/*
- * Disable "inline" if PG_FORCE_DISABLE_INLINE is defined.
- * This is used to work around compiler bugs and might also be useful for
- * investigatory purposes.
- */
-#ifdef PG_FORCE_DISABLE_INLINE
-#undef inline
-#define inline
-#endif
-
-/*
- * Attribute macros
- *
- * GCC: https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
- * GCC: https://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html
- * Clang: https://clang.llvm.org/docs/AttributeReference.html
- * Sunpro: https://docs.oracle.com/cd/E18659_01/html/821-1384/gjzke.html
- * XLC: https://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.2/com.ibm.xlc131.aix.doc/language_ref/function_attributes.html
- * XLC: https://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.2/com.ibm.xlc131.aix.doc/language_ref/type_attrib.html
- */
-
-/*
- * For compilers which don't support __has_attribute, we just define
- * __has_attribute(x) to 0 so that we can define macros for various
- * __attribute__s more easily below.
- */
-#ifndef __has_attribute
-#define __has_attribute(attribute) 0
-#endif
-
-/* only GCC supports the unused attribute */
-#ifdef __GNUC__
-#define pg_attribute_unused() __attribute__((unused))
-#else
-#define pg_attribute_unused()
-#endif
-
-/*
- * pg_nodiscard means the compiler should warn if the result of a function
- * call is ignored. The name "nodiscard" is chosen in alignment with
- * (possibly future) C and C++ standards. For maximum compatibility, use it
- * as a function declaration specifier, so it goes before the return type.
- */
-#ifdef __GNUC__
-#define pg_nodiscard __attribute__((warn_unused_result))
-#else
-#define pg_nodiscard
-#endif
-
-/*
- * Place this macro before functions that should be allowed to make misaligned
- * accesses. Think twice before using it on non-x86-specific code!
- * Testing can be done with "-fsanitize=alignment -fsanitize-trap=alignment"
- * on clang, or "-fsanitize=alignment -fno-sanitize-recover=alignment" on gcc.
- */
-#if __clang_major__ >= 7 || __GNUC__ >= 8
-#define pg_attribute_no_sanitize_alignment() __attribute__((no_sanitize("alignment")))
-#else
-#define pg_attribute_no_sanitize_alignment()
-#endif
-
-/*
- * Append PG_USED_FOR_ASSERTS_ONLY to definitions of variables that are only
- * used in assert-enabled builds, to avoid compiler warnings about unused
- * variables in assert-disabled builds.
- */
-#ifdef USE_ASSERT_CHECKING
-#define PG_USED_FOR_ASSERTS_ONLY
-#else
-#define PG_USED_FOR_ASSERTS_ONLY pg_attribute_unused()
-#endif
-
-/* GCC and XLC support format attributes */
-#if defined(__GNUC__) || defined(__IBMC__)
-#define pg_attribute_format_arg(a) __attribute__((format_arg(a)))
-#define pg_attribute_printf(f,a) __attribute__((format(PG_PRINTF_ATTRIBUTE, f, a)))
-#else
-#define pg_attribute_format_arg(a)
-#define pg_attribute_printf(f,a)
-#endif
-
-/* GCC, Sunpro and XLC support aligned, packed and noreturn */
-#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
-#define pg_attribute_aligned(a) __attribute__((aligned(a)))
-#define pg_attribute_noreturn() __attribute__((noreturn))
-#define pg_attribute_packed() __attribute__((packed))
-#define HAVE_PG_ATTRIBUTE_NORETURN 1
-#else
-/*
- * NB: aligned and packed are not given default definitions because they
- * affect code functionality; they *must* be implemented by the compiler
- * if they are to be used.
- */
-#define pg_attribute_noreturn()
-#endif
-
-/*
- * Use "pg_attribute_always_inline" in place of "inline" for functions that
- * we wish to force inlining of, even when the compiler's heuristics would
- * choose not to. But, if possible, don't force inlining in unoptimized
- * debug builds.
- */
-#if (defined(__GNUC__) && __GNUC__ > 3 && defined(__OPTIMIZE__)) || defined(__SUNPRO_C) || defined(__IBMC__)
-/* GCC > 3, Sunpro and XLC support always_inline via __attribute__ */
-#define pg_attribute_always_inline __attribute__((always_inline)) inline
-#elif defined(_MSC_VER)
-/* MSVC has a special keyword for this */
-#define pg_attribute_always_inline __forceinline
-#else
-/* Otherwise, the best we can do is to say "inline" */
-#define pg_attribute_always_inline inline
-#endif
-
-/*
- * Forcing a function not to be inlined can be useful if it's the slow path of
- * a performance-critical function, or should be visible in profiles to allow
- * for proper cost attribution. Note that unlike the pg_attribute_XXX macros
- * above, this should be placed before the function's return type and name.
- */
-/* GCC, Sunpro and XLC support noinline via __attribute__ */
-#if (defined(__GNUC__) && __GNUC__ > 2) || defined(__SUNPRO_C) || defined(__IBMC__)
-#define pg_noinline __attribute__((noinline))
-/* msvc via declspec */
-#elif defined(_MSC_VER)
-#define pg_noinline __declspec(noinline)
-#else
-#define pg_noinline
-#endif
-
-/*
- * For now, just define pg_attribute_cold and pg_attribute_hot to be empty
- * macros on minGW 8.1. There appears to be a compiler bug that results in
- * compilation failure. At this time, we still have at least one buildfarm
- * animal running that compiler, so this should make that green again. It's
- * likely this compiler is not popular enough to warrant keeping this code
- * around forever, so let's just remove it once the last buildfarm animal
- * upgrades.
- */
-#if defined(__MINGW64__) && __GNUC__ == 8 && __GNUC_MINOR__ == 1
-
-#define pg_attribute_cold
-#define pg_attribute_hot
-
-#else
-/*
- * Marking certain functions as "hot" or "cold" can be useful to assist the
- * compiler in arranging the assembly code in a more efficient way.
- */
-#if __has_attribute (cold)
-#define pg_attribute_cold __attribute__((cold))
-#else
-#define pg_attribute_cold
-#endif
-
-#if __has_attribute (hot)
-#define pg_attribute_hot __attribute__((hot))
-#else
-#define pg_attribute_hot
-#endif
-
-#endif /* defined(__MINGW64__) && __GNUC__ == 8 &&
- * __GNUC_MINOR__ == 1 */
-/*
- * Mark a point as unreachable in a portable fashion. This should preferably
- * be something that the compiler understands, to aid code generation.
- * In assert-enabled builds, we prefer abort() for debugging reasons.
- */
-#if defined(HAVE__BUILTIN_UNREACHABLE) && !defined(USE_ASSERT_CHECKING)
-#define pg_unreachable() __builtin_unreachable()
-#elif defined(_MSC_VER) && !defined(USE_ASSERT_CHECKING)
-#define pg_unreachable() __assume(0)
-#else
-#define pg_unreachable() abort()
-#endif
-
-/*
- * Hints to the compiler about the likelihood of a branch. Both likely() and
- * unlikely() return the boolean value of the contained expression.
- *
- * These should only be used sparingly, in very hot code paths. It's very easy
- * to mis-estimate likelihoods.
- */
-#if __GNUC__ >= 3
-#define likely(x) __builtin_expect((x) != 0, 1)
-#define unlikely(x) __builtin_expect((x) != 0, 0)
-#else
-#define likely(x) ((x) != 0)
-#define unlikely(x) ((x) != 0)
-#endif
-
-/*
- * CppAsString
- * Convert the argument to a string, using the C preprocessor.
- * CppAsString2
- * Convert the argument to a string, after one round of macro expansion.
- * CppConcat
- * Concatenate two arguments together, using the C preprocessor.
- *
- * Note: There used to be support here for pre-ANSI C compilers that didn't
- * support # and ##. Nowadays, these macros are just for clarity and/or
- * backward compatibility with existing PostgreSQL code.
- */
-#define CppAsString(identifier) #identifier
-#define CppAsString2(x) CppAsString(x)
-#define CppConcat(x, y) x##y
-
-/*
- * VA_ARGS_NARGS
- * Returns the number of macro arguments it is passed.
- *
- * An empty argument still counts as an argument, so effectively, this is
- * "one more than the number of commas in the argument list".
- *
- * This works for up to 63 arguments. Internally, VA_ARGS_NARGS_() is passed
- * 64+N arguments, and the C99 standard only requires macros to allow up to
- * 127 arguments, so we can't portably go higher. The implementation is
- * pretty trivial: VA_ARGS_NARGS_() returns its 64th argument, and we set up
- * the call so that that is the appropriate one of the list of constants.
- * This idea is due to Laurent Deniau.
- */
-#define VA_ARGS_NARGS(...) \
- VA_ARGS_NARGS_(__VA_ARGS__, \
- 63,62,61,60, \
- 59,58,57,56,55,54,53,52,51,50, \
- 49,48,47,46,45,44,43,42,41,40, \
- 39,38,37,36,35,34,33,32,31,30, \
- 29,28,27,26,25,24,23,22,21,20, \
- 19,18,17,16,15,14,13,12,11,10, \
- 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
-#define VA_ARGS_NARGS_( \
- _01,_02,_03,_04,_05,_06,_07,_08,_09,_10, \
- _11,_12,_13,_14,_15,_16,_17,_18,_19,_20, \
- _21,_22,_23,_24,_25,_26,_27,_28,_29,_30, \
- _31,_32,_33,_34,_35,_36,_37,_38,_39,_40, \
- _41,_42,_43,_44,_45,_46,_47,_48,_49,_50, \
- _51,_52,_53,_54,_55,_56,_57,_58,_59,_60, \
- _61,_62,_63, N, ...) \
- (N)
-
-/*
- * dummyret is used to set return values in macros that use ?: to make
- * assignments. gcc wants these to be void, other compilers like char
- */
-#ifdef __GNUC__ /* GNU cc */
-#define dummyret void
-#else
-#define dummyret char
-#endif
-
-/*
- * Generic function pointer. This can be used in the rare cases where it's
- * necessary to cast a function pointer to a seemingly incompatible function
- * pointer type while avoiding gcc's -Wcast-function-type warnings.
- */
-typedef void (*pg_funcptr_t) (void);
-
-/*
- * We require C99, hence the compiler should understand flexible array
- * members. However, for documentation purposes we still consider it to be
- * project style to write "field[FLEXIBLE_ARRAY_MEMBER]" not just "field[]".
- * When computing the size of such an object, use "offsetof(struct s, f)"
- * for portability. Don't use "offsetof(struct s, f[0])", as this doesn't
- * work with MSVC and with C++ compilers.
- */
-#define FLEXIBLE_ARRAY_MEMBER /* empty */
-
-/* Which __func__ symbol do we have, if any? */
-#ifdef HAVE_FUNCNAME__FUNC
-#define PG_FUNCNAME_MACRO __func__
-#else
-#ifdef HAVE_FUNCNAME__FUNCTION
-#define PG_FUNCNAME_MACRO __FUNCTION__
-#else
-#define PG_FUNCNAME_MACRO NULL
-#endif
-#endif
-
-
-/* ----------------------------------------------------------------
- * Section 2: bool, true, false
- * ----------------------------------------------------------------
- */
-
-/*
- * bool
- * Boolean value, either true or false.
- *
- * We use stdbool.h if available and its bool has size 1. That's useful for
- * better compiler and debugger output and for compatibility with third-party
- * libraries. But PostgreSQL currently cannot deal with bool of other sizes;
- * there are static assertions around the code to prevent that.
- *
- * For C++ compilers, we assume the compiler has a compatible built-in
- * definition of bool.
- *
- * See also the version of this code in src/interfaces/ecpg/include/ecpglib.h.
- */
-
-#ifndef __cplusplus
-
-#ifdef PG_USE_STDBOOL
-#include <stdbool.h>
-#else
-
-#ifndef bool
-typedef unsigned char bool;
-#endif
-
-#ifndef true
-#define true ((bool) 1)
-#endif
-
-#ifndef false
-#define false ((bool) 0)
-#endif
-
-#endif /* not PG_USE_STDBOOL */
-#endif /* not C++ */
-
-
-/* ----------------------------------------------------------------
- * Section 3: standard system types
- * ----------------------------------------------------------------
- */
-
-/*
- * Pointer
- * Variable holding address of any memory resident object.
- *
- * XXX Pointer arithmetic is done with this, so it can't be void *
- * under "true" ANSI compilers.
- */
-typedef char *Pointer;
-
-/*
- * intN
- * Signed integer, EXACTLY N BITS IN SIZE,
- * used for numerical computations and the
- * frontend/backend protocol.
- */
-#ifndef HAVE_INT8
-typedef signed char int8; /* == 8 bits */
-typedef signed short int16; /* == 16 bits */
-typedef signed int int32; /* == 32 bits */
-#endif /* not HAVE_INT8 */
-
-/*
- * uintN
- * Unsigned integer, EXACTLY N BITS IN SIZE,
- * used for numerical computations and the
- * frontend/backend protocol.
- */
-#ifndef HAVE_UINT8
-typedef unsigned char uint8; /* == 8 bits */
-typedef unsigned short uint16; /* == 16 bits */
-typedef unsigned int uint32; /* == 32 bits */
-#endif /* not HAVE_UINT8 */
-
-/*
- * bitsN
- * Unit of bitwise operation, AT LEAST N BITS IN SIZE.
- */
-typedef uint8 bits8; /* >= 8 bits */
-typedef uint16 bits16; /* >= 16 bits */
-typedef uint32 bits32; /* >= 32 bits */
-
-/*
- * 64-bit integers
- */
-#ifdef HAVE_LONG_INT_64
-/* Plain "long int" fits, use it */
-
-#ifndef HAVE_INT64
-typedef long int int64;
-#endif
-#ifndef HAVE_UINT64
-typedef unsigned long int uint64;
-#endif
-#define INT64CONST(x) (x##L)
-#define UINT64CONST(x) (x##UL)
-#elif defined(HAVE_LONG_LONG_INT_64)
-/* We have working support for "long long int", use that */
-
-#ifndef HAVE_INT64
-typedef long long int int64;
-#endif
-#ifndef HAVE_UINT64
-typedef unsigned long long int uint64;
-#endif
-#define INT64CONST(x) (x##LL)
-#define UINT64CONST(x) (x##ULL)
-#else
-/* neither HAVE_LONG_INT_64 nor HAVE_LONG_LONG_INT_64 */
-#error must have a working 64-bit integer datatype
-#endif
-
-/* snprintf format strings to use for 64-bit integers */
-#define INT64_FORMAT "%" INT64_MODIFIER "d"
-#define UINT64_FORMAT "%" INT64_MODIFIER "u"
-
-/*
- * 128-bit signed and unsigned integers
- * There currently is only limited support for such types.
- * E.g. 128bit literals and snprintf are not supported; but math is.
- * Also, because we exclude such types when choosing MAXIMUM_ALIGNOF,
- * it must be possible to coerce the compiler to allocate them on no
- * more than MAXALIGN boundaries.
- */
-#if defined(PG_INT128_TYPE)
-#if defined(pg_attribute_aligned) || ALIGNOF_PG_INT128_TYPE <= MAXIMUM_ALIGNOF
-#define HAVE_INT128 1
-
-typedef PG_INT128_TYPE int128
-#if defined(pg_attribute_aligned)
- pg_attribute_aligned(MAXIMUM_ALIGNOF)
-#endif
- ;
-
-typedef unsigned PG_INT128_TYPE uint128
-#if defined(pg_attribute_aligned)
- pg_attribute_aligned(MAXIMUM_ALIGNOF)
-#endif
- ;
-
-#endif
-#endif
-
-/*
- * stdint.h limits aren't guaranteed to have compatible types with our fixed
- * width types. So just define our own.
- */
-#define PG_INT8_MIN (-0x7F-1)
-#define PG_INT8_MAX (0x7F)
-#define PG_UINT8_MAX (0xFF)
-#define PG_INT16_MIN (-0x7FFF-1)
-#define PG_INT16_MAX (0x7FFF)
-#define PG_UINT16_MAX (0xFFFF)
-#define PG_INT32_MIN (-0x7FFFFFFF-1)
-#define PG_INT32_MAX (0x7FFFFFFF)
-#define PG_UINT32_MAX (0xFFFFFFFFU)
-#define PG_INT64_MIN (-INT64CONST(0x7FFFFFFFFFFFFFFF) - 1)
-#define PG_INT64_MAX INT64CONST(0x7FFFFFFFFFFFFFFF)
-#define PG_UINT64_MAX UINT64CONST(0xFFFFFFFFFFFFFFFF)
-
-/*
- * We now always use int64 timestamps, but keep this symbol defined for the
- * benefit of external code that might test it.
- */
-#define HAVE_INT64_TIMESTAMP
-
-/*
- * Size
- * Size of any memory resident object, as returned by sizeof.
- */
-typedef size_t Size;
-
-/*
- * Index
- * Index into any memory resident array.
- *
- * Note:
- * Indices are non negative.
- */
-typedef unsigned int Index;
-
-/*
- * Offset
- * Offset into any memory resident array.
- *
- * Note:
- * This differs from an Index in that an Index is always
- * non negative, whereas Offset may be negative.
- */
-typedef signed int Offset;
-
-/*
- * Common Postgres datatype names (as used in the catalogs)
- */
-typedef float float4;
-typedef double float8;
-
-#ifdef USE_FLOAT8_BYVAL
-#define FLOAT8PASSBYVAL true
-#else
-#define FLOAT8PASSBYVAL false
-#endif
-
-/*
- * Oid, RegProcedure, TransactionId, SubTransactionId, MultiXactId,
- * CommandId
- */
-
-/* typedef Oid is in postgres_ext.h */
-
-/*
- * regproc is the type name used in the include/catalog headers, but
- * RegProcedure is the preferred name in C code.
- */
-typedef Oid regproc;
-typedef regproc RegProcedure;
-
-typedef uint32 TransactionId;
-
-typedef uint32 LocalTransactionId;
-
-typedef uint32 SubTransactionId;
-
-#define InvalidSubTransactionId ((SubTransactionId) 0)
-#define TopSubTransactionId ((SubTransactionId) 1)
-
-/* MultiXactId must be equivalent to TransactionId, to fit in t_xmax */
-typedef TransactionId MultiXactId;
-
-typedef uint32 MultiXactOffset;
-
-typedef uint32 CommandId;
-
-#define FirstCommandId ((CommandId) 0)
-#define InvalidCommandId (~(CommandId)0)
-
-
-/* ----------------
- * Variable-length datatypes all share the 'struct varlena' header.
- *
- * NOTE: for TOASTable types, this is an oversimplification, since the value
- * may be compressed or moved out-of-line. However datatype-specific routines
- * are mostly content to deal with de-TOASTed values only, and of course
- * client-side routines should never see a TOASTed value. But even in a
- * de-TOASTed value, beware of touching vl_len_ directly, as its
- * representation is no longer convenient. It's recommended that code always
- * use macros VARDATA_ANY, VARSIZE_ANY, VARSIZE_ANY_EXHDR, VARDATA, VARSIZE,
- * and SET_VARSIZE instead of relying on direct mentions of the struct fields.
- * See postgres.h for details of the TOASTed form.
- * ----------------
- */
-struct varlena
-{
- char vl_len_[4]; /* Do not touch this field directly! */
- char vl_dat[FLEXIBLE_ARRAY_MEMBER]; /* Data content is here */
-};
-
-#define VARHDRSZ ((int32) sizeof(int32))
-
-/*
- * These widely-used datatypes are just a varlena header and the data bytes.
- * There is no terminating null or anything like that --- the data length is
- * always VARSIZE_ANY_EXHDR(ptr).
- */
-typedef struct varlena bytea;
-typedef struct varlena text;
-typedef struct varlena BpChar; /* blank-padded char, ie SQL char(n) */
-typedef struct varlena VarChar; /* var-length char, ie SQL varchar(n) */
-
-/*
- * Specialized array types. These are physically laid out just the same
- * as regular arrays (so that the regular array subscripting code works
- * with them). They exist as distinct types mostly for historical reasons:
- * they have nonstandard I/O behavior which we don't want to change for fear
- * of breaking applications that look at the system catalogs. There is also
- * an implementation issue for oidvector: it's part of the primary key for
- * pg_proc, and we can't use the normal btree array support routines for that
- * without circularity.
- */
-typedef struct
-{
- int32 vl_len_; /* these fields must match ArrayType! */
- int ndim; /* always 1 for int2vector */
- int32 dataoffset; /* always 0 for int2vector */
- Oid elemtype;
- int dim1;
- int lbound1;
- int16 values[FLEXIBLE_ARRAY_MEMBER];
-} int2vector;
-
-typedef struct
-{
- int32 vl_len_; /* these fields must match ArrayType! */
- int ndim; /* always 1 for oidvector */
- int32 dataoffset; /* always 0 for oidvector */
- Oid elemtype;
- int dim1;
- int lbound1;
- Oid values[FLEXIBLE_ARRAY_MEMBER];
-} oidvector;
-
-/*
- * Representation of a Name: effectively just a C string, but null-padded to
- * exactly NAMEDATALEN bytes. The use of a struct is historical.
- */
-typedef struct nameData
-{
- char data[NAMEDATALEN];
-} NameData;
-typedef NameData *Name;
-
-#define NameStr(name) ((name).data)
-
-
-/* ----------------------------------------------------------------
- * Section 4: IsValid macros for system types
- * ----------------------------------------------------------------
- */
-/*
- * BoolIsValid
- * True iff bool is valid.
- */
-#define BoolIsValid(boolean) ((boolean) == false || (boolean) == true)
-
-/*
- * PointerIsValid
- * True iff pointer is valid.
- */
-#define PointerIsValid(pointer) ((const void*)(pointer) != NULL)
-
-/*
- * PointerIsAligned
- * True iff pointer is properly aligned to point to the given type.
- */
-#define PointerIsAligned(pointer, type) \
- (((uintptr_t)(pointer) % (sizeof (type))) == 0)
-
-#define OffsetToPointer(base, offset) \
- ((void *)((char *) base + offset))
-
-#define OidIsValid(objectId) ((bool) ((objectId) != InvalidOid))
-
-#define RegProcedureIsValid(p) OidIsValid(p)
-
-
-/* ----------------------------------------------------------------
- * Section 5: offsetof, lengthof, alignment
- * ----------------------------------------------------------------
- */
-/*
- * offsetof
- * Offset of a structure/union field within that structure/union.
- *
- * XXX This is supposed to be part of stddef.h, but isn't on
- * some systems (like SunOS 4).
- */
-#ifndef offsetof
-#define offsetof(type, field) ((long) &((type *)0)->field)
-#endif /* offsetof */
-
-/*
- * lengthof
- * Number of elements in an array.
- */
-#define lengthof(array) (sizeof (array) / sizeof ((array)[0]))
-
-/* ----------------
- * Alignment macros: align a length or address appropriately for a given type.
- * The fooALIGN() macros round up to a multiple of the required alignment,
- * while the fooALIGN_DOWN() macros round down. The latter are more useful
- * for problems like "how many X-sized structures will fit in a page?".
- *
- * NOTE: TYPEALIGN[_DOWN] will not work if ALIGNVAL is not a power of 2.
- * That case seems extremely unlikely to be needed in practice, however.
- *
- * NOTE: MAXIMUM_ALIGNOF, and hence MAXALIGN(), intentionally exclude any
- * larger-than-8-byte types the compiler might have.
- * ----------------
- */
-
-#define TYPEALIGN(ALIGNVAL,LEN) \
- (((uintptr_t) (LEN) + ((ALIGNVAL) - 1)) & ~((uintptr_t) ((ALIGNVAL) - 1)))
-
-#define SHORTALIGN(LEN) TYPEALIGN(ALIGNOF_SHORT, (LEN))
-#define INTALIGN(LEN) TYPEALIGN(ALIGNOF_INT, (LEN))
-#define LONGALIGN(LEN) TYPEALIGN(ALIGNOF_LONG, (LEN))
-#define DOUBLEALIGN(LEN) TYPEALIGN(ALIGNOF_DOUBLE, (LEN))
-#define MAXALIGN(LEN) TYPEALIGN(MAXIMUM_ALIGNOF, (LEN))
-/* MAXALIGN covers only built-in types, not buffers */
-#define BUFFERALIGN(LEN) TYPEALIGN(ALIGNOF_BUFFER, (LEN))
-#define CACHELINEALIGN(LEN) TYPEALIGN(PG_CACHE_LINE_SIZE, (LEN))
-
-#define TYPEALIGN_DOWN(ALIGNVAL,LEN) \
- (((uintptr_t) (LEN)) & ~((uintptr_t) ((ALIGNVAL) - 1)))
-
-#define SHORTALIGN_DOWN(LEN) TYPEALIGN_DOWN(ALIGNOF_SHORT, (LEN))
-#define INTALIGN_DOWN(LEN) TYPEALIGN_DOWN(ALIGNOF_INT, (LEN))
-#define LONGALIGN_DOWN(LEN) TYPEALIGN_DOWN(ALIGNOF_LONG, (LEN))
-#define DOUBLEALIGN_DOWN(LEN) TYPEALIGN_DOWN(ALIGNOF_DOUBLE, (LEN))
-#define MAXALIGN_DOWN(LEN) TYPEALIGN_DOWN(MAXIMUM_ALIGNOF, (LEN))
-#define BUFFERALIGN_DOWN(LEN) TYPEALIGN_DOWN(ALIGNOF_BUFFER, (LEN))
-
-/*
- * The above macros will not work with types wider than uintptr_t, like with
- * uint64 on 32-bit platforms. That's not problem for the usual use where a
- * pointer or a length is aligned, but for the odd case that you need to
- * align something (potentially) wider, use TYPEALIGN64.
- */
-#define TYPEALIGN64(ALIGNVAL,LEN) \
- (((uint64) (LEN) + ((ALIGNVAL) - 1)) & ~((uint64) ((ALIGNVAL) - 1)))
-
-/* we don't currently need wider versions of the other ALIGN macros */
-#define MAXALIGN64(LEN) TYPEALIGN64(MAXIMUM_ALIGNOF, (LEN))
-
-
-/* ----------------------------------------------------------------
- * Section 6: assertions
- * ----------------------------------------------------------------
- */
-
-/*
- * USE_ASSERT_CHECKING, if defined, turns on all the assertions.
- * - plai 9/5/90
- *
- * It should _NOT_ be defined in releases or in benchmark copies
- */
-
-/*
- * Assert() can be used in both frontend and backend code. In frontend code it
- * just calls the standard assert, if it's available. If use of assertions is
- * not configured, it does nothing.
- */
-#ifndef USE_ASSERT_CHECKING
-
-#define Assert(condition) ((void)true)
-#define AssertMacro(condition) ((void)true)
-#define AssertArg(condition) ((void)true)
-#define AssertState(condition) ((void)true)
-#define AssertPointerAlignment(ptr, bndr) ((void)true)
-#define Trap(condition, errorType) ((void)true)
-#define TrapMacro(condition, errorType) (true)
-
-#elif defined(FRONTEND)
-
-#include <assert.h>
-#define Assert(p) assert(p)
-#define AssertMacro(p) ((void) assert(p))
-#define AssertArg(condition) assert(condition)
-#define AssertState(condition) assert(condition)
-#define AssertPointerAlignment(ptr, bndr) ((void)true)
-
-#else /* USE_ASSERT_CHECKING && !FRONTEND */
-
-/*
- * Trap
- * Generates an exception if the given condition is true.
- */
-#define Trap(condition, errorType) \
- do { \
- if (condition) \
- ExceptionalCondition(#condition, (errorType), \
- __FILE__, __LINE__); \
- } while (0)
-
-/*
- * TrapMacro is the same as Trap but it's intended for use in macros:
- *
- * #define foo(x) (AssertMacro(x != 0), bar(x))
- *
- * Isn't CPP fun?
- */
-#define TrapMacro(condition, errorType) \
- ((bool) (! (condition) || \
- (ExceptionalCondition(#condition, (errorType), \
- __FILE__, __LINE__), 0)))
-
-#define Assert(condition) \
- do { \
- if (!(condition)) \
- ExceptionalCondition(#condition, "FailedAssertion", \
- __FILE__, __LINE__); \
- } while (0)
-
-#define AssertMacro(condition) \
- ((void) ((condition) || \
- (ExceptionalCondition(#condition, "FailedAssertion", \
- __FILE__, __LINE__), 0)))
-
-#define AssertArg(condition) \
- do { \
- if (!(condition)) \
- ExceptionalCondition(#condition, "BadArgument", \
- __FILE__, __LINE__); \
- } while (0)
-
-#define AssertState(condition) \
- do { \
- if (!(condition)) \
- ExceptionalCondition(#condition, "BadState", \
- __FILE__, __LINE__); \
- } while (0)
-
-/*
- * Check that `ptr' is `bndr' aligned.
- */
-#define AssertPointerAlignment(ptr, bndr) \
- Trap(TYPEALIGN(bndr, (uintptr_t)(ptr)) != (uintptr_t)(ptr), \
- "UnalignedPointer")
-
-#endif /* USE_ASSERT_CHECKING && !FRONTEND */
-
-/*
- * ExceptionalCondition is compiled into the backend whether or not
- * USE_ASSERT_CHECKING is defined, so as to support use of extensions
- * that are built with that #define with a backend that isn't. Hence,
- * we should declare it as long as !FRONTEND.
- */
-#ifndef FRONTEND
-extern void ExceptionalCondition(const char *conditionName,
- const char *errorType,
- const char *fileName, int lineNumber) pg_attribute_noreturn();
-#endif
-
-/*
- * Macros to support compile-time assertion checks.
- *
- * If the "condition" (a compile-time-constant expression) evaluates to false,
- * throw a compile error using the "errmessage" (a string literal).
- *
- * gcc 4.6 and up supports _Static_assert(), but there are bizarre syntactic
- * placement restrictions. Macros StaticAssertStmt() and StaticAssertExpr()
- * make it safe to use as a statement or in an expression, respectively.
- * The macro StaticAssertDecl() is suitable for use at file scope (outside of
- * any function).
- *
- * Otherwise we fall back on a kluge that assumes the compiler will complain
- * about a negative width for a struct bit-field. This will not include a
- * helpful error message, but it beats not getting an error at all.
- */
-#ifndef __cplusplus
-#ifdef HAVE__STATIC_ASSERT
-#define StaticAssertStmt(condition, errmessage) \
- do { _Static_assert(condition, errmessage); } while(0)
-#define StaticAssertExpr(condition, errmessage) \
- ((void) ({ StaticAssertStmt(condition, errmessage); true; }))
-#define StaticAssertDecl(condition, errmessage) \
- _Static_assert(condition, errmessage)
-#else /* !HAVE__STATIC_ASSERT */
-#define StaticAssertStmt(condition, errmessage) \
- ((void) sizeof(struct { int static_assert_failure : (condition) ? 1 : -1; }))
-#define StaticAssertExpr(condition, errmessage) \
- StaticAssertStmt(condition, errmessage)
-#define StaticAssertDecl(condition, errmessage) \
- extern void static_assert_func(int static_assert_failure[(condition) ? 1 : -1])
-#endif /* HAVE__STATIC_ASSERT */
-#else /* C++ */
-#if defined(__cpp_static_assert) && __cpp_static_assert >= 200410
-#define StaticAssertStmt(condition, errmessage) \
- static_assert(condition, errmessage)
-#define StaticAssertExpr(condition, errmessage) \
- ({ static_assert(condition, errmessage); })
-#define StaticAssertDecl(condition, errmessage) \
- static_assert(condition, errmessage)
-#else /* !__cpp_static_assert */
-#define StaticAssertStmt(condition, errmessage) \
- do { struct static_assert_struct { int static_assert_failure : (condition) ? 1 : -1; }; } while(0)
-#define StaticAssertExpr(condition, errmessage) \
- ((void) ({ StaticAssertStmt(condition, errmessage); }))
-#define StaticAssertDecl(condition, errmessage) \
- extern void static_assert_func(int static_assert_failure[(condition) ? 1 : -1])
-#endif /* __cpp_static_assert */
-#endif /* C++ */
-
-
-/*
- * Compile-time checks that a variable (or expression) has the specified type.
- *
- * AssertVariableIsOfType() can be used as a statement.
- * AssertVariableIsOfTypeMacro() is intended for use in macros, eg
- * #define foo(x) (AssertVariableIsOfTypeMacro(x, int), bar(x))
- *
- * If we don't have __builtin_types_compatible_p, we can still assert that
- * the types have the same size. This is far from ideal (especially on 32-bit
- * platforms) but it provides at least some coverage.
- */
-#ifdef HAVE__BUILTIN_TYPES_COMPATIBLE_P
-#define AssertVariableIsOfType(varname, typename) \
- StaticAssertStmt(__builtin_types_compatible_p(__typeof__(varname), typename), \
- CppAsString(varname) " does not have type " CppAsString(typename))
-#define AssertVariableIsOfTypeMacro(varname, typename) \
- (StaticAssertExpr(__builtin_types_compatible_p(__typeof__(varname), typename), \
- CppAsString(varname) " does not have type " CppAsString(typename)))
-#else /* !HAVE__BUILTIN_TYPES_COMPATIBLE_P */
-#define AssertVariableIsOfType(varname, typename) \
- StaticAssertStmt(sizeof(varname) == sizeof(typename), \
- CppAsString(varname) " does not have type " CppAsString(typename))
-#define AssertVariableIsOfTypeMacro(varname, typename) \
- (StaticAssertExpr(sizeof(varname) == sizeof(typename), \
- CppAsString(varname) " does not have type " CppAsString(typename)))
-#endif /* HAVE__BUILTIN_TYPES_COMPATIBLE_P */
-
-
-/* ----------------------------------------------------------------
- * Section 7: widely useful macros
- * ----------------------------------------------------------------
- */
-/*
- * Max
- * Return the maximum of two numbers.
- */
-#define Max(x, y) ((x) > (y) ? (x) : (y))
-
-/*
- * Min
- * Return the minimum of two numbers.
- */
-#define Min(x, y) ((x) < (y) ? (x) : (y))
-
-/*
- * Abs
- * Return the absolute value of the argument.
- */
-#define Abs(x) ((x) >= 0 ? (x) : -(x))
-
-
-/* Get a bit mask of the bits set in non-long aligned addresses */
-#define LONG_ALIGN_MASK (sizeof(long) - 1)
-
-/*
- * MemSet
- * Exactly the same as standard library function memset(), but considerably
- * faster for zeroing small word-aligned structures (such as parsetree nodes).
- * This has to be a macro because the main point is to avoid function-call
- * overhead. However, we have also found that the loop is faster than
- * native libc memset() on some platforms, even those with assembler
- * memset() functions. More research needs to be done, perhaps with
- * MEMSET_LOOP_LIMIT tests in configure.
- */
-#define MemSet(start, val, len) \
- do \
- { \
- /* must be void* because we don't know if it is integer aligned yet */ \
- void *_vstart = (void *) (start); \
- int _val = (val); \
- Size _len = (len); \
-\
- if ((((uintptr_t) _vstart) & LONG_ALIGN_MASK) == 0 && \
- (_len & LONG_ALIGN_MASK) == 0 && \
- _val == 0 && \
- _len <= MEMSET_LOOP_LIMIT && \
- /* \
- * If MEMSET_LOOP_LIMIT == 0, optimizer should find \
- * the whole "if" false at compile time. \
- */ \
- MEMSET_LOOP_LIMIT != 0) \
- { \
- long *_start = (long *) _vstart; \
- long *_stop = (long *) ((char *) _start + _len); \
- while (_start < _stop) \
- *_start++ = 0; \
- } \
- else \
- memset(_vstart, _val, _len); \
- } while (0)
-
-/*
- * MemSetAligned is the same as MemSet except it omits the test to see if
- * "start" is word-aligned. This is okay to use if the caller knows a-priori
- * that the pointer is suitably aligned (typically, because he just got it
- * from palloc(), which always delivers a max-aligned pointer).
- */
-#define MemSetAligned(start, val, len) \
- do \
- { \
- long *_start = (long *) (start); \
- int _val = (val); \
- Size _len = (len); \
-\
- if ((_len & LONG_ALIGN_MASK) == 0 && \
- _val == 0 && \
- _len <= MEMSET_LOOP_LIMIT && \
- MEMSET_LOOP_LIMIT != 0) \
- { \
- long *_stop = (long *) ((char *) _start + _len); \
- while (_start < _stop) \
- *_start++ = 0; \
- } \
- else \
- memset(_start, _val, _len); \
- } while (0)
-
-
-/*
- * MemSetTest/MemSetLoop are a variant version that allow all the tests in
- * MemSet to be done at compile time in cases where "val" and "len" are
- * constants *and* we know the "start" pointer must be word-aligned.
- * If MemSetTest succeeds, then it is okay to use MemSetLoop, otherwise use
- * MemSetAligned. Beware of multiple evaluations of the arguments when using
- * this approach.
- */
-#define MemSetTest(val, len) \
- ( ((len) & LONG_ALIGN_MASK) == 0 && \
- (len) <= MEMSET_LOOP_LIMIT && \
- MEMSET_LOOP_LIMIT != 0 && \
- (val) == 0 )
-
-#define MemSetLoop(start, val, len) \
- do \
- { \
- long * _start = (long *) (start); \
- long * _stop = (long *) ((char *) _start + (Size) (len)); \
- \
- while (_start < _stop) \
- *_start++ = 0; \
- } while (0)
-
-/*
- * Macros for range-checking float values before converting to integer.
- * We must be careful here that the boundary values are expressed exactly
- * in the float domain. PG_INTnn_MIN is an exact power of 2, so it will
- * be represented exactly; but PG_INTnn_MAX isn't, and might get rounded
- * off, so avoid using that.
- * The input must be rounded to an integer beforehand, typically with rint(),
- * else we might draw the wrong conclusion about close-to-the-limit values.
- * These macros will do the right thing for Inf, but not necessarily for NaN,
- * so check isnan(num) first if that's a possibility.
- */
-#define FLOAT4_FITS_IN_INT16(num) \
- ((num) >= (float4) PG_INT16_MIN && (num) < -((float4) PG_INT16_MIN))
-#define FLOAT4_FITS_IN_INT32(num) \
- ((num) >= (float4) PG_INT32_MIN && (num) < -((float4) PG_INT32_MIN))
-#define FLOAT4_FITS_IN_INT64(num) \
- ((num) >= (float4) PG_INT64_MIN && (num) < -((float4) PG_INT64_MIN))
-#define FLOAT8_FITS_IN_INT16(num) \
- ((num) >= (float8) PG_INT16_MIN && (num) < -((float8) PG_INT16_MIN))
-#define FLOAT8_FITS_IN_INT32(num) \
- ((num) >= (float8) PG_INT32_MIN && (num) < -((float8) PG_INT32_MIN))
-#define FLOAT8_FITS_IN_INT64(num) \
- ((num) >= (float8) PG_INT64_MIN && (num) < -((float8) PG_INT64_MIN))
-
-
-/* ----------------------------------------------------------------
- * Section 8: random stuff
- * ----------------------------------------------------------------
- */
-
-#ifdef HAVE_STRUCT_SOCKADDR_UN
-#define HAVE_UNIX_SOCKETS 1
-#endif
-
-/*
- * Invert the sign of a qsort-style comparison result, ie, exchange negative
- * and positive integer values, being careful not to get the wrong answer
- * for INT_MIN. The argument should be an integral variable.
- */
-#define INVERT_COMPARE_RESULT(var) \
- ((var) = ((var) < 0) ? 1 : -(var))
-
-/*
- * Use this, not "char buf[BLCKSZ]", to declare a field or local variable
- * holding a page buffer, if that page might be accessed as a page and not
- * just a string of bytes. Otherwise the variable might be under-aligned,
- * causing problems on alignment-picky hardware. (In some places, we use
- * this to declare buffers even though we only pass them to read() and
- * write(), because copying to/from aligned buffers is usually faster than
- * using unaligned buffers.) We include both "double" and "int64" in the
- * union to ensure that the compiler knows the value must be MAXALIGN'ed
- * (cf. configure's computation of MAXIMUM_ALIGNOF).
- */
-typedef union PGAlignedBlock
-{
- char data[BLCKSZ];
- double force_align_d;
- int64 force_align_i64;
-} PGAlignedBlock;
-
-/* Same, but for an XLOG_BLCKSZ-sized buffer */
-typedef union PGAlignedXLogBlock
-{
- char data[XLOG_BLCKSZ];
- double force_align_d;
- int64 force_align_i64;
-} PGAlignedXLogBlock;
-
-/* msb for char */
-#define HIGHBIT (0x80)
-#define IS_HIGHBIT_SET(ch) ((unsigned char)(ch) & HIGHBIT)
-
-/*
- * Support macros for escaping strings. escape_backslash should be true
- * if generating a non-standard-conforming string. Prefixing a string
- * with ESCAPE_STRING_SYNTAX guarantees it is non-standard-conforming.
- * Beware of multiple evaluation of the "ch" argument!
- */
-#define SQL_STR_DOUBLE(ch, escape_backslash) \
- ((ch) == '\'' || ((ch) == '\\' && (escape_backslash)))
-
-#define ESCAPE_STRING_SYNTAX 'E'
-
-
-#define STATUS_OK (0)
-#define STATUS_ERROR (-1)
-#define STATUS_EOF (-2)
-
-/*
- * gettext support
- */
-
-#ifndef ENABLE_NLS
-/* stuff we'd otherwise get from <libintl.h> */
-#define gettext(x) (x)
-#define dgettext(d,x) (x)
-#define ngettext(s,p,n) ((n) == 1 ? (s) : (p))
-#define dngettext(d,s,p,n) ((n) == 1 ? (s) : (p))
-#endif
-
-#define _(x) gettext(x)
-
-/*
- * Use this to mark string constants as needing translation at some later
- * time, rather than immediately. This is useful for cases where you need
- * access to the original string and translated string, and for cases where
- * immediate translation is not possible, like when initializing global
- * variables.
- *
- * https://www.gnu.org/software/gettext/manual/html_node/Special-cases.html
- */
-#define gettext_noop(x) (x)
-
-/*
- * To better support parallel installations of major PostgreSQL
- * versions as well as parallel installations of major library soname
- * versions, we mangle the gettext domain name by appending those
- * version numbers. The coding rule ought to be that wherever the
- * domain name is mentioned as a literal, it must be wrapped into
- * PG_TEXTDOMAIN(). The macros below do not work on non-literals; but
- * that is somewhat intentional because it avoids having to worry
- * about multiple states of premangling and postmangling as the values
- * are being passed around.
- *
- * Make sure this matches the installation rules in nls-global.mk.
- */
-#ifdef SO_MAJOR_VERSION
-#define PG_TEXTDOMAIN(domain) (domain CppAsString2(SO_MAJOR_VERSION) "-" PG_MAJORVERSION)
-#else
-#define PG_TEXTDOMAIN(domain) (domain "-" PG_MAJORVERSION)
-#endif
-
-/*
- * Macro that allows to cast constness and volatile away from an expression, but doesn't
- * allow changing the underlying type. Enforcement of the latter
- * currently only works for gcc like compilers.
- *
- * Please note IT IS NOT SAFE to cast constness away if the result will ever
- * be modified (it would be undefined behaviour). Doing so anyway can cause
- * compiler misoptimizations or runtime crashes (modifying readonly memory).
- * It is only safe to use when the result will not be modified, but API
- * design or language restrictions prevent you from declaring that
- * (e.g. because a function returns both const and non-const variables).
- *
- * Note that this only works in function scope, not for global variables (it'd
- * be nice, but not trivial, to improve that).
- */
-#if defined(HAVE__BUILTIN_TYPES_COMPATIBLE_P)
-#define unconstify(underlying_type, expr) \
- (StaticAssertExpr(__builtin_types_compatible_p(__typeof(expr), const underlying_type), \
- "wrong cast"), \
- (underlying_type) (expr))
-#define unvolatize(underlying_type, expr) \
- (StaticAssertExpr(__builtin_types_compatible_p(__typeof(expr), volatile underlying_type), \
- "wrong cast"), \
- (underlying_type) (expr))
-#else
-#define unconstify(underlying_type, expr) \
- ((underlying_type) (expr))
-#define unvolatize(underlying_type, expr) \
- ((underlying_type) (expr))
-#endif
-
-/* ----------------------------------------------------------------
- * Section 9: system-specific hacks
- *
- * This should be limited to things that absolutely have to be
- * included in every source file. The port-specific header file
- * is usually a better place for this sort of thing.
- * ----------------------------------------------------------------
- */
-
-/*
- * NOTE: this is also used for opening text files.
- * WIN32 treats Control-Z as EOF in files opened in text mode.
- * Therefore, we open files in binary mode on Win32 so we can read
- * literal control-Z. The other affect is that we see CRLF, but
- * that is OK because we can already handle those cleanly.
- */
-#if defined(WIN32) || defined(__CYGWIN__)
-#define PG_BINARY O_BINARY
-#define PG_BINARY_A "ab"
-#define PG_BINARY_R "rb"
-#define PG_BINARY_W "wb"
-#else
-#define PG_BINARY 0
-#define PG_BINARY_A "a"
-#define PG_BINARY_R "r"
-#define PG_BINARY_W "w"
-#endif
-
-/*
- * Provide prototypes for routines not present in a particular machine's
- * standard C library.
- */
-
-#if defined(HAVE_FDATASYNC) && !HAVE_DECL_FDATASYNC
-extern int fdatasync(int fildes);
-#endif
-
-/* Older platforms may provide strto[u]ll functionality under other names */
-#if !defined(HAVE_STRTOLL) && defined(HAVE___STRTOLL)
-#define strtoll __strtoll
-#define HAVE_STRTOLL 1
-#endif
-
-#if !defined(HAVE_STRTOLL) && defined(HAVE_STRTOQ)
-#define strtoll strtoq
-#define HAVE_STRTOLL 1
-#endif
-
-#if !defined(HAVE_STRTOULL) && defined(HAVE___STRTOULL)
-#define strtoull __strtoull
-#define HAVE_STRTOULL 1
-#endif
-
-#if !defined(HAVE_STRTOULL) && defined(HAVE_STRTOUQ)
-#define strtoull strtouq
-#define HAVE_STRTOULL 1
-#endif
-
-#if defined(HAVE_STRTOLL) && !HAVE_DECL_STRTOLL
-extern long long strtoll(const char *str, char **endptr, int base);
-#endif
-
-#if defined(HAVE_STRTOULL) && !HAVE_DECL_STRTOULL
-extern unsigned long long strtoull(const char *str, char **endptr, int base);
-#endif
-
-#define PGDLLIMPORT
-#define PGDLLEXPORT
-
-/*
- * The following is used as the arg list for signal handlers. Any ports
- * that take something other than an int argument should override this in
- * their pg_config_os.h file. Note that variable names are required
- * because it is used in both the prototypes as well as the definitions.
- * Note also the long name. We expect that this won't collide with
- * other names causing compiler warnings.
- */
-
-#ifndef SIGNAL_ARGS
-#define SIGNAL_ARGS int postgres_signal_arg
-#endif
-
-/*
- * When there is no sigsetjmp, its functionality is provided by plain
- * setjmp. We now support the case only on Windows. However, it seems
- * that MinGW-64 has some longstanding issues in its setjmp support,
- * so on that toolchain we cheat and use gcc's builtins.
- */
-#ifdef WIN32
-#ifdef __MINGW64__
-typedef intptr_t sigjmp_buf[5];
-#define sigsetjmp(x,y) __builtin_setjmp(x)
-#define siglongjmp __builtin_longjmp
-#else /* !__MINGW64__ */
-#define sigjmp_buf jmp_buf
-#define sigsetjmp(x,y) setjmp(x)
-#define siglongjmp longjmp
-#endif /* __MINGW64__ */
-#endif /* WIN32 */
-
-/* EXEC_BACKEND defines */
-#ifdef EXEC_BACKEND
-#define NON_EXEC_STATIC
-#else
-#define NON_EXEC_STATIC static
-#endif
-
-/* /port compatibility functions */
-#include "port.h"
-
-#endif /* C_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/binary_upgrade.h b/contrib/libs/postgresql/src/include/catalog/binary_upgrade.h
deleted file mode 100644
index f6e82e7ac50..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/binary_upgrade.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * binary_upgrade.h
- * variables used for binary upgrades
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/binary_upgrade.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef BINARY_UPGRADE_H
-#define BINARY_UPGRADE_H
-
-extern PGDLLIMPORT Oid binary_upgrade_next_pg_type_oid;
-extern PGDLLIMPORT Oid binary_upgrade_next_array_pg_type_oid;
-extern PGDLLIMPORT Oid binary_upgrade_next_mrng_pg_type_oid;
-extern PGDLLIMPORT Oid binary_upgrade_next_mrng_array_pg_type_oid;
-
-extern PGDLLIMPORT Oid binary_upgrade_next_heap_pg_class_oid;
-extern PGDLLIMPORT Oid binary_upgrade_next_index_pg_class_oid;
-extern PGDLLIMPORT Oid binary_upgrade_next_toast_pg_class_oid;
-
-extern PGDLLIMPORT Oid binary_upgrade_next_pg_enum_oid;
-extern PGDLLIMPORT Oid binary_upgrade_next_pg_authid_oid;
-
-extern PGDLLIMPORT bool binary_upgrade_record_init_privs;
-
-#endif /* BINARY_UPGRADE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/catalog.h b/contrib/libs/postgresql/src/include/catalog/catalog.h
deleted file mode 100644
index f247be50b4d..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/catalog.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * catalog.h
- * prototypes for functions in backend/catalog/catalog.c
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/catalog.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef CATALOG_H
-#define CATALOG_H
-
-#include "catalog/pg_class.h"
-#include "utils/relcache.h"
-
-
-extern bool IsSystemRelation(Relation relation);
-extern bool IsToastRelation(Relation relation);
-extern bool IsCatalogRelation(Relation relation);
-
-extern bool IsSystemClass(Oid relid, Form_pg_class reltuple);
-extern bool IsToastClass(Form_pg_class reltuple);
-
-extern bool IsCatalogRelationOid(Oid relid);
-
-extern bool IsCatalogNamespace(Oid namespaceId);
-extern bool IsToastNamespace(Oid namespaceId);
-
-extern bool IsReservedName(const char *name);
-
-extern bool IsSharedRelation(Oid relationId);
-
-extern Oid GetNewOidWithIndex(Relation relation, Oid indexId,
- AttrNumber oidcolumn);
-extern Oid GetNewRelFileNode(Oid reltablespace, Relation pg_class,
- char relpersistence);
-
-#endif /* CATALOG_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/catversion.h b/contrib/libs/postgresql/src/include/catalog/catversion.h
deleted file mode 100644
index 0a4f4abdb39..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/catversion.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * catversion.h
- * "Catalog version number" for PostgreSQL.
- *
- * The catalog version number is used to flag incompatible changes in
- * the PostgreSQL system catalogs. Whenever anyone changes the format of
- * a system catalog relation, or adds, deletes, or modifies standard
- * catalog entries in such a way that an updated backend wouldn't work
- * with an old database (or vice versa), the catalog version number
- * should be changed. The version number stored in pg_control by initdb
- * is checked against the version number compiled into the backend at
- * startup time, so that a backend can refuse to run in an incompatible
- * database.
- *
- * The point of this feature is to provide a finer grain of compatibility
- * checking than is possible from looking at the major version number
- * stored in PG_VERSION. It shouldn't matter to end users, but during
- * development cycles we usually make quite a few incompatible changes
- * to the contents of the system catalogs, and we don't want to bump the
- * major version number for each one. What we can do instead is bump
- * this internal version number. This should save some grief for
- * developers who might otherwise waste time tracking down "bugs" that
- * are really just code-vs-database incompatibilities.
- *
- * The rule for developers is: if you commit a change that requires
- * an initdb, you should update the catalog version number (as well as
- * notifying the pgsql-hackers mailing list, which has been the
- * informal practice for a long time).
- *
- * The catalog version number is placed here since modifying files in
- * include/catalog is the most common kind of initdb-forcing change.
- * But it could be used to protect any kind of incompatible change in
- * database contents or layout, such as altering tuple headers.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/catversion.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef CATVERSION_H
-#define CATVERSION_H
-
-/*
- * We could use anything we wanted for version numbers, but I recommend
- * following the "YYYYMMDDN" style often used for DNS zone serial numbers.
- * YYYYMMDD are the date of the change, and N is the number of the change
- * on that day. (Hopefully we'll never commit ten independent sets of
- * catalog changes on the same day...)
- */
-
-/* yyyymmddN */
-#define CATALOG_VERSION_NO 202107181
-
-#endif
diff --git a/contrib/libs/postgresql/src/include/catalog/dependency.h b/contrib/libs/postgresql/src/include/catalog/dependency.h
deleted file mode 100644
index fd44081e741..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/dependency.h
+++ /dev/null
@@ -1,273 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * dependency.h
- * Routines to support inter-object dependencies.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/dependency.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef DEPENDENCY_H
-#define DEPENDENCY_H
-
-#include "catalog/objectaddress.h"
-
-
-/*
- * Precise semantics of a dependency relationship are specified by the
- * DependencyType code (which is stored in a "char" field in pg_depend,
- * so we assign ASCII-code values to the enumeration members).
- *
- * In all cases, a dependency relationship indicates that the referenced
- * object may not be dropped without also dropping the dependent object.
- * However, there are several subflavors; see the description of pg_depend
- * in catalogs.sgml for details.
- */
-
-typedef enum DependencyType
-{
- DEPENDENCY_NORMAL = 'n',
- DEPENDENCY_AUTO = 'a',
- DEPENDENCY_INTERNAL = 'i',
- DEPENDENCY_PARTITION_PRI = 'P',
- DEPENDENCY_PARTITION_SEC = 'S',
- DEPENDENCY_EXTENSION = 'e',
- DEPENDENCY_AUTO_EXTENSION = 'x',
- DEPENDENCY_PIN = 'p'
-} DependencyType;
-
-/*
- * There is also a SharedDependencyType enum type that determines the exact
- * semantics of an entry in pg_shdepend. Just like regular dependency entries,
- * any pg_shdepend entry means that the referenced object cannot be dropped
- * unless the dependent object is dropped at the same time. There are some
- * additional rules however:
- *
- * (a) For a SHARED_DEPENDENCY_PIN entry, there is no dependent object --
- * rather, the referenced object is an essential part of the system. This
- * applies to the initdb-created superuser. Entries of this type are only
- * created by initdb; objects in this category don't need further pg_shdepend
- * entries if more objects come to depend on them.
- *
- * (b) a SHARED_DEPENDENCY_OWNER entry means that the referenced object is
- * the role owning the dependent object. The referenced object must be
- * a pg_authid entry.
- *
- * (c) a SHARED_DEPENDENCY_ACL entry means that the referenced object is
- * a role mentioned in the ACL field of the dependent object. The referenced
- * object must be a pg_authid entry. (SHARED_DEPENDENCY_ACL entries are not
- * created for the owner of an object; hence two objects may be linked by
- * one or the other, but not both, of these dependency types.)
- *
- * (d) a SHARED_DEPENDENCY_POLICY entry means that the referenced object is
- * a role mentioned in a policy object. The referenced object must be a
- * pg_authid entry.
- *
- * (e) a SHARED_DEPENDENCY_TABLESPACE entry means that the referenced
- * object is a tablespace mentioned in a relation without storage. The
- * referenced object must be a pg_tablespace entry. (Relations that have
- * storage don't need this: they are protected by the existence of a physical
- * file in the tablespace.)
- *
- * SHARED_DEPENDENCY_INVALID is a value used as a parameter in internal
- * routines, and is not valid in the catalog itself.
- */
-typedef enum SharedDependencyType
-{
- SHARED_DEPENDENCY_PIN = 'p',
- SHARED_DEPENDENCY_OWNER = 'o',
- SHARED_DEPENDENCY_ACL = 'a',
- SHARED_DEPENDENCY_POLICY = 'r',
- SHARED_DEPENDENCY_TABLESPACE = 't',
- SHARED_DEPENDENCY_INVALID = 0
-} SharedDependencyType;
-
-/* expansible list of ObjectAddresses (private in dependency.c) */
-typedef struct ObjectAddresses ObjectAddresses;
-
-/*
- * This enum covers all system catalogs whose OIDs can appear in
- * pg_depend.classId or pg_shdepend.classId. Keep object_classes[] in sync.
- */
-typedef enum ObjectClass
-{
- OCLASS_CLASS, /* pg_class */
- OCLASS_PROC, /* pg_proc */
- OCLASS_TYPE, /* pg_type */
- OCLASS_CAST, /* pg_cast */
- OCLASS_COLLATION, /* pg_collation */
- OCLASS_CONSTRAINT, /* pg_constraint */
- OCLASS_CONVERSION, /* pg_conversion */
- OCLASS_DEFAULT, /* pg_attrdef */
- OCLASS_LANGUAGE, /* pg_language */
- OCLASS_LARGEOBJECT, /* pg_largeobject */
- OCLASS_OPERATOR, /* pg_operator */
- OCLASS_OPCLASS, /* pg_opclass */
- OCLASS_OPFAMILY, /* pg_opfamily */
- OCLASS_AM, /* pg_am */
- OCLASS_AMOP, /* pg_amop */
- OCLASS_AMPROC, /* pg_amproc */
- OCLASS_REWRITE, /* pg_rewrite */
- OCLASS_TRIGGER, /* pg_trigger */
- OCLASS_SCHEMA, /* pg_namespace */
- OCLASS_STATISTIC_EXT, /* pg_statistic_ext */
- OCLASS_TSPARSER, /* pg_ts_parser */
- OCLASS_TSDICT, /* pg_ts_dict */
- OCLASS_TSTEMPLATE, /* pg_ts_template */
- OCLASS_TSCONFIG, /* pg_ts_config */
- OCLASS_ROLE, /* pg_authid */
- OCLASS_DATABASE, /* pg_database */
- OCLASS_TBLSPACE, /* pg_tablespace */
- OCLASS_FDW, /* pg_foreign_data_wrapper */
- OCLASS_FOREIGN_SERVER, /* pg_foreign_server */
- OCLASS_USER_MAPPING, /* pg_user_mapping */
- OCLASS_DEFACL, /* pg_default_acl */
- OCLASS_EXTENSION, /* pg_extension */
- OCLASS_EVENT_TRIGGER, /* pg_event_trigger */
- OCLASS_POLICY, /* pg_policy */
- OCLASS_PUBLICATION, /* pg_publication */
- OCLASS_PUBLICATION_REL, /* pg_publication_rel */
- OCLASS_SUBSCRIPTION, /* pg_subscription */
- OCLASS_TRANSFORM /* pg_transform */
-} ObjectClass;
-
-#define LAST_OCLASS OCLASS_TRANSFORM
-
-/* flag bits for performDeletion/performMultipleDeletions: */
-#define PERFORM_DELETION_INTERNAL 0x0001 /* internal action */
-#define PERFORM_DELETION_CONCURRENTLY 0x0002 /* concurrent drop */
-#define PERFORM_DELETION_QUIETLY 0x0004 /* suppress notices */
-#define PERFORM_DELETION_SKIP_ORIGINAL 0x0008 /* keep original obj */
-#define PERFORM_DELETION_SKIP_EXTENSIONS 0x0010 /* keep extensions */
-#define PERFORM_DELETION_CONCURRENT_LOCK 0x0020 /* normal drop with
- * concurrent lock mode */
-
-
-/* in dependency.c */
-
-extern void AcquireDeletionLock(const ObjectAddress *object, int flags);
-
-extern void ReleaseDeletionLock(const ObjectAddress *object);
-
-extern void performDeletion(const ObjectAddress *object,
- DropBehavior behavior, int flags);
-
-extern void performMultipleDeletions(const ObjectAddresses *objects,
- DropBehavior behavior, int flags);
-
-extern void recordDependencyOnExpr(const ObjectAddress *depender,
- Node *expr, List *rtable,
- DependencyType behavior);
-
-extern void recordDependencyOnSingleRelExpr(const ObjectAddress *depender,
- Node *expr, Oid relId,
- DependencyType behavior,
- DependencyType self_behavior,
- bool reverse_self);
-
-extern ObjectClass getObjectClass(const ObjectAddress *object);
-
-extern ObjectAddresses *new_object_addresses(void);
-
-extern void add_exact_object_address(const ObjectAddress *object,
- ObjectAddresses *addrs);
-
-extern bool object_address_present(const ObjectAddress *object,
- const ObjectAddresses *addrs);
-
-extern void record_object_address_dependencies(const ObjectAddress *depender,
- ObjectAddresses *referenced,
- DependencyType behavior);
-
-extern void sort_object_addresses(ObjectAddresses *addrs);
-
-extern void free_object_addresses(ObjectAddresses *addrs);
-
-/* in pg_depend.c */
-
-extern void recordDependencyOn(const ObjectAddress *depender,
- const ObjectAddress *referenced,
- DependencyType behavior);
-
-extern void recordMultipleDependencies(const ObjectAddress *depender,
- const ObjectAddress *referenced,
- int nreferenced,
- DependencyType behavior);
-
-extern void recordDependencyOnCurrentExtension(const ObjectAddress *object,
- bool isReplace);
-
-extern long deleteDependencyRecordsFor(Oid classId, Oid objectId,
- bool skipExtensionDeps);
-
-extern long deleteDependencyRecordsForClass(Oid classId, Oid objectId,
- Oid refclassId, char deptype);
-
-extern long deleteDependencyRecordsForSpecific(Oid classId, Oid objectId,
- char deptype,
- Oid refclassId, Oid refobjectId);
-
-extern long changeDependencyFor(Oid classId, Oid objectId,
- Oid refClassId, Oid oldRefObjectId,
- Oid newRefObjectId);
-
-extern long changeDependenciesOf(Oid classId, Oid oldObjectId,
- Oid newObjectId);
-
-extern long changeDependenciesOn(Oid refClassId, Oid oldRefObjectId,
- Oid newRefObjectId);
-
-extern Oid getExtensionOfObject(Oid classId, Oid objectId);
-extern List *getAutoExtensionsOfObject(Oid classId, Oid objectId);
-
-extern bool sequenceIsOwned(Oid seqId, char deptype, Oid *tableId, int32 *colId);
-extern List *getOwnedSequences(Oid relid);
-extern Oid getIdentitySequence(Oid relid, AttrNumber attnum, bool missing_ok);
-
-extern Oid get_index_constraint(Oid indexId);
-
-extern List *get_index_ref_constraints(Oid indexId);
-
-/* in pg_shdepend.c */
-
-extern void recordSharedDependencyOn(ObjectAddress *depender,
- ObjectAddress *referenced,
- SharedDependencyType deptype);
-
-extern void deleteSharedDependencyRecordsFor(Oid classId, Oid objectId,
- int32 objectSubId);
-
-extern void recordDependencyOnOwner(Oid classId, Oid objectId, Oid owner);
-
-extern void changeDependencyOnOwner(Oid classId, Oid objectId,
- Oid newOwnerId);
-
-extern void recordDependencyOnTablespace(Oid classId, Oid objectId,
- Oid tablespace);
-
-extern void changeDependencyOnTablespace(Oid classId, Oid objectId,
- Oid newTablespaceId);
-
-extern void updateAclDependencies(Oid classId, Oid objectId, int32 objectSubId,
- Oid ownerId,
- int noldmembers, Oid *oldmembers,
- int nnewmembers, Oid *newmembers);
-
-extern bool checkSharedDependencies(Oid classId, Oid objectId,
- char **detail_msg, char **detail_log_msg);
-
-extern void shdepLockAndCheckObject(Oid classId, Oid objectId);
-
-extern void copyTemplateDependencies(Oid templateDbId, Oid newDbId);
-
-extern void dropDatabaseDependencies(Oid databaseId);
-
-extern void shdepDropOwned(List *relids, DropBehavior behavior);
-
-extern void shdepReassignOwned(List *relids, Oid newrole);
-
-#endif /* DEPENDENCY_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/genbki.h b/contrib/libs/postgresql/src/include/catalog/genbki.h
deleted file mode 100644
index b1fee54d3c2..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/genbki.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * genbki.h
- * Required include file for all POSTGRES catalog header files
- *
- * genbki.h defines CATALOG(), BKI_BOOTSTRAP and related macros
- * so that the catalog header files can be read by the C compiler.
- * (These same words are recognized by genbki.pl to build the BKI
- * bootstrap file from these header files.)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/genbki.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef GENBKI_H
-#define GENBKI_H
-
-/* Introduces a catalog's structure definition */
-#define CATALOG(name,oid,oidmacro) typedef struct CppConcat(FormData_,name)
-
-/* Options that may appear after CATALOG (on the same line) */
-#define BKI_BOOTSTRAP
-#define BKI_SHARED_RELATION
-#define BKI_ROWTYPE_OID(oid,oidmacro)
-#define BKI_SCHEMA_MACRO
-
-/* Options that may appear after an attribute (on the same line) */
-#define BKI_FORCE_NULL
-#define BKI_FORCE_NOT_NULL
-/* Specifies a default value for a catalog field */
-#define BKI_DEFAULT(value)
-/* Specifies a default value for auto-generated array types */
-#define BKI_ARRAY_DEFAULT(value)
-/*
- * Indicates that the attribute contains OIDs referencing the named catalog;
- * can be applied to columns of oid, regproc, oid[], or oidvector type.
- * genbki.pl uses this to know how to perform name lookups in the initial
- * data (if any), and it also feeds into regression-test validity checks.
- * The _OPT suffix indicates that values can be zero instead of
- * a valid OID reference.
- */
-#define BKI_LOOKUP(catalog)
-#define BKI_LOOKUP_OPT(catalog)
-
-/*
- * These lines are processed by genbki.pl to create the statements
- * the bootstrap parser will turn into BootstrapToastTable commands.
- * Each line specifies the system catalog that needs a toast table,
- * the OID to assign to the toast table, and the OID to assign to the
- * toast table's index. The reason we hard-wire these OIDs is that we
- * need stable OIDs for shared relations, and that includes toast tables
- * of shared relations.
- *
- * The macro definition is just to keep the C compiler from spitting up.
- */
-#define DECLARE_TOAST(name,toastoid,indexoid) extern int no_such_variable
-
-/*
- * These lines are processed by genbki.pl to create the statements
- * the bootstrap parser will turn into DefineIndex calls.
- *
- * The keyword is DECLARE_INDEX or DECLARE_UNIQUE_INDEX or
- * DECLARE_UNIQUE_INDEX_PKEY. ("PKEY" marks the index as being the catalog's
- * primary key; currently this is only cosmetically different from a regular
- * unique index. By convention, we usually make a catalog's OID column its
- * pkey, if it has one.) The first two arguments are the index's name and
- * OID, the rest is much like a standard 'create index' SQL command.
- *
- * For each index, we also provide a #define for its OID. References to
- * the index in the C code should always use these #defines, not the actual
- * index name (much less the numeric OID).
- *
- * The macro definitions are just to keep the C compiler from spitting up.
- */
-#define DECLARE_INDEX(name,oid,decl) extern int no_such_variable
-#define DECLARE_UNIQUE_INDEX(name,oid,decl) extern int no_such_variable
-#define DECLARE_UNIQUE_INDEX_PKEY(name,oid,decl) extern int no_such_variable
-
-/*
- * These lines are processed by genbki.pl to create a table for use
- * by the pg_get_catalog_foreign_keys() function. We do not have any
- * mechanism that actually enforces foreign-key relationships in the
- * system catalogs, but it is still useful to record the intended
- * relationships in a machine-readable form.
- *
- * The keyword is DECLARE_FOREIGN_KEY[_OPT] or DECLARE_ARRAY_FOREIGN_KEY[_OPT].
- * The first argument is a parenthesized list of the referencing columns;
- * the second, the name of the referenced table; the third, a parenthesized
- * list of the referenced columns. Use of the ARRAY macros means that the
- * last referencing column is an array, each of whose elements is supposed
- * to match some entry in the last referenced column. Use of the OPT suffix
- * indicates that the referencing column(s) can be zero instead of a valid
- * reference.
- *
- * Columns that are marked with a BKI_LOOKUP rule do not need an explicit
- * DECLARE_FOREIGN_KEY macro, as genbki.pl can infer the FK relationship
- * from that. Thus, these macros are only needed in special cases.
- *
- * The macro definitions are just to keep the C compiler from spitting up.
- */
-#define DECLARE_FOREIGN_KEY(cols,reftbl,refcols) extern int no_such_variable
-#define DECLARE_FOREIGN_KEY_OPT(cols,reftbl,refcols) extern int no_such_variable
-#define DECLARE_ARRAY_FOREIGN_KEY(cols,reftbl,refcols) extern int no_such_variable
-#define DECLARE_ARRAY_FOREIGN_KEY_OPT(cols,reftbl,refcols) extern int no_such_variable
-
-/* The following are never defined; they are here only for documentation. */
-
-/*
- * Variable-length catalog fields (except possibly the first not nullable one)
- * should not be visible in C structures, so they are made invisible by #ifdefs
- * of an undefined symbol. See also the BOOTCOL_NULL_AUTO code in bootstrap.c
- * for how this is handled.
- */
-#undef CATALOG_VARLEN
-
-/*
- * There is code in some catalog headers that needs to be visible to clients,
- * but we don't want clients to include the full header because of safety
- * issues with other code in the header. To handle that, surround code that
- * should be visible to clients with "#ifdef EXPOSE_TO_CLIENT_CODE". That
- * instructs genbki.pl to copy the section when generating the corresponding
- * "_d" header, which can be included by both client and backend code.
- */
-#undef EXPOSE_TO_CLIENT_CODE
-
-#endif /* GENBKI_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/heap.h b/contrib/libs/postgresql/src/include/catalog/heap.h
deleted file mode 100644
index 6ce480b49c1..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/heap.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * heap.h
- * prototypes for functions in backend/catalog/heap.c
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/heap.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef HEAP_H
-#define HEAP_H
-
-#include "catalog/indexing.h"
-#include "catalog/objectaddress.h"
-#include "parser/parse_node.h"
-
-
-/* flag bits for CheckAttributeType/CheckAttributeNamesTypes */
-#define CHKATYPE_ANYARRAY 0x01 /* allow ANYARRAY */
-#define CHKATYPE_ANYRECORD 0x02 /* allow RECORD and RECORD[] */
-#define CHKATYPE_IS_PARTKEY 0x04 /* attname is part key # not column */
-
-typedef struct RawColumnDefault
-{
- AttrNumber attnum; /* attribute to attach default to */
- Node *raw_default; /* default value (untransformed parse tree) */
- bool missingMode; /* true if part of add column processing */
- char generated; /* attgenerated setting */
-} RawColumnDefault;
-
-typedef struct CookedConstraint
-{
- ConstrType contype; /* CONSTR_DEFAULT or CONSTR_CHECK */
- Oid conoid; /* constr OID if created, otherwise Invalid */
- char *name; /* name, or NULL if none */
- AttrNumber attnum; /* which attr (only for DEFAULT) */
- Node *expr; /* transformed default or check expr */
- bool skip_validation; /* skip validation? (only for CHECK) */
- bool is_local; /* constraint has local (non-inherited) def */
- int inhcount; /* number of times constraint is inherited */
- bool is_no_inherit; /* constraint has local def and cannot be
- * inherited */
-} CookedConstraint;
-
-extern Relation heap_create(const char *relname,
- Oid relnamespace,
- Oid reltablespace,
- Oid relid,
- Oid relfilenode,
- Oid accessmtd,
- TupleDesc tupDesc,
- char relkind,
- char relpersistence,
- bool shared_relation,
- bool mapped_relation,
- bool allow_system_table_mods,
- TransactionId *relfrozenxid,
- MultiXactId *relminmxid);
-
-extern Oid heap_create_with_catalog(const char *relname,
- Oid relnamespace,
- Oid reltablespace,
- Oid relid,
- Oid reltypeid,
- Oid reloftypeid,
- Oid ownerid,
- Oid accessmtd,
- TupleDesc tupdesc,
- List *cooked_constraints,
- char relkind,
- char relpersistence,
- bool shared_relation,
- bool mapped_relation,
- OnCommitAction oncommit,
- Datum reloptions,
- bool use_user_acl,
- bool allow_system_table_mods,
- bool is_internal,
- Oid relrewrite,
- ObjectAddress *typaddress);
-
-extern void heap_drop_with_catalog(Oid relid);
-
-extern void heap_truncate(List *relids);
-
-extern void heap_truncate_one_rel(Relation rel);
-
-extern void heap_truncate_check_FKs(List *relations, bool tempTables);
-
-extern List *heap_truncate_find_FKs(List *relationIds);
-
-extern void InsertPgAttributeTuples(Relation pg_attribute_rel,
- TupleDesc tupdesc,
- Oid new_rel_oid,
- Datum *attoptions,
- CatalogIndexState indstate);
-
-extern void InsertPgClassTuple(Relation pg_class_desc,
- Relation new_rel_desc,
- Oid new_rel_oid,
- Datum relacl,
- Datum reloptions);
-
-extern List *AddRelationNewConstraints(Relation rel,
- List *newColDefaults,
- List *newConstraints,
- bool allow_merge,
- bool is_local,
- bool is_internal,
- const char *queryString);
-
-extern void RelationClearMissing(Relation rel);
-extern void SetAttrMissing(Oid relid, char *attname, char *value);
-
-extern Oid StoreAttrDefault(Relation rel, AttrNumber attnum,
- Node *expr, bool is_internal,
- bool add_column_mode);
-
-extern Node *cookDefault(ParseState *pstate,
- Node *raw_default,
- Oid atttypid,
- int32 atttypmod,
- const char *attname,
- char attgenerated);
-
-extern void DeleteRelationTuple(Oid relid);
-extern void DeleteAttributeTuples(Oid relid);
-extern void DeleteSystemAttributeTuples(Oid relid);
-extern void RemoveAttributeById(Oid relid, AttrNumber attnum);
-extern void RemoveAttrDefault(Oid relid, AttrNumber attnum,
- DropBehavior behavior, bool complain, bool internal);
-extern void RemoveAttrDefaultById(Oid attrdefId);
-extern void CopyStatistics(Oid fromrelid, Oid torelid);
-extern void RemoveStatistics(Oid relid, AttrNumber attnum);
-
-extern const FormData_pg_attribute *SystemAttributeDefinition(AttrNumber attno);
-
-extern const FormData_pg_attribute *SystemAttributeByName(const char *attname);
-
-extern void CheckAttributeNamesTypes(TupleDesc tupdesc, char relkind,
- int flags);
-
-extern void CheckAttributeType(const char *attname,
- Oid atttypid, Oid attcollation,
- List *containing_rowtypes,
- int flags);
-
-/* pg_partitioned_table catalog manipulation functions */
-extern void StorePartitionKey(Relation rel,
- char strategy,
- int16 partnatts,
- AttrNumber *partattrs,
- List *partexprs,
- Oid *partopclass,
- Oid *partcollation);
-extern void RemovePartitionKeyByRelId(Oid relid);
-extern void StorePartitionBound(Relation rel, Relation parent,
- PartitionBoundSpec *bound);
-
-#endif /* HEAP_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/index.h b/contrib/libs/postgresql/src/include/catalog/index.h
deleted file mode 100644
index 008f723e104..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/index.h
+++ /dev/null
@@ -1,214 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * index.h
- * prototypes for catalog/index.c.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/index.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef INDEX_H
-#define INDEX_H
-
-#include "catalog/objectaddress.h"
-#include "nodes/execnodes.h"
-
-
-#define DEFAULT_INDEX_TYPE "btree"
-
-/* Action code for index_set_state_flags */
-typedef enum
-{
- INDEX_CREATE_SET_READY,
- INDEX_CREATE_SET_VALID,
- INDEX_DROP_CLEAR_VALID,
- INDEX_DROP_SET_DEAD
-} IndexStateFlagsAction;
-
-/* options for REINDEX */
-typedef struct ReindexParams
-{
- bits32 options; /* bitmask of REINDEXOPT_* */
- Oid tablespaceOid; /* New tablespace to move indexes to.
- * InvalidOid to do nothing. */
-} ReindexParams;
-
-/* flag bits for ReindexParams->flags */
-#define REINDEXOPT_VERBOSE 0x01 /* print progress info */
-#define REINDEXOPT_REPORT_PROGRESS 0x02 /* report pgstat progress */
-#define REINDEXOPT_MISSING_OK 0x04 /* skip missing relations */
-#define REINDEXOPT_CONCURRENTLY 0x08 /* concurrent mode */
-
-/* state info for validate_index bulkdelete callback */
-typedef struct ValidateIndexState
-{
- Tuplesortstate *tuplesort; /* for sorting the index TIDs */
- /* statistics (for debug purposes only): */
- double htups,
- itups,
- tups_inserted;
-} ValidateIndexState;
-
-extern void index_check_primary_key(Relation heapRel,
- IndexInfo *indexInfo,
- bool is_alter_table,
- IndexStmt *stmt);
-
-#define INDEX_CREATE_IS_PRIMARY (1 << 0)
-#define INDEX_CREATE_ADD_CONSTRAINT (1 << 1)
-#define INDEX_CREATE_SKIP_BUILD (1 << 2)
-#define INDEX_CREATE_CONCURRENT (1 << 3)
-#define INDEX_CREATE_IF_NOT_EXISTS (1 << 4)
-#define INDEX_CREATE_PARTITIONED (1 << 5)
-#define INDEX_CREATE_INVALID (1 << 6)
-
-extern Oid index_create(Relation heapRelation,
- const char *indexRelationName,
- Oid indexRelationId,
- Oid parentIndexRelid,
- Oid parentConstraintId,
- Oid relFileNode,
- IndexInfo *indexInfo,
- List *indexColNames,
- Oid accessMethodObjectId,
- Oid tableSpaceId,
- Oid *collationObjectId,
- Oid *classObjectId,
- int16 *coloptions,
- Datum reloptions,
- bits16 flags,
- bits16 constr_flags,
- bool allow_system_table_mods,
- bool is_internal,
- Oid *constraintId);
-
-#define INDEX_CONSTR_CREATE_MARK_AS_PRIMARY (1 << 0)
-#define INDEX_CONSTR_CREATE_DEFERRABLE (1 << 1)
-#define INDEX_CONSTR_CREATE_INIT_DEFERRED (1 << 2)
-#define INDEX_CONSTR_CREATE_UPDATE_INDEX (1 << 3)
-#define INDEX_CONSTR_CREATE_REMOVE_OLD_DEPS (1 << 4)
-
-extern Oid index_concurrently_create_copy(Relation heapRelation,
- Oid oldIndexId,
- Oid tablespaceOid,
- const char *newName);
-
-extern void index_concurrently_build(Oid heapRelationId,
- Oid indexRelationId);
-
-extern void index_concurrently_swap(Oid newIndexId,
- Oid oldIndexId,
- const char *oldName);
-
-extern void index_concurrently_set_dead(Oid heapId,
- Oid indexId);
-
-extern ObjectAddress index_constraint_create(Relation heapRelation,
- Oid indexRelationId,
- Oid parentConstraintId,
- IndexInfo *indexInfo,
- const char *constraintName,
- char constraintType,
- bits16 constr_flags,
- bool allow_system_table_mods,
- bool is_internal);
-
-extern void index_drop(Oid indexId, bool concurrent, bool concurrent_lock_mode);
-
-extern IndexInfo *BuildIndexInfo(Relation index);
-
-extern IndexInfo *BuildDummyIndexInfo(Relation index);
-
-extern bool CompareIndexInfo(IndexInfo *info1, IndexInfo *info2,
- Oid *collations1, Oid *collations2,
- Oid *opfamilies1, Oid *opfamilies2,
- AttrMap *attmap);
-
-extern void BuildSpeculativeIndexInfo(Relation index, IndexInfo *ii);
-
-extern void FormIndexDatum(IndexInfo *indexInfo,
- TupleTableSlot *slot,
- EState *estate,
- Datum *values,
- bool *isnull);
-
-extern void index_build(Relation heapRelation,
- Relation indexRelation,
- IndexInfo *indexInfo,
- bool isreindex,
- bool parallel);
-
-extern void validate_index(Oid heapId, Oid indexId, Snapshot snapshot);
-
-extern void index_set_state_flags(Oid indexId, IndexStateFlagsAction action);
-
-extern Oid IndexGetRelation(Oid indexId, bool missing_ok);
-
-extern void reindex_index(Oid indexId, bool skip_constraint_checks,
- char relpersistence, ReindexParams *params);
-
-/* Flag bits for reindex_relation(): */
-#define REINDEX_REL_PROCESS_TOAST 0x01
-#define REINDEX_REL_SUPPRESS_INDEX_USE 0x02
-#define REINDEX_REL_CHECK_CONSTRAINTS 0x04
-#define REINDEX_REL_FORCE_INDEXES_UNLOGGED 0x08
-#define REINDEX_REL_FORCE_INDEXES_PERMANENT 0x10
-
-extern bool reindex_relation(Oid relid, int flags, ReindexParams *params);
-
-extern bool ReindexIsProcessingHeap(Oid heapOid);
-extern bool ReindexIsProcessingIndex(Oid indexOid);
-
-extern void ResetReindexState(int nestLevel);
-extern Size EstimateReindexStateSpace(void);
-extern void SerializeReindexState(Size maxsize, char *start_address);
-extern void RestoreReindexState(void *reindexstate);
-
-extern void IndexSetParentIndex(Relation idx, Oid parentOid);
-
-
-/*
- * itemptr_encode - Encode ItemPointer as int64/int8
- *
- * This representation must produce values encoded as int64 that sort in the
- * same order as their corresponding original TID values would (using the
- * default int8 opclass to produce a result equivalent to the default TID
- * opclass).
- *
- * As noted in validate_index(), this can be significantly faster.
- */
-static inline int64
-itemptr_encode(ItemPointer itemptr)
-{
- BlockNumber block = ItemPointerGetBlockNumber(itemptr);
- OffsetNumber offset = ItemPointerGetOffsetNumber(itemptr);
- int64 encoded;
-
- /*
- * Use the 16 least significant bits for the offset. 32 adjacent bits are
- * used for the block number. Since remaining bits are unused, there
- * cannot be negative encoded values (We assume a two's complement
- * representation).
- */
- encoded = ((uint64) block << 16) | (uint16) offset;
-
- return encoded;
-}
-
-/*
- * itemptr_decode - Decode int64/int8 representation back to ItemPointer
- */
-static inline void
-itemptr_decode(ItemPointer itemptr, int64 encoded)
-{
- BlockNumber block = (BlockNumber) (encoded >> 16);
- OffsetNumber offset = (OffsetNumber) (encoded & 0xFFFF);
-
- ItemPointerSet(itemptr, block, offset);
-}
-
-#endif /* INDEX_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/indexing.h b/contrib/libs/postgresql/src/include/catalog/indexing.h
deleted file mode 100644
index 758ec42e501..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/indexing.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * indexing.h
- * This file provides some definitions to support indexing
- * on system catalogs
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/indexing.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef INDEXING_H
-#define INDEXING_H
-
-#include "access/htup.h"
-#include "nodes/execnodes.h"
-#include "utils/relcache.h"
-
-/*
- * The state object used by CatalogOpenIndexes and friends is actually the
- * same as the executor's ResultRelInfo, but we give it another type name
- * to decouple callers from that fact.
- */
-typedef struct ResultRelInfo *CatalogIndexState;
-
-/*
- * Cap the maximum amount of bytes allocated for multi-inserts with system
- * catalogs, limiting the number of slots used.
- */
-#define MAX_CATALOG_MULTI_INSERT_BYTES 65535
-
-/*
- * indexing.c prototypes
- */
-extern CatalogIndexState CatalogOpenIndexes(Relation heapRel);
-extern void CatalogCloseIndexes(CatalogIndexState indstate);
-extern void CatalogTupleInsert(Relation heapRel, HeapTuple tup);
-extern void CatalogTupleInsertWithInfo(Relation heapRel, HeapTuple tup,
- CatalogIndexState indstate);
-extern void CatalogTuplesMultiInsertWithInfo(Relation heapRel,
- TupleTableSlot **slot,
- int ntuples,
- CatalogIndexState indstate);
-extern void CatalogTupleUpdate(Relation heapRel, ItemPointer otid,
- HeapTuple tup);
-extern void CatalogTupleUpdateWithInfo(Relation heapRel,
- ItemPointer otid, HeapTuple tup,
- CatalogIndexState indstate);
-extern void CatalogTupleDelete(Relation heapRel, ItemPointer tid);
-
-#endif /* INDEXING_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/namespace.h b/contrib/libs/postgresql/src/include/catalog/namespace.h
deleted file mode 100644
index b98f2843560..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/namespace.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * namespace.h
- * prototypes for functions in backend/catalog/namespace.c
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/namespace.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef NAMESPACE_H
-#define NAMESPACE_H
-
-#include "nodes/primnodes.h"
-#include "storage/lock.h"
-
-
-/*
- * This structure holds a list of possible functions or operators
- * found by namespace lookup. Each function/operator is identified
- * by OID and by argument types; the list must be pruned by type
- * resolution rules that are embodied in the parser, not here.
- * See FuncnameGetCandidates's comments for more info.
- */
-typedef struct _FuncCandidateList
-{
- struct _FuncCandidateList *next;
- int pathpos; /* for internal use of namespace lookup */
- Oid oid; /* the function or operator's OID */
- int nominalnargs; /* either pronargs or length(proallargtypes) */
- int nargs; /* number of arg types returned */
- int nvargs; /* number of args to become variadic array */
- int ndargs; /* number of defaulted args */
- int *argnumbers; /* args' positional indexes, if named call */
- Oid args[FLEXIBLE_ARRAY_MEMBER]; /* arg types */
-} *FuncCandidateList;
-
-/*
- * Result of checkTempNamespaceStatus
- */
-typedef enum TempNamespaceStatus
-{
- TEMP_NAMESPACE_NOT_TEMP, /* nonexistent, or non-temp namespace */
- TEMP_NAMESPACE_IDLE, /* exists, belongs to no active session */
- TEMP_NAMESPACE_IN_USE /* belongs to some active session */
-} TempNamespaceStatus;
-
-/*
- * Structure for xxxOverrideSearchPath functions
- *
- * The generation counter is private to namespace.c and shouldn't be touched
- * by other code. It can be initialized to zero if necessary (that means
- * "not known equal to the current active path").
- */
-typedef struct OverrideSearchPath
-{
- List *schemas; /* OIDs of explicitly named schemas */
- bool addCatalog; /* implicitly prepend pg_catalog? */
- bool addTemp; /* implicitly prepend temp schema? */
- uint64 generation; /* for quick detection of equality to active */
-} OverrideSearchPath;
-
-/*
- * Option flag bits for RangeVarGetRelidExtended().
- */
-typedef enum RVROption
-{
- RVR_MISSING_OK = 1 << 0, /* don't error if relation doesn't exist */
- RVR_NOWAIT = 1 << 1, /* error if relation cannot be locked */
- RVR_SKIP_LOCKED = 1 << 2 /* skip if relation cannot be locked */
-} RVROption;
-
-typedef void (*RangeVarGetRelidCallback) (const RangeVar *relation, Oid relId,
- Oid oldRelId, void *callback_arg);
-
-#define RangeVarGetRelid(relation, lockmode, missing_ok) \
- RangeVarGetRelidExtended(relation, lockmode, \
- (missing_ok) ? RVR_MISSING_OK : 0, NULL, NULL)
-
-extern Oid RangeVarGetRelidExtended(const RangeVar *relation,
- LOCKMODE lockmode, uint32 flags,
- RangeVarGetRelidCallback callback,
- void *callback_arg);
-extern Oid RangeVarGetCreationNamespace(const RangeVar *newRelation);
-extern Oid RangeVarGetAndCheckCreationNamespace(RangeVar *newRelation,
- LOCKMODE lockmode,
- Oid *existing_relation_id);
-extern void RangeVarAdjustRelationPersistence(RangeVar *newRelation, Oid nspid);
-extern Oid RelnameGetRelid(const char *relname);
-extern bool RelationIsVisible(Oid relid);
-
-extern Oid TypenameGetTypid(const char *typname);
-extern Oid TypenameGetTypidExtended(const char *typname, bool temp_ok);
-extern bool TypeIsVisible(Oid typid);
-
-extern FuncCandidateList FuncnameGetCandidates(List *names,
- int nargs, List *argnames,
- bool expand_variadic,
- bool expand_defaults,
- bool include_out_arguments,
- bool missing_ok);
-extern bool FunctionIsVisible(Oid funcid);
-
-extern Oid OpernameGetOprid(List *names, Oid oprleft, Oid oprright);
-extern FuncCandidateList OpernameGetCandidates(List *names, char oprkind,
- bool missing_schema_ok);
-extern bool OperatorIsVisible(Oid oprid);
-
-extern Oid OpclassnameGetOpcid(Oid amid, const char *opcname);
-extern bool OpclassIsVisible(Oid opcid);
-
-extern Oid OpfamilynameGetOpfid(Oid amid, const char *opfname);
-extern bool OpfamilyIsVisible(Oid opfid);
-
-extern Oid CollationGetCollid(const char *collname);
-extern bool CollationIsVisible(Oid collid);
-
-extern Oid ConversionGetConid(const char *conname);
-extern bool ConversionIsVisible(Oid conid);
-
-extern Oid get_statistics_object_oid(List *names, bool missing_ok);
-extern bool StatisticsObjIsVisible(Oid relid);
-
-extern Oid get_ts_parser_oid(List *names, bool missing_ok);
-extern bool TSParserIsVisible(Oid prsId);
-
-extern Oid get_ts_dict_oid(List *names, bool missing_ok);
-extern bool TSDictionaryIsVisible(Oid dictId);
-
-extern Oid get_ts_template_oid(List *names, bool missing_ok);
-extern bool TSTemplateIsVisible(Oid tmplId);
-
-extern Oid get_ts_config_oid(List *names, bool missing_ok);
-extern bool TSConfigIsVisible(Oid cfgid);
-
-extern void DeconstructQualifiedName(List *names,
- char **nspname_p,
- char **objname_p);
-extern Oid LookupNamespaceNoError(const char *nspname);
-extern Oid LookupExplicitNamespace(const char *nspname, bool missing_ok);
-extern Oid get_namespace_oid(const char *nspname, bool missing_ok);
-
-extern Oid LookupCreationNamespace(const char *nspname);
-extern void CheckSetNamespace(Oid oldNspOid, Oid nspOid);
-extern Oid QualifiedNameGetCreationNamespace(List *names, char **objname_p);
-extern RangeVar *makeRangeVarFromNameList(List *names);
-extern char *NameListToString(List *names);
-extern char *NameListToQuotedString(List *names);
-
-extern bool isTempNamespace(Oid namespaceId);
-extern bool isTempToastNamespace(Oid namespaceId);
-extern bool isTempOrTempToastNamespace(Oid namespaceId);
-extern bool isAnyTempNamespace(Oid namespaceId);
-extern bool isOtherTempNamespace(Oid namespaceId);
-extern TempNamespaceStatus checkTempNamespaceStatus(Oid namespaceId);
-extern int GetTempNamespaceBackendId(Oid namespaceId);
-extern Oid GetTempToastNamespace(void);
-extern void GetTempNamespaceState(Oid *tempNamespaceId,
- Oid *tempToastNamespaceId);
-extern void SetTempNamespaceState(Oid tempNamespaceId,
- Oid tempToastNamespaceId);
-extern void ResetTempTableNamespace(void);
-
-extern OverrideSearchPath *GetOverrideSearchPath(MemoryContext context);
-extern OverrideSearchPath *CopyOverrideSearchPath(OverrideSearchPath *path);
-extern bool OverrideSearchPathMatchesCurrent(OverrideSearchPath *path);
-extern void PushOverrideSearchPath(OverrideSearchPath *newpath);
-extern void PopOverrideSearchPath(void);
-
-extern Oid get_collation_oid(List *collname, bool missing_ok);
-extern Oid get_conversion_oid(List *conname, bool missing_ok);
-extern Oid FindDefaultConversionProc(int32 for_encoding, int32 to_encoding);
-
-
-/* initialization & transaction cleanup code */
-extern void InitializeSearchPath(void);
-extern void AtEOXact_Namespace(bool isCommit, bool parallel);
-extern void AtEOSubXact_Namespace(bool isCommit, SubTransactionId mySubid,
- SubTransactionId parentSubid);
-
-/* stuff for search_path GUC variable */
-extern char *namespace_search_path;
-
-extern List *fetch_search_path(bool includeImplicit);
-extern int fetch_search_path_array(Oid *sarray, int sarray_len);
-
-#endif /* NAMESPACE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/objectaccess.h b/contrib/libs/postgresql/src/include/catalog/objectaccess.h
deleted file mode 100644
index 896c3a0fdc5..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/objectaccess.h
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * objectaccess.h
- *
- * Object access hooks.
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- */
-
-#ifndef OBJECTACCESS_H
-#define OBJECTACCESS_H
-
-/*
- * Object access hooks are intended to be called just before or just after
- * performing certain actions on a SQL object. This is intended as
- * infrastructure for security or logging plugins.
- *
- * OAT_POST_CREATE should be invoked just after the object is created.
- * Typically, this is done after inserting the primary catalog records and
- * associated dependencies.
- *
- * OAT_DROP should be invoked just before deletion of objects; typically
- * deleteOneObject(). Its arguments are packed within ObjectAccessDrop.
- *
- * OAT_POST_ALTER should be invoked just after the object is altered,
- * but before the command counter is incremented. An extension using the
- * hook can use a current MVCC snapshot to get the old version of the tuple,
- * and can use SnapshotSelf to get the new version of the tuple.
- *
- * OAT_NAMESPACE_SEARCH should be invoked prior to object name lookup under
- * a particular namespace. This event is equivalent to usage permission
- * on a schema under the default access control mechanism.
- *
- * OAT_FUNCTION_EXECUTE should be invoked prior to function execution.
- * This event is almost equivalent to execute permission on functions,
- * except for the case when execute permission is checked during object
- * creation or altering, because OAT_POST_CREATE or OAT_POST_ALTER are
- * sufficient for extensions to track these kind of checks.
- *
- * OAT_TRUNCATE should be invoked just before truncation of objects. This
- * event is equivalent to truncate permission on a relation under the
- * default access control mechanism.
- *
- * Other types may be added in the future.
- */
-typedef enum ObjectAccessType
-{
- OAT_POST_CREATE,
- OAT_DROP,
- OAT_POST_ALTER,
- OAT_NAMESPACE_SEARCH,
- OAT_FUNCTION_EXECUTE,
- OAT_TRUNCATE
-} ObjectAccessType;
-
-/*
- * Arguments of OAT_POST_CREATE event
- */
-typedef struct
-{
- /*
- * This flag informs extensions whether the context of this creation is
- * invoked by user's operations, or not. E.g, it shall be dealt as
- * internal stuff on toast tables or indexes due to type changes.
- */
- bool is_internal;
-} ObjectAccessPostCreate;
-
-/*
- * Arguments of OAT_DROP event
- */
-typedef struct
-{
- /*
- * Flags to inform extensions the context of this deletion. Also see
- * PERFORM_DELETION_* in dependency.h
- */
- int dropflags;
-} ObjectAccessDrop;
-
-/*
- * Arguments of OAT_POST_ALTER event
- */
-typedef struct
-{
- /*
- * This identifier is used when system catalog takes two IDs to identify a
- * particular tuple of the catalog. It is only used when the caller want
- * to identify an entry of pg_inherits, pg_db_role_setting or
- * pg_user_mapping. Elsewhere, InvalidOid should be set.
- */
- Oid auxiliary_id;
-
- /*
- * If this flag is set, the user hasn't requested that the object be
- * altered, but we're doing it anyway for some internal reason.
- * Permissions-checking hooks may want to skip checks if, say, we're alter
- * the constraints of a temporary heap during CLUSTER.
- */
- bool is_internal;
-} ObjectAccessPostAlter;
-
-/*
- * Arguments of OAT_NAMESPACE_SEARCH
- */
-typedef struct
-{
- /*
- * If true, hook should report an error when permission to search this
- * schema is denied.
- */
- bool ereport_on_violation;
-
- /*
- * This is, in essence, an out parameter. Core code should initialize
- * this to true, and any extension that wants to deny access should reset
- * it to false. But an extension should be careful never to store a true
- * value here, so that in case there are multiple extensions access is
- * only allowed if all extensions agree.
- */
- bool result;
-} ObjectAccessNamespaceSearch;
-
-/* Plugin provides a hook function matching this signature. */
-typedef void (*object_access_hook_type) (ObjectAccessType access,
- Oid classId,
- Oid objectId,
- int subId,
- void *arg);
-
-/* Plugin sets this variable to a suitable hook function. */
-extern PGDLLIMPORT object_access_hook_type object_access_hook;
-
-/* Core code uses these functions to call the hook (see macros below). */
-extern void RunObjectPostCreateHook(Oid classId, Oid objectId, int subId,
- bool is_internal);
-extern void RunObjectDropHook(Oid classId, Oid objectId, int subId,
- int dropflags);
-extern void RunObjectTruncateHook(Oid objectId);
-extern void RunObjectPostAlterHook(Oid classId, Oid objectId, int subId,
- Oid auxiliaryId, bool is_internal);
-extern bool RunNamespaceSearchHook(Oid objectId, bool ereport_on_violation);
-extern void RunFunctionExecuteHook(Oid objectId);
-
-/*
- * The following macros are wrappers around the functions above; these should
- * normally be used to invoke the hook in lieu of calling the above functions
- * directly.
- */
-
-#define InvokeObjectPostCreateHook(classId,objectId,subId) \
- InvokeObjectPostCreateHookArg((classId),(objectId),(subId),false)
-#define InvokeObjectPostCreateHookArg(classId,objectId,subId,is_internal) \
- do { \
- if (object_access_hook) \
- RunObjectPostCreateHook((classId),(objectId),(subId), \
- (is_internal)); \
- } while(0)
-
-#define InvokeObjectDropHook(classId,objectId,subId) \
- InvokeObjectDropHookArg((classId),(objectId),(subId),0)
-#define InvokeObjectDropHookArg(classId,objectId,subId,dropflags) \
- do { \
- if (object_access_hook) \
- RunObjectDropHook((classId),(objectId),(subId), \
- (dropflags)); \
- } while(0)
-
-#define InvokeObjectTruncateHook(objectId) \
- do { \
- if (object_access_hook) \
- RunObjectTruncateHook(objectId); \
- } while(0)
-
-#define InvokeObjectPostAlterHook(classId,objectId,subId) \
- InvokeObjectPostAlterHookArg((classId),(objectId),(subId), \
- InvalidOid,false)
-#define InvokeObjectPostAlterHookArg(classId,objectId,subId, \
- auxiliaryId,is_internal) \
- do { \
- if (object_access_hook) \
- RunObjectPostAlterHook((classId),(objectId),(subId), \
- (auxiliaryId),(is_internal)); \
- } while(0)
-
-#define InvokeNamespaceSearchHook(objectId, ereport_on_violation) \
- (!object_access_hook \
- ? true \
- : RunNamespaceSearchHook((objectId), (ereport_on_violation)))
-
-#define InvokeFunctionExecuteHook(objectId) \
- do { \
- if (object_access_hook) \
- RunFunctionExecuteHook(objectId); \
- } while(0)
-
-#endif /* OBJECTACCESS_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/objectaddress.h b/contrib/libs/postgresql/src/include/catalog/objectaddress.h
deleted file mode 100644
index 2b4e104bb9d..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/objectaddress.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * objectaddress.h
- * functions for working with object addresses
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/objectaddress.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef OBJECTADDRESS_H
-#define OBJECTADDRESS_H
-
-#include "access/htup.h"
-#include "nodes/parsenodes.h"
-#include "storage/lockdefs.h"
-#include "utils/relcache.h"
-
-/*
- * An ObjectAddress represents a database object of any type.
- */
-typedef struct ObjectAddress
-{
- Oid classId; /* Class Id from pg_class */
- Oid objectId; /* OID of the object */
- int32 objectSubId; /* Subitem within object (eg column), or 0 */
-} ObjectAddress;
-
-extern const ObjectAddress InvalidObjectAddress;
-
-#define ObjectAddressSubSet(addr, class_id, object_id, object_sub_id) \
- do { \
- (addr).classId = (class_id); \
- (addr).objectId = (object_id); \
- (addr).objectSubId = (object_sub_id); \
- } while (0)
-
-#define ObjectAddressSet(addr, class_id, object_id) \
- ObjectAddressSubSet(addr, class_id, object_id, 0)
-
-extern ObjectAddress get_object_address(ObjectType objtype, Node *object,
- Relation *relp,
- LOCKMODE lockmode, bool missing_ok);
-
-extern ObjectAddress get_object_address_rv(ObjectType objtype, RangeVar *rel,
- List *object, Relation *relp,
- LOCKMODE lockmode, bool missing_ok);
-
-extern void check_object_ownership(Oid roleid,
- ObjectType objtype, ObjectAddress address,
- Node *object, Relation relation);
-
-extern Oid get_object_namespace(const ObjectAddress *address);
-
-extern bool is_objectclass_supported(Oid class_id);
-extern const char *get_object_class_descr(Oid class_id);
-extern Oid get_object_oid_index(Oid class_id);
-extern int get_object_catcache_oid(Oid class_id);
-extern int get_object_catcache_name(Oid class_id);
-extern AttrNumber get_object_attnum_oid(Oid class_id);
-extern AttrNumber get_object_attnum_name(Oid class_id);
-extern AttrNumber get_object_attnum_namespace(Oid class_id);
-extern AttrNumber get_object_attnum_owner(Oid class_id);
-extern AttrNumber get_object_attnum_acl(Oid class_id);
-extern ObjectType get_object_type(Oid class_id, Oid object_id);
-extern bool get_object_namensp_unique(Oid class_id);
-
-extern HeapTuple get_catalog_object_by_oid(Relation catalog,
- AttrNumber oidcol, Oid objectId);
-
-extern char *getObjectDescription(const ObjectAddress *object,
- bool missing_ok);
-extern char *getObjectDescriptionOids(Oid classid, Oid objid);
-
-extern int read_objtype_from_string(const char *objtype);
-extern char *getObjectTypeDescription(const ObjectAddress *object,
- bool missing_ok);
-extern char *getObjectIdentity(const ObjectAddress *address,
- bool missing_ok);
-extern char *getObjectIdentityParts(const ObjectAddress *address,
- List **objname, List **objargs,
- bool missing_ok);
-extern struct ArrayType *strlist_to_textarray(List *list);
-
-extern ObjectType get_relkind_objtype(char relkind);
-
-#endif /* OBJECTADDRESS_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/partition.h b/contrib/libs/postgresql/src/include/catalog/partition.h
deleted file mode 100644
index c8c7bc1d998..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/partition.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * partition.h
- * Header file for structures and utility functions related to
- * partitioning
- *
- * Copyright (c) 2007-2021, PostgreSQL Global Development Group
- *
- * src/include/catalog/partition.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PARTITION_H
-#define PARTITION_H
-
-#include "partitioning/partdefs.h"
-#include "utils/relcache.h"
-
-/* Seed for the extended hash function */
-#define HASH_PARTITION_SEED UINT64CONST(0x7A5B22367996DCFD)
-
-extern Oid get_partition_parent(Oid relid, bool even_if_detached);
-extern List *get_partition_ancestors(Oid relid);
-extern Oid index_get_partition(Relation partition, Oid indexId);
-extern List *map_partition_varattnos(List *expr, int fromrel_varno,
- Relation to_rel, Relation from_rel);
-extern bool has_partition_attrs(Relation rel, Bitmapset *attnums,
- bool *used_in_expr);
-
-extern Oid get_default_partition_oid(Oid parentId);
-extern void update_default_partition_oid(Oid parentId, Oid defaultPartId);
-extern List *get_proposed_default_constraint(List *new_part_constraints);
-
-#endif /* PARTITION_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_aggregate.h b/contrib/libs/postgresql/src/include/catalog/pg_aggregate.h
deleted file mode 100644
index 25feb41678f..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_aggregate.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_aggregate.h
- * definition of the "aggregate" system catalog (pg_aggregate)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_aggregate.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_AGGREGATE_H
-#define PG_AGGREGATE_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_aggregate_d.h"
-
-#include "catalog/objectaddress.h"
-#include "nodes/pg_list.h"
-
-/* ----------------------------------------------------------------
- * pg_aggregate definition.
- * cpp turns this into typedef struct FormData_pg_aggregate
- * ----------------------------------------------------------------
- */
-CATALOG(pg_aggregate,2600,AggregateRelationId)
-{
- /* pg_proc OID of the aggregate itself */
- regproc aggfnoid BKI_LOOKUP(pg_proc);
-
- /* aggregate kind, see AGGKIND_ categories below */
- char aggkind BKI_DEFAULT(n);
-
- /* number of arguments that are "direct" arguments */
- int16 aggnumdirectargs BKI_DEFAULT(0);
-
- /* transition function */
- regproc aggtransfn BKI_LOOKUP(pg_proc);
-
- /* final function (0 if none) */
- regproc aggfinalfn BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc);
-
- /* combine function (0 if none) */
- regproc aggcombinefn BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc);
-
- /* function to convert transtype to bytea (0 if none) */
- regproc aggserialfn BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc);
-
- /* function to convert bytea to transtype (0 if none) */
- regproc aggdeserialfn BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc);
-
- /* forward function for moving-aggregate mode (0 if none) */
- regproc aggmtransfn BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc);
-
- /* inverse function for moving-aggregate mode (0 if none) */
- regproc aggminvtransfn BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc);
-
- /* final function for moving-aggregate mode (0 if none) */
- regproc aggmfinalfn BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc);
-
- /* true to pass extra dummy arguments to aggfinalfn */
- bool aggfinalextra BKI_DEFAULT(f);
-
- /* true to pass extra dummy arguments to aggmfinalfn */
- bool aggmfinalextra BKI_DEFAULT(f);
-
- /* tells whether aggfinalfn modifies transition state */
- char aggfinalmodify BKI_DEFAULT(r);
-
- /* tells whether aggmfinalfn modifies transition state */
- char aggmfinalmodify BKI_DEFAULT(r);
-
- /* associated sort operator (0 if none) */
- Oid aggsortop BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_operator);
-
- /* type of aggregate's transition (state) data */
- Oid aggtranstype BKI_LOOKUP(pg_type);
-
- /* estimated size of state data (0 for default estimate) */
- int32 aggtransspace BKI_DEFAULT(0);
-
- /* type of moving-aggregate state data (0 if none) */
- Oid aggmtranstype BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_type);
-
- /* estimated size of moving-agg state (0 for default est) */
- int32 aggmtransspace BKI_DEFAULT(0);
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
-
- /* initial value for transition state (can be NULL) */
- text agginitval BKI_DEFAULT(_null_);
-
- /* initial value for moving-agg state (can be NULL) */
- text aggminitval BKI_DEFAULT(_null_);
-#endif
-} FormData_pg_aggregate;
-
-/* ----------------
- * Form_pg_aggregate corresponds to a pointer to a tuple with
- * the format of pg_aggregate relation.
- * ----------------
- */
-typedef FormData_pg_aggregate *Form_pg_aggregate;
-
-DECLARE_TOAST(pg_aggregate, 4159, 4160);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_aggregate_fnoid_index, 2650, on pg_aggregate using btree(aggfnoid oid_ops));
-#define AggregateFnoidIndexId 2650
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-/*
- * Symbolic values for aggkind column. We distinguish normal aggregates
- * from ordered-set aggregates (which have two sets of arguments, namely
- * direct and aggregated arguments) and from hypothetical-set aggregates
- * (which are a subclass of ordered-set aggregates in which the last
- * direct arguments have to match up in number and datatypes with the
- * aggregated arguments).
- */
-#define AGGKIND_NORMAL 'n'
-#define AGGKIND_ORDERED_SET 'o'
-#define AGGKIND_HYPOTHETICAL 'h'
-
-/* Use this macro to test for "ordered-set agg including hypothetical case" */
-#define AGGKIND_IS_ORDERED_SET(kind) ((kind) != AGGKIND_NORMAL)
-
-/*
- * Symbolic values for aggfinalmodify and aggmfinalmodify columns.
- * Preferably, finalfns do not modify the transition state value at all,
- * but in some cases that would cost too much performance. We distinguish
- * "pure read only" and "trashes it arbitrarily" cases, as well as the
- * intermediate case where multiple finalfn calls are allowed but the
- * transfn cannot be applied anymore after the first finalfn call.
- */
-#define AGGMODIFY_READ_ONLY 'r'
-#define AGGMODIFY_SHAREABLE 's'
-#define AGGMODIFY_READ_WRITE 'w'
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-
-extern ObjectAddress AggregateCreate(const char *aggName,
- Oid aggNamespace,
- bool replace,
- char aggKind,
- int numArgs,
- int numDirectArgs,
- oidvector *parameterTypes,
- Datum allParameterTypes,
- Datum parameterModes,
- Datum parameterNames,
- List *parameterDefaults,
- Oid variadicArgType,
- List *aggtransfnName,
- List *aggfinalfnName,
- List *aggcombinefnName,
- List *aggserialfnName,
- List *aggdeserialfnName,
- List *aggmtransfnName,
- List *aggminvtransfnName,
- List *aggmfinalfnName,
- bool finalfnExtraArgs,
- bool mfinalfnExtraArgs,
- char finalfnModify,
- char mfinalfnModify,
- List *aggsortopName,
- Oid aggTransType,
- int32 aggTransSpace,
- Oid aggmTransType,
- int32 aggmTransSpace,
- const char *agginitval,
- const char *aggminitval,
- char proparallel);
-
-#endif /* PG_AGGREGATE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_aggregate_d.h b/contrib/libs/postgresql/src/include/catalog/pg_aggregate_d.h
deleted file mode 100644
index 0e5ce1127f1..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_aggregate_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_aggregate_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_am.dat b/contrib/libs/postgresql/src/include/catalog/pg_am.dat
deleted file mode 100644
index 6082f0e6a8f..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_am.dat
+++ /dev/null
@@ -1,37 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_am.dat
-# Initial contents of the pg_am system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_am.dat
-#
-#----------------------------------------------------------------------
-
-[
-
-{ oid => '2', oid_symbol => 'HEAP_TABLE_AM_OID',
- descr => 'heap table access method',
- amname => 'heap', amhandler => 'heap_tableam_handler', amtype => 't' },
-{ oid => '403', oid_symbol => 'BTREE_AM_OID',
- descr => 'b-tree index access method',
- amname => 'btree', amhandler => 'bthandler', amtype => 'i' },
-{ oid => '405', oid_symbol => 'HASH_AM_OID',
- descr => 'hash index access method',
- amname => 'hash', amhandler => 'hashhandler', amtype => 'i' },
-{ oid => '783', oid_symbol => 'GIST_AM_OID',
- descr => 'GiST index access method',
- amname => 'gist', amhandler => 'gisthandler', amtype => 'i' },
-{ oid => '2742', oid_symbol => 'GIN_AM_OID',
- descr => 'GIN index access method',
- amname => 'gin', amhandler => 'ginhandler', amtype => 'i' },
-{ oid => '4000', oid_symbol => 'SPGIST_AM_OID',
- descr => 'SP-GiST index access method',
- amname => 'spgist', amhandler => 'spghandler', amtype => 'i' },
-{ oid => '3580', oid_symbol => 'BRIN_AM_OID',
- descr => 'block range index (BRIN) access method',
- amname => 'brin', amhandler => 'brinhandler', amtype => 'i' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_am.h b/contrib/libs/postgresql/src/include/catalog/pg_am.h
deleted file mode 100644
index ced86faef84..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_am.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_am.h
- * definition of the "access method" system catalog (pg_am)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_am.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_AM_H
-#define PG_AM_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_am_d.h"
-
-/* ----------------
- * pg_am definition. cpp turns this into
- * typedef struct FormData_pg_am
- * ----------------
- */
-CATALOG(pg_am,2601,AccessMethodRelationId)
-{
- Oid oid; /* oid */
-
- /* access method name */
- NameData amname;
-
- /* handler function */
- regproc amhandler BKI_LOOKUP(pg_proc);
-
- /* see AMTYPE_xxx constants below */
- char amtype;
-} FormData_pg_am;
-
-/* ----------------
- * Form_pg_am corresponds to a pointer to a tuple with
- * the format of pg_am relation.
- * ----------------
- */
-typedef FormData_pg_am *Form_pg_am;
-
-DECLARE_UNIQUE_INDEX(pg_am_name_index, 2651, on pg_am using btree(amname name_ops));
-#define AmNameIndexId 2651
-DECLARE_UNIQUE_INDEX_PKEY(pg_am_oid_index, 2652, on pg_am using btree(oid oid_ops));
-#define AmOidIndexId 2652
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-/*
- * Allowed values for amtype
- */
-#define AMTYPE_INDEX 'i' /* index access method */
-#define AMTYPE_TABLE 't' /* table access method */
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-#endif /* PG_AM_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_am_d.h b/contrib/libs/postgresql/src/include/catalog/pg_am_d.h
deleted file mode 100644
index 607bfd8cee6..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_am_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_am_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_amop.h b/contrib/libs/postgresql/src/include/catalog/pg_amop.h
deleted file mode 100644
index e1cca35e312..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_amop.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_amop.h
- * definition of the "access method operator" system catalog (pg_amop)
- *
- * The amop table identifies the operators associated with each index operator
- * family and operator class (classes are subsets of families). An associated
- * operator can be either a search operator or an ordering operator, as
- * identified by amoppurpose.
- *
- * The primary key for this table is <amopfamily, amoplefttype, amoprighttype,
- * amopstrategy>. amoplefttype and amoprighttype are just copies of the
- * operator's oprleft/oprright, ie its declared input data types. The
- * "default" operators for a particular opclass within the family are those
- * with amoplefttype = amoprighttype = opclass's opcintype. An opfamily may
- * also contain other operators, typically cross-data-type operators. All the
- * operators within a family are supposed to be compatible, in a way that is
- * defined by each individual index AM.
- *
- * We also keep a unique index on <amopopr, amoppurpose, amopfamily>, so that
- * we can use a syscache to quickly answer questions of the form "is this
- * operator in this opfamily, and if so what are its semantics with respect to
- * the family?" This implies that the same operator cannot be listed for
- * multiple strategy numbers within a single opfamily, with the exception that
- * it's possible to list it for both search and ordering purposes (with
- * different strategy numbers for the two purposes).
- *
- * amopmethod is a copy of the owning opfamily's opfmethod field. This is an
- * intentional denormalization of the catalogs to buy lookup speed.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_amop.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_AMOP_H
-#define PG_AMOP_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_amop_d.h"
-
-/* ----------------
- * pg_amop definition. cpp turns this into
- * typedef struct FormData_pg_amop
- * ----------------
- */
-CATALOG(pg_amop,2602,AccessMethodOperatorRelationId)
-{
- Oid oid; /* oid */
-
- /* the index opfamily this entry is for */
- Oid amopfamily BKI_LOOKUP(pg_opfamily);
-
- /* operator's left input data type */
- Oid amoplefttype BKI_LOOKUP(pg_type);
-
- /* operator's right input data type */
- Oid amoprighttype BKI_LOOKUP(pg_type);
-
- /* operator strategy number */
- int16 amopstrategy;
-
- /* is operator for 's'earch or 'o'rdering? */
- char amoppurpose BKI_DEFAULT(s);
-
- /* the operator's pg_operator OID */
- Oid amopopr BKI_LOOKUP(pg_operator);
-
- /* the index access method this entry is for */
- Oid amopmethod BKI_LOOKUP(pg_am);
-
- /* ordering opfamily OID, or 0 if search op */
- Oid amopsortfamily BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_opfamily);
-} FormData_pg_amop;
-
-/* ----------------
- * Form_pg_amop corresponds to a pointer to a tuple with
- * the format of pg_amop relation.
- * ----------------
- */
-typedef FormData_pg_amop *Form_pg_amop;
-
-DECLARE_UNIQUE_INDEX(pg_amop_fam_strat_index, 2653, on pg_amop using btree(amopfamily oid_ops, amoplefttype oid_ops, amoprighttype oid_ops, amopstrategy int2_ops));
-#define AccessMethodStrategyIndexId 2653
-DECLARE_UNIQUE_INDEX(pg_amop_opr_fam_index, 2654, on pg_amop using btree(amopopr oid_ops, amoppurpose char_ops, amopfamily oid_ops));
-#define AccessMethodOperatorIndexId 2654
-DECLARE_UNIQUE_INDEX_PKEY(pg_amop_oid_index, 2756, on pg_amop using btree(oid oid_ops));
-#define AccessMethodOperatorOidIndexId 2756
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-/* allowed values of amoppurpose: */
-#define AMOP_SEARCH 's' /* operator is for search */
-#define AMOP_ORDER 'o' /* operator is for ordering */
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-#endif /* PG_AMOP_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_amop_d.h b/contrib/libs/postgresql/src/include/catalog/pg_amop_d.h
deleted file mode 100644
index 3bf63b84c49..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_amop_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_amop_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_amproc.h b/contrib/libs/postgresql/src/include/catalog/pg_amproc.h
deleted file mode 100644
index 8a727c359a4..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_amproc.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_amproc.h
- * definition of the "access method procedure" system catalog (pg_amproc)
- *
- * The amproc table identifies support procedures associated with index
- * operator families and classes. These procedures can't be listed in pg_amop
- * since they are not the implementation of any indexable operator.
- *
- * The primary key for this table is <amprocfamily, amproclefttype,
- * amprocrighttype, amprocnum>. The "default" support functions for a
- * particular opclass within the family are those with amproclefttype =
- * amprocrighttype = opclass's opcintype. These are the ones loaded into the
- * relcache for an index and typically used for internal index operations.
- * Other support functions are typically used to handle cross-type indexable
- * operators with oprleft/oprright matching the entry's amproclefttype and
- * amprocrighttype. The exact behavior depends on the index AM, however, and
- * some don't pay attention to non-default functions at all.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_amproc.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_AMPROC_H
-#define PG_AMPROC_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_amproc_d.h"
-
-/* ----------------
- * pg_amproc definition. cpp turns this into
- * typedef struct FormData_pg_amproc
- * ----------------
- */
-CATALOG(pg_amproc,2603,AccessMethodProcedureRelationId)
-{
- Oid oid; /* oid */
-
- /* the index opfamily this entry is for */
- Oid amprocfamily BKI_LOOKUP(pg_opfamily);
-
- /* procedure's left input data type */
- Oid amproclefttype BKI_LOOKUP(pg_type);
-
- /* procedure's right input data type */
- Oid amprocrighttype BKI_LOOKUP(pg_type);
-
- /* support procedure index */
- int16 amprocnum;
-
- /* OID of the proc */
- regproc amproc BKI_LOOKUP(pg_proc);
-} FormData_pg_amproc;
-
-/* ----------------
- * Form_pg_amproc corresponds to a pointer to a tuple with
- * the format of pg_amproc relation.
- * ----------------
- */
-typedef FormData_pg_amproc *Form_pg_amproc;
-
-DECLARE_UNIQUE_INDEX(pg_amproc_fam_proc_index, 2655, on pg_amproc using btree(amprocfamily oid_ops, amproclefttype oid_ops, amprocrighttype oid_ops, amprocnum int2_ops));
-#define AccessMethodProcedureIndexId 2655
-DECLARE_UNIQUE_INDEX_PKEY(pg_amproc_oid_index, 2757, on pg_amproc using btree(oid oid_ops));
-#define AccessMethodProcedureOidIndexId 2757
-
-#endif /* PG_AMPROC_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_amproc_d.h b/contrib/libs/postgresql/src/include/catalog/pg_amproc_d.h
deleted file mode 100644
index 7df62bb78f3..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_amproc_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_amproc_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_attrdef.h b/contrib/libs/postgresql/src/include/catalog/pg_attrdef.h
deleted file mode 100644
index d689ca20c85..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_attrdef.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_attrdef.h
- * definition of the "attribute defaults" system catalog (pg_attrdef)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_attrdef.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_ATTRDEF_H
-#define PG_ATTRDEF_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_attrdef_d.h"
-
-/* ----------------
- * pg_attrdef definition. cpp turns this into
- * typedef struct FormData_pg_attrdef
- * ----------------
- */
-CATALOG(pg_attrdef,2604,AttrDefaultRelationId)
-{
- Oid oid; /* oid */
-
- Oid adrelid BKI_LOOKUP(pg_class); /* OID of table containing
- * attribute */
- int16 adnum; /* attnum of attribute */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- pg_node_tree adbin BKI_FORCE_NOT_NULL; /* nodeToString representation of
- * default */
-#endif
-} FormData_pg_attrdef;
-
-/* ----------------
- * Form_pg_attrdef corresponds to a pointer to a tuple with
- * the format of pg_attrdef relation.
- * ----------------
- */
-typedef FormData_pg_attrdef *Form_pg_attrdef;
-
-DECLARE_TOAST(pg_attrdef, 2830, 2831);
-
-DECLARE_UNIQUE_INDEX(pg_attrdef_adrelid_adnum_index, 2656, on pg_attrdef using btree(adrelid oid_ops, adnum int2_ops));
-#define AttrDefaultIndexId 2656
-DECLARE_UNIQUE_INDEX_PKEY(pg_attrdef_oid_index, 2657, on pg_attrdef using btree(oid oid_ops));
-#define AttrDefaultOidIndexId 2657
-
-DECLARE_FOREIGN_KEY((adrelid, adnum), pg_attribute, (attrelid, attnum));
-
-#endif /* PG_ATTRDEF_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_attrdef_d.h b/contrib/libs/postgresql/src/include/catalog/pg_attrdef_d.h
deleted file mode 100644
index a5544bf1e04..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_attrdef_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_attrdef_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_attribute.h b/contrib/libs/postgresql/src/include/catalog/pg_attribute.h
deleted file mode 100644
index 603392fe81b..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_attribute.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_attribute.h
- * definition of the "attribute" system catalog (pg_attribute)
- *
- * The initial contents of pg_attribute are generated at compile time by
- * genbki.pl, so there is no pg_attribute.dat file. Only "bootstrapped"
- * relations need be included.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_attribute.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_ATTRIBUTE_H
-#define PG_ATTRIBUTE_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_attribute_d.h"
-
-/* ----------------
- * pg_attribute definition. cpp turns this into
- * typedef struct FormData_pg_attribute
- *
- * If you change the following, make sure you change the structs for
- * system attributes in catalog/heap.c also.
- * You may need to change catalog/genbki.pl as well.
- * ----------------
- */
-CATALOG(pg_attribute,1249,AttributeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(75,AttributeRelation_Rowtype_Id) BKI_SCHEMA_MACRO
-{
- Oid attrelid BKI_LOOKUP(pg_class); /* OID of relation containing
- * this attribute */
- NameData attname; /* name of attribute */
-
- /*
- * atttypid is the OID of the instance in Catalog Class pg_type that
- * defines the data type of this attribute (e.g. int4). Information in
- * that instance is redundant with the attlen, attbyval, and attalign
- * attributes of this instance, so they had better match or Postgres will
- * fail. In an entry for a dropped column, this field is set to zero
- * since the pg_type entry may no longer exist; but we rely on attlen,
- * attbyval, and attalign to still tell us how large the values in the
- * table are.
- */
- Oid atttypid BKI_LOOKUP_OPT(pg_type);
-
- /*
- * attstattarget is the target number of statistics datapoints to collect
- * during VACUUM ANALYZE of this column. A zero here indicates that we do
- * not wish to collect any stats about this column. A "-1" here indicates
- * that no value has been explicitly set for this column, so ANALYZE
- * should use the default setting.
- */
- int32 attstattarget BKI_DEFAULT(-1);
-
- /*
- * attlen is a copy of the typlen field from pg_type for this attribute.
- * See atttypid comments above.
- */
- int16 attlen;
-
- /*
- * attnum is the "attribute number" for the attribute: A value that
- * uniquely identifies this attribute within its class. For user
- * attributes, Attribute numbers are greater than 0 and not greater than
- * the number of attributes in the class. I.e. if the Class pg_class says
- * that Class XYZ has 10 attributes, then the user attribute numbers in
- * Class pg_attribute must be 1-10.
- *
- * System attributes have attribute numbers less than 0 that are unique
- * within the class, but not constrained to any particular range.
- *
- * Note that (attnum - 1) is often used as the index to an array.
- */
- int16 attnum;
-
- /*
- * attndims is the declared number of dimensions, if an array type,
- * otherwise zero.
- */
- int32 attndims;
-
- /*
- * fastgetattr() uses attcacheoff to cache byte offsets of attributes in
- * heap tuples. The value actually stored in pg_attribute (-1) indicates
- * no cached value. But when we copy these tuples into a tuple
- * descriptor, we may then update attcacheoff in the copies. This speeds
- * up the attribute walking process.
- */
- int32 attcacheoff BKI_DEFAULT(-1);
-
- /*
- * atttypmod records type-specific data supplied at table creation time
- * (for example, the max length of a varchar field). It is passed to
- * type-specific input and output functions as the third argument. The
- * value will generally be -1 for types that do not need typmod.
- */
- int32 atttypmod BKI_DEFAULT(-1);
-
- /*
- * attbyval is a copy of the typbyval field from pg_type for this
- * attribute. See atttypid comments above.
- */
- bool attbyval;
-
- /*
- * attalign is a copy of the typalign field from pg_type for this
- * attribute. See atttypid comments above.
- */
- char attalign;
-
- /*----------
- * attstorage tells for VARLENA attributes, what the heap access
- * methods can do to it if a given tuple doesn't fit into a page.
- * Possible values are as for pg_type.typstorage (see TYPSTORAGE macros).
- *----------
- */
- char attstorage;
-
- /*
- * attcompression sets the current compression method of the attribute.
- * Typically this is InvalidCompressionMethod ('\0') to specify use of the
- * current default setting (see default_toast_compression). Otherwise,
- * 'p' selects pglz compression, while 'l' selects LZ4 compression.
- * However, this field is ignored whenever attstorage does not allow
- * compression.
- */
- char attcompression BKI_DEFAULT('\0');
-
- /* This flag represents the "NOT NULL" constraint */
- bool attnotnull;
-
- /* Has DEFAULT value or not */
- bool atthasdef BKI_DEFAULT(f);
-
- /* Has a missing value or not */
- bool atthasmissing BKI_DEFAULT(f);
-
- /* One of the ATTRIBUTE_IDENTITY_* constants below, or '\0' */
- char attidentity BKI_DEFAULT('\0');
-
- /* One of the ATTRIBUTE_GENERATED_* constants below, or '\0' */
- char attgenerated BKI_DEFAULT('\0');
-
- /* Is dropped (ie, logically invisible) or not */
- bool attisdropped BKI_DEFAULT(f);
-
- /*
- * This flag specifies whether this column has ever had a local
- * definition. It is set for normal non-inherited columns, but also for
- * columns that are inherited from parents if also explicitly listed in
- * CREATE TABLE INHERITS. It is also set when inheritance is removed from
- * a table with ALTER TABLE NO INHERIT. If the flag is set, the column is
- * not dropped by a parent's DROP COLUMN even if this causes the column's
- * attinhcount to become zero.
- */
- bool attislocal BKI_DEFAULT(t);
-
- /* Number of times inherited from direct parent relation(s) */
- int32 attinhcount BKI_DEFAULT(0);
-
- /* attribute's collation, if any */
- Oid attcollation BKI_LOOKUP_OPT(pg_collation);
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- /* NOTE: The following fields are not present in tuple descriptors. */
-
- /* Column-level access permissions */
- aclitem attacl[1] BKI_DEFAULT(_null_);
-
- /* Column-level options */
- text attoptions[1] BKI_DEFAULT(_null_);
-
- /* Column-level FDW options */
- text attfdwoptions[1] BKI_DEFAULT(_null_);
-
- /*
- * Missing value for added columns. This is a one element array which lets
- * us store a value of the attribute type here.
- */
- anyarray attmissingval BKI_DEFAULT(_null_);
-#endif
-} FormData_pg_attribute;
-
-/*
- * ATTRIBUTE_FIXED_PART_SIZE is the size of the fixed-layout,
- * guaranteed-not-null part of a pg_attribute row. This is in fact as much
- * of the row as gets copied into tuple descriptors, so don't expect you
- * can access the variable-length fields except in a real tuple!
- */
-#define ATTRIBUTE_FIXED_PART_SIZE \
- (offsetof(FormData_pg_attribute,attcollation) + sizeof(Oid))
-
-/* ----------------
- * Form_pg_attribute corresponds to a pointer to a tuple with
- * the format of pg_attribute relation.
- * ----------------
- */
-typedef FormData_pg_attribute *Form_pg_attribute;
-
-DECLARE_UNIQUE_INDEX(pg_attribute_relid_attnam_index, 2658, on pg_attribute using btree(attrelid oid_ops, attname name_ops));
-#define AttributeRelidNameIndexId 2658
-DECLARE_UNIQUE_INDEX_PKEY(pg_attribute_relid_attnum_index, 2659, on pg_attribute using btree(attrelid oid_ops, attnum int2_ops));
-#define AttributeRelidNumIndexId 2659
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-#define ATTRIBUTE_IDENTITY_ALWAYS 'a'
-#define ATTRIBUTE_IDENTITY_BY_DEFAULT 'd'
-
-#define ATTRIBUTE_GENERATED_STORED 's'
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-#endif /* PG_ATTRIBUTE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_attribute_d.h b/contrib/libs/postgresql/src/include/catalog/pg_attribute_d.h
deleted file mode 100644
index 2fea2c5e480..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_attribute_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_attribute_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_auth_members.h b/contrib/libs/postgresql/src/include/catalog/pg_auth_members.h
deleted file mode 100644
index 76ab90c9395..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_auth_members.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_auth_members.h
- * definition of the "authorization identifier members" system catalog
- * (pg_auth_members).
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_auth_members.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_AUTH_MEMBERS_H
-#define PG_AUTH_MEMBERS_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_auth_members_d.h"
-
-/* ----------------
- * pg_auth_members definition. cpp turns this into
- * typedef struct FormData_pg_auth_members
- * ----------------
- */
-CATALOG(pg_auth_members,1261,AuthMemRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2843,AuthMemRelation_Rowtype_Id) BKI_SCHEMA_MACRO
-{
- Oid roleid BKI_LOOKUP(pg_authid); /* ID of a role */
- Oid member BKI_LOOKUP(pg_authid); /* ID of a member of that role */
- Oid grantor BKI_LOOKUP(pg_authid); /* who granted the membership */
- bool admin_option; /* granted with admin option? */
-} FormData_pg_auth_members;
-
-/* ----------------
- * Form_pg_auth_members corresponds to a pointer to a tuple with
- * the format of pg_auth_members relation.
- * ----------------
- */
-typedef FormData_pg_auth_members *Form_pg_auth_members;
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_auth_members_role_member_index, 2694, on pg_auth_members using btree(roleid oid_ops, member oid_ops));
-#define AuthMemRoleMemIndexId 2694
-DECLARE_UNIQUE_INDEX(pg_auth_members_member_role_index, 2695, on pg_auth_members using btree(member oid_ops, roleid oid_ops));
-#define AuthMemMemRoleIndexId 2695
-
-#endif /* PG_AUTH_MEMBERS_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_auth_members_d.h b/contrib/libs/postgresql/src/include/catalog/pg_auth_members_d.h
deleted file mode 100644
index 8298e984f3c..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_auth_members_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_auth_members_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_authid.dat b/contrib/libs/postgresql/src/include/catalog/pg_authid.dat
deleted file mode 100644
index 3da68016b61..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_authid.dat
+++ /dev/null
@@ -1,83 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_authid.dat
-# Initial contents of the pg_authid system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_authid.dat
-#
-#----------------------------------------------------------------------
-
-[
-
-# The C code typically refers to these roles using the #define symbols,
-# so make sure every entry has an oid_symbol value.
-
-# The bootstrap superuser is named POSTGRES according to this data and
-# according to BKI_DEFAULT entries in other catalogs. However, initdb
-# will replace that at database initialization time.
-
-{ oid => '10', oid_symbol => 'BOOTSTRAP_SUPERUSERID',
- rolname => 'POSTGRES', rolsuper => 't', rolinherit => 't',
- rolcreaterole => 't', rolcreatedb => 't', rolcanlogin => 't',
- rolreplication => 't', rolbypassrls => 't', rolconnlimit => '-1',
- rolpassword => '_null_', rolvaliduntil => '_null_' },
-{ oid => '6171', oid_symbol => 'ROLE_PG_DATABASE_OWNER',
- rolname => 'pg_database_owner', rolsuper => 'f', rolinherit => 't',
- rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
- rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
- rolpassword => '_null_', rolvaliduntil => '_null_' },
-{ oid => '6181', oid_symbol => 'ROLE_PG_READ_ALL_DATA',
- rolname => 'pg_read_all_data', rolsuper => 'f', rolinherit => 't',
- rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
- rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
- rolpassword => '_null_', rolvaliduntil => '_null_' },
-{ oid => '6182', oid_symbol => 'ROLE_PG_WRITE_ALL_DATA',
- rolname => 'pg_write_all_data', rolsuper => 'f', rolinherit => 't',
- rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
- rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
- rolpassword => '_null_', rolvaliduntil => '_null_' },
-{ oid => '3373', oid_symbol => 'ROLE_PG_MONITOR',
- rolname => 'pg_monitor', rolsuper => 'f', rolinherit => 't',
- rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
- rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
- rolpassword => '_null_', rolvaliduntil => '_null_' },
-{ oid => '3374', oid_symbol => 'ROLE_PG_READ_ALL_SETTINGS',
- rolname => 'pg_read_all_settings', rolsuper => 'f', rolinherit => 't',
- rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
- rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
- rolpassword => '_null_', rolvaliduntil => '_null_' },
-{ oid => '3375', oid_symbol => 'ROLE_PG_READ_ALL_STATS',
- rolname => 'pg_read_all_stats', rolsuper => 'f', rolinherit => 't',
- rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
- rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
- rolpassword => '_null_', rolvaliduntil => '_null_' },
-{ oid => '3377', oid_symbol => 'ROLE_PG_STAT_SCAN_TABLES',
- rolname => 'pg_stat_scan_tables', rolsuper => 'f', rolinherit => 't',
- rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
- rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
- rolpassword => '_null_', rolvaliduntil => '_null_' },
-{ oid => '4569', oid_symbol => 'ROLE_PG_READ_SERVER_FILES',
- rolname => 'pg_read_server_files', rolsuper => 'f', rolinherit => 't',
- rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
- rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
- rolpassword => '_null_', rolvaliduntil => '_null_' },
-{ oid => '4570', oid_symbol => 'ROLE_PG_WRITE_SERVER_FILES',
- rolname => 'pg_write_server_files', rolsuper => 'f', rolinherit => 't',
- rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
- rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
- rolpassword => '_null_', rolvaliduntil => '_null_' },
-{ oid => '4571', oid_symbol => 'ROLE_PG_EXECUTE_SERVER_PROGRAM',
- rolname => 'pg_execute_server_program', rolsuper => 'f', rolinherit => 't',
- rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
- rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
- rolpassword => '_null_', rolvaliduntil => '_null_' },
-{ oid => '4200', oid_symbol => 'ROLE_PG_SIGNAL_BACKEND',
- rolname => 'pg_signal_backend', rolsuper => 'f', rolinherit => 't',
- rolcreaterole => 'f', rolcreatedb => 'f', rolcanlogin => 'f',
- rolreplication => 'f', rolbypassrls => 'f', rolconnlimit => '-1',
- rolpassword => '_null_', rolvaliduntil => '_null_' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_authid.h b/contrib/libs/postgresql/src/include/catalog/pg_authid.h
deleted file mode 100644
index 609bd7fcbcc..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_authid.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_authid.h
- * definition of the "authorization identifier" system catalog (pg_authid)
- *
- * pg_shadow and pg_group are now publicly accessible views on pg_authid.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_authid.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_AUTHID_H
-#define PG_AUTHID_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_authid_d.h"
-
-/* ----------------
- * pg_authid definition. cpp turns this into
- * typedef struct FormData_pg_authid
- * ----------------
- */
-CATALOG(pg_authid,1260,AuthIdRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842,AuthIdRelation_Rowtype_Id) BKI_SCHEMA_MACRO
-{
- Oid oid; /* oid */
- NameData rolname; /* name of role */
- bool rolsuper; /* read this field via superuser() only! */
- bool rolinherit; /* inherit privileges from other roles? */
- bool rolcreaterole; /* allowed to create more roles? */
- bool rolcreatedb; /* allowed to create databases? */
- bool rolcanlogin; /* allowed to log in as session user? */
- bool rolreplication; /* role used for streaming replication */
- bool rolbypassrls; /* bypasses row-level security? */
- int32 rolconnlimit; /* max connections allowed (-1=no limit) */
-
- /* remaining fields may be null; use heap_getattr to read them! */
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- text rolpassword; /* password, if any */
- timestamptz rolvaliduntil; /* password expiration time, if any */
-#endif
-} FormData_pg_authid;
-
-/* ----------------
- * Form_pg_authid corresponds to a pointer to a tuple with
- * the format of pg_authid relation.
- * ----------------
- */
-typedef FormData_pg_authid *Form_pg_authid;
-
-DECLARE_TOAST(pg_authid, 4175, 4176);
-#define PgAuthidToastTable 4175
-#define PgAuthidToastIndex 4176
-
-DECLARE_UNIQUE_INDEX(pg_authid_rolname_index, 2676, on pg_authid using btree(rolname name_ops));
-#define AuthIdRolnameIndexId 2676
-DECLARE_UNIQUE_INDEX_PKEY(pg_authid_oid_index, 2677, on pg_authid using btree(oid oid_ops));
-#define AuthIdOidIndexId 2677
-
-#endif /* PG_AUTHID_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_authid_d.h b/contrib/libs/postgresql/src/include/catalog/pg_authid_d.h
deleted file mode 100644
index ac7acb4f82f..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_authid_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_authid_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_cast.h b/contrib/libs/postgresql/src/include/catalog/pg_cast.h
deleted file mode 100644
index f64a9df54ce..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_cast.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_cast.h
- * definition of the "type casts" system catalog (pg_cast)
- *
- * As of Postgres 8.0, pg_cast describes not only type coercion functions
- * but also length coercion functions.
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_cast.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_CAST_H
-#define PG_CAST_H
-
-#include "catalog/dependency.h"
-#include "catalog/genbki.h"
-#include "catalog/pg_cast_d.h"
-
-/* ----------------
- * pg_cast definition. cpp turns this into
- * typedef struct FormData_pg_cast
- * ----------------
- */
-CATALOG(pg_cast,2605,CastRelationId)
-{
- Oid oid; /* oid */
-
- /* source datatype for cast */
- Oid castsource BKI_LOOKUP(pg_type);
-
- /* destination datatype for cast */
- Oid casttarget BKI_LOOKUP(pg_type);
-
- /* cast function; 0 = binary coercible */
- Oid castfunc BKI_LOOKUP_OPT(pg_proc);
-
- /* contexts in which cast can be used */
- char castcontext;
-
- /* cast method */
- char castmethod;
-} FormData_pg_cast;
-
-/* ----------------
- * Form_pg_cast corresponds to a pointer to a tuple with
- * the format of pg_cast relation.
- * ----------------
- */
-typedef FormData_pg_cast *Form_pg_cast;
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_cast_oid_index, 2660, on pg_cast using btree(oid oid_ops));
-#define CastOidIndexId 2660
-DECLARE_UNIQUE_INDEX(pg_cast_source_target_index, 2661, on pg_cast using btree(castsource oid_ops, casttarget oid_ops));
-#define CastSourceTargetIndexId 2661
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-/*
- * The allowable values for pg_cast.castcontext are specified by this enum.
- * Since castcontext is stored as a "char", we use ASCII codes for human
- * convenience in reading the table. Note that internally to the backend,
- * these values are converted to the CoercionContext enum (see primnodes.h),
- * which is defined to sort in a convenient order; the ASCII codes don't
- * have to sort in any special order.
- */
-
-typedef enum CoercionCodes
-{
- COERCION_CODE_IMPLICIT = 'i', /* coercion in context of expression */
- COERCION_CODE_ASSIGNMENT = 'a', /* coercion in context of assignment */
- COERCION_CODE_EXPLICIT = 'e' /* explicit cast operation */
-} CoercionCodes;
-
-/*
- * The allowable values for pg_cast.castmethod are specified by this enum.
- * Since castmethod is stored as a "char", we use ASCII codes for human
- * convenience in reading the table.
- */
-typedef enum CoercionMethod
-{
- COERCION_METHOD_FUNCTION = 'f', /* use a function */
- COERCION_METHOD_BINARY = 'b', /* types are binary-compatible */
- COERCION_METHOD_INOUT = 'i' /* use input/output functions */
-} CoercionMethod;
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-
-extern ObjectAddress CastCreate(Oid sourcetypeid,
- Oid targettypeid,
- Oid funcid,
- char castcontext,
- char castmethod,
- DependencyType behavior);
-
-#endif /* PG_CAST_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_cast_d.h b/contrib/libs/postgresql/src/include/catalog/pg_cast_d.h
deleted file mode 100644
index c57c7aa9324..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_cast_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_cast_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_class.dat b/contrib/libs/postgresql/src/include/catalog/pg_class.dat
deleted file mode 100644
index 601abb98e43..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_class.dat
+++ /dev/null
@@ -1,28 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_class.dat
-# Initial contents of the pg_class system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_class.dat
-#
-#----------------------------------------------------------------------
-
-[
-
-# Note: only bootstrap catalogs, ie those marked BKI_BOOTSTRAP, need to
-# have entries here. Be sure that the OIDs listed here match those given in
-# their CATALOG and BKI_ROWTYPE_OID macros.
-
-{ oid => '1247',
- relname => 'pg_type', reltype => 'pg_type' },
-{ oid => '1249',
- relname => 'pg_attribute', reltype => 'pg_attribute' },
-{ oid => '1255',
- relname => 'pg_proc', reltype => 'pg_proc' },
-{ oid => '1259',
- relname => 'pg_class', reltype => 'pg_class' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_class.h b/contrib/libs/postgresql/src/include/catalog/pg_class.h
deleted file mode 100644
index 97e329e42a3..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_class.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_class.h
- * definition of the "relation" system catalog (pg_class)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_class.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_CLASS_H
-#define PG_CLASS_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_class_d.h"
-
-/* ----------------
- * pg_class definition. cpp turns this into
- * typedef struct FormData_pg_class
- *
- * Note that the BKI_DEFAULT values below are only used for rows describing
- * BKI_BOOTSTRAP catalogs, since only those rows appear in pg_class.dat.
- * ----------------
- */
-CATALOG(pg_class,1259,RelationRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83,RelationRelation_Rowtype_Id) BKI_SCHEMA_MACRO
-{
- /* oid */
- Oid oid;
-
- /* class name */
- NameData relname;
-
- /* OID of namespace containing this class */
- Oid relnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace);
-
- /* OID of entry in pg_type for relation's implicit row type, if any */
- Oid reltype BKI_LOOKUP_OPT(pg_type);
-
- /* OID of entry in pg_type for underlying composite type, if any */
- Oid reloftype BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_type);
-
- /* class owner */
- Oid relowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid);
-
- /* access method; 0 if not a table / index */
- Oid relam BKI_DEFAULT(heap) BKI_LOOKUP_OPT(pg_am);
-
- /* identifier of physical storage file */
- /* relfilenode == 0 means it is a "mapped" relation, see relmapper.c */
- Oid relfilenode BKI_DEFAULT(0);
-
- /* identifier of table space for relation (0 means default for database) */
- Oid reltablespace BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_tablespace);
-
- /* # of blocks (not always up-to-date) */
- int32 relpages BKI_DEFAULT(0);
-
- /* # of tuples (not always up-to-date; -1 means "unknown") */
- float4 reltuples BKI_DEFAULT(-1);
-
- /* # of all-visible blocks (not always up-to-date) */
- int32 relallvisible BKI_DEFAULT(0);
-
- /* OID of toast table; 0 if none */
- Oid reltoastrelid BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_class);
-
- /* T if has (or has had) any indexes */
- bool relhasindex BKI_DEFAULT(f);
-
- /* T if shared across databases */
- bool relisshared BKI_DEFAULT(f);
-
- /* see RELPERSISTENCE_xxx constants below */
- char relpersistence BKI_DEFAULT(p);
-
- /* see RELKIND_xxx constants below */
- char relkind BKI_DEFAULT(r);
-
- /* number of user attributes */
- int16 relnatts BKI_DEFAULT(0); /* genbki.pl will fill this in */
-
- /*
- * Class pg_attribute must contain exactly "relnatts" user attributes
- * (with attnums ranging from 1 to relnatts) for this class. It may also
- * contain entries with negative attnums for system attributes.
- */
-
- /* # of CHECK constraints for class */
- int16 relchecks BKI_DEFAULT(0);
-
- /* has (or has had) any rules */
- bool relhasrules BKI_DEFAULT(f);
-
- /* has (or has had) any TRIGGERs */
- bool relhastriggers BKI_DEFAULT(f);
-
- /* has (or has had) child tables or indexes */
- bool relhassubclass BKI_DEFAULT(f);
-
- /* row security is enabled or not */
- bool relrowsecurity BKI_DEFAULT(f);
-
- /* row security forced for owners or not */
- bool relforcerowsecurity BKI_DEFAULT(f);
-
- /* matview currently holds query results */
- bool relispopulated BKI_DEFAULT(t);
-
- /* see REPLICA_IDENTITY_xxx constants */
- char relreplident BKI_DEFAULT(n);
-
- /* is relation a partition? */
- bool relispartition BKI_DEFAULT(f);
-
- /* link to original rel during table rewrite; otherwise 0 */
- Oid relrewrite BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_class);
-
- /* all Xids < this are frozen in this rel */
- TransactionId relfrozenxid BKI_DEFAULT(3); /* FirstNormalTransactionId */
-
- /* all multixacts in this rel are >= this; it is really a MultiXactId */
- TransactionId relminmxid BKI_DEFAULT(1); /* FirstMultiXactId */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- /* NOTE: These fields are not present in a relcache entry's rd_rel field. */
- /* access permissions */
- aclitem relacl[1] BKI_DEFAULT(_null_);
-
- /* access-method-specific options */
- text reloptions[1] BKI_DEFAULT(_null_);
-
- /* partition bound node tree */
- pg_node_tree relpartbound BKI_DEFAULT(_null_);
-#endif
-} FormData_pg_class;
-
-/* Size of fixed part of pg_class tuples, not counting var-length fields */
-#define CLASS_TUPLE_SIZE \
- (offsetof(FormData_pg_class,relminmxid) + sizeof(TransactionId))
-
-/* ----------------
- * Form_pg_class corresponds to a pointer to a tuple with
- * the format of pg_class relation.
- * ----------------
- */
-typedef FormData_pg_class *Form_pg_class;
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_class_oid_index, 2662, on pg_class using btree(oid oid_ops));
-#define ClassOidIndexId 2662
-DECLARE_UNIQUE_INDEX(pg_class_relname_nsp_index, 2663, on pg_class using btree(relname name_ops, relnamespace oid_ops));
-#define ClassNameNspIndexId 2663
-DECLARE_INDEX(pg_class_tblspc_relfilenode_index, 3455, on pg_class using btree(reltablespace oid_ops, relfilenode oid_ops));
-#define ClassTblspcRelfilenodeIndexId 3455
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-#define RELKIND_RELATION 'r' /* ordinary table */
-#define RELKIND_INDEX 'i' /* secondary index */
-#define RELKIND_SEQUENCE 'S' /* sequence object */
-#define RELKIND_TOASTVALUE 't' /* for out-of-line values */
-#define RELKIND_VIEW 'v' /* view */
-#define RELKIND_MATVIEW 'm' /* materialized view */
-#define RELKIND_COMPOSITE_TYPE 'c' /* composite type */
-#define RELKIND_FOREIGN_TABLE 'f' /* foreign table */
-#define RELKIND_PARTITIONED_TABLE 'p' /* partitioned table */
-#define RELKIND_PARTITIONED_INDEX 'I' /* partitioned index */
-
-#define RELPERSISTENCE_PERMANENT 'p' /* regular table */
-#define RELPERSISTENCE_UNLOGGED 'u' /* unlogged permanent table */
-#define RELPERSISTENCE_TEMP 't' /* temporary table */
-
-/* default selection for replica identity (primary key or nothing) */
-#define REPLICA_IDENTITY_DEFAULT 'd'
-/* no replica identity is logged for this relation */
-#define REPLICA_IDENTITY_NOTHING 'n'
-/* all columns are logged as replica identity */
-#define REPLICA_IDENTITY_FULL 'f'
-/*
- * an explicitly chosen candidate key's columns are used as replica identity.
- * Note this will still be set if the index has been dropped; in that case it
- * has the same meaning as 'n'.
- */
-#define REPLICA_IDENTITY_INDEX 'i'
-
-/*
- * Relation kinds that have physical storage. These relations normally have
- * relfilenode set to non-zero, but it can also be zero if the relation is
- * mapped.
- */
-#define RELKIND_HAS_STORAGE(relkind) \
- ((relkind) == RELKIND_RELATION || \
- (relkind) == RELKIND_INDEX || \
- (relkind) == RELKIND_SEQUENCE || \
- (relkind) == RELKIND_TOASTVALUE || \
- (relkind) == RELKIND_MATVIEW)
-
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-#endif /* PG_CLASS_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_class_d.h b/contrib/libs/postgresql/src/include/catalog/pg_class_d.h
deleted file mode 100644
index 48f407763da..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_class_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_class_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_collation.dat b/contrib/libs/postgresql/src/include/catalog/pg_collation.dat
deleted file mode 100644
index 6e0ab1ab4b8..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_collation.dat
+++ /dev/null
@@ -1,28 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_collation.dat
-# Initial contents of the pg_collation system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_collation.dat
-#
-#----------------------------------------------------------------------
-
-[
-
-{ oid => '100', oid_symbol => 'DEFAULT_COLLATION_OID',
- descr => 'database\'s default collation',
- collname => 'default', collprovider => 'd', collencoding => '-1',
- collcollate => '', collctype => '' },
-{ oid => '950', oid_symbol => 'C_COLLATION_OID',
- descr => 'standard C collation',
- collname => 'C', collprovider => 'c', collencoding => '-1',
- collcollate => 'C', collctype => 'C' },
-{ oid => '951', oid_symbol => 'POSIX_COLLATION_OID',
- descr => 'standard POSIX collation',
- collname => 'POSIX', collprovider => 'c', collencoding => '-1',
- collcollate => 'POSIX', collctype => 'POSIX' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_collation.h b/contrib/libs/postgresql/src/include/catalog/pg_collation.h
deleted file mode 100644
index 6adbeab690b..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_collation.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_collation.h
- * definition of the "collation" system catalog (pg_collation)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_collation.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_COLLATION_H
-#define PG_COLLATION_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_collation_d.h"
-
-/* ----------------
- * pg_collation definition. cpp turns this into
- * typedef struct FormData_pg_collation
- * ----------------
- */
-CATALOG(pg_collation,3456,CollationRelationId)
-{
- Oid oid; /* oid */
- NameData collname; /* collation name */
-
- /* OID of namespace containing this collation */
- Oid collnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace);
-
- /* owner of collation */
- Oid collowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid);
- char collprovider; /* see constants below */
- bool collisdeterministic BKI_DEFAULT(t);
- int32 collencoding; /* encoding for this collation; -1 = "all" */
- NameData collcollate; /* LC_COLLATE setting */
- NameData collctype; /* LC_CTYPE setting */
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- text collversion BKI_DEFAULT(_null_); /* provider-dependent
- * version of collation
- * data */
-#endif
-} FormData_pg_collation;
-
-/* ----------------
- * Form_pg_collation corresponds to a pointer to a row with
- * the format of pg_collation relation.
- * ----------------
- */
-typedef FormData_pg_collation *Form_pg_collation;
-
-DECLARE_TOAST(pg_collation, 6175, 6176);
-
-DECLARE_UNIQUE_INDEX(pg_collation_name_enc_nsp_index, 3164, on pg_collation using btree(collname name_ops, collencoding int4_ops, collnamespace oid_ops));
-#define CollationNameEncNspIndexId 3164
-DECLARE_UNIQUE_INDEX_PKEY(pg_collation_oid_index, 3085, on pg_collation using btree(oid oid_ops));
-#define CollationOidIndexId 3085
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-#define COLLPROVIDER_DEFAULT 'd'
-#define COLLPROVIDER_ICU 'i'
-#define COLLPROVIDER_LIBC 'c'
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-
-extern Oid CollationCreate(const char *collname, Oid collnamespace,
- Oid collowner,
- char collprovider,
- bool collisdeterministic,
- int32 collencoding,
- const char *collcollate, const char *collctype,
- const char *collversion,
- bool if_not_exists,
- bool quiet);
-
-#endif /* PG_COLLATION_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_collation_d.h b/contrib/libs/postgresql/src/include/catalog/pg_collation_d.h
deleted file mode 100644
index 2ad4d6d60d8..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_collation_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_collation_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_constraint.h b/contrib/libs/postgresql/src/include/catalog/pg_constraint.h
deleted file mode 100644
index 63f0f8bf418..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_constraint.h
+++ /dev/null
@@ -1,269 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_constraint.h
- * definition of the "constraint" system catalog (pg_constraint)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_constraint.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_CONSTRAINT_H
-#define PG_CONSTRAINT_H
-
-#include "catalog/dependency.h"
-#include "catalog/genbki.h"
-#include "catalog/pg_constraint_d.h"
-#include "nodes/pg_list.h"
-
-/* ----------------
- * pg_constraint definition. cpp turns this into
- * typedef struct FormData_pg_constraint
- * ----------------
- */
-CATALOG(pg_constraint,2606,ConstraintRelationId)
-{
- Oid oid; /* oid */
-
- /*
- * conname + connamespace is deliberately not unique; we allow, for
- * example, the same name to be used for constraints of different
- * relations. This is partly for backwards compatibility with past
- * Postgres practice, and partly because we don't want to have to obtain a
- * global lock to generate a globally unique name for a nameless
- * constraint. We associate a namespace with constraint names only for
- * SQL-spec compatibility.
- *
- * However, we do require conname to be unique among the constraints of a
- * single relation or domain. This is enforced by a unique index on
- * conrelid + contypid + conname.
- */
- NameData conname; /* name of this constraint */
- Oid connamespace BKI_LOOKUP(pg_namespace); /* OID of namespace
- * containing constraint */
- char contype; /* constraint type; see codes below */
- bool condeferrable; /* deferrable constraint? */
- bool condeferred; /* deferred by default? */
- bool convalidated; /* constraint has been validated? */
-
- /*
- * conrelid and conkey are only meaningful if the constraint applies to a
- * specific relation (this excludes domain constraints and assertions).
- * Otherwise conrelid is 0 and conkey is NULL.
- */
- Oid conrelid BKI_LOOKUP_OPT(pg_class); /* relation this
- * constraint constrains */
-
- /*
- * contypid links to the pg_type row for a domain if this is a domain
- * constraint. Otherwise it's 0.
- *
- * For SQL-style global ASSERTIONs, both conrelid and contypid would be
- * zero. This is not presently supported, however.
- */
- Oid contypid BKI_LOOKUP_OPT(pg_type); /* domain this constraint
- * constrains */
-
- /*
- * conindid links to the index supporting the constraint, if any;
- * otherwise it's 0. This is used for unique, primary-key, and exclusion
- * constraints, and less obviously for foreign-key constraints (where the
- * index is a unique index on the referenced relation's referenced
- * columns). Notice that the index is on conrelid in the first case but
- * confrelid in the second.
- */
- Oid conindid BKI_LOOKUP_OPT(pg_class); /* index supporting this
- * constraint */
-
- /*
- * If this constraint is on a partition inherited from a partitioned
- * table, this is the OID of the corresponding constraint in the parent.
- */
- Oid conparentid BKI_LOOKUP_OPT(pg_constraint);
-
- /*
- * These fields, plus confkey, are only meaningful for a foreign-key
- * constraint. Otherwise confrelid is 0 and the char fields are spaces.
- */
- Oid confrelid BKI_LOOKUP_OPT(pg_class); /* relation referenced by
- * foreign key */
- char confupdtype; /* foreign key's ON UPDATE action */
- char confdeltype; /* foreign key's ON DELETE action */
- char confmatchtype; /* foreign key's match type */
-
- /* Has a local definition (hence, do not drop when coninhcount is 0) */
- bool conislocal;
-
- /* Number of times inherited from direct parent relation(s) */
- int32 coninhcount;
-
- /* Has a local definition and cannot be inherited */
- bool connoinherit;
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
-
- /*
- * Columns of conrelid that the constraint applies to, if known (this is
- * NULL for trigger constraints)
- */
- int16 conkey[1];
-
- /*
- * If a foreign key, the referenced columns of confrelid
- */
- int16 confkey[1];
-
- /*
- * If a foreign key, the OIDs of the PK = FK equality operators for each
- * column of the constraint
- */
- Oid conpfeqop[1] BKI_LOOKUP(pg_operator);
-
- /*
- * If a foreign key, the OIDs of the PK = PK equality operators for each
- * column of the constraint (i.e., equality for the referenced columns)
- */
- Oid conppeqop[1] BKI_LOOKUP(pg_operator);
-
- /*
- * If a foreign key, the OIDs of the FK = FK equality operators for each
- * column of the constraint (i.e., equality for the referencing columns)
- */
- Oid conffeqop[1] BKI_LOOKUP(pg_operator);
-
- /*
- * If an exclusion constraint, the OIDs of the exclusion operators for
- * each column of the constraint
- */
- Oid conexclop[1] BKI_LOOKUP(pg_operator);
-
- /*
- * If a check constraint, nodeToString representation of expression
- */
- pg_node_tree conbin;
-#endif
-} FormData_pg_constraint;
-
-/* ----------------
- * Form_pg_constraint corresponds to a pointer to a tuple with
- * the format of pg_constraint relation.
- * ----------------
- */
-typedef FormData_pg_constraint *Form_pg_constraint;
-
-DECLARE_TOAST(pg_constraint, 2832, 2833);
-
-DECLARE_INDEX(pg_constraint_conname_nsp_index, 2664, on pg_constraint using btree(conname name_ops, connamespace oid_ops));
-#define ConstraintNameNspIndexId 2664
-DECLARE_UNIQUE_INDEX(pg_constraint_conrelid_contypid_conname_index, 2665, on pg_constraint using btree(conrelid oid_ops, contypid oid_ops, conname name_ops));
-#define ConstraintRelidTypidNameIndexId 2665
-DECLARE_INDEX(pg_constraint_contypid_index, 2666, on pg_constraint using btree(contypid oid_ops));
-#define ConstraintTypidIndexId 2666
-DECLARE_UNIQUE_INDEX_PKEY(pg_constraint_oid_index, 2667, on pg_constraint using btree(oid oid_ops));
-#define ConstraintOidIndexId 2667
-DECLARE_INDEX(pg_constraint_conparentid_index, 2579, on pg_constraint using btree(conparentid oid_ops));
-#define ConstraintParentIndexId 2579
-
-/* conkey can contain zero (InvalidAttrNumber) if a whole-row Var is used */
-DECLARE_ARRAY_FOREIGN_KEY_OPT((conrelid, conkey), pg_attribute, (attrelid, attnum));
-DECLARE_ARRAY_FOREIGN_KEY((confrelid, confkey), pg_attribute, (attrelid, attnum));
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-/* Valid values for contype */
-#define CONSTRAINT_CHECK 'c'
-#define CONSTRAINT_FOREIGN 'f'
-#define CONSTRAINT_PRIMARY 'p'
-#define CONSTRAINT_UNIQUE 'u'
-#define CONSTRAINT_TRIGGER 't'
-#define CONSTRAINT_EXCLUSION 'x'
-
-/*
- * Valid values for confupdtype and confdeltype are the FKCONSTR_ACTION_xxx
- * constants defined in parsenodes.h. Valid values for confmatchtype are
- * the FKCONSTR_MATCH_xxx constants defined in parsenodes.h.
- */
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-/*
- * Identify constraint type for lookup purposes
- */
-typedef enum ConstraintCategory
-{
- CONSTRAINT_RELATION,
- CONSTRAINT_DOMAIN,
- CONSTRAINT_ASSERTION /* for future expansion */
-} ConstraintCategory;
-
-
-extern Oid CreateConstraintEntry(const char *constraintName,
- Oid constraintNamespace,
- char constraintType,
- bool isDeferrable,
- bool isDeferred,
- bool isValidated,
- Oid parentConstrId,
- Oid relId,
- const int16 *constraintKey,
- int constraintNKeys,
- int constraintNTotalKeys,
- Oid domainId,
- Oid indexRelId,
- Oid foreignRelId,
- const int16 *foreignKey,
- const Oid *pfEqOp,
- const Oid *ppEqOp,
- const Oid *ffEqOp,
- int foreignNKeys,
- char foreignUpdateType,
- char foreignDeleteType,
- char foreignMatchType,
- const Oid *exclOp,
- Node *conExpr,
- const char *conBin,
- bool conIsLocal,
- int conInhCount,
- bool conNoInherit,
- bool is_internal);
-
-extern void RemoveConstraintById(Oid conId);
-extern void RenameConstraintById(Oid conId, const char *newname);
-
-extern bool ConstraintNameIsUsed(ConstraintCategory conCat, Oid objId,
- const char *conname);
-extern bool ConstraintNameExists(const char *conname, Oid namespaceid);
-extern char *ChooseConstraintName(const char *name1, const char *name2,
- const char *label, Oid namespaceid,
- List *others);
-
-extern void AlterConstraintNamespaces(Oid ownerId, Oid oldNspId,
- Oid newNspId, bool isType, ObjectAddresses *objsMoved);
-extern void ConstraintSetParentConstraint(Oid childConstrId,
- Oid parentConstrId,
- Oid childTableId);
-extern Oid get_relation_constraint_oid(Oid relid, const char *conname, bool missing_ok);
-extern Bitmapset *get_relation_constraint_attnos(Oid relid, const char *conname,
- bool missing_ok, Oid *constraintOid);
-extern Oid get_domain_constraint_oid(Oid typid, const char *conname, bool missing_ok);
-extern Oid get_relation_idx_constraint_oid(Oid relationId, Oid indexId);
-
-extern Bitmapset *get_primary_key_attnos(Oid relid, bool deferrableOk,
- Oid *constraintOid);
-extern void DeconstructFkConstraintRow(HeapTuple tuple, int *numfks,
- AttrNumber *conkey, AttrNumber *confkey,
- Oid *pf_eq_oprs, Oid *pp_eq_oprs, Oid *ff_eq_oprs);
-
-extern bool check_functional_grouping(Oid relid,
- Index varno, Index varlevelsup,
- List *grouping_columns,
- List **constraintDeps);
-
-#endif /* PG_CONSTRAINT_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_constraint_d.h b/contrib/libs/postgresql/src/include/catalog/pg_constraint_d.h
deleted file mode 100644
index 34106f49338..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_constraint_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_constraint_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_control.h b/contrib/libs/postgresql/src/include/catalog/pg_control.h
deleted file mode 100644
index 749bce0cc6f..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_control.h
+++ /dev/null
@@ -1,252 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_control.h
- * The system control file "pg_control" is not a heap relation.
- * However, we define it here so that the format is documented.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_control.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_CONTROL_H
-#define PG_CONTROL_H
-
-#include "access/transam.h"
-#include "access/xlogdefs.h"
-#include "pgtime.h" /* for pg_time_t */
-#include "port/pg_crc32c.h"
-
-
-/* Version identifier for this pg_control format */
-#define PG_CONTROL_VERSION 1300
-
-/* Nonce key length, see below */
-#define MOCK_AUTH_NONCE_LEN 32
-
-/*
- * Body of CheckPoint XLOG records. This is declared here because we keep
- * a copy of the latest one in pg_control for possible disaster recovery.
- * Changing this struct requires a PG_CONTROL_VERSION bump.
- */
-typedef struct CheckPoint
-{
- XLogRecPtr redo; /* next RecPtr available when we began to
- * create CheckPoint (i.e. REDO start point) */
- TimeLineID ThisTimeLineID; /* current TLI */
- TimeLineID PrevTimeLineID; /* previous TLI, if this record begins a new
- * timeline (equals ThisTimeLineID otherwise) */
- bool fullPageWrites; /* current full_page_writes */
- FullTransactionId nextXid; /* next free transaction ID */
- Oid nextOid; /* next free OID */
- MultiXactId nextMulti; /* next free MultiXactId */
- MultiXactOffset nextMultiOffset; /* next free MultiXact offset */
- TransactionId oldestXid; /* cluster-wide minimum datfrozenxid */
- Oid oldestXidDB; /* database with minimum datfrozenxid */
- MultiXactId oldestMulti; /* cluster-wide minimum datminmxid */
- Oid oldestMultiDB; /* database with minimum datminmxid */
- pg_time_t time; /* time stamp of checkpoint */
- TransactionId oldestCommitTsXid; /* oldest Xid with valid commit
- * timestamp */
- TransactionId newestCommitTsXid; /* newest Xid with valid commit
- * timestamp */
-
- /*
- * Oldest XID still running. This is only needed to initialize hot standby
- * mode from an online checkpoint, so we only bother calculating this for
- * online checkpoints and only when wal_level is replica. Otherwise it's
- * set to InvalidTransactionId.
- */
- TransactionId oldestActiveXid;
-} CheckPoint;
-
-/* XLOG info values for XLOG rmgr */
-#define XLOG_CHECKPOINT_SHUTDOWN 0x00
-#define XLOG_CHECKPOINT_ONLINE 0x10
-#define XLOG_NOOP 0x20
-#define XLOG_NEXTOID 0x30
-#define XLOG_SWITCH 0x40
-#define XLOG_BACKUP_END 0x50
-#define XLOG_PARAMETER_CHANGE 0x60
-#define XLOG_RESTORE_POINT 0x70
-#define XLOG_FPW_CHANGE 0x80
-#define XLOG_END_OF_RECOVERY 0x90
-#define XLOG_FPI_FOR_HINT 0xA0
-#define XLOG_FPI 0xB0
-/* 0xC0 is used in Postgres 9.5-11 */
-#define XLOG_OVERWRITE_CONTRECORD 0xD0
-
-
-/*
- * System status indicator. Note this is stored in pg_control; if you change
- * it, you must bump PG_CONTROL_VERSION
- */
-typedef enum DBState
-{
- DB_STARTUP = 0,
- DB_SHUTDOWNED,
- DB_SHUTDOWNED_IN_RECOVERY,
- DB_SHUTDOWNING,
- DB_IN_CRASH_RECOVERY,
- DB_IN_ARCHIVE_RECOVERY,
- DB_IN_PRODUCTION
-} DBState;
-
-/*
- * Contents of pg_control.
- */
-
-typedef struct ControlFileData
-{
- /*
- * Unique system identifier --- to ensure we match up xlog files with the
- * installation that produced them.
- */
- uint64 system_identifier;
-
- /*
- * Version identifier information. Keep these fields at the same offset,
- * especially pg_control_version; they won't be real useful if they move
- * around. (For historical reasons they must be 8 bytes into the file
- * rather than immediately at the front.)
- *
- * pg_control_version identifies the format of pg_control itself.
- * catalog_version_no identifies the format of the system catalogs.
- *
- * There are additional version identifiers in individual files; for
- * example, WAL logs contain per-page magic numbers that can serve as
- * version cues for the WAL log.
- */
- uint32 pg_control_version; /* PG_CONTROL_VERSION */
- uint32 catalog_version_no; /* see catversion.h */
-
- /*
- * System status data
- */
- DBState state; /* see enum above */
- pg_time_t time; /* time stamp of last pg_control update */
- XLogRecPtr checkPoint; /* last check point record ptr */
-
- CheckPoint checkPointCopy; /* copy of last check point record */
-
- XLogRecPtr unloggedLSN; /* current fake LSN value, for unlogged rels */
-
- /*
- * These two values determine the minimum point we must recover up to
- * before starting up:
- *
- * minRecoveryPoint is updated to the latest replayed LSN whenever we
- * flush a data change during archive recovery. That guards against
- * starting archive recovery, aborting it, and restarting with an earlier
- * stop location. If we've already flushed data changes from WAL record X
- * to disk, we mustn't start up until we reach X again. Zero when not
- * doing archive recovery.
- *
- * backupStartPoint is the redo pointer of the backup start checkpoint, if
- * we are recovering from an online backup and haven't reached the end of
- * backup yet. It is reset to zero when the end of backup is reached, and
- * we mustn't start up before that. A boolean would suffice otherwise, but
- * we use the redo pointer as a cross-check when we see an end-of-backup
- * record, to make sure the end-of-backup record corresponds the base
- * backup we're recovering from.
- *
- * backupEndPoint is the backup end location, if we are recovering from an
- * online backup which was taken from the standby and haven't reached the
- * end of backup yet. It is initialized to the minimum recovery point in
- * pg_control which was backed up last. It is reset to zero when the end
- * of backup is reached, and we mustn't start up before that.
- *
- * If backupEndRequired is true, we know for sure that we're restoring
- * from a backup, and must see a backup-end record before we can safely
- * start up. If it's false, but backupStartPoint is set, a backup_label
- * file was found at startup but it may have been a leftover from a stray
- * pg_start_backup() call, not accompanied by pg_stop_backup().
- */
- XLogRecPtr minRecoveryPoint;
- TimeLineID minRecoveryPointTLI;
- XLogRecPtr backupStartPoint;
- XLogRecPtr backupEndPoint;
- bool backupEndRequired;
-
- /*
- * Parameter settings that determine if the WAL can be used for archival
- * or hot standby.
- */
- int wal_level;
- bool wal_log_hints;
- int MaxConnections;
- int max_worker_processes;
- int max_wal_senders;
- int max_prepared_xacts;
- int max_locks_per_xact;
- bool track_commit_timestamp;
-
- /*
- * This data is used to check for hardware-architecture compatibility of
- * the database and the backend executable. We need not check endianness
- * explicitly, since the pg_control version will surely look wrong to a
- * machine of different endianness, but we do need to worry about MAXALIGN
- * and floating-point format. (Note: storage layout nominally also
- * depends on SHORTALIGN and INTALIGN, but in practice these are the same
- * on all architectures of interest.)
- *
- * Testing just one double value is not a very bulletproof test for
- * floating-point compatibility, but it will catch most cases.
- */
- uint32 maxAlign; /* alignment requirement for tuples */
- double floatFormat; /* constant 1234567.0 */
-#define FLOATFORMAT_VALUE 1234567.0
-
- /*
- * This data is used to make sure that configuration of this database is
- * compatible with the backend executable.
- */
- uint32 blcksz; /* data block size for this DB */
- uint32 relseg_size; /* blocks per segment of large relation */
-
- uint32 xlog_blcksz; /* block size within WAL files */
- uint32 xlog_seg_size; /* size of each WAL segment */
-
- uint32 nameDataLen; /* catalog name field width */
- uint32 indexMaxKeys; /* max number of columns in an index */
-
- uint32 toast_max_chunk_size; /* chunk size in TOAST tables */
- uint32 loblksize; /* chunk size in pg_largeobject */
-
- bool float8ByVal; /* float8, int8, etc pass-by-value? */
-
- /* Are data pages protected by checksums? Zero if no checksum version */
- uint32 data_checksum_version;
-
- /*
- * Random nonce, used in authentication requests that need to proceed
- * based on values that are cluster-unique, like a SASL exchange that
- * failed at an early stage.
- */
- char mock_authentication_nonce[MOCK_AUTH_NONCE_LEN];
-
- /* CRC of all above ... MUST BE LAST! */
- pg_crc32c crc;
-} ControlFileData;
-
-/*
- * Maximum safe value of sizeof(ControlFileData). For reliability's sake,
- * it's critical that pg_control updates be atomic writes. That generally
- * means the active data can't be more than one disk sector, which is 512
- * bytes on common hardware. Be very careful about raising this limit.
- */
-#define PG_CONTROL_MAX_SAFE_SIZE 512
-
-/*
- * Physical size of the pg_control file. Note that this is considerably
- * bigger than the actually used size (ie, sizeof(ControlFileData)).
- * The idea is to keep the physical size constant independent of format
- * changes, so that ReadControlFile will deliver a suitable wrong-version
- * message instead of a read error if it's looking at an incompatible file.
- */
-#define PG_CONTROL_FILE_SIZE 8192
-
-#endif /* PG_CONTROL_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_conversion.dat b/contrib/libs/postgresql/src/include/catalog/pg_conversion.dat
deleted file mode 100644
index d8ba3a6c523..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_conversion.dat
+++ /dev/null
@@ -1,405 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_conversion.dat
-# Initial contents of the pg_conversion system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_conversion.dat
-#
-#----------------------------------------------------------------------
-
-# Note: conforencoding and contoencoding must match the spelling of
-# the labels used in the enum pg_enc in mb/pg_wchar.h.
-
-[
-
-{ oid => '4402', descr => 'conversion for KOI8R to MULE_INTERNAL',
- conname => 'koi8_r_to_mic', conforencoding => 'PG_KOI8R',
- contoencoding => 'PG_MULE_INTERNAL', conproc => 'koi8r_to_mic' },
-{ oid => '4403', descr => 'conversion for MULE_INTERNAL to KOI8R',
- conname => 'mic_to_koi8_r', conforencoding => 'PG_MULE_INTERNAL',
- contoencoding => 'PG_KOI8R', conproc => 'mic_to_koi8r' },
-{ oid => '4404', descr => 'conversion for ISO-8859-5 to MULE_INTERNAL',
- conname => 'iso_8859_5_to_mic', conforencoding => 'PG_ISO_8859_5',
- contoencoding => 'PG_MULE_INTERNAL', conproc => 'iso_to_mic' },
-{ oid => '4405', descr => 'conversion for MULE_INTERNAL to ISO-8859-5',
- conname => 'mic_to_iso_8859_5', conforencoding => 'PG_MULE_INTERNAL',
- contoencoding => 'PG_ISO_8859_5', conproc => 'mic_to_iso' },
-{ oid => '4406', descr => 'conversion for WIN1251 to MULE_INTERNAL',
- conname => 'windows_1251_to_mic', conforencoding => 'PG_WIN1251',
- contoencoding => 'PG_MULE_INTERNAL', conproc => 'win1251_to_mic' },
-{ oid => '4407', descr => 'conversion for MULE_INTERNAL to WIN1251',
- conname => 'mic_to_windows_1251', conforencoding => 'PG_MULE_INTERNAL',
- contoencoding => 'PG_WIN1251', conproc => 'mic_to_win1251' },
-{ oid => '4408', descr => 'conversion for WIN866 to MULE_INTERNAL',
- conname => 'windows_866_to_mic', conforencoding => 'PG_WIN866',
- contoencoding => 'PG_MULE_INTERNAL', conproc => 'win866_to_mic' },
-{ oid => '4409', descr => 'conversion for MULE_INTERNAL to WIN866',
- conname => 'mic_to_windows_866', conforencoding => 'PG_MULE_INTERNAL',
- contoencoding => 'PG_WIN866', conproc => 'mic_to_win866' },
-{ oid => '4410', descr => 'conversion for KOI8R to WIN1251',
- conname => 'koi8_r_to_windows_1251', conforencoding => 'PG_KOI8R',
- contoencoding => 'PG_WIN1251', conproc => 'koi8r_to_win1251' },
-{ oid => '4411', descr => 'conversion for WIN1251 to KOI8R',
- conname => 'windows_1251_to_koi8_r', conforencoding => 'PG_WIN1251',
- contoencoding => 'PG_KOI8R', conproc => 'win1251_to_koi8r' },
-{ oid => '4412', descr => 'conversion for KOI8R to WIN866',
- conname => 'koi8_r_to_windows_866', conforencoding => 'PG_KOI8R',
- contoencoding => 'PG_WIN866', conproc => 'koi8r_to_win866' },
-{ oid => '4413', descr => 'conversion for WIN866 to KOI8R',
- conname => 'windows_866_to_koi8_r', conforencoding => 'PG_WIN866',
- contoencoding => 'PG_KOI8R', conproc => 'win866_to_koi8r' },
-{ oid => '4414', descr => 'conversion for WIN866 to WIN1251',
- conname => 'windows_866_to_windows_1251', conforencoding => 'PG_WIN866',
- contoencoding => 'PG_WIN1251', conproc => 'win866_to_win1251' },
-{ oid => '4415', descr => 'conversion for WIN1251 to WIN866',
- conname => 'windows_1251_to_windows_866', conforencoding => 'PG_WIN1251',
- contoencoding => 'PG_WIN866', conproc => 'win1251_to_win866' },
-{ oid => '4416', descr => 'conversion for ISO-8859-5 to KOI8R',
- conname => 'iso_8859_5_to_koi8_r', conforencoding => 'PG_ISO_8859_5',
- contoencoding => 'PG_KOI8R', conproc => 'iso_to_koi8r' },
-{ oid => '4417', descr => 'conversion for KOI8R to ISO-8859-5',
- conname => 'koi8_r_to_iso_8859_5', conforencoding => 'PG_KOI8R',
- contoencoding => 'PG_ISO_8859_5', conproc => 'koi8r_to_iso' },
-{ oid => '4418', descr => 'conversion for ISO-8859-5 to WIN1251',
- conname => 'iso_8859_5_to_windows_1251', conforencoding => 'PG_ISO_8859_5',
- contoencoding => 'PG_WIN1251', conproc => 'iso_to_win1251' },
-{ oid => '4419', descr => 'conversion for WIN1251 to ISO-8859-5',
- conname => 'windows_1251_to_iso_8859_5', conforencoding => 'PG_WIN1251',
- contoencoding => 'PG_ISO_8859_5', conproc => 'win1251_to_iso' },
-{ oid => '4420', descr => 'conversion for ISO-8859-5 to WIN866',
- conname => 'iso_8859_5_to_windows_866', conforencoding => 'PG_ISO_8859_5',
- contoencoding => 'PG_WIN866', conproc => 'iso_to_win866' },
-{ oid => '4421', descr => 'conversion for WIN866 to ISO-8859-5',
- conname => 'windows_866_to_iso_8859_5', conforencoding => 'PG_WIN866',
- contoencoding => 'PG_ISO_8859_5', conproc => 'win866_to_iso' },
-{ oid => '4422', descr => 'conversion for EUC_CN to MULE_INTERNAL',
- conname => 'euc_cn_to_mic', conforencoding => 'PG_EUC_CN',
- contoencoding => 'PG_MULE_INTERNAL', conproc => 'euc_cn_to_mic' },
-{ oid => '4423', descr => 'conversion for MULE_INTERNAL to EUC_CN',
- conname => 'mic_to_euc_cn', conforencoding => 'PG_MULE_INTERNAL',
- contoencoding => 'PG_EUC_CN', conproc => 'mic_to_euc_cn' },
-{ oid => '4424', descr => 'conversion for EUC_JP to SJIS',
- conname => 'euc_jp_to_sjis', conforencoding => 'PG_EUC_JP',
- contoencoding => 'PG_SJIS', conproc => 'euc_jp_to_sjis' },
-{ oid => '4425', descr => 'conversion for SJIS to EUC_JP',
- conname => 'sjis_to_euc_jp', conforencoding => 'PG_SJIS',
- contoencoding => 'PG_EUC_JP', conproc => 'sjis_to_euc_jp' },
-{ oid => '4426', descr => 'conversion for EUC_JP to MULE_INTERNAL',
- conname => 'euc_jp_to_mic', conforencoding => 'PG_EUC_JP',
- contoencoding => 'PG_MULE_INTERNAL', conproc => 'euc_jp_to_mic' },
-{ oid => '4427', descr => 'conversion for SJIS to MULE_INTERNAL',
- conname => 'sjis_to_mic', conforencoding => 'PG_SJIS',
- contoencoding => 'PG_MULE_INTERNAL', conproc => 'sjis_to_mic' },
-{ oid => '4428', descr => 'conversion for MULE_INTERNAL to EUC_JP',
- conname => 'mic_to_euc_jp', conforencoding => 'PG_MULE_INTERNAL',
- contoencoding => 'PG_EUC_JP', conproc => 'mic_to_euc_jp' },
-{ oid => '4429', descr => 'conversion for MULE_INTERNAL to SJIS',
- conname => 'mic_to_sjis', conforencoding => 'PG_MULE_INTERNAL',
- contoencoding => 'PG_SJIS', conproc => 'mic_to_sjis' },
-{ oid => '4430', descr => 'conversion for EUC_KR to MULE_INTERNAL',
- conname => 'euc_kr_to_mic', conforencoding => 'PG_EUC_KR',
- contoencoding => 'PG_MULE_INTERNAL', conproc => 'euc_kr_to_mic' },
-{ oid => '4431', descr => 'conversion for MULE_INTERNAL to EUC_KR',
- conname => 'mic_to_euc_kr', conforencoding => 'PG_MULE_INTERNAL',
- contoencoding => 'PG_EUC_KR', conproc => 'mic_to_euc_kr' },
-{ oid => '4432', descr => 'conversion for EUC_TW to BIG5',
- conname => 'euc_tw_to_big5', conforencoding => 'PG_EUC_TW',
- contoencoding => 'PG_BIG5', conproc => 'euc_tw_to_big5' },
-{ oid => '4433', descr => 'conversion for BIG5 to EUC_TW',
- conname => 'big5_to_euc_tw', conforencoding => 'PG_BIG5',
- contoencoding => 'PG_EUC_TW', conproc => 'big5_to_euc_tw' },
-{ oid => '4434', descr => 'conversion for EUC_TW to MULE_INTERNAL',
- conname => 'euc_tw_to_mic', conforencoding => 'PG_EUC_TW',
- contoencoding => 'PG_MULE_INTERNAL', conproc => 'euc_tw_to_mic' },
-{ oid => '4435', descr => 'conversion for BIG5 to MULE_INTERNAL',
- conname => 'big5_to_mic', conforencoding => 'PG_BIG5',
- contoencoding => 'PG_MULE_INTERNAL', conproc => 'big5_to_mic' },
-{ oid => '4436', descr => 'conversion for MULE_INTERNAL to EUC_TW',
- conname => 'mic_to_euc_tw', conforencoding => 'PG_MULE_INTERNAL',
- contoencoding => 'PG_EUC_TW', conproc => 'mic_to_euc_tw' },
-{ oid => '4437', descr => 'conversion for MULE_INTERNAL to BIG5',
- conname => 'mic_to_big5', conforencoding => 'PG_MULE_INTERNAL',
- contoencoding => 'PG_BIG5', conproc => 'mic_to_big5' },
-{ oid => '4438', descr => 'conversion for LATIN2 to MULE_INTERNAL',
- conname => 'iso_8859_2_to_mic', conforencoding => 'PG_LATIN2',
- contoencoding => 'PG_MULE_INTERNAL', conproc => 'latin2_to_mic' },
-{ oid => '4439', descr => 'conversion for MULE_INTERNAL to LATIN2',
- conname => 'mic_to_iso_8859_2', conforencoding => 'PG_MULE_INTERNAL',
- contoencoding => 'PG_LATIN2', conproc => 'mic_to_latin2' },
-{ oid => '4440', descr => 'conversion for WIN1250 to MULE_INTERNAL',
- conname => 'windows_1250_to_mic', conforencoding => 'PG_WIN1250',
- contoencoding => 'PG_MULE_INTERNAL', conproc => 'win1250_to_mic' },
-{ oid => '4441', descr => 'conversion for MULE_INTERNAL to WIN1250',
- conname => 'mic_to_windows_1250', conforencoding => 'PG_MULE_INTERNAL',
- contoencoding => 'PG_WIN1250', conproc => 'mic_to_win1250' },
-{ oid => '4442', descr => 'conversion for LATIN2 to WIN1250',
- conname => 'iso_8859_2_to_windows_1250', conforencoding => 'PG_LATIN2',
- contoencoding => 'PG_WIN1250', conproc => 'latin2_to_win1250' },
-{ oid => '4443', descr => 'conversion for WIN1250 to LATIN2',
- conname => 'windows_1250_to_iso_8859_2', conforencoding => 'PG_WIN1250',
- contoencoding => 'PG_LATIN2', conproc => 'win1250_to_latin2' },
-{ oid => '4444', descr => 'conversion for LATIN1 to MULE_INTERNAL',
- conname => 'iso_8859_1_to_mic', conforencoding => 'PG_LATIN1',
- contoencoding => 'PG_MULE_INTERNAL', conproc => 'latin1_to_mic' },
-{ oid => '4445', descr => 'conversion for MULE_INTERNAL to LATIN1',
- conname => 'mic_to_iso_8859_1', conforencoding => 'PG_MULE_INTERNAL',
- contoencoding => 'PG_LATIN1', conproc => 'mic_to_latin1' },
-{ oid => '4446', descr => 'conversion for LATIN3 to MULE_INTERNAL',
- conname => 'iso_8859_3_to_mic', conforencoding => 'PG_LATIN3',
- contoencoding => 'PG_MULE_INTERNAL', conproc => 'latin3_to_mic' },
-{ oid => '4447', descr => 'conversion for MULE_INTERNAL to LATIN3',
- conname => 'mic_to_iso_8859_3', conforencoding => 'PG_MULE_INTERNAL',
- contoencoding => 'PG_LATIN3', conproc => 'mic_to_latin3' },
-{ oid => '4448', descr => 'conversion for LATIN4 to MULE_INTERNAL',
- conname => 'iso_8859_4_to_mic', conforencoding => 'PG_LATIN4',
- contoencoding => 'PG_MULE_INTERNAL', conproc => 'latin4_to_mic' },
-{ oid => '4449', descr => 'conversion for MULE_INTERNAL to LATIN4',
- conname => 'mic_to_iso_8859_4', conforencoding => 'PG_MULE_INTERNAL',
- contoencoding => 'PG_LATIN4', conproc => 'mic_to_latin4' },
-{ oid => '4452', descr => 'conversion for BIG5 to UTF8',
- conname => 'big5_to_utf8', conforencoding => 'PG_BIG5',
- contoencoding => 'PG_UTF8', conproc => 'big5_to_utf8' },
-{ oid => '4453', descr => 'conversion for UTF8 to BIG5',
- conname => 'utf8_to_big5', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_BIG5', conproc => 'utf8_to_big5' },
-{ oid => '4454', descr => 'conversion for UTF8 to KOI8R',
- conname => 'utf8_to_koi8_r', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_KOI8R', conproc => 'utf8_to_koi8r' },
-{ oid => '4455', descr => 'conversion for KOI8R to UTF8',
- conname => 'koi8_r_to_utf8', conforencoding => 'PG_KOI8R',
- contoencoding => 'PG_UTF8', conproc => 'koi8r_to_utf8' },
-{ oid => '4456', descr => 'conversion for UTF8 to KOI8U',
- conname => 'utf8_to_koi8_u', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_KOI8U', conproc => 'utf8_to_koi8u' },
-{ oid => '4457', descr => 'conversion for KOI8U to UTF8',
- conname => 'koi8_u_to_utf8', conforencoding => 'PG_KOI8U',
- contoencoding => 'PG_UTF8', conproc => 'koi8u_to_utf8' },
-{ oid => '4458', descr => 'conversion for UTF8 to WIN866',
- conname => 'utf8_to_windows_866', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_WIN866', conproc => 'utf8_to_win' },
-{ oid => '4459', descr => 'conversion for WIN866 to UTF8',
- conname => 'windows_866_to_utf8', conforencoding => 'PG_WIN866',
- contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
-{ oid => '4460', descr => 'conversion for UTF8 to WIN874',
- conname => 'utf8_to_windows_874', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_WIN874', conproc => 'utf8_to_win' },
-{ oid => '4461', descr => 'conversion for WIN874 to UTF8',
- conname => 'windows_874_to_utf8', conforencoding => 'PG_WIN874',
- contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
-{ oid => '4462', descr => 'conversion for UTF8 to WIN1250',
- conname => 'utf8_to_windows_1250', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_WIN1250', conproc => 'utf8_to_win' },
-{ oid => '4463', descr => 'conversion for WIN1250 to UTF8',
- conname => 'windows_1250_to_utf8', conforencoding => 'PG_WIN1250',
- contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
-{ oid => '4464', descr => 'conversion for UTF8 to WIN1251',
- conname => 'utf8_to_windows_1251', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_WIN1251', conproc => 'utf8_to_win' },
-{ oid => '4465', descr => 'conversion for WIN1251 to UTF8',
- conname => 'windows_1251_to_utf8', conforencoding => 'PG_WIN1251',
- contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
-{ oid => '4466', descr => 'conversion for UTF8 to WIN1252',
- conname => 'utf8_to_windows_1252', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_WIN1252', conproc => 'utf8_to_win' },
-{ oid => '4467', descr => 'conversion for WIN1252 to UTF8',
- conname => 'windows_1252_to_utf8', conforencoding => 'PG_WIN1252',
- contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
-{ oid => '4468', descr => 'conversion for UTF8 to WIN1253',
- conname => 'utf8_to_windows_1253', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_WIN1253', conproc => 'utf8_to_win' },
-{ oid => '4469', descr => 'conversion for WIN1253 to UTF8',
- conname => 'windows_1253_to_utf8', conforencoding => 'PG_WIN1253',
- contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
-{ oid => '4470', descr => 'conversion for UTF8 to WIN1254',
- conname => 'utf8_to_windows_1254', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_WIN1254', conproc => 'utf8_to_win' },
-{ oid => '4471', descr => 'conversion for WIN1254 to UTF8',
- conname => 'windows_1254_to_utf8', conforencoding => 'PG_WIN1254',
- contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
-{ oid => '4472', descr => 'conversion for UTF8 to WIN1255',
- conname => 'utf8_to_windows_1255', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_WIN1255', conproc => 'utf8_to_win' },
-{ oid => '4473', descr => 'conversion for WIN1255 to UTF8',
- conname => 'windows_1255_to_utf8', conforencoding => 'PG_WIN1255',
- contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
-{ oid => '4474', descr => 'conversion for UTF8 to WIN1256',
- conname => 'utf8_to_windows_1256', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_WIN1256', conproc => 'utf8_to_win' },
-{ oid => '4475', descr => 'conversion for WIN1256 to UTF8',
- conname => 'windows_1256_to_utf8', conforencoding => 'PG_WIN1256',
- contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
-{ oid => '4476', descr => 'conversion for UTF8 to WIN1257',
- conname => 'utf8_to_windows_1257', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_WIN1257', conproc => 'utf8_to_win' },
-{ oid => '4477', descr => 'conversion for WIN1257 to UTF8',
- conname => 'windows_1257_to_utf8', conforencoding => 'PG_WIN1257',
- contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
-{ oid => '4478', descr => 'conversion for UTF8 to WIN1258',
- conname => 'utf8_to_windows_1258', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_WIN1258', conproc => 'utf8_to_win' },
-{ oid => '4479', descr => 'conversion for WIN1258 to UTF8',
- conname => 'windows_1258_to_utf8', conforencoding => 'PG_WIN1258',
- contoencoding => 'PG_UTF8', conproc => 'win_to_utf8' },
-{ oid => '4480', descr => 'conversion for EUC_CN to UTF8',
- conname => 'euc_cn_to_utf8', conforencoding => 'PG_EUC_CN',
- contoencoding => 'PG_UTF8', conproc => 'euc_cn_to_utf8' },
-{ oid => '4481', descr => 'conversion for UTF8 to EUC_CN',
- conname => 'utf8_to_euc_cn', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_EUC_CN', conproc => 'utf8_to_euc_cn' },
-{ oid => '4482', descr => 'conversion for EUC_JP to UTF8',
- conname => 'euc_jp_to_utf8', conforencoding => 'PG_EUC_JP',
- contoencoding => 'PG_UTF8', conproc => 'euc_jp_to_utf8' },
-{ oid => '4483', descr => 'conversion for UTF8 to EUC_JP',
- conname => 'utf8_to_euc_jp', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_EUC_JP', conproc => 'utf8_to_euc_jp' },
-{ oid => '4484', descr => 'conversion for EUC_KR to UTF8',
- conname => 'euc_kr_to_utf8', conforencoding => 'PG_EUC_KR',
- contoencoding => 'PG_UTF8', conproc => 'euc_kr_to_utf8' },
-{ oid => '4485', descr => 'conversion for UTF8 to EUC_KR',
- conname => 'utf8_to_euc_kr', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_EUC_KR', conproc => 'utf8_to_euc_kr' },
-{ oid => '4486', descr => 'conversion for EUC_TW to UTF8',
- conname => 'euc_tw_to_utf8', conforencoding => 'PG_EUC_TW',
- contoencoding => 'PG_UTF8', conproc => 'euc_tw_to_utf8' },
-{ oid => '4487', descr => 'conversion for UTF8 to EUC_TW',
- conname => 'utf8_to_euc_tw', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_EUC_TW', conproc => 'utf8_to_euc_tw' },
-{ oid => '4488', descr => 'conversion for GB18030 to UTF8',
- conname => 'gb18030_to_utf8', conforencoding => 'PG_GB18030',
- contoencoding => 'PG_UTF8', conproc => 'gb18030_to_utf8' },
-{ oid => '4489', descr => 'conversion for UTF8 to GB18030',
- conname => 'utf8_to_gb18030', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_GB18030', conproc => 'utf8_to_gb18030' },
-{ oid => '4490', descr => 'conversion for GBK to UTF8',
- conname => 'gbk_to_utf8', conforencoding => 'PG_GBK',
- contoencoding => 'PG_UTF8', conproc => 'gbk_to_utf8' },
-{ oid => '4491', descr => 'conversion for UTF8 to GBK',
- conname => 'utf8_to_gbk', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_GBK', conproc => 'utf8_to_gbk' },
-{ oid => '4492', descr => 'conversion for UTF8 to LATIN2',
- conname => 'utf8_to_iso_8859_2', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_LATIN2', conproc => 'utf8_to_iso8859' },
-{ oid => '4493', descr => 'conversion for LATIN2 to UTF8',
- conname => 'iso_8859_2_to_utf8', conforencoding => 'PG_LATIN2',
- contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
-{ oid => '4494', descr => 'conversion for UTF8 to LATIN3',
- conname => 'utf8_to_iso_8859_3', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_LATIN3', conproc => 'utf8_to_iso8859' },
-{ oid => '4495', descr => 'conversion for LATIN3 to UTF8',
- conname => 'iso_8859_3_to_utf8', conforencoding => 'PG_LATIN3',
- contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
-{ oid => '4496', descr => 'conversion for UTF8 to LATIN4',
- conname => 'utf8_to_iso_8859_4', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_LATIN4', conproc => 'utf8_to_iso8859' },
-{ oid => '4497', descr => 'conversion for LATIN4 to UTF8',
- conname => 'iso_8859_4_to_utf8', conforencoding => 'PG_LATIN4',
- contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
-{ oid => '4498', descr => 'conversion for UTF8 to LATIN5',
- conname => 'utf8_to_iso_8859_9', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_LATIN5', conproc => 'utf8_to_iso8859' },
-{ oid => '4499', descr => 'conversion for LATIN5 to UTF8',
- conname => 'iso_8859_9_to_utf8', conforencoding => 'PG_LATIN5',
- contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
-{ oid => '4500', descr => 'conversion for UTF8 to LATIN6',
- conname => 'utf8_to_iso_8859_10', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_LATIN6', conproc => 'utf8_to_iso8859' },
-{ oid => '4501', descr => 'conversion for LATIN6 to UTF8',
- conname => 'iso_8859_10_to_utf8', conforencoding => 'PG_LATIN6',
- contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
-{ oid => '4502', descr => 'conversion for UTF8 to LATIN7',
- conname => 'utf8_to_iso_8859_13', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_LATIN7', conproc => 'utf8_to_iso8859' },
-{ oid => '4503', descr => 'conversion for LATIN7 to UTF8',
- conname => 'iso_8859_13_to_utf8', conforencoding => 'PG_LATIN7',
- contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
-{ oid => '4504', descr => 'conversion for UTF8 to LATIN8',
- conname => 'utf8_to_iso_8859_14', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_LATIN8', conproc => 'utf8_to_iso8859' },
-{ oid => '4505', descr => 'conversion for LATIN8 to UTF8',
- conname => 'iso_8859_14_to_utf8', conforencoding => 'PG_LATIN8',
- contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
-{ oid => '4506', descr => 'conversion for UTF8 to LATIN9',
- conname => 'utf8_to_iso_8859_15', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_LATIN9', conproc => 'utf8_to_iso8859' },
-{ oid => '4507', descr => 'conversion for LATIN9 to UTF8',
- conname => 'iso_8859_15_to_utf8', conforencoding => 'PG_LATIN9',
- contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
-{ oid => '4508', descr => 'conversion for UTF8 to LATIN10',
- conname => 'utf8_to_iso_8859_16', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_LATIN10', conproc => 'utf8_to_iso8859' },
-{ oid => '4509', descr => 'conversion for LATIN10 to UTF8',
- conname => 'iso_8859_16_to_utf8', conforencoding => 'PG_LATIN10',
- contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
-{ oid => '4510', descr => 'conversion for UTF8 to ISO-8859-5',
- conname => 'utf8_to_iso_8859_5', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_ISO_8859_5', conproc => 'utf8_to_iso8859' },
-{ oid => '4511', descr => 'conversion for ISO-8859-5 to UTF8',
- conname => 'iso_8859_5_to_utf8', conforencoding => 'PG_ISO_8859_5',
- contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
-{ oid => '4512', descr => 'conversion for UTF8 to ISO-8859-6',
- conname => 'utf8_to_iso_8859_6', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_ISO_8859_6', conproc => 'utf8_to_iso8859' },
-{ oid => '4513', descr => 'conversion for ISO-8859-6 to UTF8',
- conname => 'iso_8859_6_to_utf8', conforencoding => 'PG_ISO_8859_6',
- contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
-{ oid => '4514', descr => 'conversion for UTF8 to ISO-8859-7',
- conname => 'utf8_to_iso_8859_7', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_ISO_8859_7', conproc => 'utf8_to_iso8859' },
-{ oid => '4515', descr => 'conversion for ISO-8859-7 to UTF8',
- conname => 'iso_8859_7_to_utf8', conforencoding => 'PG_ISO_8859_7',
- contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
-{ oid => '4516', descr => 'conversion for UTF8 to ISO-8859-8',
- conname => 'utf8_to_iso_8859_8', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_ISO_8859_8', conproc => 'utf8_to_iso8859' },
-{ oid => '4517', descr => 'conversion for ISO-8859-8 to UTF8',
- conname => 'iso_8859_8_to_utf8', conforencoding => 'PG_ISO_8859_8',
- contoencoding => 'PG_UTF8', conproc => 'iso8859_to_utf8' },
-{ oid => '4518', descr => 'conversion for LATIN1 to UTF8',
- conname => 'iso_8859_1_to_utf8', conforencoding => 'PG_LATIN1',
- contoencoding => 'PG_UTF8', conproc => 'iso8859_1_to_utf8' },
-{ oid => '4519', descr => 'conversion for UTF8 to LATIN1',
- conname => 'utf8_to_iso_8859_1', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_LATIN1', conproc => 'utf8_to_iso8859_1' },
-{ oid => '4520', descr => 'conversion for JOHAB to UTF8',
- conname => 'johab_to_utf8', conforencoding => 'PG_JOHAB',
- contoencoding => 'PG_UTF8', conproc => 'johab_to_utf8' },
-{ oid => '4521', descr => 'conversion for UTF8 to JOHAB',
- conname => 'utf8_to_johab', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_JOHAB', conproc => 'utf8_to_johab' },
-{ oid => '4522', descr => 'conversion for SJIS to UTF8',
- conname => 'sjis_to_utf8', conforencoding => 'PG_SJIS',
- contoencoding => 'PG_UTF8', conproc => 'sjis_to_utf8' },
-{ oid => '4523', descr => 'conversion for UTF8 to SJIS',
- conname => 'utf8_to_sjis', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_SJIS', conproc => 'utf8_to_sjis' },
-{ oid => '4524', descr => 'conversion for UHC to UTF8',
- conname => 'uhc_to_utf8', conforencoding => 'PG_UHC',
- contoencoding => 'PG_UTF8', conproc => 'uhc_to_utf8' },
-{ oid => '4525', descr => 'conversion for UTF8 to UHC',
- conname => 'utf8_to_uhc', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_UHC', conproc => 'utf8_to_uhc' },
-{ oid => '4526', descr => 'conversion for EUC_JIS_2004 to UTF8',
- conname => 'euc_jis_2004_to_utf8', conforencoding => 'PG_EUC_JIS_2004',
- contoencoding => 'PG_UTF8', conproc => 'euc_jis_2004_to_utf8' },
-{ oid => '4527', descr => 'conversion for UTF8 to EUC_JIS_2004',
- conname => 'utf8_to_euc_jis_2004', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_EUC_JIS_2004', conproc => 'utf8_to_euc_jis_2004' },
-{ oid => '4528', descr => 'conversion for SHIFT_JIS_2004 to UTF8',
- conname => 'shift_jis_2004_to_utf8', conforencoding => 'PG_SHIFT_JIS_2004',
- contoencoding => 'PG_UTF8', conproc => 'shift_jis_2004_to_utf8' },
-{ oid => '4529', descr => 'conversion for UTF8 to SHIFT_JIS_2004',
- conname => 'utf8_to_shift_jis_2004', conforencoding => 'PG_UTF8',
- contoencoding => 'PG_SHIFT_JIS_2004', conproc => 'utf8_to_shift_jis_2004' },
-{ oid => '4530', descr => 'conversion for EUC_JIS_2004 to SHIFT_JIS_2004',
- conname => 'euc_jis_2004_to_shift_jis_2004',
- conforencoding => 'PG_EUC_JIS_2004', contoencoding => 'PG_SHIFT_JIS_2004',
- conproc => 'euc_jis_2004_to_shift_jis_2004' },
-{ oid => '4531', descr => 'conversion for SHIFT_JIS_2004 to EUC_JIS_2004',
- conname => 'shift_jis_2004_to_euc_jis_2004',
- conforencoding => 'PG_SHIFT_JIS_2004', contoencoding => 'PG_EUC_JIS_2004',
- conproc => 'shift_jis_2004_to_euc_jis_2004' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_conversion.h b/contrib/libs/postgresql/src/include/catalog/pg_conversion.h
deleted file mode 100644
index ca556f6030f..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_conversion.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_conversion.h
- * definition of the "conversion" system catalog (pg_conversion)
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_conversion.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_CONVERSION_H
-#define PG_CONVERSION_H
-
-#include "catalog/genbki.h"
-#include "catalog/objectaddress.h"
-#include "catalog/pg_conversion_d.h"
-
-/* ----------------
- * pg_conversion definition. cpp turns this into
- * typedef struct FormData_pg_conversion
- * ----------------
- */
-CATALOG(pg_conversion,2607,ConversionRelationId)
-{
- /* oid */
- Oid oid;
-
- /* name of the conversion */
- NameData conname;
-
- /* namespace that the conversion belongs to */
- Oid connamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace);
-
- /* owner of the conversion */
- Oid conowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid);
-
- /* FOR encoding id */
- int32 conforencoding BKI_LOOKUP(encoding);
-
- /* TO encoding id */
- int32 contoencoding BKI_LOOKUP(encoding);
-
- /* OID of the conversion proc */
- regproc conproc BKI_LOOKUP(pg_proc);
-
- /* true if this is a default conversion */
- bool condefault BKI_DEFAULT(t);
-} FormData_pg_conversion;
-
-/* ----------------
- * Form_pg_conversion corresponds to a pointer to a tuple with
- * the format of pg_conversion relation.
- * ----------------
- */
-typedef FormData_pg_conversion *Form_pg_conversion;
-
-DECLARE_UNIQUE_INDEX(pg_conversion_default_index, 2668, on pg_conversion using btree(connamespace oid_ops, conforencoding int4_ops, contoencoding int4_ops, oid oid_ops));
-#define ConversionDefaultIndexId 2668
-DECLARE_UNIQUE_INDEX(pg_conversion_name_nsp_index, 2669, on pg_conversion using btree(conname name_ops, connamespace oid_ops));
-#define ConversionNameNspIndexId 2669
-DECLARE_UNIQUE_INDEX_PKEY(pg_conversion_oid_index, 2670, on pg_conversion using btree(oid oid_ops));
-#define ConversionOidIndexId 2670
-
-
-extern ObjectAddress ConversionCreate(const char *conname, Oid connamespace,
- Oid conowner,
- int32 conforencoding, int32 contoencoding,
- Oid conproc, bool def);
-extern Oid FindDefaultConversion(Oid connamespace, int32 for_encoding,
- int32 to_encoding);
-
-#endif /* PG_CONVERSION_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_conversion_d.h b/contrib/libs/postgresql/src/include/catalog/pg_conversion_d.h
deleted file mode 100644
index b8457ea209c..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_conversion_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_conversion_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_database.dat b/contrib/libs/postgresql/src/include/catalog/pg_database.dat
deleted file mode 100644
index b8aa1364a0d..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_database.dat
+++ /dev/null
@@ -1,22 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_database.dat
-# Initial contents of the pg_database system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_database.dat
-#
-#----------------------------------------------------------------------
-
-[
-
-{ oid => '1', oid_symbol => 'TemplateDbOid',
- descr => 'default template for new databases',
- datname => 'template1', encoding => 'ENCODING', datcollate => 'LC_COLLATE',
- datctype => 'LC_CTYPE', datistemplate => 't', datallowconn => 't',
- datconnlimit => '-1', datlastsysoid => '0', datfrozenxid => '0',
- datminmxid => '1', dattablespace => 'pg_default', datacl => '_null_' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_database.h b/contrib/libs/postgresql/src/include/catalog/pg_database.h
deleted file mode 100644
index d3de45821c2..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_database.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_database.h
- * definition of the "database" system catalog (pg_database)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_database.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_DATABASE_H
-#define PG_DATABASE_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_database_d.h"
-
-/* ----------------
- * pg_database definition. cpp turns this into
- * typedef struct FormData_pg_database
- * ----------------
- */
-CATALOG(pg_database,1262,DatabaseRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248,DatabaseRelation_Rowtype_Id) BKI_SCHEMA_MACRO
-{
- /* oid */
- Oid oid;
-
- /* database name */
- NameData datname;
-
- /* owner of database */
- Oid datdba BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid);
-
- /* character encoding */
- int32 encoding;
-
- /* LC_COLLATE setting */
- NameData datcollate;
-
- /* LC_CTYPE setting */
- NameData datctype;
-
- /* allowed as CREATE DATABASE template? */
- bool datistemplate;
-
- /* new connections allowed? */
- bool datallowconn;
-
- /* max connections allowed (-1=no limit) */
- int32 datconnlimit;
-
- /* highest OID to consider a system OID */
- Oid datlastsysoid;
-
- /* all Xids < this are frozen in this DB */
- TransactionId datfrozenxid;
-
- /* all multixacts in the DB are >= this */
- TransactionId datminmxid;
-
- /* default table space for this DB */
- Oid dattablespace BKI_LOOKUP(pg_tablespace);
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- /* access permissions */
- aclitem datacl[1];
-#endif
-} FormData_pg_database;
-
-/* ----------------
- * Form_pg_database corresponds to a pointer to a tuple with
- * the format of pg_database relation.
- * ----------------
- */
-typedef FormData_pg_database *Form_pg_database;
-
-DECLARE_TOAST(pg_database, 4177, 4178);
-#define PgDatabaseToastTable 4177
-#define PgDatabaseToastIndex 4178
-
-DECLARE_UNIQUE_INDEX(pg_database_datname_index, 2671, on pg_database using btree(datname name_ops));
-#define DatabaseNameIndexId 2671
-DECLARE_UNIQUE_INDEX_PKEY(pg_database_oid_index, 2672, on pg_database using btree(oid oid_ops));
-#define DatabaseOidIndexId 2672
-
-#endif /* PG_DATABASE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_database_d.h b/contrib/libs/postgresql/src/include/catalog/pg_database_d.h
deleted file mode 100644
index 7c5ca52aa82..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_database_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_database_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_db_role_setting.h b/contrib/libs/postgresql/src/include/catalog/pg_db_role_setting.h
deleted file mode 100644
index 705f698ae79..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_db_role_setting.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_db_role_setting.h
- * definition of the system catalog for per-database/per-user
- * configuration settings (pg_db_role_setting)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_db_role_setting.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_DB_ROLE_SETTING_H
-#define PG_DB_ROLE_SETTING_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_db_role_setting_d.h"
-
-#include "utils/guc.h"
-#include "utils/relcache.h"
-#include "utils/snapshot.h"
-
-/* ----------------
- * pg_db_role_setting definition. cpp turns this into
- * typedef struct FormData_pg_db_role_setting
- * ----------------
- */
-CATALOG(pg_db_role_setting,2964,DbRoleSettingRelationId) BKI_SHARED_RELATION
-{
- /* database, or 0 for a role-specific setting */
- Oid setdatabase BKI_LOOKUP_OPT(pg_database);
-
- /* role, or 0 for a database-specific setting */
- Oid setrole BKI_LOOKUP_OPT(pg_authid);
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- text setconfig[1]; /* GUC settings to apply at login */
-#endif
-} FormData_pg_db_role_setting;
-
-typedef FormData_pg_db_role_setting * Form_pg_db_role_setting;
-
-DECLARE_TOAST(pg_db_role_setting, 2966, 2967);
-#define PgDbRoleSettingToastTable 2966
-#define PgDbRoleSettingToastIndex 2967
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_db_role_setting_databaseid_rol_index, 2965, on pg_db_role_setting using btree(setdatabase oid_ops, setrole oid_ops));
-#define DbRoleSettingDatidRolidIndexId 2965
-
-/*
- * prototypes for functions in pg_db_role_setting.h
- */
-extern void AlterSetting(Oid databaseid, Oid roleid, VariableSetStmt *setstmt);
-extern void DropSetting(Oid databaseid, Oid roleid);
-extern void ApplySetting(Snapshot snapshot, Oid databaseid, Oid roleid,
- Relation relsetting, GucSource source);
-
-#endif /* PG_DB_ROLE_SETTING_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_db_role_setting_d.h b/contrib/libs/postgresql/src/include/catalog/pg_db_role_setting_d.h
deleted file mode 100644
index 5128cb71330..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_db_role_setting_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_db_role_setting_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_default_acl.h b/contrib/libs/postgresql/src/include/catalog/pg_default_acl.h
deleted file mode 100644
index 156fc0712da..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_default_acl.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_default_acl.h
- * definition of the system catalog for default ACLs of new objects
- * (pg_default_acl)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_default_acl.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_DEFAULT_ACL_H
-#define PG_DEFAULT_ACL_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_default_acl_d.h"
-
-/* ----------------
- * pg_default_acl definition. cpp turns this into
- * typedef struct FormData_pg_default_acl
- * ----------------
- */
-CATALOG(pg_default_acl,826,DefaultAclRelationId)
-{
- Oid oid; /* oid */
- Oid defaclrole BKI_LOOKUP(pg_authid); /* OID of role owning this
- * ACL */
- Oid defaclnamespace BKI_LOOKUP_OPT(pg_namespace); /* OID of namespace, or
- * 0 for all */
- char defaclobjtype; /* see DEFACLOBJ_xxx constants below */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- aclitem defaclacl[1] BKI_FORCE_NOT_NULL; /* permissions to add at
- * CREATE time */
-#endif
-} FormData_pg_default_acl;
-
-/* ----------------
- * Form_pg_default_acl corresponds to a pointer to a tuple with
- * the format of pg_default_acl relation.
- * ----------------
- */
-typedef FormData_pg_default_acl *Form_pg_default_acl;
-
-DECLARE_TOAST(pg_default_acl, 4143, 4144);
-
-DECLARE_UNIQUE_INDEX(pg_default_acl_role_nsp_obj_index, 827, on pg_default_acl using btree(defaclrole oid_ops, defaclnamespace oid_ops, defaclobjtype char_ops));
-#define DefaultAclRoleNspObjIndexId 827
-DECLARE_UNIQUE_INDEX_PKEY(pg_default_acl_oid_index, 828, on pg_default_acl using btree(oid oid_ops));
-#define DefaultAclOidIndexId 828
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-/*
- * Types of objects for which the user is allowed to specify default
- * permissions through pg_default_acl. These codes are used in the
- * defaclobjtype column.
- */
-#define DEFACLOBJ_RELATION 'r' /* table, view */
-#define DEFACLOBJ_SEQUENCE 'S' /* sequence */
-#define DEFACLOBJ_FUNCTION 'f' /* function */
-#define DEFACLOBJ_TYPE 'T' /* type */
-#define DEFACLOBJ_NAMESPACE 'n' /* namespace */
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-#endif /* PG_DEFAULT_ACL_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_default_acl_d.h b/contrib/libs/postgresql/src/include/catalog/pg_default_acl_d.h
deleted file mode 100644
index c67a7f8e976..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_default_acl_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_default_acl_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_depend.h b/contrib/libs/postgresql/src/include/catalog/pg_depend.h
deleted file mode 100644
index e0bc1141457..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_depend.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_depend.h
- * definition of the "dependency" system catalog (pg_depend)
- *
- * pg_depend has no preloaded contents, so there is no pg_depend.dat
- * file; system-defined dependencies are loaded into it during a late stage
- * of the initdb process.
- *
- * NOTE: we do not represent all possible dependency pairs in pg_depend;
- * for example, there's not much value in creating an explicit dependency
- * from an attribute to its relation. Usually we make a dependency for
- * cases where the relationship is conditional rather than essential
- * (for example, not all triggers are dependent on constraints, but all
- * attributes are dependent on relations) or where the dependency is not
- * convenient to find from the contents of other catalogs.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_depend.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_DEPEND_H
-#define PG_DEPEND_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_depend_d.h"
-
-/* ----------------
- * pg_depend definition. cpp turns this into
- * typedef struct FormData_pg_depend
- * ----------------
- */
-CATALOG(pg_depend,2608,DependRelationId)
-{
- /*
- * Identification of the dependent (referencing) object.
- *
- * These fields are all zeroes for a DEPENDENCY_PIN entry.
- */
- Oid classid BKI_LOOKUP_OPT(pg_class); /* OID of table containing
- * object */
- Oid objid; /* OID of object itself */
- int32 objsubid; /* column number, or 0 if not used */
-
- /*
- * Identification of the independent (referenced) object.
- */
- Oid refclassid BKI_LOOKUP(pg_class); /* OID of table containing
- * object */
- Oid refobjid; /* OID of object itself */
- int32 refobjsubid; /* column number, or 0 if not used */
-
- /*
- * Precise semantics of the relationship are specified by the deptype
- * field. See DependencyType in catalog/dependency.h.
- */
- char deptype; /* see codes in dependency.h */
-} FormData_pg_depend;
-
-/* ----------------
- * Form_pg_depend corresponds to a pointer to a row with
- * the format of pg_depend relation.
- * ----------------
- */
-typedef FormData_pg_depend *Form_pg_depend;
-
-DECLARE_INDEX(pg_depend_depender_index, 2673, on pg_depend using btree(classid oid_ops, objid oid_ops, objsubid int4_ops));
-#define DependDependerIndexId 2673
-DECLARE_INDEX(pg_depend_reference_index, 2674, on pg_depend using btree(refclassid oid_ops, refobjid oid_ops, refobjsubid int4_ops));
-#define DependReferenceIndexId 2674
-
-#endif /* PG_DEPEND_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_depend_d.h b/contrib/libs/postgresql/src/include/catalog/pg_depend_d.h
deleted file mode 100644
index a25be9e0aba..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_depend_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_depend_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_description.h b/contrib/libs/postgresql/src/include/catalog/pg_description.h
deleted file mode 100644
index adc06a854d9..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_description.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_description.h
- * definition of the "description" system catalog (pg_description)
- *
- * Because the contents of this table are taken from the *.dat files
- * of other catalogs, there is no pg_description.dat file. The initial
- * contents are assembled by genbki.pl and loaded during initdb.
- *
- * NOTE: an object is identified by the OID of the row that primarily
- * defines the object, plus the OID of the table that that row appears in.
- * For example, a function is identified by the OID of its pg_proc row
- * plus the pg_class OID of table pg_proc. This allows unique identification
- * of objects without assuming that OIDs are unique across tables.
- *
- * Since attributes don't have OIDs of their own, we identify an attribute
- * comment by the objoid+classoid of its parent table, plus an "objsubid"
- * giving the attribute column number. "objsubid" must be zero in a comment
- * for a table itself, so that it is distinct from any column comment.
- * Currently, objsubid is unused and zero for all other kinds of objects,
- * but perhaps it might be useful someday to associate comments with
- * constituent elements of other kinds of objects (arguments of a function,
- * for example).
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_description.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_DESCRIPTION_H
-#define PG_DESCRIPTION_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_description_d.h"
-
-/* ----------------
- * pg_description definition. cpp turns this into
- * typedef struct FormData_pg_description
- * ----------------
- */
-CATALOG(pg_description,2609,DescriptionRelationId)
-{
- Oid objoid; /* OID of object itself */
- Oid classoid; /* OID of table containing object */
- int32 objsubid; /* column number, or 0 if not used */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- text description BKI_FORCE_NOT_NULL; /* description of object */
-#endif
-} FormData_pg_description;
-
-/* ----------------
- * Form_pg_description corresponds to a pointer to a tuple with
- * the format of pg_description relation.
- * ----------------
- */
-typedef FormData_pg_description * Form_pg_description;
-
-DECLARE_TOAST(pg_description, 2834, 2835);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_description_o_c_o_index, 2675, on pg_description using btree(objoid oid_ops, classoid oid_ops, objsubid int4_ops));
-#define DescriptionObjIndexId 2675
-
-/* We do not use BKI_LOOKUP here because it causes problems for genbki.pl */
-DECLARE_FOREIGN_KEY((classoid), pg_class, (oid));
-
-#endif /* PG_DESCRIPTION_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_description_d.h b/contrib/libs/postgresql/src/include/catalog/pg_description_d.h
deleted file mode 100644
index 72f10e1b920..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_description_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_description_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_enum.h b/contrib/libs/postgresql/src/include/catalog/pg_enum.h
deleted file mode 100644
index 78a183b27d4..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_enum.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_enum.h
- * definition of the "enum" system catalog (pg_enum)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_enum.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_ENUM_H
-#define PG_ENUM_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_enum_d.h"
-
-#include "nodes/pg_list.h"
-
-/* ----------------
- * pg_enum definition. cpp turns this into
- * typedef struct FormData_pg_enum
- * ----------------
- */
-CATALOG(pg_enum,3501,EnumRelationId)
-{
- Oid oid; /* oid */
- Oid enumtypid BKI_LOOKUP(pg_type); /* OID of owning enum type */
- float4 enumsortorder; /* sort position of this enum value */
- NameData enumlabel; /* text representation of enum value */
-} FormData_pg_enum;
-
-/* ----------------
- * Form_pg_enum corresponds to a pointer to a tuple with
- * the format of pg_enum relation.
- * ----------------
- */
-typedef FormData_pg_enum *Form_pg_enum;
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_enum_oid_index, 3502, on pg_enum using btree(oid oid_ops));
-#define EnumOidIndexId 3502
-DECLARE_UNIQUE_INDEX(pg_enum_typid_label_index, 3503, on pg_enum using btree(enumtypid oid_ops, enumlabel name_ops));
-#define EnumTypIdLabelIndexId 3503
-DECLARE_UNIQUE_INDEX(pg_enum_typid_sortorder_index, 3534, on pg_enum using btree(enumtypid oid_ops, enumsortorder float4_ops));
-#define EnumTypIdSortOrderIndexId 3534
-
-/*
- * prototypes for functions in pg_enum.c
- */
-extern void EnumValuesCreate(Oid enumTypeOid, List *vals);
-extern void EnumValuesDelete(Oid enumTypeOid);
-extern void AddEnumLabel(Oid enumTypeOid, const char *newVal,
- const char *neighbor, bool newValIsAfter,
- bool skipIfExists);
-extern void RenameEnumLabel(Oid enumTypeOid,
- const char *oldVal, const char *newVal);
-extern bool EnumUncommitted(Oid enum_id);
-extern Size EstimateUncommittedEnumsSpace(void);
-extern void SerializeUncommittedEnums(void *space, Size size);
-extern void RestoreUncommittedEnums(void *space);
-extern void AtEOXact_Enum(void);
-
-#endif /* PG_ENUM_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_enum_d.h b/contrib/libs/postgresql/src/include/catalog/pg_enum_d.h
deleted file mode 100644
index 5a100692944..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_enum_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_enum_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_event_trigger.h b/contrib/libs/postgresql/src/include/catalog/pg_event_trigger.h
deleted file mode 100644
index eeaa6be5184..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_event_trigger.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_event_trigger.h
- * definition of the "event trigger" system catalog (pg_event_trigger)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_event_trigger.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_EVENT_TRIGGER_H
-#define PG_EVENT_TRIGGER_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_event_trigger_d.h"
-
-/* ----------------
- * pg_event_trigger definition. cpp turns this into
- * typedef struct FormData_pg_event_trigger
- * ----------------
- */
-CATALOG(pg_event_trigger,3466,EventTriggerRelationId)
-{
- Oid oid; /* oid */
- NameData evtname; /* trigger's name */
- NameData evtevent; /* trigger's event */
- Oid evtowner BKI_LOOKUP(pg_authid); /* trigger's owner */
- Oid evtfoid BKI_LOOKUP(pg_proc); /* OID of function to be
- * called */
- char evtenabled; /* trigger's firing configuration WRT
- * session_replication_role */
-
-#ifdef CATALOG_VARLEN
- text evttags[1]; /* command TAGs this event trigger targets */
-#endif
-} FormData_pg_event_trigger;
-
-/* ----------------
- * Form_pg_event_trigger corresponds to a pointer to a tuple with
- * the format of pg_event_trigger relation.
- * ----------------
- */
-typedef FormData_pg_event_trigger *Form_pg_event_trigger;
-
-DECLARE_TOAST(pg_event_trigger, 4145, 4146);
-
-DECLARE_UNIQUE_INDEX(pg_event_trigger_evtname_index, 3467, on pg_event_trigger using btree(evtname name_ops));
-#define EventTriggerNameIndexId 3467
-DECLARE_UNIQUE_INDEX_PKEY(pg_event_trigger_oid_index, 3468, on pg_event_trigger using btree(oid oid_ops));
-#define EventTriggerOidIndexId 3468
-
-#endif /* PG_EVENT_TRIGGER_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_event_trigger_d.h b/contrib/libs/postgresql/src/include/catalog/pg_event_trigger_d.h
deleted file mode 100644
index 20d5bf48457..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_event_trigger_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_event_trigger_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_extension.h b/contrib/libs/postgresql/src/include/catalog/pg_extension.h
deleted file mode 100644
index 2d6ad9fa888..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_extension.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_extension.h
- * definition of the "extension" system catalog (pg_extension)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_extension.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_EXTENSION_H
-#define PG_EXTENSION_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_extension_d.h"
-
-/* ----------------
- * pg_extension definition. cpp turns this into
- * typedef struct FormData_pg_extension
- * ----------------
- */
-CATALOG(pg_extension,3079,ExtensionRelationId)
-{
- Oid oid; /* oid */
- NameData extname; /* extension name */
- Oid extowner BKI_LOOKUP(pg_authid); /* extension owner */
- Oid extnamespace BKI_LOOKUP(pg_namespace); /* namespace of
- * contained objects */
- bool extrelocatable; /* if true, allow ALTER EXTENSION SET SCHEMA */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- /* extversion may never be null, but the others can be. */
- text extversion BKI_FORCE_NOT_NULL; /* extension version name */
- Oid extconfig[1] BKI_LOOKUP(pg_class); /* dumpable configuration
- * tables */
- text extcondition[1]; /* WHERE clauses for config tables */
-#endif
-} FormData_pg_extension;
-
-/* ----------------
- * Form_pg_extension corresponds to a pointer to a tuple with
- * the format of pg_extension relation.
- * ----------------
- */
-typedef FormData_pg_extension *Form_pg_extension;
-
-DECLARE_TOAST(pg_extension, 4147, 4148);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_extension_oid_index, 3080, on pg_extension using btree(oid oid_ops));
-#define ExtensionOidIndexId 3080
-DECLARE_UNIQUE_INDEX(pg_extension_name_index, 3081, on pg_extension using btree(extname name_ops));
-#define ExtensionNameIndexId 3081
-
-#endif /* PG_EXTENSION_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_extension_d.h b/contrib/libs/postgresql/src/include/catalog/pg_extension_d.h
deleted file mode 100644
index be632265be9..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_extension_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_extension_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_foreign_data_wrapper.h b/contrib/libs/postgresql/src/include/catalog/pg_foreign_data_wrapper.h
deleted file mode 100644
index f6240d9eb32..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_foreign_data_wrapper.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_foreign_data_wrapper.h
- * definition of the "foreign-data wrapper" system catalog (pg_foreign_data_wrapper)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_foreign_data_wrapper.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_FOREIGN_DATA_WRAPPER_H
-#define PG_FOREIGN_DATA_WRAPPER_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_foreign_data_wrapper_d.h"
-
-/* ----------------
- * pg_foreign_data_wrapper definition. cpp turns this into
- * typedef struct FormData_pg_foreign_data_wrapper
- * ----------------
- */
-CATALOG(pg_foreign_data_wrapper,2328,ForeignDataWrapperRelationId)
-{
- Oid oid; /* oid */
- NameData fdwname; /* foreign-data wrapper name */
- Oid fdwowner BKI_LOOKUP(pg_authid); /* FDW owner */
- Oid fdwhandler BKI_LOOKUP_OPT(pg_proc); /* handler function, or 0
- * if none */
- Oid fdwvalidator BKI_LOOKUP_OPT(pg_proc); /* option validation
- * function, or 0 if
- * none */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- aclitem fdwacl[1]; /* access permissions */
- text fdwoptions[1]; /* FDW options */
-#endif
-} FormData_pg_foreign_data_wrapper;
-
-/* ----------------
- * Form_pg_foreign_data_wrapper corresponds to a pointer to a tuple with
- * the format of pg_foreign_data_wrapper relation.
- * ----------------
- */
-typedef FormData_pg_foreign_data_wrapper *Form_pg_foreign_data_wrapper;
-
-DECLARE_TOAST(pg_foreign_data_wrapper, 4149, 4150);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_foreign_data_wrapper_oid_index, 112, on pg_foreign_data_wrapper using btree(oid oid_ops));
-#define ForeignDataWrapperOidIndexId 112
-DECLARE_UNIQUE_INDEX(pg_foreign_data_wrapper_name_index, 548, on pg_foreign_data_wrapper using btree(fdwname name_ops));
-#define ForeignDataWrapperNameIndexId 548
-
-#endif /* PG_FOREIGN_DATA_WRAPPER_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_foreign_data_wrapper_d.h b/contrib/libs/postgresql/src/include/catalog/pg_foreign_data_wrapper_d.h
deleted file mode 100644
index 7098c77d41a..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_foreign_data_wrapper_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_foreign_data_wrapper_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_foreign_server.h b/contrib/libs/postgresql/src/include/catalog/pg_foreign_server.h
deleted file mode 100644
index a173699aef6..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_foreign_server.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_foreign_server.h
- * definition of the "foreign server" system catalog (pg_foreign_server)
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_foreign_server.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_FOREIGN_SERVER_H
-#define PG_FOREIGN_SERVER_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_foreign_server_d.h"
-
-/* ----------------
- * pg_foreign_server definition. cpp turns this into
- * typedef struct FormData_pg_foreign_server
- * ----------------
- */
-CATALOG(pg_foreign_server,1417,ForeignServerRelationId)
-{
- Oid oid; /* oid */
- NameData srvname; /* foreign server name */
- Oid srvowner BKI_LOOKUP(pg_authid); /* server owner */
- Oid srvfdw BKI_LOOKUP(pg_foreign_data_wrapper); /* server FDW */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- text srvtype;
- text srvversion;
- aclitem srvacl[1]; /* access permissions */
- text srvoptions[1]; /* FDW-specific options */
-#endif
-} FormData_pg_foreign_server;
-
-/* ----------------
- * Form_pg_foreign_server corresponds to a pointer to a tuple with
- * the format of pg_foreign_server relation.
- * ----------------
- */
-typedef FormData_pg_foreign_server *Form_pg_foreign_server;
-
-DECLARE_TOAST(pg_foreign_server, 4151, 4152);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_foreign_server_oid_index, 113, on pg_foreign_server using btree(oid oid_ops));
-#define ForeignServerOidIndexId 113
-DECLARE_UNIQUE_INDEX(pg_foreign_server_name_index, 549, on pg_foreign_server using btree(srvname name_ops));
-#define ForeignServerNameIndexId 549
-
-#endif /* PG_FOREIGN_SERVER_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_foreign_server_d.h b/contrib/libs/postgresql/src/include/catalog/pg_foreign_server_d.h
deleted file mode 100644
index baddc2a76d7..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_foreign_server_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_foreign_server_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_foreign_table.h b/contrib/libs/postgresql/src/include/catalog/pg_foreign_table.h
deleted file mode 100644
index 3b6221b0e64..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_foreign_table.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_foreign_table.h
- * definition of the "foreign table" system catalog (pg_foreign_table)
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_foreign_table.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_FOREIGN_TABLE_H
-#define PG_FOREIGN_TABLE_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_foreign_table_d.h"
-
-/* ----------------
- * pg_foreign_table definition. cpp turns this into
- * typedef struct FormData_pg_foreign_table
- * ----------------
- */
-CATALOG(pg_foreign_table,3118,ForeignTableRelationId)
-{
- Oid ftrelid BKI_LOOKUP(pg_class); /* OID of foreign table */
- Oid ftserver BKI_LOOKUP(pg_foreign_server); /* OID of foreign server */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- text ftoptions[1]; /* FDW-specific options */
-#endif
-} FormData_pg_foreign_table;
-
-/* ----------------
- * Form_pg_foreign_table corresponds to a pointer to a tuple with
- * the format of pg_foreign_table relation.
- * ----------------
- */
-typedef FormData_pg_foreign_table *Form_pg_foreign_table;
-
-DECLARE_TOAST(pg_foreign_table, 4153, 4154);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_foreign_table_relid_index, 3119, on pg_foreign_table using btree(ftrelid oid_ops));
-#define ForeignTableRelidIndexId 3119
-
-#endif /* PG_FOREIGN_TABLE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_foreign_table_d.h b/contrib/libs/postgresql/src/include/catalog/pg_foreign_table_d.h
deleted file mode 100644
index a8822cbf34b..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_foreign_table_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_foreign_table_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_index.h b/contrib/libs/postgresql/src/include/catalog/pg_index.h
deleted file mode 100644
index 00d0b439f5c..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_index.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_index.h
- * definition of the "index" system catalog (pg_index)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_index.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_INDEX_H
-#define PG_INDEX_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_index_d.h"
-
-/* ----------------
- * pg_index definition. cpp turns this into
- * typedef struct FormData_pg_index.
- * ----------------
- */
-CATALOG(pg_index,2610,IndexRelationId) BKI_SCHEMA_MACRO
-{
- Oid indexrelid BKI_LOOKUP(pg_class); /* OID of the index */
- Oid indrelid BKI_LOOKUP(pg_class); /* OID of the relation it
- * indexes */
- int16 indnatts; /* total number of columns in index */
- int16 indnkeyatts; /* number of key columns in index */
- bool indisunique; /* is this a unique index? */
- bool indisprimary; /* is this index for primary key? */
- bool indisexclusion; /* is this index for exclusion constraint? */
- bool indimmediate; /* is uniqueness enforced immediately? */
- bool indisclustered; /* is this the index last clustered by? */
- bool indisvalid; /* is this index valid for use by queries? */
- bool indcheckxmin; /* must we wait for xmin to be old? */
- bool indisready; /* is this index ready for inserts? */
- bool indislive; /* is this index alive at all? */
- bool indisreplident; /* is this index the identity for replication? */
-
- /* variable-length fields start here, but we allow direct access to indkey */
- int2vector indkey BKI_FORCE_NOT_NULL; /* column numbers of indexed cols,
- * or 0 */
-
-#ifdef CATALOG_VARLEN
- oidvector indcollation BKI_LOOKUP_OPT(pg_collation) BKI_FORCE_NOT_NULL; /* collation identifiers */
- oidvector indclass BKI_LOOKUP(pg_opclass) BKI_FORCE_NOT_NULL; /* opclass identifiers */
- int2vector indoption BKI_FORCE_NOT_NULL; /* per-column flags
- * (AM-specific meanings) */
- pg_node_tree indexprs; /* expression trees for index attributes that
- * are not simple column references; one for
- * each zero entry in indkey[] */
- pg_node_tree indpred; /* expression tree for predicate, if a partial
- * index; else NULL */
-#endif
-} FormData_pg_index;
-
-/* ----------------
- * Form_pg_index corresponds to a pointer to a tuple with
- * the format of pg_index relation.
- * ----------------
- */
-typedef FormData_pg_index *Form_pg_index;
-
-DECLARE_INDEX(pg_index_indrelid_index, 2678, on pg_index using btree(indrelid oid_ops));
-#define IndexIndrelidIndexId 2678
-DECLARE_UNIQUE_INDEX_PKEY(pg_index_indexrelid_index, 2679, on pg_index using btree(indexrelid oid_ops));
-#define IndexRelidIndexId 2679
-
-/* indkey can contain zero (InvalidAttrNumber) to represent expressions */
-DECLARE_ARRAY_FOREIGN_KEY_OPT((indrelid, indkey), pg_attribute, (attrelid, attnum));
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-/*
- * Index AMs that support ordered scans must support these two indoption
- * bits. Otherwise, the content of the per-column indoption fields is
- * open for future definition.
- */
-#define INDOPTION_DESC 0x0001 /* values are in reverse order */
-#define INDOPTION_NULLS_FIRST 0x0002 /* NULLs are first instead of last */
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-#endif /* PG_INDEX_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_index_d.h b/contrib/libs/postgresql/src/include/catalog/pg_index_d.h
deleted file mode 100644
index f503f4f5623..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_index_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_index_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_inherits.h b/contrib/libs/postgresql/src/include/catalog/pg_inherits.h
deleted file mode 100644
index f47c0a8cd84..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_inherits.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_inherits.h
- * definition of the "inherits" system catalog (pg_inherits)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_inherits.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_INHERITS_H
-#define PG_INHERITS_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_inherits_d.h"
-
-#include "nodes/pg_list.h"
-#include "storage/lock.h"
-
-/* ----------------
- * pg_inherits definition. cpp turns this into
- * typedef struct FormData_pg_inherits
- * ----------------
- */
-CATALOG(pg_inherits,2611,InheritsRelationId)
-{
- Oid inhrelid BKI_LOOKUP(pg_class);
- Oid inhparent BKI_LOOKUP(pg_class);
- int32 inhseqno;
- bool inhdetachpending;
-} FormData_pg_inherits;
-
-/* ----------------
- * Form_pg_inherits corresponds to a pointer to a tuple with
- * the format of pg_inherits relation.
- * ----------------
- */
-typedef FormData_pg_inherits *Form_pg_inherits;
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_inherits_relid_seqno_index, 2680, on pg_inherits using btree(inhrelid oid_ops, inhseqno int4_ops));
-#define InheritsRelidSeqnoIndexId 2680
-DECLARE_INDEX(pg_inherits_parent_index, 2187, on pg_inherits using btree(inhparent oid_ops));
-#define InheritsParentIndexId 2187
-
-
-extern List *find_inheritance_children(Oid parentrelId, LOCKMODE lockmode);
-extern List *find_inheritance_children_extended(Oid parentrelId, bool omit_detached,
- LOCKMODE lockmode, bool *detached_exist, TransactionId *detached_xmin);
-
-extern List *find_all_inheritors(Oid parentrelId, LOCKMODE lockmode,
- List **parents);
-extern bool has_subclass(Oid relationId);
-extern bool has_superclass(Oid relationId);
-extern bool typeInheritsFrom(Oid subclassTypeId, Oid superclassTypeId);
-extern void StoreSingleInheritance(Oid relationId, Oid parentOid,
- int32 seqNumber);
-extern bool DeleteInheritsTuple(Oid inhrelid, Oid inhparent, bool allow_detached,
- const char *childname);
-extern bool PartitionHasPendingDetach(Oid partoid);
-
-#endif /* PG_INHERITS_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_inherits_d.h b/contrib/libs/postgresql/src/include/catalog/pg_inherits_d.h
deleted file mode 100644
index ce95d9c9040..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_inherits_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_inherits_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_init_privs.h b/contrib/libs/postgresql/src/include/catalog/pg_init_privs.h
deleted file mode 100644
index 4aafeb246d7..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_init_privs.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_init_privs.h
- * definition of the "initial privileges" system catalog (pg_init_privs)
- *
- * NOTE: an object is identified by the OID of the row that primarily
- * defines the object, plus the OID of the table that that row appears in.
- * For example, a function is identified by the OID of its pg_proc row
- * plus the pg_class OID of table pg_proc. This allows unique identification
- * of objects without assuming that OIDs are unique across tables.
- *
- * Since attributes don't have OIDs of their own, we identify an attribute
- * privilege by the objoid+classoid of its parent table, plus an "objsubid"
- * giving the attribute column number. "objsubid" must be zero in a privilege
- * for a table itself, so that it is distinct from any column privilege.
- * Currently, objsubid is unused and zero for all other kinds of objects.
- *
- * Because the contents of this table depend on what is done with the other
- * objects in the system (and, in particular, may change due to changes in
- * system_views.sql), there is no pg_init_privs.dat file. The initial contents
- * are loaded near the end of initdb.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_init_privs.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_INIT_PRIVS_H
-#define PG_INIT_PRIVS_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_init_privs_d.h"
-
-/* ----------------
- * pg_init_privs definition. cpp turns this into
- * typedef struct FormData_pg_init_privs
- * ----------------
- */
-CATALOG(pg_init_privs,3394,InitPrivsRelationId)
-{
- Oid objoid; /* OID of object itself */
- Oid classoid BKI_LOOKUP(pg_class); /* OID of table containing
- * object */
- int32 objsubid; /* column number, or 0 if not used */
- char privtype; /* from initdb or extension? */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- aclitem initprivs[1] BKI_FORCE_NOT_NULL; /* initial privs on object */
-#endif
-} FormData_pg_init_privs;
-
-/* ----------------
- * Form_pg_init_privs corresponds to a pointer to a tuple with
- * the format of pg_init_privs relation.
- * ----------------
- */
-typedef FormData_pg_init_privs * Form_pg_init_privs;
-
-DECLARE_TOAST(pg_init_privs, 4155, 4156);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_init_privs_o_c_o_index, 3395, on pg_init_privs using btree(objoid oid_ops, classoid oid_ops, objsubid int4_ops));
-#define InitPrivsObjIndexId 3395
-
-/*
- * It is important to know if the initial privileges are from initdb or from an
- * extension. This enum is used to provide that differentiation and the two
- * places which populate this table (initdb and during CREATE EXTENSION, see
- * recordExtensionInitPriv()) know to use the correct values.
- */
-
-typedef enum InitPrivsType
-{
- INITPRIVS_INITDB = 'i',
- INITPRIVS_EXTENSION = 'e'
-} InitPrivsType;
-
-#endif /* PG_INIT_PRIVS_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_init_privs_d.h b/contrib/libs/postgresql/src/include/catalog/pg_init_privs_d.h
deleted file mode 100644
index 267e64e3043..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_init_privs_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_init_privs_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_language.dat b/contrib/libs/postgresql/src/include/catalog/pg_language.dat
deleted file mode 100644
index a584679927a..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_language.dat
+++ /dev/null
@@ -1,25 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_language.dat
-# Initial contents of the pg_language system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_language.dat
-#
-#----------------------------------------------------------------------
-
-[
-
-{ oid => '12', oid_symbol => 'INTERNALlanguageId',
- descr => 'built-in functions',
- lanname => 'internal', lanvalidator => 'fmgr_internal_validator' },
-{ oid => '13', oid_symbol => 'ClanguageId',
- descr => 'dynamically-loaded C functions',
- lanname => 'c', lanvalidator => 'fmgr_c_validator' },
-{ oid => '14', oid_symbol => 'SQLlanguageId',
- descr => 'SQL-language functions',
- lanname => 'sql', lanpltrusted => 't', lanvalidator => 'fmgr_sql_validator' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_language.h b/contrib/libs/postgresql/src/include/catalog/pg_language.h
deleted file mode 100644
index 3e56597ece7..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_language.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_language.h
- * definition of the "language" system catalog (pg_language)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_language.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_LANGUAGE_H
-#define PG_LANGUAGE_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_language_d.h"
-
-/* ----------------
- * pg_language definition. cpp turns this into
- * typedef struct FormData_pg_language
- * ----------------
- */
-CATALOG(pg_language,2612,LanguageRelationId)
-{
- Oid oid; /* oid */
-
- /* Language name */
- NameData lanname;
-
- /* Language's owner */
- Oid lanowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid);
-
- /* Is a procedural language */
- bool lanispl BKI_DEFAULT(f);
-
- /* PL is trusted */
- bool lanpltrusted BKI_DEFAULT(f);
-
- /* Call handler, if it's a PL */
- Oid lanplcallfoid BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_proc);
-
- /* Optional anonymous-block handler function */
- Oid laninline BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_proc);
-
- /* Optional validation function */
- Oid lanvalidator BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_proc);
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- /* Access privileges */
- aclitem lanacl[1] BKI_DEFAULT(_null_);
-#endif
-} FormData_pg_language;
-
-/* ----------------
- * Form_pg_language corresponds to a pointer to a tuple with
- * the format of pg_language relation.
- * ----------------
- */
-typedef FormData_pg_language *Form_pg_language;
-
-DECLARE_TOAST(pg_language, 4157, 4158);
-
-DECLARE_UNIQUE_INDEX(pg_language_name_index, 2681, on pg_language using btree(lanname name_ops));
-#define LanguageNameIndexId 2681
-DECLARE_UNIQUE_INDEX_PKEY(pg_language_oid_index, 2682, on pg_language using btree(oid oid_ops));
-#define LanguageOidIndexId 2682
-
-#endif /* PG_LANGUAGE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_language_d.h b/contrib/libs/postgresql/src/include/catalog/pg_language_d.h
deleted file mode 100644
index 4cb0a127ed5..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_language_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_language_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_largeobject.h b/contrib/libs/postgresql/src/include/catalog/pg_largeobject.h
deleted file mode 100644
index 32225f4de7d..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_largeobject.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_largeobject.h
- * definition of the "large object" system catalog (pg_largeobject)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_largeobject.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_LARGEOBJECT_H
-#define PG_LARGEOBJECT_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_largeobject_d.h"
-
-/* ----------------
- * pg_largeobject definition. cpp turns this into
- * typedef struct FormData_pg_largeobject
- * ----------------
- */
-CATALOG(pg_largeobject,2613,LargeObjectRelationId)
-{
- Oid loid BKI_LOOKUP(pg_largeobject_metadata); /* Identifier of large
- * object */
- int32 pageno; /* Page number (starting from 0) */
-
- /* data has variable length, but we allow direct access; see inv_api.c */
- bytea data BKI_FORCE_NOT_NULL; /* Data for page (may be
- * zero-length) */
-} FormData_pg_largeobject;
-
-/* ----------------
- * Form_pg_largeobject corresponds to a pointer to a tuple with
- * the format of pg_largeobject relation.
- * ----------------
- */
-typedef FormData_pg_largeobject *Form_pg_largeobject;
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_largeobject_loid_pn_index, 2683, on pg_largeobject using btree(loid oid_ops, pageno int4_ops));
-#define LargeObjectLOidPNIndexId 2683
-
-extern Oid LargeObjectCreate(Oid loid);
-extern void LargeObjectDrop(Oid loid);
-extern bool LargeObjectExists(Oid loid);
-
-#endif /* PG_LARGEOBJECT_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_largeobject_d.h b/contrib/libs/postgresql/src/include/catalog/pg_largeobject_d.h
deleted file mode 100644
index 15d990ad910..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_largeobject_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_largeobject_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_largeobject_metadata.h b/contrib/libs/postgresql/src/include/catalog/pg_largeobject_metadata.h
deleted file mode 100644
index 9b689bab849..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_largeobject_metadata.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_largeobject_metadata.h
- * definition of the "large object metadata" system catalog
- * (pg_largeobject_metadata)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_largeobject_metadata.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_LARGEOBJECT_METADATA_H
-#define PG_LARGEOBJECT_METADATA_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_largeobject_metadata_d.h"
-
-/* ----------------
- * pg_largeobject_metadata definition. cpp turns this into
- * typedef struct FormData_pg_largeobject_metadata
- * ----------------
- */
-CATALOG(pg_largeobject_metadata,2995,LargeObjectMetadataRelationId)
-{
- Oid oid; /* oid */
-
- Oid lomowner BKI_LOOKUP(pg_authid); /* OID of the largeobject
- * owner */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- aclitem lomacl[1]; /* access permissions */
-#endif
-} FormData_pg_largeobject_metadata;
-
-/* ----------------
- * Form_pg_largeobject_metadata corresponds to a pointer to a tuple
- * with the format of pg_largeobject_metadata relation.
- * ----------------
- */
-typedef FormData_pg_largeobject_metadata *Form_pg_largeobject_metadata;
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_largeobject_metadata_oid_index, 2996, on pg_largeobject_metadata using btree(oid oid_ops));
-#define LargeObjectMetadataOidIndexId 2996
-
-#endif /* PG_LARGEOBJECT_METADATA_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_largeobject_metadata_d.h b/contrib/libs/postgresql/src/include/catalog/pg_largeobject_metadata_d.h
deleted file mode 100644
index b7fea19e578..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_largeobject_metadata_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_largeobject_metadata_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_namespace.dat b/contrib/libs/postgresql/src/include/catalog/pg_namespace.dat
deleted file mode 100644
index 2ed136b787e..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_namespace.dat
+++ /dev/null
@@ -1,25 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_namespace.dat
-# Initial contents of the pg_namespace system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_namespace.dat
-#
-#----------------------------------------------------------------------
-
-[
-
-{ oid => '11', oid_symbol => 'PG_CATALOG_NAMESPACE',
- descr => 'system catalog schema',
- nspname => 'pg_catalog', nspacl => '_null_' },
-{ oid => '99', oid_symbol => 'PG_TOAST_NAMESPACE',
- descr => 'reserved schema for TOAST tables',
- nspname => 'pg_toast', nspacl => '_null_' },
-{ oid => '2200', oid_symbol => 'PG_PUBLIC_NAMESPACE',
- descr => 'standard public schema',
- nspname => 'public', nspacl => '_null_' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_namespace.h b/contrib/libs/postgresql/src/include/catalog/pg_namespace.h
deleted file mode 100644
index fe87a947ee7..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_namespace.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_namespace.h
- * definition of the "namespace" system catalog (pg_namespace)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_namespace.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_NAMESPACE_H
-#define PG_NAMESPACE_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_namespace_d.h"
-#include "utils/acl.h"
-
-/* ----------------------------------------------------------------
- * pg_namespace definition.
- *
- * cpp turns this into typedef struct FormData_pg_namespace
- *
- * nspname name of the namespace
- * nspowner owner (creator) of the namespace
- * nspacl access privilege list
- * ----------------------------------------------------------------
- */
-CATALOG(pg_namespace,2615,NamespaceRelationId)
-{
- Oid oid; /* oid */
-
- NameData nspname;
- Oid nspowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid);
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- aclitem nspacl[1];
-#endif
-} FormData_pg_namespace;
-
-/* ----------------
- * Form_pg_namespace corresponds to a pointer to a tuple with
- * the format of pg_namespace relation.
- * ----------------
- */
-typedef FormData_pg_namespace *Form_pg_namespace;
-
-DECLARE_TOAST(pg_namespace, 4163, 4164);
-
-DECLARE_UNIQUE_INDEX(pg_namespace_nspname_index, 2684, on pg_namespace using btree(nspname name_ops));
-#define NamespaceNameIndexId 2684
-DECLARE_UNIQUE_INDEX_PKEY(pg_namespace_oid_index, 2685, on pg_namespace using btree(oid oid_ops));
-#define NamespaceOidIndexId 2685
-
-/*
- * prototypes for functions in pg_namespace.c
- */
-extern Oid NamespaceCreate(const char *nspName, Oid ownerId, bool isTemp);
-
-#endif /* PG_NAMESPACE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_namespace_d.h b/contrib/libs/postgresql/src/include/catalog/pg_namespace_d.h
deleted file mode 100644
index a6ec80c6b04..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_namespace_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_namespace_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_opclass.h b/contrib/libs/postgresql/src/include/catalog/pg_opclass.h
deleted file mode 100644
index 7b2cf259208..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_opclass.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_opclass.h
- * definition of the "operator class" system catalog (pg_opclass)
- *
- * The primary key for this table is <opcmethod, opcname, opcnamespace> ---
- * that is, there is a row for each valid combination of opclass name and
- * index access method type. This row specifies the expected input data type
- * for the opclass (the type of the heap column, or the expression output type
- * in the case of an index expression). Note that types binary-coercible to
- * the specified type will be accepted too.
- *
- * For a given <opcmethod, opcintype> pair, there can be at most one row that
- * has opcdefault = true; this row is the default opclass for such data in
- * such an index. (This is not currently enforced by an index, because we
- * don't support partial indexes on system catalogs.)
- *
- * Normally opckeytype = InvalidOid (zero), indicating that the data stored
- * in the index is the same as the data in the indexed column. If opckeytype
- * is nonzero then it indicates that a conversion step is needed to produce
- * the stored index data, which will be of type opckeytype (which might be
- * the same or different from the input datatype). Performing such a
- * conversion is the responsibility of the index access method --- not all
- * AMs support this.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_opclass.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_OPCLASS_H
-#define PG_OPCLASS_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_opclass_d.h"
-
-/* ----------------
- * pg_opclass definition. cpp turns this into
- * typedef struct FormData_pg_opclass
- * ----------------
- */
-CATALOG(pg_opclass,2616,OperatorClassRelationId)
-{
- Oid oid; /* oid */
-
- /* index access method opclass is for */
- Oid opcmethod BKI_LOOKUP(pg_am);
-
- /* name of this opclass */
- NameData opcname;
-
- /* namespace of this opclass */
- Oid opcnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace);
-
- /* opclass owner */
- Oid opcowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid);
-
- /* containing operator family */
- Oid opcfamily BKI_LOOKUP(pg_opfamily);
-
- /* type of data indexed by opclass */
- Oid opcintype BKI_LOOKUP(pg_type);
-
- /* T if opclass is default for opcintype */
- bool opcdefault BKI_DEFAULT(t);
-
- /* type of data in index, or InvalidOid if same as input column type */
- Oid opckeytype BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_type);
-} FormData_pg_opclass;
-
-/* ----------------
- * Form_pg_opclass corresponds to a pointer to a tuple with
- * the format of pg_opclass relation.
- * ----------------
- */
-typedef FormData_pg_opclass *Form_pg_opclass;
-
-DECLARE_UNIQUE_INDEX(pg_opclass_am_name_nsp_index, 2686, on pg_opclass using btree(opcmethod oid_ops, opcname name_ops, opcnamespace oid_ops));
-#define OpclassAmNameNspIndexId 2686
-DECLARE_UNIQUE_INDEX_PKEY(pg_opclass_oid_index, 2687, on pg_opclass using btree(oid oid_ops));
-#define OpclassOidIndexId 2687
-
-#endif /* PG_OPCLASS_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_opclass_d.h b/contrib/libs/postgresql/src/include/catalog/pg_opclass_d.h
deleted file mode 100644
index 113547a25ae..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_opclass_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_opclass_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_operator.h b/contrib/libs/postgresql/src/include/catalog/pg_operator.h
deleted file mode 100644
index a40e38a5d87..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_operator.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_operator.h
- * definition of the "operator" system catalog (pg_operator)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_operator.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_OPERATOR_H
-#define PG_OPERATOR_H
-
-#include "catalog/genbki.h"
-#include "catalog/objectaddress.h"
-#include "catalog/pg_operator_d.h"
-#include "nodes/pg_list.h"
-
-/* ----------------
- * pg_operator definition. cpp turns this into
- * typedef struct FormData_pg_operator
- * ----------------
- */
-CATALOG(pg_operator,2617,OperatorRelationId)
-{
- Oid oid; /* oid */
-
- /* name of operator */
- NameData oprname;
-
- /* OID of namespace containing this oper */
- Oid oprnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace);
-
- /* operator owner */
- Oid oprowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid);
-
- /* 'l' for prefix or 'b' for infix */
- char oprkind BKI_DEFAULT(b);
-
- /* can be used in merge join? */
- bool oprcanmerge BKI_DEFAULT(f);
-
- /* can be used in hash join? */
- bool oprcanhash BKI_DEFAULT(f);
-
- /* left arg type, or 0 if prefix operator */
- Oid oprleft BKI_LOOKUP_OPT(pg_type);
-
- /* right arg type */
- Oid oprright BKI_LOOKUP(pg_type);
-
- /* result datatype; can be 0 in a "shell" operator */
- Oid oprresult BKI_LOOKUP_OPT(pg_type);
-
- /* OID of commutator oper, or 0 if none */
- Oid oprcom BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_operator);
-
- /* OID of negator oper, or 0 if none */
- Oid oprnegate BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_operator);
-
- /* OID of underlying function; can be 0 in a "shell" operator */
- regproc oprcode BKI_LOOKUP_OPT(pg_proc);
-
- /* OID of restriction estimator, or 0 */
- regproc oprrest BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc);
-
- /* OID of join estimator, or 0 */
- regproc oprjoin BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc);
-} FormData_pg_operator;
-
-/* ----------------
- * Form_pg_operator corresponds to a pointer to a tuple with
- * the format of pg_operator relation.
- * ----------------
- */
-typedef FormData_pg_operator *Form_pg_operator;
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_operator_oid_index, 2688, on pg_operator using btree(oid oid_ops));
-#define OperatorOidIndexId 2688
-DECLARE_UNIQUE_INDEX(pg_operator_oprname_l_r_n_index, 2689, on pg_operator using btree(oprname name_ops, oprleft oid_ops, oprright oid_ops, oprnamespace oid_ops));
-#define OperatorNameNspIndexId 2689
-
-
-extern ObjectAddress OperatorCreate(const char *operatorName,
- Oid operatorNamespace,
- Oid leftTypeId,
- Oid rightTypeId,
- Oid procedureId,
- List *commutatorName,
- List *negatorName,
- Oid restrictionId,
- Oid joinId,
- bool canMerge,
- bool canHash);
-
-extern ObjectAddress makeOperatorDependencies(HeapTuple tuple,
- bool makeExtensionDep,
- bool isUpdate);
-
-extern void OperatorUpd(Oid baseId, Oid commId, Oid negId, bool isDelete);
-
-#endif /* PG_OPERATOR_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_operator_d.h b/contrib/libs/postgresql/src/include/catalog/pg_operator_d.h
deleted file mode 100644
index a06e90b848b..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_operator_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_operator_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_opfamily.dat b/contrib/libs/postgresql/src/include/catalog/pg_opfamily.dat
deleted file mode 100644
index 8e480efd286..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_opfamily.dat
+++ /dev/null
@@ -1,308 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_opfamily.dat
-# Initial contents of the pg_opfamily system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_opfamily.dat
-#
-#----------------------------------------------------------------------
-
-[
-
-{ oid => '397',
- opfmethod => 'btree', opfname => 'array_ops' },
-{ oid => '627',
- opfmethod => 'hash', opfname => 'array_ops' },
-{ oid => '423',
- opfmethod => 'btree', opfname => 'bit_ops' },
-{ oid => '424', oid_symbol => 'BOOL_BTREE_FAM_OID',
- opfmethod => 'btree', opfname => 'bool_ops' },
-{ oid => '426', oid_symbol => 'BPCHAR_BTREE_FAM_OID',
- opfmethod => 'btree', opfname => 'bpchar_ops' },
-{ oid => '427',
- opfmethod => 'hash', opfname => 'bpchar_ops' },
-{ oid => '428', oid_symbol => 'BYTEA_BTREE_FAM_OID',
- opfmethod => 'btree', opfname => 'bytea_ops' },
-{ oid => '429',
- opfmethod => 'btree', opfname => 'char_ops' },
-{ oid => '431',
- opfmethod => 'hash', opfname => 'char_ops' },
-{ oid => '434',
- opfmethod => 'btree', opfname => 'datetime_ops' },
-{ oid => '435',
- opfmethod => 'hash', opfname => 'date_ops' },
-{ oid => '1970',
- opfmethod => 'btree', opfname => 'float_ops' },
-{ oid => '1971',
- opfmethod => 'hash', opfname => 'float_ops' },
-{ oid => '1974', oid_symbol => 'NETWORK_BTREE_FAM_OID',
- opfmethod => 'btree', opfname => 'network_ops' },
-{ oid => '1975',
- opfmethod => 'hash', opfname => 'network_ops' },
-{ oid => '3550',
- opfmethod => 'gist', opfname => 'network_ops' },
-{ oid => '3794',
- opfmethod => 'spgist', opfname => 'network_ops' },
-{ oid => '1976', oid_symbol => 'INTEGER_BTREE_FAM_OID',
- opfmethod => 'btree', opfname => 'integer_ops' },
-{ oid => '1977',
- opfmethod => 'hash', opfname => 'integer_ops' },
-{ oid => '1982',
- opfmethod => 'btree', opfname => 'interval_ops' },
-{ oid => '1983',
- opfmethod => 'hash', opfname => 'interval_ops' },
-{ oid => '1984',
- opfmethod => 'btree', opfname => 'macaddr_ops' },
-{ oid => '1985',
- opfmethod => 'hash', opfname => 'macaddr_ops' },
-{ oid => '3371',
- opfmethod => 'btree', opfname => 'macaddr8_ops' },
-{ oid => '3372',
- opfmethod => 'hash', opfname => 'macaddr8_ops' },
-{ oid => '1988',
- opfmethod => 'btree', opfname => 'numeric_ops' },
-{ oid => '1998',
- opfmethod => 'hash', opfname => 'numeric_ops' },
-{ oid => '1989', oid_symbol => 'OID_BTREE_FAM_OID',
- opfmethod => 'btree', opfname => 'oid_ops' },
-{ oid => '1990',
- opfmethod => 'hash', opfname => 'oid_ops' },
-{ oid => '1991',
- opfmethod => 'btree', opfname => 'oidvector_ops' },
-{ oid => '1992',
- opfmethod => 'hash', opfname => 'oidvector_ops' },
-{ oid => '2994',
- opfmethod => 'btree', opfname => 'record_ops' },
-{ oid => '6194',
- opfmethod => 'hash', opfname => 'record_ops' },
-{ oid => '3194',
- opfmethod => 'btree', opfname => 'record_image_ops' },
-{ oid => '1994', oid_symbol => 'TEXT_BTREE_FAM_OID',
- opfmethod => 'btree', opfname => 'text_ops' },
-{ oid => '1995',
- opfmethod => 'hash', opfname => 'text_ops' },
-{ oid => '1996',
- opfmethod => 'btree', opfname => 'time_ops' },
-{ oid => '1997',
- opfmethod => 'hash', opfname => 'time_ops' },
-{ oid => '1999',
- opfmethod => 'hash', opfname => 'timestamptz_ops' },
-{ oid => '2000',
- opfmethod => 'btree', opfname => 'timetz_ops' },
-{ oid => '2001',
- opfmethod => 'hash', opfname => 'timetz_ops' },
-{ oid => '2002',
- opfmethod => 'btree', opfname => 'varbit_ops' },
-{ oid => '2040',
- opfmethod => 'hash', opfname => 'timestamp_ops' },
-{ oid => '2095', oid_symbol => 'TEXT_PATTERN_BTREE_FAM_OID',
- opfmethod => 'btree', opfname => 'text_pattern_ops' },
-{ oid => '2097', oid_symbol => 'BPCHAR_PATTERN_BTREE_FAM_OID',
- opfmethod => 'btree', opfname => 'bpchar_pattern_ops' },
-{ oid => '2099',
- opfmethod => 'btree', opfname => 'money_ops' },
-{ oid => '2222', oid_symbol => 'BOOL_HASH_FAM_OID',
- opfmethod => 'hash', opfname => 'bool_ops' },
-{ oid => '2223',
- opfmethod => 'hash', opfname => 'bytea_ops' },
-{ oid => '2789',
- opfmethod => 'btree', opfname => 'tid_ops' },
-{ oid => '2225',
- opfmethod => 'hash', opfname => 'xid_ops' },
-{ oid => '5032',
- opfmethod => 'hash', opfname => 'xid8_ops' },
-{ oid => '5067',
- opfmethod => 'btree', opfname => 'xid8_ops' },
-{ oid => '2226',
- opfmethod => 'hash', opfname => 'cid_ops' },
-{ oid => '2227',
- opfmethod => 'hash', opfname => 'tid_ops' },
-{ oid => '2229',
- opfmethod => 'hash', opfname => 'text_pattern_ops' },
-{ oid => '2231',
- opfmethod => 'hash', opfname => 'bpchar_pattern_ops' },
-{ oid => '2235',
- opfmethod => 'hash', opfname => 'aclitem_ops' },
-{ oid => '2593',
- opfmethod => 'gist', opfname => 'box_ops' },
-{ oid => '2594',
- opfmethod => 'gist', opfname => 'poly_ops' },
-{ oid => '2595',
- opfmethod => 'gist', opfname => 'circle_ops' },
-{ oid => '1029',
- opfmethod => 'gist', opfname => 'point_ops' },
-{ oid => '2745',
- opfmethod => 'gin', opfname => 'array_ops' },
-{ oid => '2968',
- opfmethod => 'btree', opfname => 'uuid_ops' },
-{ oid => '2969',
- opfmethod => 'hash', opfname => 'uuid_ops' },
-{ oid => '3253',
- opfmethod => 'btree', opfname => 'pg_lsn_ops' },
-{ oid => '3254',
- opfmethod => 'hash', opfname => 'pg_lsn_ops' },
-{ oid => '3522',
- opfmethod => 'btree', opfname => 'enum_ops' },
-{ oid => '3523',
- opfmethod => 'hash', opfname => 'enum_ops' },
-{ oid => '3626',
- opfmethod => 'btree', opfname => 'tsvector_ops' },
-{ oid => '3655',
- opfmethod => 'gist', opfname => 'tsvector_ops' },
-{ oid => '3659',
- opfmethod => 'gin', opfname => 'tsvector_ops' },
-{ oid => '3683',
- opfmethod => 'btree', opfname => 'tsquery_ops' },
-{ oid => '3702',
- opfmethod => 'gist', opfname => 'tsquery_ops' },
-{ oid => '3901',
- opfmethod => 'btree', opfname => 'range_ops' },
-{ oid => '3903',
- opfmethod => 'hash', opfname => 'range_ops' },
-{ oid => '3919',
- opfmethod => 'gist', opfname => 'range_ops' },
-{ oid => '3474',
- opfmethod => 'spgist', opfname => 'range_ops' },
-{ oid => '4015',
- opfmethod => 'spgist', opfname => 'quad_point_ops' },
-{ oid => '4016',
- opfmethod => 'spgist', opfname => 'kd_point_ops' },
-{ oid => '4017', oid_symbol => 'TEXT_SPGIST_FAM_OID',
- opfmethod => 'spgist', opfname => 'text_ops' },
-{ oid => '4033',
- opfmethod => 'btree', opfname => 'jsonb_ops' },
-{ oid => '4034',
- opfmethod => 'hash', opfname => 'jsonb_ops' },
-{ oid => '4036',
- opfmethod => 'gin', opfname => 'jsonb_ops' },
-{ oid => '4037',
- opfmethod => 'gin', opfname => 'jsonb_path_ops' },
-{ oid => '4054',
- opfmethod => 'brin', opfname => 'integer_minmax_ops' },
-{ oid => '4602',
- opfmethod => 'brin', opfname => 'integer_minmax_multi_ops' },
-{ oid => '4572',
- opfmethod => 'brin', opfname => 'integer_bloom_ops' },
-{ oid => '4055',
- opfmethod => 'brin', opfname => 'numeric_minmax_ops' },
-{ oid => '4603',
- opfmethod => 'brin', opfname => 'numeric_minmax_multi_ops' },
-{ oid => '4056',
- opfmethod => 'brin', opfname => 'text_minmax_ops' },
-{ oid => '4573',
- opfmethod => 'brin', opfname => 'text_bloom_ops' },
-{ oid => '4574',
- opfmethod => 'brin', opfname => 'numeric_bloom_ops' },
-{ oid => '4058',
- opfmethod => 'brin', opfname => 'timetz_minmax_ops' },
-{ oid => '4604',
- opfmethod => 'brin', opfname => 'timetz_minmax_multi_ops' },
-{ oid => '4575',
- opfmethod => 'brin', opfname => 'timetz_bloom_ops' },
-{ oid => '4059',
- opfmethod => 'brin', opfname => 'datetime_minmax_ops' },
-{ oid => '4605',
- opfmethod => 'brin', opfname => 'datetime_minmax_multi_ops' },
-{ oid => '4576',
- opfmethod => 'brin', opfname => 'datetime_bloom_ops' },
-{ oid => '4062',
- opfmethod => 'brin', opfname => 'char_minmax_ops' },
-{ oid => '4577',
- opfmethod => 'brin', opfname => 'char_bloom_ops' },
-{ oid => '4064',
- opfmethod => 'brin', opfname => 'bytea_minmax_ops' },
-{ oid => '4578',
- opfmethod => 'brin', opfname => 'bytea_bloom_ops' },
-{ oid => '4065',
- opfmethod => 'brin', opfname => 'name_minmax_ops' },
-{ oid => '4579',
- opfmethod => 'brin', opfname => 'name_bloom_ops' },
-{ oid => '4068',
- opfmethod => 'brin', opfname => 'oid_minmax_ops' },
-{ oid => '4606',
- opfmethod => 'brin', opfname => 'oid_minmax_multi_ops' },
-{ oid => '4580',
- opfmethod => 'brin', opfname => 'oid_bloom_ops' },
-{ oid => '4069',
- opfmethod => 'brin', opfname => 'tid_minmax_ops' },
-{ oid => '4581',
- opfmethod => 'brin', opfname => 'tid_bloom_ops' },
-{ oid => '4607',
- opfmethod => 'brin', opfname => 'tid_minmax_multi_ops' },
-{ oid => '4070',
- opfmethod => 'brin', opfname => 'float_minmax_ops' },
-{ oid => '4608',
- opfmethod => 'brin', opfname => 'float_minmax_multi_ops' },
-{ oid => '4582',
- opfmethod => 'brin', opfname => 'float_bloom_ops' },
-{ oid => '4074',
- opfmethod => 'brin', opfname => 'macaddr_minmax_ops' },
-{ oid => '4609',
- opfmethod => 'brin', opfname => 'macaddr_minmax_multi_ops' },
-{ oid => '4583',
- opfmethod => 'brin', opfname => 'macaddr_bloom_ops' },
-{ oid => '4109',
- opfmethod => 'brin', opfname => 'macaddr8_minmax_ops' },
-{ oid => '4610',
- opfmethod => 'brin', opfname => 'macaddr8_minmax_multi_ops' },
-{ oid => '4584',
- opfmethod => 'brin', opfname => 'macaddr8_bloom_ops' },
-{ oid => '4075',
- opfmethod => 'brin', opfname => 'network_minmax_ops' },
-{ oid => '4611',
- opfmethod => 'brin', opfname => 'network_minmax_multi_ops' },
-{ oid => '4102',
- opfmethod => 'brin', opfname => 'network_inclusion_ops' },
-{ oid => '4585',
- opfmethod => 'brin', opfname => 'network_bloom_ops' },
-{ oid => '4076',
- opfmethod => 'brin', opfname => 'bpchar_minmax_ops' },
-{ oid => '4586',
- opfmethod => 'brin', opfname => 'bpchar_bloom_ops' },
-{ oid => '4077',
- opfmethod => 'brin', opfname => 'time_minmax_ops' },
-{ oid => '4612',
- opfmethod => 'brin', opfname => 'time_minmax_multi_ops' },
-{ oid => '4587',
- opfmethod => 'brin', opfname => 'time_bloom_ops' },
-{ oid => '4078',
- opfmethod => 'brin', opfname => 'interval_minmax_ops' },
-{ oid => '4613',
- opfmethod => 'brin', opfname => 'interval_minmax_multi_ops' },
-{ oid => '4588',
- opfmethod => 'brin', opfname => 'interval_bloom_ops' },
-{ oid => '4079',
- opfmethod => 'brin', opfname => 'bit_minmax_ops' },
-{ oid => '4080',
- opfmethod => 'brin', opfname => 'varbit_minmax_ops' },
-{ oid => '4081',
- opfmethod => 'brin', opfname => 'uuid_minmax_ops' },
-{ oid => '4614',
- opfmethod => 'brin', opfname => 'uuid_minmax_multi_ops' },
-{ oid => '4589',
- opfmethod => 'brin', opfname => 'uuid_bloom_ops' },
-{ oid => '4103',
- opfmethod => 'brin', opfname => 'range_inclusion_ops' },
-{ oid => '4082',
- opfmethod => 'brin', opfname => 'pg_lsn_minmax_ops' },
-{ oid => '4615',
- opfmethod => 'brin', opfname => 'pg_lsn_minmax_multi_ops' },
-{ oid => '4590',
- opfmethod => 'brin', opfname => 'pg_lsn_bloom_ops' },
-{ oid => '4104',
- opfmethod => 'brin', opfname => 'box_inclusion_ops' },
-{ oid => '5000',
- opfmethod => 'spgist', opfname => 'box_ops' },
-{ oid => '5008',
- opfmethod => 'spgist', opfname => 'poly_ops' },
-{ oid => '4199',
- opfmethod => 'btree', opfname => 'multirange_ops' },
-{ oid => '4225',
- opfmethod => 'hash', opfname => 'multirange_ops' },
-{ oid => '6158',
- opfmethod => 'gist', opfname => 'multirange_ops' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_opfamily.h b/contrib/libs/postgresql/src/include/catalog/pg_opfamily.h
deleted file mode 100644
index 129102b5767..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_opfamily.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_opfamily.h
- * definition of the "operator family" system catalog (pg_opfamily)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_opfamily.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_OPFAMILY_H
-#define PG_OPFAMILY_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_opfamily_d.h"
-
-/* ----------------
- * pg_opfamily definition. cpp turns this into
- * typedef struct FormData_pg_opfamily
- * ----------------
- */
-CATALOG(pg_opfamily,2753,OperatorFamilyRelationId)
-{
- Oid oid; /* oid */
-
- /* index access method opfamily is for */
- Oid opfmethod BKI_LOOKUP(pg_am);
-
- /* name of this opfamily */
- NameData opfname;
-
- /* namespace of this opfamily */
- Oid opfnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace);
-
- /* opfamily owner */
- Oid opfowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid);
-} FormData_pg_opfamily;
-
-/* ----------------
- * Form_pg_opfamily corresponds to a pointer to a tuple with
- * the format of pg_opfamily relation.
- * ----------------
- */
-typedef FormData_pg_opfamily *Form_pg_opfamily;
-
-DECLARE_UNIQUE_INDEX(pg_opfamily_am_name_nsp_index, 2754, on pg_opfamily using btree(opfmethod oid_ops, opfname name_ops, opfnamespace oid_ops));
-#define OpfamilyAmNameNspIndexId 2754
-DECLARE_UNIQUE_INDEX_PKEY(pg_opfamily_oid_index, 2755, on pg_opfamily using btree(oid oid_ops));
-#define OpfamilyOidIndexId 2755
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-#define IsBooleanOpfamily(opfamily) \
- ((opfamily) == BOOL_BTREE_FAM_OID || (opfamily) == BOOL_HASH_FAM_OID)
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-#endif /* PG_OPFAMILY_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_opfamily_d.h b/contrib/libs/postgresql/src/include/catalog/pg_opfamily_d.h
deleted file mode 100644
index 5b36e673e89..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_opfamily_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_opfamily_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_partitioned_table.h b/contrib/libs/postgresql/src/include/catalog/pg_partitioned_table.h
deleted file mode 100644
index 48cbaf30ff8..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_partitioned_table.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_partitioned_table.h
- * definition of the "partitioned table" system catalog
- * (pg_partitioned_table)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_partitioned_table.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_PARTITIONED_TABLE_H
-#define PG_PARTITIONED_TABLE_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_partitioned_table_d.h"
-
-/* ----------------
- * pg_partitioned_table definition. cpp turns this into
- * typedef struct FormData_pg_partitioned_table
- * ----------------
- */
-CATALOG(pg_partitioned_table,3350,PartitionedRelationId)
-{
- Oid partrelid BKI_LOOKUP(pg_class); /* partitioned table oid */
- char partstrat; /* partitioning strategy */
- int16 partnatts; /* number of partition key columns */
- Oid partdefid BKI_LOOKUP_OPT(pg_class); /* default partition oid;
- * 0 if there isn't one */
-
- /*
- * variable-length fields start here, but we allow direct access to
- * partattrs via the C struct. That's because the first variable-length
- * field of a heap tuple can be reliably accessed using its C struct
- * offset, as previous fields are all non-nullable fixed-length fields.
- */
- int2vector partattrs BKI_FORCE_NOT_NULL; /* each member of the array is
- * the attribute number of a
- * partition key column, or 0
- * if the column is actually
- * an expression */
-
-#ifdef CATALOG_VARLEN
- oidvector partclass BKI_LOOKUP(pg_opclass) BKI_FORCE_NOT_NULL; /* operator class to
- * compare keys */
- oidvector partcollation BKI_LOOKUP_OPT(pg_collation) BKI_FORCE_NOT_NULL; /* user-specified
- * collation for keys */
- pg_node_tree partexprs; /* list of expressions in the partition key;
- * one item for each zero entry in partattrs[] */
-#endif
-} FormData_pg_partitioned_table;
-
-/* ----------------
- * Form_pg_partitioned_table corresponds to a pointer to a tuple with
- * the format of pg_partitioned_table relation.
- * ----------------
- */
-typedef FormData_pg_partitioned_table *Form_pg_partitioned_table;
-
-DECLARE_TOAST(pg_partitioned_table, 4165, 4166);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_partitioned_table_partrelid_index, 3351, on pg_partitioned_table using btree(partrelid oid_ops));
-#define PartitionedRelidIndexId 3351
-
-/* partattrs can contain zero (InvalidAttrNumber) to represent expressions */
-DECLARE_ARRAY_FOREIGN_KEY_OPT((partrelid, partattrs), pg_attribute, (attrelid, attnum));
-
-#endif /* PG_PARTITIONED_TABLE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_partitioned_table_d.h b/contrib/libs/postgresql/src/include/catalog/pg_partitioned_table_d.h
deleted file mode 100644
index 41b48e7dfc4..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_partitioned_table_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_partitioned_table_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_policy.h b/contrib/libs/postgresql/src/include/catalog/pg_policy.h
deleted file mode 100644
index 645b8fe498c..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_policy.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_policy.h
- * definition of the "policy" system catalog (pg_policy)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_policy.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_POLICY_H
-#define PG_POLICY_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_policy_d.h"
-
-/* ----------------
- * pg_policy definition. cpp turns this into
- * typedef struct FormData_pg_policy
- * ----------------
- */
-CATALOG(pg_policy,3256,PolicyRelationId)
-{
- Oid oid; /* oid */
- NameData polname; /* Policy name. */
- Oid polrelid BKI_LOOKUP(pg_class); /* Oid of the relation with
- * policy. */
- char polcmd; /* One of ACL_*_CHR, or '*' for all */
- bool polpermissive; /* restrictive or permissive policy */
-
-#ifdef CATALOG_VARLEN
- /* Roles to which the policy is applied; zero means PUBLIC */
- Oid polroles[1] BKI_LOOKUP_OPT(pg_authid) BKI_FORCE_NOT_NULL;
- pg_node_tree polqual; /* Policy quals. */
- pg_node_tree polwithcheck; /* WITH CHECK quals. */
-#endif
-} FormData_pg_policy;
-
-/* ----------------
- * Form_pg_policy corresponds to a pointer to a row with
- * the format of pg_policy relation.
- * ----------------
- */
-typedef FormData_pg_policy *Form_pg_policy;
-
-DECLARE_TOAST(pg_policy, 4167, 4168);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_policy_oid_index, 3257, on pg_policy using btree(oid oid_ops));
-#define PolicyOidIndexId 3257
-DECLARE_UNIQUE_INDEX(pg_policy_polrelid_polname_index, 3258, on pg_policy using btree(polrelid oid_ops, polname name_ops));
-#define PolicyPolrelidPolnameIndexId 3258
-
-#endif /* PG_POLICY_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_policy_d.h b/contrib/libs/postgresql/src/include/catalog/pg_policy_d.h
deleted file mode 100644
index ea2594c7942..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_policy_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_policy_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_proc.h b/contrib/libs/postgresql/src/include/catalog/pg_proc.h
deleted file mode 100644
index a65afe7bc4b..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_proc.h
+++ /dev/null
@@ -1,222 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_proc.h
- * definition of the "procedure" system catalog (pg_proc)
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_proc.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_PROC_H
-#define PG_PROC_H
-
-#include "catalog/genbki.h"
-#include "catalog/objectaddress.h"
-#include "catalog/pg_proc_d.h"
-#include "nodes/pg_list.h"
-
-/* ----------------
- * pg_proc definition. cpp turns this into
- * typedef struct FormData_pg_proc
- * ----------------
- */
-CATALOG(pg_proc,1255,ProcedureRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81,ProcedureRelation_Rowtype_Id) BKI_SCHEMA_MACRO
-{
- Oid oid; /* oid */
-
- /* procedure name */
- NameData proname;
-
- /* OID of namespace containing this proc */
- Oid pronamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace);
-
- /* procedure owner */
- Oid proowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid);
-
- /* OID of pg_language entry */
- Oid prolang BKI_DEFAULT(internal) BKI_LOOKUP(pg_language);
-
- /* estimated execution cost */
- float4 procost BKI_DEFAULT(1);
-
- /* estimated # of rows out (if proretset) */
- float4 prorows BKI_DEFAULT(0);
-
- /* element type of variadic array, or 0 if not variadic */
- Oid provariadic BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_type);
-
- /* planner support function for this function, or 0 if none */
- regproc prosupport BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_proc);
-
- /* see PROKIND_ categories below */
- char prokind BKI_DEFAULT(f);
-
- /* security definer */
- bool prosecdef BKI_DEFAULT(f);
-
- /* is it a leak-proof function? */
- bool proleakproof BKI_DEFAULT(f);
-
- /* strict with respect to NULLs? */
- bool proisstrict BKI_DEFAULT(t);
-
- /* returns a set? */
- bool proretset BKI_DEFAULT(f);
-
- /* see PROVOLATILE_ categories below */
- char provolatile BKI_DEFAULT(i);
-
- /* see PROPARALLEL_ categories below */
- char proparallel BKI_DEFAULT(s);
-
- /* number of arguments */
- /* Note: need not be given in pg_proc.dat; genbki.pl will compute it */
- int16 pronargs;
-
- /* number of arguments with defaults */
- int16 pronargdefaults BKI_DEFAULT(0);
-
- /* OID of result type */
- Oid prorettype BKI_LOOKUP(pg_type);
-
- /*
- * variable-length fields start here, but we allow direct access to
- * proargtypes
- */
-
- /* parameter types (excludes OUT params) */
- oidvector proargtypes BKI_LOOKUP(pg_type) BKI_FORCE_NOT_NULL;
-
-#ifdef CATALOG_VARLEN
-
- /* all param types (NULL if IN only) */
- Oid proallargtypes[1] BKI_DEFAULT(_null_) BKI_LOOKUP(pg_type);
-
- /* parameter modes (NULL if IN only) */
- char proargmodes[1] BKI_DEFAULT(_null_);
-
- /* parameter names (NULL if no names) */
- text proargnames[1] BKI_DEFAULT(_null_);
-
- /* list of expression trees for argument defaults (NULL if none) */
- pg_node_tree proargdefaults BKI_DEFAULT(_null_);
-
- /* types for which to apply transforms */
- Oid protrftypes[1] BKI_DEFAULT(_null_) BKI_LOOKUP(pg_type);
-
- /* procedure source text */
- text prosrc BKI_FORCE_NOT_NULL;
-
- /* secondary procedure info (can be NULL) */
- text probin BKI_DEFAULT(_null_);
-
- /* pre-parsed SQL function body */
- pg_node_tree prosqlbody BKI_DEFAULT(_null_);
-
- /* procedure-local GUC settings */
- text proconfig[1] BKI_DEFAULT(_null_);
-
- /* access permissions */
- aclitem proacl[1] BKI_DEFAULT(_null_);
-#endif
-} FormData_pg_proc;
-
-/* ----------------
- * Form_pg_proc corresponds to a pointer to a tuple with
- * the format of pg_proc relation.
- * ----------------
- */
-typedef FormData_pg_proc *Form_pg_proc;
-
-DECLARE_TOAST(pg_proc, 2836, 2837);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_proc_oid_index, 2690, on pg_proc using btree(oid oid_ops));
-#define ProcedureOidIndexId 2690
-DECLARE_UNIQUE_INDEX(pg_proc_proname_args_nsp_index, 2691, on pg_proc using btree(proname name_ops, proargtypes oidvector_ops, pronamespace oid_ops));
-#define ProcedureNameArgsNspIndexId 2691
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-/*
- * Symbolic values for prokind column
- */
-#define PROKIND_FUNCTION 'f'
-#define PROKIND_AGGREGATE 'a'
-#define PROKIND_WINDOW 'w'
-#define PROKIND_PROCEDURE 'p'
-
-/*
- * Symbolic values for provolatile column: these indicate whether the result
- * of a function is dependent *only* on the values of its explicit arguments,
- * or can change due to outside factors (such as parameter variables or
- * table contents). NOTE: functions having side-effects, such as setval(),
- * must be labeled volatile to ensure they will not get optimized away,
- * even if the actual return value is not changeable.
- */
-#define PROVOLATILE_IMMUTABLE 'i' /* never changes for given input */
-#define PROVOLATILE_STABLE 's' /* does not change within a scan */
-#define PROVOLATILE_VOLATILE 'v' /* can change even within a scan */
-
-/*
- * Symbolic values for proparallel column: these indicate whether a function
- * can be safely be run in a parallel backend, during parallelism but
- * necessarily in the leader, or only in non-parallel mode.
- */
-#define PROPARALLEL_SAFE 's' /* can run in worker or leader */
-#define PROPARALLEL_RESTRICTED 'r' /* can run in parallel leader only */
-#define PROPARALLEL_UNSAFE 'u' /* banned while in parallel mode */
-
-/*
- * Symbolic values for proargmodes column. Note that these must agree with
- * the FunctionParameterMode enum in parsenodes.h; we declare them here to
- * be accessible from either header.
- */
-#define PROARGMODE_IN 'i'
-#define PROARGMODE_OUT 'o'
-#define PROARGMODE_INOUT 'b'
-#define PROARGMODE_VARIADIC 'v'
-#define PROARGMODE_TABLE 't'
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-
-extern ObjectAddress ProcedureCreate(const char *procedureName,
- Oid procNamespace,
- bool replace,
- bool returnsSet,
- Oid returnType,
- Oid proowner,
- Oid languageObjectId,
- Oid languageValidator,
- const char *prosrc,
- const char *probin,
- Node *prosqlbody,
- char prokind,
- bool security_definer,
- bool isLeakProof,
- bool isStrict,
- char volatility,
- char parallel,
- oidvector *parameterTypes,
- Datum allParameterTypes,
- Datum parameterModes,
- Datum parameterNames,
- List *parameterDefaults,
- Datum trftypes,
- Datum proconfig,
- Oid prosupport,
- float4 procost,
- float4 prorows);
-
-extern bool function_parse_error_transpose(const char *prosrc);
-
-extern List *oid_array_to_list(Datum datum);
-
-#endif /* PG_PROC_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_proc_d.h b/contrib/libs/postgresql/src/include/catalog/pg_proc_d.h
deleted file mode 100644
index bf5d3d97ee3..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_proc_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_proc_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_publication.h b/contrib/libs/postgresql/src/include/catalog/pg_publication.h
deleted file mode 100644
index 84552ab5b36..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_publication.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_publication.h
- * definition of the "publication" system catalog (pg_publication)
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_publication.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_PUBLICATION_H
-#define PG_PUBLICATION_H
-
-#include "catalog/genbki.h"
-#include "catalog/objectaddress.h"
-#include "catalog/pg_publication_d.h"
-
-/* ----------------
- * pg_publication definition. cpp turns this into
- * typedef struct FormData_pg_publication
- * ----------------
- */
-CATALOG(pg_publication,6104,PublicationRelationId)
-{
- Oid oid; /* oid */
-
- NameData pubname; /* name of the publication */
-
- Oid pubowner BKI_LOOKUP(pg_authid); /* publication owner */
-
- /*
- * indicates that this is special publication which should encompass all
- * tables in the database (except for the unlogged and temp ones)
- */
- bool puballtables;
-
- /* true if inserts are published */
- bool pubinsert;
-
- /* true if updates are published */
- bool pubupdate;
-
- /* true if deletes are published */
- bool pubdelete;
-
- /* true if truncates are published */
- bool pubtruncate;
-
- /* true if partition changes are published using root schema */
- bool pubviaroot;
-} FormData_pg_publication;
-
-/* ----------------
- * Form_pg_publication corresponds to a pointer to a tuple with
- * the format of pg_publication relation.
- * ----------------
- */
-typedef FormData_pg_publication *Form_pg_publication;
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_publication_oid_index, 6110, on pg_publication using btree(oid oid_ops));
-#define PublicationObjectIndexId 6110
-DECLARE_UNIQUE_INDEX(pg_publication_pubname_index, 6111, on pg_publication using btree(pubname name_ops));
-#define PublicationNameIndexId 6111
-
-typedef struct PublicationActions
-{
- bool pubinsert;
- bool pubupdate;
- bool pubdelete;
- bool pubtruncate;
-} PublicationActions;
-
-typedef struct Publication
-{
- Oid oid;
- char *name;
- bool alltables;
- bool pubviaroot;
- PublicationActions pubactions;
-} Publication;
-
-extern Publication *GetPublication(Oid pubid);
-extern Publication *GetPublicationByName(const char *pubname, bool missing_ok);
-extern List *GetRelationPublications(Oid relid);
-
-/*---------
- * Expected values for pub_partopt parameter of GetRelationPublications(),
- * which allows callers to specify which partitions of partitioned tables
- * mentioned in the publication they expect to see.
- *
- * ROOT: only the table explicitly mentioned in the publication
- * LEAF: only leaf partitions in given tree
- * ALL: all partitions in given tree
- */
-typedef enum PublicationPartOpt
-{
- PUBLICATION_PART_ROOT,
- PUBLICATION_PART_LEAF,
- PUBLICATION_PART_ALL,
-} PublicationPartOpt;
-
-extern List *GetPublicationRelations(Oid pubid, PublicationPartOpt pub_partopt);
-extern List *GetAllTablesPublications(void);
-extern List *GetAllTablesPublicationRelations(bool pubviaroot);
-
-extern bool is_publishable_relation(Relation rel);
-extern ObjectAddress publication_add_relation(Oid pubid, Relation targetrel,
- bool if_not_exists);
-extern List *GetPubPartitionOptionRelations(List *result,
- PublicationPartOpt pub_partopt,
- Oid relid);
-
-extern Oid get_publication_oid(const char *pubname, bool missing_ok);
-extern char *get_publication_name(Oid pubid, bool missing_ok);
-
-
-#endif /* PG_PUBLICATION_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_publication_d.h b/contrib/libs/postgresql/src/include/catalog/pg_publication_d.h
deleted file mode 100644
index f78caa1ac29..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_publication_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_publication_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_publication_rel.h b/contrib/libs/postgresql/src/include/catalog/pg_publication_rel.h
deleted file mode 100644
index aecf53b3b39..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_publication_rel.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_publication_rel.h
- * definition of the system catalog for mappings between relations and
- * publications (pg_publication_rel)
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_publication_rel.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_PUBLICATION_REL_H
-#define PG_PUBLICATION_REL_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_publication_rel_d.h"
-
-/* ----------------
- * pg_publication_rel definition. cpp turns this into
- * typedef struct FormData_pg_publication_rel
- * ----------------
- */
-CATALOG(pg_publication_rel,6106,PublicationRelRelationId)
-{
- Oid oid; /* oid */
- Oid prpubid BKI_LOOKUP(pg_publication); /* Oid of the publication */
- Oid prrelid BKI_LOOKUP(pg_class); /* Oid of the relation */
-} FormData_pg_publication_rel;
-
-/* ----------------
- * Form_pg_publication_rel corresponds to a pointer to a tuple with
- * the format of pg_publication_rel relation.
- * ----------------
- */
-typedef FormData_pg_publication_rel *Form_pg_publication_rel;
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_publication_rel_oid_index, 6112, on pg_publication_rel using btree(oid oid_ops));
-#define PublicationRelObjectIndexId 6112
-DECLARE_UNIQUE_INDEX(pg_publication_rel_prrelid_prpubid_index, 6113, on pg_publication_rel using btree(prrelid oid_ops, prpubid oid_ops));
-#define PublicationRelPrrelidPrpubidIndexId 6113
-
-#endif /* PG_PUBLICATION_REL_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_publication_rel_d.h b/contrib/libs/postgresql/src/include/catalog/pg_publication_rel_d.h
deleted file mode 100644
index 0604b4b1a3e..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_publication_rel_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_publication_rel_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_range.dat b/contrib/libs/postgresql/src/include/catalog/pg_range.dat
deleted file mode 100644
index 3bd2d83b383..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_range.dat
+++ /dev/null
@@ -1,34 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_range.dat
-# Initial contents of the pg_range system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_range.dat
-#
-#----------------------------------------------------------------------
-
-[
-
-{ rngtypid => 'int4range', rngsubtype => 'int4',
- rngmultitypid => 'int4multirange', rngsubopc => 'btree/int4_ops',
- rngcanonical => 'int4range_canonical', rngsubdiff => 'int4range_subdiff' },
-{ rngtypid => 'numrange', rngsubtype => 'numeric',
- rngmultitypid => 'nummultirange', rngsubopc => 'btree/numeric_ops',
- rngcanonical => '-', rngsubdiff => 'numrange_subdiff' },
-{ rngtypid => 'tsrange', rngsubtype => 'timestamp',
- rngmultitypid => 'tsmultirange', rngsubopc => 'btree/timestamp_ops',
- rngcanonical => '-', rngsubdiff => 'tsrange_subdiff' },
-{ rngtypid => 'tstzrange', rngsubtype => 'timestamptz',
- rngmultitypid => 'tstzmultirange', rngsubopc => 'btree/timestamptz_ops',
- rngcanonical => '-', rngsubdiff => 'tstzrange_subdiff' },
-{ rngtypid => 'daterange', rngsubtype => 'date',
- rngmultitypid => 'datemultirange', rngsubopc => 'btree/date_ops',
- rngcanonical => 'daterange_canonical', rngsubdiff => 'daterange_subdiff' },
-{ rngtypid => 'int8range', rngsubtype => 'int8',
- rngmultitypid => 'int8multirange', rngsubopc => 'btree/int8_ops',
- rngcanonical => 'int8range_canonical', rngsubdiff => 'int8range_subdiff' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_range.h b/contrib/libs/postgresql/src/include/catalog/pg_range.h
deleted file mode 100644
index 5dfa4eef8ba..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_range.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_range.h
- * definition of the "range type" system catalog (pg_range)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_range.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_RANGE_H
-#define PG_RANGE_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_range_d.h"
-
-/* ----------------
- * pg_range definition. cpp turns this into
- * typedef struct FormData_pg_range
- * ----------------
- */
-CATALOG(pg_range,3541,RangeRelationId)
-{
- /* OID of owning range type */
- Oid rngtypid BKI_LOOKUP(pg_type);
-
- /* OID of range's element type (subtype) */
- Oid rngsubtype BKI_LOOKUP(pg_type);
-
- /* OID of the range's multirange type */
- Oid rngmultitypid BKI_LOOKUP(pg_type);
-
- /* collation for this range type, or 0 */
- Oid rngcollation BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_collation);
-
- /* subtype's btree opclass */
- Oid rngsubopc BKI_LOOKUP(pg_opclass);
-
- /* canonicalize range, or 0 */
- regproc rngcanonical BKI_LOOKUP_OPT(pg_proc);
-
- /* subtype difference as a float8, or 0 */
- regproc rngsubdiff BKI_LOOKUP_OPT(pg_proc);
-} FormData_pg_range;
-
-/* ----------------
- * Form_pg_range corresponds to a pointer to a tuple with
- * the format of pg_range relation.
- * ----------------
- */
-typedef FormData_pg_range *Form_pg_range;
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_range_rngtypid_index, 3542, on pg_range using btree(rngtypid oid_ops));
-#define RangeTypidIndexId 3542
-
-DECLARE_UNIQUE_INDEX(pg_range_rngmultitypid_index, 2228, on pg_range using btree(rngmultitypid oid_ops));
-#define RangeMultirangeTypidIndexId 2228
-
-
-/*
- * prototypes for functions in pg_range.c
- */
-
-extern void RangeCreate(Oid rangeTypeOid, Oid rangeSubType, Oid rangeCollation,
- Oid rangeSubOpclass, RegProcedure rangeCanonical,
- RegProcedure rangeSubDiff, Oid multirangeTypeOid);
-extern void RangeDelete(Oid rangeTypeOid);
-
-#endif /* PG_RANGE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_range_d.h b/contrib/libs/postgresql/src/include/catalog/pg_range_d.h
deleted file mode 100644
index be0ad6f5219..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_range_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_range_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_replication_origin.h b/contrib/libs/postgresql/src/include/catalog/pg_replication_origin.h
deleted file mode 100644
index 184f2403ceb..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_replication_origin.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_replication_origin.h
- * definition of the "replication origin" system catalog
- * (pg_replication_origin)
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_replication_origin.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_REPLICATION_ORIGIN_H
-#define PG_REPLICATION_ORIGIN_H
-
-#include "access/xlogdefs.h"
-#include "catalog/genbki.h"
-#include "catalog/pg_replication_origin_d.h"
-
-/* ----------------
- * pg_replication_origin. cpp turns this into
- * typedef struct FormData_pg_replication_origin
- * ----------------
- */
-CATALOG(pg_replication_origin,6000,ReplicationOriginRelationId) BKI_SHARED_RELATION
-{
- /*
- * Locally known id that get included into WAL.
- *
- * This should never leave the system.
- *
- * Needs to fit into an uint16, so we don't waste too much space in WAL
- * records. For this reason we don't use a normal Oid column here, since
- * we need to handle allocation of new values manually.
- */
- Oid roident;
-
- /*
- * Variable-length fields start here, but we allow direct access to
- * roname.
- */
-
- /* external, free-format, name */
- text roname BKI_FORCE_NOT_NULL;
-
-#ifdef CATALOG_VARLEN /* further variable-length fields */
-#endif
-} FormData_pg_replication_origin;
-
-typedef FormData_pg_replication_origin *Form_pg_replication_origin;
-
-DECLARE_TOAST(pg_replication_origin, 4181, 4182);
-#define PgReplicationOriginToastTable 4181
-#define PgReplicationOriginToastIndex 4182
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_replication_origin_roiident_index, 6001, on pg_replication_origin using btree(roident oid_ops));
-#define ReplicationOriginIdentIndex 6001
-DECLARE_UNIQUE_INDEX(pg_replication_origin_roname_index, 6002, on pg_replication_origin using btree(roname text_ops));
-#define ReplicationOriginNameIndex 6002
-
-#endif /* PG_REPLICATION_ORIGIN_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_replication_origin_d.h b/contrib/libs/postgresql/src/include/catalog/pg_replication_origin_d.h
deleted file mode 100644
index f42fe89aac6..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_replication_origin_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_replication_origin_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_rewrite.h b/contrib/libs/postgresql/src/include/catalog/pg_rewrite.h
deleted file mode 100644
index 89c72545d0b..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_rewrite.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_rewrite.h
- * definition of the "rewrite rule" system catalog (pg_rewrite)
- *
- * As of Postgres 7.3, the primary key for this table is <ev_class, rulename>
- * --- ie, rule names are only unique among the rules of a given table.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_rewrite.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_REWRITE_H
-#define PG_REWRITE_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_rewrite_d.h"
-
-/* ----------------
- * pg_rewrite definition. cpp turns this into
- * typedef struct FormData_pg_rewrite
- * ----------------
- */
-CATALOG(pg_rewrite,2618,RewriteRelationId)
-{
- Oid oid; /* oid */
- NameData rulename;
- Oid ev_class BKI_LOOKUP(pg_class);
- char ev_type;
- char ev_enabled;
- bool is_instead;
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- pg_node_tree ev_qual BKI_FORCE_NOT_NULL;
- pg_node_tree ev_action BKI_FORCE_NOT_NULL;
-#endif
-} FormData_pg_rewrite;
-
-/* ----------------
- * Form_pg_rewrite corresponds to a pointer to a tuple with
- * the format of pg_rewrite relation.
- * ----------------
- */
-typedef FormData_pg_rewrite *Form_pg_rewrite;
-
-DECLARE_TOAST(pg_rewrite, 2838, 2839);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_rewrite_oid_index, 2692, on pg_rewrite using btree(oid oid_ops));
-#define RewriteOidIndexId 2692
-DECLARE_UNIQUE_INDEX(pg_rewrite_rel_rulename_index, 2693, on pg_rewrite using btree(ev_class oid_ops, rulename name_ops));
-#define RewriteRelRulenameIndexId 2693
-
-#endif /* PG_REWRITE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_rewrite_d.h b/contrib/libs/postgresql/src/include/catalog/pg_rewrite_d.h
deleted file mode 100644
index 633a69fd37f..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_rewrite_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_rewrite_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_seclabel.h b/contrib/libs/postgresql/src/include/catalog/pg_seclabel.h
deleted file mode 100644
index 0a12225eb70..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_seclabel.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -------------------------------------------------------------------------
- *
- * pg_seclabel.h
- * definition of the "security label" system catalog (pg_seclabel)
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_seclabel.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- * -------------------------------------------------------------------------
- */
-#ifndef PG_SECLABEL_H
-#define PG_SECLABEL_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_seclabel_d.h"
-
-/* ----------------
- * pg_seclabel definition. cpp turns this into
- * typedef struct FormData_pg_seclabel
- * ----------------
- */
-CATALOG(pg_seclabel,3596,SecLabelRelationId)
-{
- Oid objoid; /* OID of the object itself */
- Oid classoid BKI_LOOKUP(pg_class); /* OID of table containing the
- * object */
- int32 objsubid; /* column number, or 0 if not used */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- text provider BKI_FORCE_NOT_NULL; /* name of label provider */
- text label BKI_FORCE_NOT_NULL; /* security label of the object */
-#endif
-} FormData_pg_seclabel;
-
-DECLARE_TOAST(pg_seclabel, 3598, 3599);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_seclabel_object_index, 3597, on pg_seclabel using btree(objoid oid_ops, classoid oid_ops, objsubid int4_ops, provider text_ops));
-#define SecLabelObjectIndexId 3597
-
-#endif /* PG_SECLABEL_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_seclabel_d.h b/contrib/libs/postgresql/src/include/catalog/pg_seclabel_d.h
deleted file mode 100644
index e8c167dfe14..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_seclabel_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_seclabel_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_sequence.h b/contrib/libs/postgresql/src/include/catalog/pg_sequence.h
deleted file mode 100644
index 8d0a00baf69..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_sequence.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -------------------------------------------------------------------------
- *
- * pg_sequence.h
- * definition of the "sequence" system catalog (pg_sequence)
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_sequence.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- * -------------------------------------------------------------------------
- */
-#ifndef PG_SEQUENCE_H
-#define PG_SEQUENCE_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_sequence_d.h"
-
-CATALOG(pg_sequence,2224,SequenceRelationId)
-{
- Oid seqrelid BKI_LOOKUP(pg_class);
- Oid seqtypid BKI_LOOKUP(pg_type);
- int64 seqstart;
- int64 seqincrement;
- int64 seqmax;
- int64 seqmin;
- int64 seqcache;
- bool seqcycle;
-} FormData_pg_sequence;
-
-/* ----------------
- * Form_pg_sequence corresponds to a pointer to a tuple with
- * the format of pg_sequence relation.
- * ----------------
- */
-typedef FormData_pg_sequence *Form_pg_sequence;
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_sequence_seqrelid_index, 5002, on pg_sequence using btree(seqrelid oid_ops));
-#define SequenceRelidIndexId 5002
-
-#endif /* PG_SEQUENCE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_sequence_d.h b/contrib/libs/postgresql/src/include/catalog/pg_sequence_d.h
deleted file mode 100644
index 70f7a702585..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_sequence_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_sequence_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_shdepend.h b/contrib/libs/postgresql/src/include/catalog/pg_shdepend.h
deleted file mode 100644
index 4faa95794db..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_shdepend.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_shdepend.h
- * definition of the "shared dependency" system catalog (pg_shdepend)
- *
- * pg_shdepend has no preloaded contents, so there is no pg_shdepend.dat
- * file; system-defined dependencies are loaded into it during a late stage
- * of the initdb process.
- *
- * NOTE: we do not represent all possible dependency pairs in pg_shdepend;
- * for example, there's not much value in creating an explicit dependency
- * from a relation to its database. Currently, only dependencies on roles
- * are explicitly stored in pg_shdepend.
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_shdepend.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_SHDEPEND_H
-#define PG_SHDEPEND_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_shdepend_d.h"
-
-/* ----------------
- * pg_shdepend definition. cpp turns this into
- * typedef struct FormData_pg_shdepend
- * ----------------
- */
-CATALOG(pg_shdepend,1214,SharedDependRelationId) BKI_SHARED_RELATION
-{
- /*
- * Identification of the dependent (referencing) object.
- *
- * These fields are all zeroes for a DEPENDENCY_PIN entry. Also, dbid can
- * be zero to denote a shared object.
- */
- Oid dbid BKI_LOOKUP_OPT(pg_database); /* OID of database
- * containing object */
- Oid classid BKI_LOOKUP_OPT(pg_class); /* OID of table containing
- * object */
- Oid objid; /* OID of object itself */
- int32 objsubid; /* column number, or 0 if not used */
-
- /*
- * Identification of the independent (referenced) object. This is always
- * a shared object, so we need no database ID field. We don't bother with
- * a sub-object ID either.
- */
- Oid refclassid BKI_LOOKUP(pg_class); /* OID of table containing
- * object */
- Oid refobjid; /* OID of object itself */
-
- /*
- * Precise semantics of the relationship are specified by the deptype
- * field. See SharedDependencyType in catalog/dependency.h.
- */
- char deptype; /* see codes in dependency.h */
-} FormData_pg_shdepend;
-
-/* ----------------
- * Form_pg_shdepend corresponds to a pointer to a row with
- * the format of pg_shdepend relation.
- * ----------------
- */
-typedef FormData_pg_shdepend *Form_pg_shdepend;
-
-DECLARE_INDEX(pg_shdepend_depender_index, 1232, on pg_shdepend using btree(dbid oid_ops, classid oid_ops, objid oid_ops, objsubid int4_ops));
-#define SharedDependDependerIndexId 1232
-DECLARE_INDEX(pg_shdepend_reference_index, 1233, on pg_shdepend using btree(refclassid oid_ops, refobjid oid_ops));
-#define SharedDependReferenceIndexId 1233
-
-#endif /* PG_SHDEPEND_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_shdepend_d.h b/contrib/libs/postgresql/src/include/catalog/pg_shdepend_d.h
deleted file mode 100644
index b3b9f33f279..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_shdepend_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_shdepend_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_shdescription.h b/contrib/libs/postgresql/src/include/catalog/pg_shdescription.h
deleted file mode 100644
index 543e216710b..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_shdescription.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_shdescription.h
- * definition of the "shared description" system catalog
- * (pg_shdescription)
- *
- * Because the contents of this table are taken from the *.dat files
- * of other catalogs, there is no pg_shdescription.dat file. The initial
- * contents are assembled by genbki.pl and loaded during initdb.
- *
- * NOTE: an object is identified by the OID of the row that primarily
- * defines the object, plus the OID of the table that that row appears in.
- * For example, a database is identified by the OID of its pg_database row
- * plus the pg_class OID of table pg_database. This allows unique
- * identification of objects without assuming that OIDs are unique
- * across tables.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_shdescription.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_SHDESCRIPTION_H
-#define PG_SHDESCRIPTION_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_shdescription_d.h"
-
-/* ----------------
- * pg_shdescription definition. cpp turns this into
- * typedef struct FormData_pg_shdescription
- * ----------------
- */
-CATALOG(pg_shdescription,2396,SharedDescriptionRelationId) BKI_SHARED_RELATION
-{
- Oid objoid; /* OID of object itself */
- Oid classoid; /* OID of table containing object */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- text description BKI_FORCE_NOT_NULL; /* description of object */
-#endif
-} FormData_pg_shdescription;
-
-/* ----------------
- * Form_pg_shdescription corresponds to a pointer to a tuple with
- * the format of pg_shdescription relation.
- * ----------------
- */
-typedef FormData_pg_shdescription * Form_pg_shdescription;
-
-DECLARE_TOAST(pg_shdescription, 2846, 2847);
-#define PgShdescriptionToastTable 2846
-#define PgShdescriptionToastIndex 2847
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_shdescription_o_c_index, 2397, on pg_shdescription using btree(objoid oid_ops, classoid oid_ops));
-#define SharedDescriptionObjIndexId 2397
-
-/* We do not use BKI_LOOKUP here because it causes problems for genbki.pl */
-DECLARE_FOREIGN_KEY((classoid), pg_class, (oid));
-
-#endif /* PG_SHDESCRIPTION_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_shdescription_d.h b/contrib/libs/postgresql/src/include/catalog/pg_shdescription_d.h
deleted file mode 100644
index 4981c86b7c4..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_shdescription_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_shdescription_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_shseclabel.h b/contrib/libs/postgresql/src/include/catalog/pg_shseclabel.h
deleted file mode 100644
index 5d6864cf8cf..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_shseclabel.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -------------------------------------------------------------------------
- *
- * pg_shseclabel.h
- * definition of the "shared security label" system catalog (pg_shseclabel)
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_shseclabel.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- * -------------------------------------------------------------------------
- */
-#ifndef PG_SHSECLABEL_H
-#define PG_SHSECLABEL_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_shseclabel_d.h"
-
-/* ----------------
- * pg_shseclabel definition. cpp turns this into
- * typedef struct FormData_pg_shseclabel
- * ----------------
- */
-CATALOG(pg_shseclabel,3592,SharedSecLabelRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(4066,SharedSecLabelRelation_Rowtype_Id) BKI_SCHEMA_MACRO
-{
- Oid objoid; /* OID of the shared object itself */
- Oid classoid BKI_LOOKUP(pg_class); /* OID of table containing the
- * shared object */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- text provider BKI_FORCE_NOT_NULL; /* name of label provider */
- text label BKI_FORCE_NOT_NULL; /* security label of the object */
-#endif
-} FormData_pg_shseclabel;
-
-typedef FormData_pg_shseclabel * Form_pg_shseclabel;
-
-DECLARE_TOAST(pg_shseclabel, 4060, 4061);
-#define PgShseclabelToastTable 4060
-#define PgShseclabelToastIndex 4061
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_shseclabel_object_index, 3593, on pg_shseclabel using btree(objoid oid_ops, classoid oid_ops, provider text_ops));
-#define SharedSecLabelObjectIndexId 3593
-
-#endif /* PG_SHSECLABEL_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_shseclabel_d.h b/contrib/libs/postgresql/src/include/catalog/pg_shseclabel_d.h
deleted file mode 100644
index 56688085b51..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_shseclabel_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_shseclabel_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_statistic.h b/contrib/libs/postgresql/src/include/catalog/pg_statistic.h
deleted file mode 100644
index d1827858e2d..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_statistic.h
+++ /dev/null
@@ -1,283 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_statistic.h
- * definition of the "statistics" system catalog (pg_statistic)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_statistic.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_STATISTIC_H
-#define PG_STATISTIC_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_statistic_d.h"
-
-/* ----------------
- * pg_statistic definition. cpp turns this into
- * typedef struct FormData_pg_statistic
- * ----------------
- */
-CATALOG(pg_statistic,2619,StatisticRelationId)
-{
- /* These fields form the unique key for the entry: */
- Oid starelid BKI_LOOKUP(pg_class); /* relation containing
- * attribute */
- int16 staattnum; /* attribute (column) stats are for */
- bool stainherit; /* true if inheritance children are included */
-
- /* the fraction of the column's entries that are NULL: */
- float4 stanullfrac;
-
- /*
- * stawidth is the average width in bytes of non-null entries. For
- * fixed-width datatypes this is of course the same as the typlen, but for
- * var-width types it is more useful. Note that this is the average width
- * of the data as actually stored, post-TOASTing (eg, for a
- * moved-out-of-line value, only the size of the pointer object is
- * counted). This is the appropriate definition for the primary use of
- * the statistic, which is to estimate sizes of in-memory hash tables of
- * tuples.
- */
- int32 stawidth;
-
- /* ----------------
- * stadistinct indicates the (approximate) number of distinct non-null
- * data values in the column. The interpretation is:
- * 0 unknown or not computed
- * > 0 actual number of distinct values
- * < 0 negative of multiplier for number of rows
- * The special negative case allows us to cope with columns that are
- * unique (stadistinct = -1) or nearly so (for example, a column in which
- * non-null values appear about twice on the average could be represented
- * by stadistinct = -0.5 if there are no nulls, or -0.4 if 20% of the
- * column is nulls). Because the number-of-rows statistic in pg_class may
- * be updated more frequently than pg_statistic is, it's important to be
- * able to describe such situations as a multiple of the number of rows,
- * rather than a fixed number of distinct values. But in other cases a
- * fixed number is correct (eg, a boolean column).
- * ----------------
- */
- float4 stadistinct;
-
- /* ----------------
- * To allow keeping statistics on different kinds of datatypes,
- * we do not hard-wire any particular meaning for the remaining
- * statistical fields. Instead, we provide several "slots" in which
- * statistical data can be placed. Each slot includes:
- * kind integer code identifying kind of data (see below)
- * op OID of associated operator, if needed
- * coll OID of relevant collation, or 0 if none
- * numbers float4 array (for statistical values)
- * values anyarray (for representations of data values)
- * The ID, operator, and collation fields are never NULL; they are zeroes
- * in an unused slot. The numbers and values fields are NULL in an
- * unused slot, and might also be NULL in a used slot if the slot kind
- * has no need for one or the other.
- * ----------------
- */
-
- int16 stakind1;
- int16 stakind2;
- int16 stakind3;
- int16 stakind4;
- int16 stakind5;
-
- Oid staop1 BKI_LOOKUP_OPT(pg_operator);
- Oid staop2 BKI_LOOKUP_OPT(pg_operator);
- Oid staop3 BKI_LOOKUP_OPT(pg_operator);
- Oid staop4 BKI_LOOKUP_OPT(pg_operator);
- Oid staop5 BKI_LOOKUP_OPT(pg_operator);
-
- Oid stacoll1 BKI_LOOKUP_OPT(pg_collation);
- Oid stacoll2 BKI_LOOKUP_OPT(pg_collation);
- Oid stacoll3 BKI_LOOKUP_OPT(pg_collation);
- Oid stacoll4 BKI_LOOKUP_OPT(pg_collation);
- Oid stacoll5 BKI_LOOKUP_OPT(pg_collation);
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- float4 stanumbers1[1];
- float4 stanumbers2[1];
- float4 stanumbers3[1];
- float4 stanumbers4[1];
- float4 stanumbers5[1];
-
- /*
- * Values in these arrays are values of the column's data type, or of some
- * related type such as an array element type. We presently have to cheat
- * quite a bit to allow polymorphic arrays of this kind, but perhaps
- * someday it'll be a less bogus facility.
- */
- anyarray stavalues1;
- anyarray stavalues2;
- anyarray stavalues3;
- anyarray stavalues4;
- anyarray stavalues5;
-#endif
-} FormData_pg_statistic;
-
-#define STATISTIC_NUM_SLOTS 5
-
-
-/* ----------------
- * Form_pg_statistic corresponds to a pointer to a tuple with
- * the format of pg_statistic relation.
- * ----------------
- */
-typedef FormData_pg_statistic *Form_pg_statistic;
-
-DECLARE_TOAST(pg_statistic, 2840, 2841);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_statistic_relid_att_inh_index, 2696, on pg_statistic using btree(starelid oid_ops, staattnum int2_ops, stainherit bool_ops));
-#define StatisticRelidAttnumInhIndexId 2696
-
-DECLARE_FOREIGN_KEY((starelid, staattnum), pg_attribute, (attrelid, attnum));
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-/*
- * Several statistical slot "kinds" are defined by core PostgreSQL, as
- * documented below. Also, custom data types can define their own "kind"
- * codes by mutual agreement between a custom typanalyze routine and the
- * selectivity estimation functions of the type's operators.
- *
- * Code reading the pg_statistic relation should not assume that a particular
- * data "kind" will appear in any particular slot. Instead, search the
- * stakind fields to see if the desired data is available. (The standard
- * function get_attstatsslot() may be used for this.)
- */
-
-/*
- * The present allocation of "kind" codes is:
- *
- * 1-99: reserved for assignment by the core PostgreSQL project
- * (values in this range will be documented in this file)
- * 100-199: reserved for assignment by the PostGIS project
- * (values to be documented in PostGIS documentation)
- * 200-299: reserved for assignment by the ESRI ST_Geometry project
- * (values to be documented in ESRI ST_Geometry documentation)
- * 300-9999: reserved for future public assignments
- *
- * For private use you may choose a "kind" code at random in the range
- * 10000-30000. However, for code that is to be widely disseminated it is
- * better to obtain a publicly defined "kind" code by request from the
- * PostgreSQL Global Development Group.
- */
-
-/*
- * In a "most common values" slot, staop is the OID of the "=" operator
- * used to decide whether values are the same or not, and stacoll is the
- * collation used (same as column's collation). stavalues contains
- * the K most common non-null values appearing in the column, and stanumbers
- * contains their frequencies (fractions of total row count). The values
- * shall be ordered in decreasing frequency. Note that since the arrays are
- * variable-size, K may be chosen by the statistics collector. Values should
- * not appear in MCV unless they have been observed to occur more than once;
- * a unique column will have no MCV slot.
- */
-#define STATISTIC_KIND_MCV 1
-
-/*
- * A "histogram" slot describes the distribution of scalar data. staop is
- * the OID of the "<" operator that describes the sort ordering, and stacoll
- * is the relevant collation. (In theory more than one histogram could appear,
- * if a datatype has more than one useful sort operator or we care about more
- * than one collation. Currently the collation will always be that of the
- * underlying column.) stavalues contains M (>=2) non-null values that
- * divide the non-null column data values into M-1 bins of approximately equal
- * population. The first stavalues item is the MIN and the last is the MAX.
- * stanumbers is not used and should be NULL. IMPORTANT POINT: if an MCV
- * slot is also provided, then the histogram describes the data distribution
- * *after removing the values listed in MCV* (thus, it's a "compressed
- * histogram" in the technical parlance). This allows a more accurate
- * representation of the distribution of a column with some very-common
- * values. In a column with only a few distinct values, it's possible that
- * the MCV list describes the entire data population; in this case the
- * histogram reduces to empty and should be omitted.
- */
-#define STATISTIC_KIND_HISTOGRAM 2
-
-/*
- * A "correlation" slot describes the correlation between the physical order
- * of table tuples and the ordering of data values of this column, as seen
- * by the "<" operator identified by staop with the collation identified by
- * stacoll. (As with the histogram, more than one entry could theoretically
- * appear.) stavalues is not used and should be NULL. stanumbers contains
- * a single entry, the correlation coefficient between the sequence of data
- * values and the sequence of their actual tuple positions. The coefficient
- * ranges from +1 to -1.
- */
-#define STATISTIC_KIND_CORRELATION 3
-
-/*
- * A "most common elements" slot is similar to a "most common values" slot,
- * except that it stores the most common non-null *elements* of the column
- * values. This is useful when the column datatype is an array or some other
- * type with identifiable elements (for instance, tsvector). staop contains
- * the equality operator appropriate to the element type, and stacoll
- * contains the collation to use with it. stavalues contains
- * the most common element values, and stanumbers their frequencies. Unlike
- * MCV slots, frequencies are measured as the fraction of non-null rows the
- * element value appears in, not the frequency of all rows. Also unlike
- * MCV slots, the values are sorted into the element type's default order
- * (to support binary search for a particular value). Since this puts the
- * minimum and maximum frequencies at unpredictable spots in stanumbers,
- * there are two extra members of stanumbers, holding copies of the minimum
- * and maximum frequencies. Optionally, there can be a third extra member,
- * which holds the frequency of null elements (expressed in the same terms:
- * the fraction of non-null rows that contain at least one null element). If
- * this member is omitted, the column is presumed to contain no null elements.
- *
- * Note: in current usage for tsvector columns, the stavalues elements are of
- * type text, even though their representation within tsvector is not
- * exactly text.
- */
-#define STATISTIC_KIND_MCELEM 4
-
-/*
- * A "distinct elements count histogram" slot describes the distribution of
- * the number of distinct element values present in each row of an array-type
- * column. Only non-null rows are considered, and only non-null elements.
- * staop contains the equality operator appropriate to the element type,
- * and stacoll contains the collation to use with it.
- * stavalues is not used and should be NULL. The last member of stanumbers is
- * the average count of distinct element values over all non-null rows. The
- * preceding M (>=2) members form a histogram that divides the population of
- * distinct-elements counts into M-1 bins of approximately equal population.
- * The first of these is the minimum observed count, and the last the maximum.
- */
-#define STATISTIC_KIND_DECHIST 5
-
-/*
- * A "length histogram" slot describes the distribution of range lengths in
- * rows of a range-type column. stanumbers contains a single entry, the
- * fraction of empty ranges. stavalues is a histogram of non-empty lengths, in
- * a format similar to STATISTIC_KIND_HISTOGRAM: it contains M (>=2) range
- * values that divide the column data values into M-1 bins of approximately
- * equal population. The lengths are stored as float8s, as measured by the
- * range type's subdiff function. Only non-null rows are considered.
- */
-#define STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM 6
-
-/*
- * A "bounds histogram" slot is similar to STATISTIC_KIND_HISTOGRAM, but for
- * a range-type column. stavalues contains M (>=2) range values that divide
- * the column data values into M-1 bins of approximately equal population.
- * Unlike a regular scalar histogram, this is actually two histograms combined
- * into a single array, with the lower bounds of each value forming a
- * histogram of lower bounds, and the upper bounds a histogram of upper
- * bounds. Only non-NULL, non-empty ranges are included.
- */
-#define STATISTIC_KIND_BOUNDS_HISTOGRAM 7
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-#endif /* PG_STATISTIC_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_statistic_d.h b/contrib/libs/postgresql/src/include/catalog/pg_statistic_d.h
deleted file mode 100644
index 25f8ba5d265..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_statistic_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_statistic_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext.h b/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext.h
deleted file mode 100644
index 36912ce528e..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_statistic_ext.h
- * definition of the "extended statistics" system catalog
- * (pg_statistic_ext)
- *
- * Note that pg_statistic_ext contains the definitions of extended statistics
- * objects, created by CREATE STATISTICS, but not the actual statistical data,
- * created by running ANALYZE.
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_statistic_ext.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_STATISTIC_EXT_H
-#define PG_STATISTIC_EXT_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_statistic_ext_d.h"
-
-/* ----------------
- * pg_statistic_ext definition. cpp turns this into
- * typedef struct FormData_pg_statistic_ext
- * ----------------
- */
-CATALOG(pg_statistic_ext,3381,StatisticExtRelationId)
-{
- Oid oid; /* oid */
-
- Oid stxrelid BKI_LOOKUP(pg_class); /* relation containing
- * attributes */
-
- /* These two fields form the unique key for the entry: */
- NameData stxname; /* statistics object name */
- Oid stxnamespace BKI_LOOKUP(pg_namespace); /* OID of statistics
- * object's namespace */
-
- Oid stxowner BKI_LOOKUP(pg_authid); /* statistics object's owner */
- int32 stxstattarget BKI_DEFAULT(-1); /* statistics target */
-
- /*
- * variable-length fields start here, but we allow direct access to
- * stxkeys
- */
- int2vector stxkeys BKI_FORCE_NOT_NULL; /* array of column keys */
-
-#ifdef CATALOG_VARLEN
- char stxkind[1] BKI_FORCE_NOT_NULL; /* statistics kinds requested
- * to build */
- pg_node_tree stxexprs; /* A list of expression trees for stats
- * attributes that are not simple column
- * references. */
-#endif
-
-} FormData_pg_statistic_ext;
-
-/* ----------------
- * Form_pg_statistic_ext corresponds to a pointer to a tuple with
- * the format of pg_statistic_ext relation.
- * ----------------
- */
-typedef FormData_pg_statistic_ext *Form_pg_statistic_ext;
-
-DECLARE_TOAST(pg_statistic_ext, 3439, 3440);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_statistic_ext_oid_index, 3380, on pg_statistic_ext using btree(oid oid_ops));
-#define StatisticExtOidIndexId 3380
-DECLARE_UNIQUE_INDEX(pg_statistic_ext_name_index, 3997, on pg_statistic_ext using btree(stxname name_ops, stxnamespace oid_ops));
-#define StatisticExtNameIndexId 3997
-DECLARE_INDEX(pg_statistic_ext_relid_index, 3379, on pg_statistic_ext using btree(stxrelid oid_ops));
-#define StatisticExtRelidIndexId 3379
-
-DECLARE_ARRAY_FOREIGN_KEY((stxrelid, stxkeys), pg_attribute, (attrelid, attnum));
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-#define STATS_EXT_NDISTINCT 'd'
-#define STATS_EXT_DEPENDENCIES 'f'
-#define STATS_EXT_MCV 'm'
-#define STATS_EXT_EXPRESSIONS 'e'
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-#endif /* PG_STATISTIC_EXT_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext_d.h b/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext_d.h
deleted file mode 100644
index e472ec19af7..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_statistic_ext_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext_data.h b/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext_data.h
deleted file mode 100644
index 57291543837..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext_data.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_statistic_ext_data.h
- * definition of the "extended statistics data" system catalog
- * (pg_statistic_ext_data)
- *
- * This catalog stores the statistical data for extended statistics objects.
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_statistic_ext_data.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_STATISTIC_EXT_DATA_H
-#define PG_STATISTIC_EXT_DATA_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_statistic_ext_data_d.h"
-
-/* ----------------
- * pg_statistic_ext_data definition. cpp turns this into
- * typedef struct FormData_pg_statistic_ext_data
- * ----------------
- */
-CATALOG(pg_statistic_ext_data,3429,StatisticExtDataRelationId)
-{
- Oid stxoid BKI_LOOKUP(pg_statistic_ext); /* statistics object
- * this data is for */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
-
- pg_ndistinct stxdndistinct; /* ndistinct coefficients (serialized) */
- pg_dependencies stxddependencies; /* dependencies (serialized) */
- pg_mcv_list stxdmcv; /* MCV (serialized) */
- pg_statistic stxdexpr[1]; /* stats for expressions */
-
-#endif
-
-} FormData_pg_statistic_ext_data;
-
-/* ----------------
- * Form_pg_statistic_ext_data corresponds to a pointer to a tuple with
- * the format of pg_statistic_ext_data relation.
- * ----------------
- */
-typedef FormData_pg_statistic_ext_data * Form_pg_statistic_ext_data;
-
-DECLARE_TOAST(pg_statistic_ext_data, 3430, 3431);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_statistic_ext_data_stxoid_index, 3433, on pg_statistic_ext_data using btree(stxoid oid_ops));
-#define StatisticExtDataStxoidIndexId 3433
-
-#endif /* PG_STATISTIC_EXT_DATA_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext_data_d.h b/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext_data_d.h
deleted file mode 100644
index 7782f447fcb..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext_data_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_statistic_ext_data_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_subscription.h b/contrib/libs/postgresql/src/include/catalog/pg_subscription.h
deleted file mode 100644
index 0060ebfb409..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_subscription.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -------------------------------------------------------------------------
- *
- * pg_subscription.h
- * definition of the "subscription" system catalog (pg_subscription)
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_subscription.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- * -------------------------------------------------------------------------
- */
-#ifndef PG_SUBSCRIPTION_H
-#define PG_SUBSCRIPTION_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_subscription_d.h"
-
-#include "nodes/pg_list.h"
-
-/* ----------------
- * pg_subscription definition. cpp turns this into
- * typedef struct FormData_pg_subscription
- * ----------------
- */
-
-/*
- * Technically, the subscriptions live inside the database, so a shared catalog
- * seems weird, but the replication launcher process needs to access all of
- * them to be able to start the workers, so we have to put them in a shared,
- * nailed catalog.
- *
- * CAUTION: There is a GRANT in system_views.sql to grant public select
- * access on all columns except subconninfo. When you add a new column
- * here, be sure to update that (or, if the new column is not to be publicly
- * readable, update associated comments and catalogs.sgml instead).
- */
-CATALOG(pg_subscription,6100,SubscriptionRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101,SubscriptionRelation_Rowtype_Id) BKI_SCHEMA_MACRO
-{
- Oid oid; /* oid */
-
- Oid subdbid BKI_LOOKUP(pg_database); /* Database the
- * subscription is in. */
- NameData subname; /* Name of the subscription */
-
- Oid subowner BKI_LOOKUP(pg_authid); /* Owner of the subscription */
-
- bool subenabled; /* True if the subscription is enabled (the
- * worker should be running) */
-
- bool subbinary; /* True if the subscription wants the
- * publisher to send data in binary */
-
- bool substream; /* Stream in-progress transactions. */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- /* Connection string to the publisher */
- text subconninfo BKI_FORCE_NOT_NULL;
-
- /* Slot name on publisher */
- NameData subslotname BKI_FORCE_NULL;
-
- /* Synchronous commit setting for worker */
- text subsynccommit BKI_FORCE_NOT_NULL;
-
- /* List of publications subscribed to */
- text subpublications[1] BKI_FORCE_NOT_NULL;
-#endif
-} FormData_pg_subscription;
-
-typedef FormData_pg_subscription *Form_pg_subscription;
-
-DECLARE_TOAST(pg_subscription, 4183, 4184);
-#define PgSubscriptionToastTable 4183
-#define PgSubscriptionToastIndex 4184
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_subscription_oid_index, 6114, on pg_subscription using btree(oid oid_ops));
-#define SubscriptionObjectIndexId 6114
-DECLARE_UNIQUE_INDEX(pg_subscription_subname_index, 6115, on pg_subscription using btree(subdbid oid_ops, subname name_ops));
-#define SubscriptionNameIndexId 6115
-
-typedef struct Subscription
-{
- Oid oid; /* Oid of the subscription */
- Oid dbid; /* Oid of the database which subscription is
- * in */
- char *name; /* Name of the subscription */
- Oid owner; /* Oid of the subscription owner */
- bool enabled; /* Indicates if the subscription is enabled */
- bool binary; /* Indicates if the subscription wants data in
- * binary format */
- bool stream; /* Allow streaming in-progress transactions. */
- char *conninfo; /* Connection string to the publisher */
- char *slotname; /* Name of the replication slot */
- char *synccommit; /* Synchronous commit setting for worker */
- List *publications; /* List of publication names to subscribe to */
-} Subscription;
-
-extern Subscription *GetSubscription(Oid subid, bool missing_ok);
-extern void FreeSubscription(Subscription *sub);
-extern Oid get_subscription_oid(const char *subname, bool missing_ok);
-extern char *get_subscription_name(Oid subid, bool missing_ok);
-
-extern int CountDBSubscriptions(Oid dbid);
-
-#endif /* PG_SUBSCRIPTION_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_subscription_d.h b/contrib/libs/postgresql/src/include/catalog/pg_subscription_d.h
deleted file mode 100644
index 2f0718c2d79..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_subscription_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_subscription_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_subscription_rel.h b/contrib/libs/postgresql/src/include/catalog/pg_subscription_rel.h
deleted file mode 100644
index ed94f57baa1..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_subscription_rel.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -------------------------------------------------------------------------
- *
- * pg_subscription_rel.h
- * definition of the system catalog containing the state for each
- * replicated table in each subscription (pg_subscription_rel)
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_subscription_rel.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- * -------------------------------------------------------------------------
- */
-#ifndef PG_SUBSCRIPTION_REL_H
-#define PG_SUBSCRIPTION_REL_H
-
-#include "access/xlogdefs.h"
-#include "catalog/genbki.h"
-#include "catalog/pg_subscription_rel_d.h"
-#include "nodes/pg_list.h"
-
-/* ----------------
- * pg_subscription_rel definition. cpp turns this into
- * typedef struct FormData_pg_subscription_rel
- * ----------------
- */
-CATALOG(pg_subscription_rel,6102,SubscriptionRelRelationId)
-{
- Oid srsubid BKI_LOOKUP(pg_subscription); /* Oid of subscription */
- Oid srrelid BKI_LOOKUP(pg_class); /* Oid of relation */
- char srsubstate; /* state of the relation in subscription */
-
- /*
- * Although srsublsn is a fixed-width type, it is allowed to be NULL, so
- * we prevent direct C code access to it just as for a varlena field.
- */
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
-
- XLogRecPtr srsublsn BKI_FORCE_NULL; /* remote LSN of the state change
- * used for synchronization
- * coordination, or NULL if not
- * valid */
-#endif
-} FormData_pg_subscription_rel;
-
-typedef FormData_pg_subscription_rel *Form_pg_subscription_rel;
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_subscription_rel_srrelid_srsubid_index, 6117, on pg_subscription_rel using btree(srrelid oid_ops, srsubid oid_ops));
-#define SubscriptionRelSrrelidSrsubidIndexId 6117
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-/* ----------------
- * substate constants
- * ----------------
- */
-#define SUBREL_STATE_INIT 'i' /* initializing (sublsn NULL) */
-#define SUBREL_STATE_DATASYNC 'd' /* data is being synchronized (sublsn
- * NULL) */
-#define SUBREL_STATE_FINISHEDCOPY 'f' /* tablesync copy phase is completed
- * (sublsn NULL) */
-#define SUBREL_STATE_SYNCDONE 's' /* synchronization finished in front of
- * apply (sublsn set) */
-#define SUBREL_STATE_READY 'r' /* ready (sublsn set) */
-
-/* These are never stored in the catalog, we only use them for IPC. */
-#define SUBREL_STATE_UNKNOWN '\0' /* unknown state */
-#define SUBREL_STATE_SYNCWAIT 'w' /* waiting for sync */
-#define SUBREL_STATE_CATCHUP 'c' /* catching up with apply */
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-typedef struct SubscriptionRelState
-{
- Oid relid;
- XLogRecPtr lsn;
- char state;
-} SubscriptionRelState;
-
-extern void AddSubscriptionRelState(Oid subid, Oid relid, char state,
- XLogRecPtr sublsn);
-extern void UpdateSubscriptionRelState(Oid subid, Oid relid, char state,
- XLogRecPtr sublsn);
-extern char GetSubscriptionRelState(Oid subid, Oid relid, XLogRecPtr *sublsn);
-extern void RemoveSubscriptionRel(Oid subid, Oid relid);
-
-extern List *GetSubscriptionRelations(Oid subid);
-extern List *GetSubscriptionNotReadyRelations(Oid subid);
-
-#endif /* PG_SUBSCRIPTION_REL_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_subscription_rel_d.h b/contrib/libs/postgresql/src/include/catalog/pg_subscription_rel_d.h
deleted file mode 100644
index d8654375941..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_subscription_rel_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_subscription_rel_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_tablespace.dat b/contrib/libs/postgresql/src/include/catalog/pg_tablespace.dat
deleted file mode 100644
index bf0d81d3061..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_tablespace.dat
+++ /dev/null
@@ -1,20 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_tablespace.dat
-# Initial contents of the pg_tablespace system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_tablespace.dat
-#
-#----------------------------------------------------------------------
-
-[
-
-{ oid => '1663', oid_symbol => 'DEFAULTTABLESPACE_OID',
- spcname => 'pg_default', spcacl => '_null_', spcoptions => '_null_' },
-{ oid => '1664', oid_symbol => 'GLOBALTABLESPACE_OID',
- spcname => 'pg_global', spcacl => '_null_', spcoptions => '_null_' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_tablespace.h b/contrib/libs/postgresql/src/include/catalog/pg_tablespace.h
deleted file mode 100644
index 58bb1087a3e..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_tablespace.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_tablespace.h
- * definition of the "tablespace" system catalog (pg_tablespace)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_tablespace.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_TABLESPACE_H
-#define PG_TABLESPACE_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_tablespace_d.h"
-
-/* ----------------
- * pg_tablespace definition. cpp turns this into
- * typedef struct FormData_pg_tablespace
- * ----------------
- */
-CATALOG(pg_tablespace,1213,TableSpaceRelationId) BKI_SHARED_RELATION
-{
- Oid oid; /* oid */
- NameData spcname; /* tablespace name */
-
- /* owner of tablespace */
- Oid spcowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid);
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- aclitem spcacl[1]; /* access permissions */
- text spcoptions[1]; /* per-tablespace options */
-#endif
-} FormData_pg_tablespace;
-
-/* ----------------
- * Form_pg_tablespace corresponds to a pointer to a tuple with
- * the format of pg_tablespace relation.
- * ----------------
- */
-typedef FormData_pg_tablespace *Form_pg_tablespace;
-
-DECLARE_TOAST(pg_tablespace, 4185, 4186);
-#define PgTablespaceToastTable 4185
-#define PgTablespaceToastIndex 4186
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_tablespace_oid_index, 2697, on pg_tablespace using btree(oid oid_ops));
-#define TablespaceOidIndexId 2697
-DECLARE_UNIQUE_INDEX(pg_tablespace_spcname_index, 2698, on pg_tablespace using btree(spcname name_ops));
-#define TablespaceNameIndexId 2698
-
-#endif /* PG_TABLESPACE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_tablespace_d.h b/contrib/libs/postgresql/src/include/catalog/pg_tablespace_d.h
deleted file mode 100644
index b388ac11699..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_tablespace_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_tablespace_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_transform.h b/contrib/libs/postgresql/src/include/catalog/pg_transform.h
deleted file mode 100644
index d6032461385..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_transform.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_transform.h
- * definition of the "transform" system catalog (pg_transform)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_transform.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_TRANSFORM_H
-#define PG_TRANSFORM_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_transform_d.h"
-
-/* ----------------
- * pg_transform definition. cpp turns this into
- * typedef struct FormData_pg_transform
- * ----------------
- */
-CATALOG(pg_transform,3576,TransformRelationId)
-{
- Oid oid; /* oid */
- Oid trftype BKI_LOOKUP(pg_type);
- Oid trflang BKI_LOOKUP(pg_language);
- regproc trffromsql BKI_LOOKUP_OPT(pg_proc);
- regproc trftosql BKI_LOOKUP_OPT(pg_proc);
-} FormData_pg_transform;
-
-/* ----------------
- * Form_pg_transform corresponds to a pointer to a tuple with
- * the format of pg_transform relation.
- * ----------------
- */
-typedef FormData_pg_transform *Form_pg_transform;
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_transform_oid_index, 3574, on pg_transform using btree(oid oid_ops));
-#define TransformOidIndexId 3574
-DECLARE_UNIQUE_INDEX(pg_transform_type_lang_index, 3575, on pg_transform using btree(trftype oid_ops, trflang oid_ops));
-#define TransformTypeLangIndexId 3575
-
-#endif /* PG_TRANSFORM_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_transform_d.h b/contrib/libs/postgresql/src/include/catalog/pg_transform_d.h
deleted file mode 100644
index e2d1984992b..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_transform_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_transform_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_trigger.h b/contrib/libs/postgresql/src/include/catalog/pg_trigger.h
deleted file mode 100644
index 2e3d2338763..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_trigger.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_trigger.h
- * definition of the "trigger" system catalog (pg_trigger)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_trigger.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_TRIGGER_H
-#define PG_TRIGGER_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_trigger_d.h"
-
-/* ----------------
- * pg_trigger definition. cpp turns this into
- * typedef struct FormData_pg_trigger
- *
- * Note: when tgconstraint is nonzero, tgconstrrelid, tgconstrindid,
- * tgdeferrable, and tginitdeferred are largely redundant with the referenced
- * pg_constraint entry. However, it is possible for a non-deferrable trigger
- * to be associated with a deferrable constraint.
- * ----------------
- */
-CATALOG(pg_trigger,2620,TriggerRelationId)
-{
- Oid oid; /* oid */
- Oid tgrelid BKI_LOOKUP(pg_class); /* relation trigger is
- * attached to */
- Oid tgparentid BKI_LOOKUP_OPT(pg_trigger); /* OID of parent
- * trigger, if any */
- NameData tgname; /* trigger's name */
- Oid tgfoid BKI_LOOKUP(pg_proc); /* OID of function to be called */
- int16 tgtype; /* BEFORE/AFTER/INSTEAD, UPDATE/DELETE/INSERT,
- * ROW/STATEMENT; see below */
- char tgenabled; /* trigger's firing configuration WRT
- * session_replication_role */
- bool tgisinternal; /* trigger is system-generated */
- Oid tgconstrrelid BKI_LOOKUP_OPT(pg_class); /* constraint's FROM
- * table, if any */
- Oid tgconstrindid BKI_LOOKUP_OPT(pg_class); /* constraint's
- * supporting index, if
- * any */
- Oid tgconstraint BKI_LOOKUP_OPT(pg_constraint); /* associated
- * pg_constraint entry,
- * if any */
- bool tgdeferrable; /* constraint trigger is deferrable */
- bool tginitdeferred; /* constraint trigger is deferred initially */
- int16 tgnargs; /* # of extra arguments in tgargs */
-
- /*
- * Variable-length fields start here, but we allow direct access to
- * tgattr. Note: tgattr and tgargs must not be null.
- */
- int2vector tgattr BKI_FORCE_NOT_NULL; /* column numbers, if trigger is
- * on columns */
-
-#ifdef CATALOG_VARLEN
- bytea tgargs BKI_FORCE_NOT_NULL; /* first\000second\000tgnargs\000 */
- pg_node_tree tgqual; /* WHEN expression, or NULL if none */
- NameData tgoldtable; /* old transition table, or NULL if none */
- NameData tgnewtable; /* new transition table, or NULL if none */
-#endif
-} FormData_pg_trigger;
-
-/* ----------------
- * Form_pg_trigger corresponds to a pointer to a tuple with
- * the format of pg_trigger relation.
- * ----------------
- */
-typedef FormData_pg_trigger *Form_pg_trigger;
-
-DECLARE_TOAST(pg_trigger, 2336, 2337);
-
-DECLARE_INDEX(pg_trigger_tgconstraint_index, 2699, on pg_trigger using btree(tgconstraint oid_ops));
-#define TriggerConstraintIndexId 2699
-DECLARE_UNIQUE_INDEX(pg_trigger_tgrelid_tgname_index, 2701, on pg_trigger using btree(tgrelid oid_ops, tgname name_ops));
-#define TriggerRelidNameIndexId 2701
-DECLARE_UNIQUE_INDEX_PKEY(pg_trigger_oid_index, 2702, on pg_trigger using btree(oid oid_ops));
-#define TriggerOidIndexId 2702
-
-DECLARE_ARRAY_FOREIGN_KEY((tgrelid, tgattr), pg_attribute, (attrelid, attnum));
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-/* Bits within tgtype */
-#define TRIGGER_TYPE_ROW (1 << 0)
-#define TRIGGER_TYPE_BEFORE (1 << 1)
-#define TRIGGER_TYPE_INSERT (1 << 2)
-#define TRIGGER_TYPE_DELETE (1 << 3)
-#define TRIGGER_TYPE_UPDATE (1 << 4)
-#define TRIGGER_TYPE_TRUNCATE (1 << 5)
-#define TRIGGER_TYPE_INSTEAD (1 << 6)
-
-#define TRIGGER_TYPE_LEVEL_MASK (TRIGGER_TYPE_ROW)
-#define TRIGGER_TYPE_STATEMENT 0
-
-/* Note bits within TRIGGER_TYPE_TIMING_MASK aren't adjacent */
-#define TRIGGER_TYPE_TIMING_MASK \
- (TRIGGER_TYPE_BEFORE | TRIGGER_TYPE_INSTEAD)
-#define TRIGGER_TYPE_AFTER 0
-
-#define TRIGGER_TYPE_EVENT_MASK \
- (TRIGGER_TYPE_INSERT | TRIGGER_TYPE_DELETE | TRIGGER_TYPE_UPDATE | TRIGGER_TYPE_TRUNCATE)
-
-/* Macros for manipulating tgtype */
-#define TRIGGER_CLEAR_TYPE(type) ((type) = 0)
-
-#define TRIGGER_SETT_ROW(type) ((type) |= TRIGGER_TYPE_ROW)
-#define TRIGGER_SETT_STATEMENT(type) ((type) |= TRIGGER_TYPE_STATEMENT)
-#define TRIGGER_SETT_BEFORE(type) ((type) |= TRIGGER_TYPE_BEFORE)
-#define TRIGGER_SETT_AFTER(type) ((type) |= TRIGGER_TYPE_AFTER)
-#define TRIGGER_SETT_INSTEAD(type) ((type) |= TRIGGER_TYPE_INSTEAD)
-#define TRIGGER_SETT_INSERT(type) ((type) |= TRIGGER_TYPE_INSERT)
-#define TRIGGER_SETT_DELETE(type) ((type) |= TRIGGER_TYPE_DELETE)
-#define TRIGGER_SETT_UPDATE(type) ((type) |= TRIGGER_TYPE_UPDATE)
-#define TRIGGER_SETT_TRUNCATE(type) ((type) |= TRIGGER_TYPE_TRUNCATE)
-
-#define TRIGGER_FOR_ROW(type) ((type) & TRIGGER_TYPE_ROW)
-#define TRIGGER_FOR_BEFORE(type) (((type) & TRIGGER_TYPE_TIMING_MASK) == TRIGGER_TYPE_BEFORE)
-#define TRIGGER_FOR_AFTER(type) (((type) & TRIGGER_TYPE_TIMING_MASK) == TRIGGER_TYPE_AFTER)
-#define TRIGGER_FOR_INSTEAD(type) (((type) & TRIGGER_TYPE_TIMING_MASK) == TRIGGER_TYPE_INSTEAD)
-#define TRIGGER_FOR_INSERT(type) ((type) & TRIGGER_TYPE_INSERT)
-#define TRIGGER_FOR_DELETE(type) ((type) & TRIGGER_TYPE_DELETE)
-#define TRIGGER_FOR_UPDATE(type) ((type) & TRIGGER_TYPE_UPDATE)
-#define TRIGGER_FOR_TRUNCATE(type) ((type) & TRIGGER_TYPE_TRUNCATE)
-
-/*
- * Efficient macro for checking if tgtype matches a particular level
- * (TRIGGER_TYPE_ROW or TRIGGER_TYPE_STATEMENT), timing (TRIGGER_TYPE_BEFORE,
- * TRIGGER_TYPE_AFTER or TRIGGER_TYPE_INSTEAD), and event (TRIGGER_TYPE_INSERT,
- * TRIGGER_TYPE_DELETE, TRIGGER_TYPE_UPDATE, or TRIGGER_TYPE_TRUNCATE). Note
- * that a tgtype can match more than one event, but only one level or timing.
- */
-#define TRIGGER_TYPE_MATCHES(type, level, timing, event) \
- (((type) & (TRIGGER_TYPE_LEVEL_MASK | TRIGGER_TYPE_TIMING_MASK | (event))) == ((level) | (timing) | (event)))
-
-/*
- * Macro to determine whether tgnewtable or tgoldtable has been specified for
- * a trigger.
- */
-#define TRIGGER_USES_TRANSITION_TABLE(namepointer) \
- ((namepointer) != (char *) NULL)
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-#endif /* PG_TRIGGER_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_trigger_d.h b/contrib/libs/postgresql/src/include/catalog/pg_trigger_d.h
deleted file mode 100644
index 0b1c9e3bee9..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_trigger_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_trigger_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_config.dat b/contrib/libs/postgresql/src/include/catalog/pg_ts_config.dat
deleted file mode 100644
index f88d8991993..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_ts_config.dat
+++ /dev/null
@@ -1,18 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_ts_config.dat
-# Initial contents of the pg_ts_config system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_ts_config.dat
-#
-#----------------------------------------------------------------------
-
-[
-
-{ oid => '3748', descr => 'simple configuration',
- cfgname => 'simple', cfgparser => 'default' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_config.h b/contrib/libs/postgresql/src/include/catalog/pg_ts_config.h
deleted file mode 100644
index 2e0263962df..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_ts_config.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_ts_config.h
- * definition of the "text search configuration" system catalog
- * (pg_ts_config)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_ts_config.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_TS_CONFIG_H
-#define PG_TS_CONFIG_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_ts_config_d.h"
-
-/* ----------------
- * pg_ts_config definition. cpp turns this into
- * typedef struct FormData_pg_ts_config
- * ----------------
- */
-CATALOG(pg_ts_config,3602,TSConfigRelationId)
-{
- /* oid */
- Oid oid;
-
- /* name of configuration */
- NameData cfgname;
-
- /* name space */
- Oid cfgnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace);
-
- /* owner */
- Oid cfgowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid);
-
- /* OID of parser */
- Oid cfgparser BKI_LOOKUP(pg_ts_parser);
-} FormData_pg_ts_config;
-
-typedef FormData_pg_ts_config *Form_pg_ts_config;
-
-DECLARE_UNIQUE_INDEX(pg_ts_config_cfgname_index, 3608, on pg_ts_config using btree(cfgname name_ops, cfgnamespace oid_ops));
-#define TSConfigNameNspIndexId 3608
-DECLARE_UNIQUE_INDEX_PKEY(pg_ts_config_oid_index, 3712, on pg_ts_config using btree(oid oid_ops));
-#define TSConfigOidIndexId 3712
-
-#endif /* PG_TS_CONFIG_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_config_d.h b/contrib/libs/postgresql/src/include/catalog/pg_ts_config_d.h
deleted file mode 100644
index 9fe42b01aec..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_ts_config_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_ts_config_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_config_map.dat b/contrib/libs/postgresql/src/include/catalog/pg_ts_config_map.dat
deleted file mode 100644
index cacfd125cf2..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_ts_config_map.dat
+++ /dev/null
@@ -1,54 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_ts_config_map.dat
-# Initial contents of the pg_ts_config_map system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_ts_config_map.dat
-#
-#----------------------------------------------------------------------
-
-[
-
-{ mapcfg => 'simple', maptokentype => '1', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '2', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '3', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '4', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '5', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '6', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '7', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '8', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '9', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '10', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '11', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '15', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '16', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '17', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '18', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '19', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '20', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '21', mapseqno => '1',
- mapdict => 'simple' },
-{ mapcfg => 'simple', maptokentype => '22', mapseqno => '1',
- mapdict => 'simple' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_config_map.h b/contrib/libs/postgresql/src/include/catalog/pg_ts_config_map.h
deleted file mode 100644
index f39d14fd795..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_ts_config_map.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_ts_config_map.h
- * definition of the system catalog for text search token mappings
- * (pg_ts_config_map)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_ts_config_map.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_TS_CONFIG_MAP_H
-#define PG_TS_CONFIG_MAP_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_ts_config_map_d.h"
-
-/* ----------------
- * pg_ts_config_map definition. cpp turns this into
- * typedef struct FormData_pg_ts_config_map
- * ----------------
- */
-CATALOG(pg_ts_config_map,3603,TSConfigMapRelationId)
-{
- /* OID of configuration owning this entry */
- Oid mapcfg BKI_LOOKUP(pg_ts_config);
-
- /* token type from parser */
- int32 maptokentype;
-
- /* order in which to consult dictionaries */
- int32 mapseqno;
-
- /* dictionary to consult */
- Oid mapdict BKI_LOOKUP(pg_ts_dict);
-} FormData_pg_ts_config_map;
-
-typedef FormData_pg_ts_config_map *Form_pg_ts_config_map;
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_ts_config_map_index, 3609, on pg_ts_config_map using btree(mapcfg oid_ops, maptokentype int4_ops, mapseqno int4_ops));
-#define TSConfigMapIndexId 3609
-
-#endif /* PG_TS_CONFIG_MAP_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_config_map_d.h b/contrib/libs/postgresql/src/include/catalog/pg_ts_config_map_d.h
deleted file mode 100644
index 5d32856d678..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_ts_config_map_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_ts_config_map_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_dict.dat b/contrib/libs/postgresql/src/include/catalog/pg_ts_dict.dat
deleted file mode 100644
index 4d39bb8c36f..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_ts_dict.dat
+++ /dev/null
@@ -1,19 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_ts_dict.dat
-# Initial contents of the pg_ts_dict system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_ts_dict.dat
-#
-#----------------------------------------------------------------------
-
-[
-
-{ oid => '3765',
- descr => 'simple dictionary: just lower case and check for stopword',
- dictname => 'simple', dicttemplate => 'simple', dictinitoption => '_null_' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_dict.h b/contrib/libs/postgresql/src/include/catalog/pg_ts_dict.h
deleted file mode 100644
index e53eead8290..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_ts_dict.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_ts_dict.h
- * definition of the "text search dictionary" system catalog (pg_ts_dict)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_ts_dict.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_TS_DICT_H
-#define PG_TS_DICT_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_ts_dict_d.h"
-
-/* ----------------
- * pg_ts_dict definition. cpp turns this into
- * typedef struct FormData_pg_ts_dict
- * ----------------
- */
-CATALOG(pg_ts_dict,3600,TSDictionaryRelationId)
-{
- /* oid */
- Oid oid;
-
- /* dictionary name */
- NameData dictname;
-
- /* name space */
- Oid dictnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace);
-
- /* owner */
- Oid dictowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid);
-
- /* dictionary's template */
- Oid dicttemplate BKI_LOOKUP(pg_ts_template);
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- /* options passed to dict_init() */
- text dictinitoption;
-#endif
-} FormData_pg_ts_dict;
-
-typedef FormData_pg_ts_dict *Form_pg_ts_dict;
-
-DECLARE_TOAST(pg_ts_dict, 4169, 4170);
-
-DECLARE_UNIQUE_INDEX(pg_ts_dict_dictname_index, 3604, on pg_ts_dict using btree(dictname name_ops, dictnamespace oid_ops));
-#define TSDictionaryNameNspIndexId 3604
-DECLARE_UNIQUE_INDEX_PKEY(pg_ts_dict_oid_index, 3605, on pg_ts_dict using btree(oid oid_ops));
-#define TSDictionaryOidIndexId 3605
-
-#endif /* PG_TS_DICT_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_dict_d.h b/contrib/libs/postgresql/src/include/catalog/pg_ts_dict_d.h
deleted file mode 100644
index 131abf7c931..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_ts_dict_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_ts_dict_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_parser.dat b/contrib/libs/postgresql/src/include/catalog/pg_ts_parser.dat
deleted file mode 100644
index a2b7cf10a62..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_ts_parser.dat
+++ /dev/null
@@ -1,20 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_ts_parser.dat
-# Initial contents of the pg_ts_parser system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_ts_parser.dat
-#
-#----------------------------------------------------------------------
-
-[
-
-{ oid => '3722', descr => 'default word parser',
- prsname => 'default', prsstart => 'prsd_start', prstoken => 'prsd_nexttoken',
- prsend => 'prsd_end', prsheadline => 'prsd_headline',
- prslextype => 'prsd_lextype' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_parser.h b/contrib/libs/postgresql/src/include/catalog/pg_ts_parser.h
deleted file mode 100644
index 0231051cee3..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_ts_parser.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_ts_parser.h
- * definition of the "text search parser" system catalog (pg_ts_parser)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_ts_parser.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_TS_PARSER_H
-#define PG_TS_PARSER_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_ts_parser_d.h"
-
-/* ----------------
- * pg_ts_parser definition. cpp turns this into
- * typedef struct FormData_pg_ts_parser
- * ----------------
- */
-CATALOG(pg_ts_parser,3601,TSParserRelationId)
-{
- Oid oid; /* oid */
-
- /* parser's name */
- NameData prsname;
-
- /* name space */
- Oid prsnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace);
-
- /* init parsing session */
- regproc prsstart BKI_LOOKUP(pg_proc);
-
- /* return next token */
- regproc prstoken BKI_LOOKUP(pg_proc);
-
- /* finalize parsing session */
- regproc prsend BKI_LOOKUP(pg_proc);
-
- /* return data for headline creation */
- regproc prsheadline BKI_LOOKUP_OPT(pg_proc);
-
- /* return descriptions of lexeme's types */
- regproc prslextype BKI_LOOKUP(pg_proc);
-} FormData_pg_ts_parser;
-
-typedef FormData_pg_ts_parser *Form_pg_ts_parser;
-
-DECLARE_UNIQUE_INDEX(pg_ts_parser_prsname_index, 3606, on pg_ts_parser using btree(prsname name_ops, prsnamespace oid_ops));
-#define TSParserNameNspIndexId 3606
-DECLARE_UNIQUE_INDEX_PKEY(pg_ts_parser_oid_index, 3607, on pg_ts_parser using btree(oid oid_ops));
-#define TSParserOidIndexId 3607
-
-#endif /* PG_TS_PARSER_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_parser_d.h b/contrib/libs/postgresql/src/include/catalog/pg_ts_parser_d.h
deleted file mode 100644
index 0bbdd2d3574..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_ts_parser_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_ts_parser_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_template.dat b/contrib/libs/postgresql/src/include/catalog/pg_ts_template.dat
deleted file mode 100644
index 0bdbcac7b25..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_ts_template.dat
+++ /dev/null
@@ -1,30 +0,0 @@
-#----------------------------------------------------------------------
-#
-# pg_ts_template.dat
-# Initial contents of the pg_ts_template system catalog.
-#
-# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
-# Portions Copyright (c) 1994, Regents of the University of California
-#
-# src/include/catalog/pg_ts_template.dat
-#
-#----------------------------------------------------------------------
-
-[
-
-{ oid => '3727',
- descr => 'simple dictionary: just lower case and check for stopword',
- tmplname => 'simple', tmplinit => 'dsimple_init',
- tmpllexize => 'dsimple_lexize' },
-{ oid => '3730', descr => 'synonym dictionary: replace word by its synonym',
- tmplname => 'synonym', tmplinit => 'dsynonym_init',
- tmpllexize => 'dsynonym_lexize' },
-{ oid => '3733', descr => 'ispell dictionary',
- tmplname => 'ispell', tmplinit => 'dispell_init',
- tmpllexize => 'dispell_lexize' },
-{ oid => '3742',
- descr => 'thesaurus dictionary: phrase by phrase substitution',
- tmplname => 'thesaurus', tmplinit => 'thesaurus_init',
- tmpllexize => 'thesaurus_lexize' },
-
-]
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_template.h b/contrib/libs/postgresql/src/include/catalog/pg_ts_template.h
deleted file mode 100644
index 194b9211362..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_ts_template.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_ts_template.h
- * definition of the "text search template" system catalog (pg_ts_template)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_ts_template.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_TS_TEMPLATE_H
-#define PG_TS_TEMPLATE_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_ts_template_d.h"
-
-/* ----------------
- * pg_ts_template definition. cpp turns this into
- * typedef struct FormData_pg_ts_template
- * ----------------
- */
-CATALOG(pg_ts_template,3764,TSTemplateRelationId)
-{
- Oid oid; /* oid */
-
- /* template name */
- NameData tmplname;
-
- /* name space */
- Oid tmplnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace);
-
- /* initialization method of dict (may be 0) */
- regproc tmplinit BKI_LOOKUP_OPT(pg_proc);
-
- /* base method of dictionary */
- regproc tmpllexize BKI_LOOKUP(pg_proc);
-} FormData_pg_ts_template;
-
-typedef FormData_pg_ts_template *Form_pg_ts_template;
-
-DECLARE_UNIQUE_INDEX(pg_ts_template_tmplname_index, 3766, on pg_ts_template using btree(tmplname name_ops, tmplnamespace oid_ops));
-#define TSTemplateNameNspIndexId 3766
-DECLARE_UNIQUE_INDEX_PKEY(pg_ts_template_oid_index, 3767, on pg_ts_template using btree(oid oid_ops));
-#define TSTemplateOidIndexId 3767
-
-#endif /* PG_TS_TEMPLATE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_template_d.h b/contrib/libs/postgresql/src/include/catalog/pg_ts_template_d.h
deleted file mode 100644
index b539cd72d88..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_ts_template_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_ts_template_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_type.h b/contrib/libs/postgresql/src/include/catalog/pg_type.h
deleted file mode 100644
index 0ece1e03d74..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_type.h
+++ /dev/null
@@ -1,405 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_type.h
- * definition of the "type" system catalog (pg_type)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_type.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_TYPE_H
-#define PG_TYPE_H
-
-#include "catalog/genbki.h"
-#include "catalog/objectaddress.h"
-#include "catalog/pg_type_d.h"
-#include "nodes/nodes.h"
-
-/* ----------------
- * pg_type definition. cpp turns this into
- * typedef struct FormData_pg_type
- *
- * Some of the values in a pg_type instance are copied into
- * pg_attribute instances. Some parts of Postgres use the pg_type copy,
- * while others use the pg_attribute copy, so they must match.
- * See struct FormData_pg_attribute for details.
- * ----------------
- */
-CATALOG(pg_type,1247,TypeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71,TypeRelation_Rowtype_Id) BKI_SCHEMA_MACRO
-{
- Oid oid; /* oid */
-
- /* type name */
- NameData typname;
-
- /* OID of namespace containing this type */
- Oid typnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace);
-
- /* type owner */
- Oid typowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid);
-
- /*
- * For a fixed-size type, typlen is the number of bytes we use to
- * represent a value of this type, e.g. 4 for an int4. But for a
- * variable-length type, typlen is negative. We use -1 to indicate a
- * "varlena" type (one that has a length word), -2 to indicate a
- * null-terminated C string.
- */
- int16 typlen BKI_ARRAY_DEFAULT(-1);
-
- /*
- * typbyval determines whether internal Postgres routines pass a value of
- * this type by value or by reference. typbyval had better be false if
- * the length is not 1, 2, or 4 (or 8 on 8-byte-Datum machines).
- * Variable-length types are always passed by reference. Note that
- * typbyval can be false even if the length would allow pass-by-value; for
- * example, type macaddr8 is pass-by-ref even when Datum is 8 bytes.
- */
- bool typbyval BKI_ARRAY_DEFAULT(f);
-
- /*
- * typtype is 'b' for a base type, 'c' for a composite type (e.g., a
- * table's rowtype), 'd' for a domain, 'e' for an enum type, 'p' for a
- * pseudo-type, or 'r' for a range type. (Use the TYPTYPE macros below.)
- *
- * If typtype is 'c', typrelid is the OID of the class' entry in pg_class.
- */
- char typtype BKI_DEFAULT(b) BKI_ARRAY_DEFAULT(b);
-
- /*
- * typcategory and typispreferred help the parser distinguish preferred
- * and non-preferred coercions. The category can be any single ASCII
- * character (but not \0). The categories used for built-in types are
- * identified by the TYPCATEGORY macros below.
- */
-
- /* arbitrary type classification */
- char typcategory BKI_ARRAY_DEFAULT(A);
-
- /* is type "preferred" within its category? */
- bool typispreferred BKI_DEFAULT(f) BKI_ARRAY_DEFAULT(f);
-
- /*
- * If typisdefined is false, the entry is only a placeholder (forward
- * reference). We know the type's name and owner, but not yet anything
- * else about it.
- */
- bool typisdefined BKI_DEFAULT(t);
-
- /* delimiter for arrays of this type */
- char typdelim BKI_DEFAULT(',');
-
- /* associated pg_class OID if a composite type, else 0 */
- Oid typrelid BKI_DEFAULT(0) BKI_ARRAY_DEFAULT(0) BKI_LOOKUP_OPT(pg_class);
-
- /*
- * Type-specific subscripting handler. If typsubscript is 0, it means
- * that this type doesn't support subscripting. Note that various parts
- * of the system deem types to be "true" array types only if their
- * typsubscript is array_subscript_handler.
- */
- regproc typsubscript BKI_DEFAULT(-) BKI_ARRAY_DEFAULT(array_subscript_handler) BKI_LOOKUP_OPT(pg_proc);
-
- /*
- * If typelem is not 0 then it identifies another row in pg_type, defining
- * the type yielded by subscripting. This should be 0 if typsubscript is
- * 0. However, it can be 0 when typsubscript isn't 0, if the handler
- * doesn't need typelem to determine the subscripting result type. Note
- * that a typelem dependency is considered to imply physical containment
- * of the element type in this type; so DDL changes on the element type
- * might be restricted by the presence of this type.
- */
- Oid typelem BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_type);
-
- /*
- * If there is a "true" array type having this type as element type,
- * typarray links to it. Zero if no associated "true" array type.
- */
- Oid typarray BKI_DEFAULT(0) BKI_ARRAY_DEFAULT(0) BKI_LOOKUP_OPT(pg_type);
-
- /*
- * I/O conversion procedures for the datatype.
- */
-
- /* text format (required) */
- regproc typinput BKI_ARRAY_DEFAULT(array_in) BKI_LOOKUP(pg_proc);
- regproc typoutput BKI_ARRAY_DEFAULT(array_out) BKI_LOOKUP(pg_proc);
-
- /* binary format (optional) */
- regproc typreceive BKI_ARRAY_DEFAULT(array_recv) BKI_LOOKUP_OPT(pg_proc);
- regproc typsend BKI_ARRAY_DEFAULT(array_send) BKI_LOOKUP_OPT(pg_proc);
-
- /*
- * I/O functions for optional type modifiers.
- */
- regproc typmodin BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc);
- regproc typmodout BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc);
-
- /*
- * Custom ANALYZE procedure for the datatype (0 selects the default).
- */
- regproc typanalyze BKI_DEFAULT(-) BKI_ARRAY_DEFAULT(array_typanalyze) BKI_LOOKUP_OPT(pg_proc);
-
- /* ----------------
- * typalign is the alignment required when storing a value of this
- * type. It applies to storage on disk as well as most
- * representations of the value inside Postgres. When multiple values
- * are stored consecutively, such as in the representation of a
- * complete row on disk, padding is inserted before a datum of this
- * type so that it begins on the specified boundary. The alignment
- * reference is the beginning of the first datum in the sequence.
- *
- * 'c' = CHAR alignment, ie no alignment needed.
- * 's' = SHORT alignment (2 bytes on most machines).
- * 'i' = INT alignment (4 bytes on most machines).
- * 'd' = DOUBLE alignment (8 bytes on many machines, but by no means all).
- * (Use the TYPALIGN macros below for these.)
- *
- * See include/access/tupmacs.h for the macros that compute these
- * alignment requirements. Note also that we allow the nominal alignment
- * to be violated when storing "packed" varlenas; the TOAST mechanism
- * takes care of hiding that from most code.
- *
- * NOTE: for types used in system tables, it is critical that the
- * size and alignment defined in pg_type agree with the way that the
- * compiler will lay out the field in a struct representing a table row.
- * ----------------
- */
- char typalign;
-
- /* ----------------
- * typstorage tells if the type is prepared for toasting and what
- * the default strategy for attributes of this type should be.
- *
- * 'p' PLAIN type not prepared for toasting
- * 'e' EXTERNAL external storage possible, don't try to compress
- * 'x' EXTENDED try to compress and store external if required
- * 'm' MAIN like 'x' but try to keep in main tuple
- * (Use the TYPSTORAGE macros below for these.)
- *
- * Note that 'm' fields can also be moved out to secondary storage,
- * but only as a last resort ('e' and 'x' fields are moved first).
- * ----------------
- */
- char typstorage BKI_DEFAULT(p) BKI_ARRAY_DEFAULT(x);
-
- /*
- * This flag represents a "NOT NULL" constraint against this datatype.
- *
- * If true, the attnotnull column for a corresponding table column using
- * this datatype will always enforce the NOT NULL constraint.
- *
- * Used primarily for domain types.
- */
- bool typnotnull BKI_DEFAULT(f);
-
- /*
- * Domains use typbasetype to show the base (or domain) type that the
- * domain is based on. Zero if the type is not a domain.
- */
- Oid typbasetype BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_type);
-
- /*
- * Domains use typtypmod to record the typmod to be applied to their base
- * type (-1 if base type does not use a typmod). -1 if this type is not a
- * domain.
- */
- int32 typtypmod BKI_DEFAULT(-1);
-
- /*
- * typndims is the declared number of dimensions for an array domain type
- * (i.e., typbasetype is an array type). Otherwise zero.
- */
- int32 typndims BKI_DEFAULT(0);
-
- /*
- * Collation: 0 if type cannot use collations, nonzero (typically
- * DEFAULT_COLLATION_OID) for collatable base types, possibly some other
- * OID for domains over collatable types
- */
- Oid typcollation BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_collation);
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
-
- /*
- * If typdefaultbin is not NULL, it is the nodeToString representation of
- * a default expression for the type. Currently this is only used for
- * domains.
- */
- pg_node_tree typdefaultbin BKI_DEFAULT(_null_) BKI_ARRAY_DEFAULT(_null_);
-
- /*
- * typdefault is NULL if the type has no associated default value. If
- * typdefaultbin is not NULL, typdefault must contain a human-readable
- * version of the default expression represented by typdefaultbin. If
- * typdefaultbin is NULL and typdefault is not, then typdefault is the
- * external representation of the type's default value, which may be fed
- * to the type's input converter to produce a constant.
- */
- text typdefault BKI_DEFAULT(_null_) BKI_ARRAY_DEFAULT(_null_);
-
- /*
- * Access permissions
- */
- aclitem typacl[1] BKI_DEFAULT(_null_);
-#endif
-} FormData_pg_type;
-
-/* ----------------
- * Form_pg_type corresponds to a pointer to a row with
- * the format of pg_type relation.
- * ----------------
- */
-typedef FormData_pg_type *Form_pg_type;
-
-DECLARE_TOAST(pg_type, 4171, 4172);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_type_oid_index, 2703, on pg_type using btree(oid oid_ops));
-#define TypeOidIndexId 2703
-DECLARE_UNIQUE_INDEX(pg_type_typname_nsp_index, 2704, on pg_type using btree(typname name_ops, typnamespace oid_ops));
-#define TypeNameNspIndexId 2704
-
-#ifdef EXPOSE_TO_CLIENT_CODE
-
-/*
- * macros for values of poor-mans-enumerated-type columns
- */
-#define TYPTYPE_BASE 'b' /* base type (ordinary scalar type) */
-#define TYPTYPE_COMPOSITE 'c' /* composite (e.g., table's rowtype) */
-#define TYPTYPE_DOMAIN 'd' /* domain over another type */
-#define TYPTYPE_ENUM 'e' /* enumerated type */
-#define TYPTYPE_MULTIRANGE 'm' /* multirange type */
-#define TYPTYPE_PSEUDO 'p' /* pseudo-type */
-#define TYPTYPE_RANGE 'r' /* range type */
-
-#define TYPCATEGORY_INVALID '\0' /* not an allowed category */
-#define TYPCATEGORY_ARRAY 'A'
-#define TYPCATEGORY_BOOLEAN 'B'
-#define TYPCATEGORY_COMPOSITE 'C'
-#define TYPCATEGORY_DATETIME 'D'
-#define TYPCATEGORY_ENUM 'E'
-#define TYPCATEGORY_GEOMETRIC 'G'
-#define TYPCATEGORY_NETWORK 'I' /* think INET */
-#define TYPCATEGORY_NUMERIC 'N'
-#define TYPCATEGORY_PSEUDOTYPE 'P'
-#define TYPCATEGORY_RANGE 'R'
-#define TYPCATEGORY_STRING 'S'
-#define TYPCATEGORY_TIMESPAN 'T'
-#define TYPCATEGORY_USER 'U'
-#define TYPCATEGORY_BITSTRING 'V' /* er ... "varbit"? */
-#define TYPCATEGORY_UNKNOWN 'X'
-
-#define TYPALIGN_CHAR 'c' /* char alignment (i.e. unaligned) */
-#define TYPALIGN_SHORT 's' /* short alignment (typically 2 bytes) */
-#define TYPALIGN_INT 'i' /* int alignment (typically 4 bytes) */
-#define TYPALIGN_DOUBLE 'd' /* double alignment (often 8 bytes) */
-
-#define TYPSTORAGE_PLAIN 'p' /* type not prepared for toasting */
-#define TYPSTORAGE_EXTERNAL 'e' /* toastable, don't try to compress */
-#define TYPSTORAGE_EXTENDED 'x' /* fully toastable */
-#define TYPSTORAGE_MAIN 'm' /* like 'x' but try to store inline */
-
-/* Is a type OID a polymorphic pseudotype? (Beware of multiple evaluation) */
-#define IsPolymorphicType(typid) \
- (IsPolymorphicTypeFamily1(typid) || \
- IsPolymorphicTypeFamily2(typid))
-
-/* Code not part of polymorphic type resolution should not use these macros: */
-#define IsPolymorphicTypeFamily1(typid) \
- ((typid) == ANYELEMENTOID || \
- (typid) == ANYARRAYOID || \
- (typid) == ANYNONARRAYOID || \
- (typid) == ANYENUMOID || \
- (typid) == ANYRANGEOID || \
- (typid) == ANYMULTIRANGEOID)
-
-#define IsPolymorphicTypeFamily2(typid) \
- ((typid) == ANYCOMPATIBLEOID || \
- (typid) == ANYCOMPATIBLEARRAYOID || \
- (typid) == ANYCOMPATIBLENONARRAYOID || \
- (typid) == ANYCOMPATIBLERANGEOID || \
- (typid) == ANYCOMPATIBLEMULTIRANGEOID)
-
-/* Is this a "true" array type? (Requires fmgroids.h) */
-#define IsTrueArrayType(typeForm) \
- (OidIsValid((typeForm)->typelem) && \
- (typeForm)->typsubscript == F_ARRAY_SUBSCRIPT_HANDLER)
-
-/*
- * Backwards compatibility for ancient random spellings of pg_type OID macros.
- * Don't use these names in new code.
- */
-#define CASHOID MONEYOID
-#define LSNOID PG_LSNOID
-
-#endif /* EXPOSE_TO_CLIENT_CODE */
-
-
-extern ObjectAddress TypeShellMake(const char *typeName,
- Oid typeNamespace,
- Oid ownerId);
-
-extern ObjectAddress TypeCreate(Oid newTypeOid,
- const char *typeName,
- Oid typeNamespace,
- Oid relationOid,
- char relationKind,
- Oid ownerId,
- int16 internalSize,
- char typeType,
- char typeCategory,
- bool typePreferred,
- char typDelim,
- Oid inputProcedure,
- Oid outputProcedure,
- Oid receiveProcedure,
- Oid sendProcedure,
- Oid typmodinProcedure,
- Oid typmodoutProcedure,
- Oid analyzeProcedure,
- Oid subscriptProcedure,
- Oid elementType,
- bool isImplicitArray,
- Oid arrayType,
- Oid baseType,
- const char *defaultTypeValue,
- char *defaultTypeBin,
- bool passedByValue,
- char alignment,
- char storage,
- int32 typeMod,
- int32 typNDims,
- bool typeNotNull,
- Oid typeCollation);
-
-extern void GenerateTypeDependencies(HeapTuple typeTuple,
- Relation typeCatalog,
- Node *defaultExpr,
- void *typacl,
- char relationKind, /* only for relation
- * rowtypes */
- bool isImplicitArray,
- bool isDependentType,
- bool makeExtensionDep,
- bool rebuild);
-
-extern void RenameTypeInternal(Oid typeOid, const char *newTypeName,
- Oid typeNamespace);
-
-extern char *makeArrayTypeName(const char *typeName, Oid typeNamespace);
-
-extern bool moveArrayTypeName(Oid typeOid, const char *typeName,
- Oid typeNamespace);
-
-extern char *makeMultirangeTypeName(const char *rangeTypeName,
- Oid typeNamespace);
-
-#endif /* PG_TYPE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_type_d.h b/contrib/libs/postgresql/src/include/catalog/pg_type_d.h
deleted file mode 100644
index 681ec78b847..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_type_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_type_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_user_mapping.h b/contrib/libs/postgresql/src/include/catalog/pg_user_mapping.h
deleted file mode 100644
index d440c67da19..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_user_mapping.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_user_mapping.h
- * definition of the "user mapping" system catalog (pg_user_mapping)
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_user_mapping.h
- *
- * NOTES
- * The Catalog.pm module reads this file and derives schema
- * information.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_USER_MAPPING_H
-#define PG_USER_MAPPING_H
-
-#include "catalog/genbki.h"
-#include "catalog/pg_user_mapping_d.h"
-
-/* ----------------
- * pg_user_mapping definition. cpp turns this into
- * typedef struct FormData_pg_user_mapping
- * ----------------
- */
-CATALOG(pg_user_mapping,1418,UserMappingRelationId)
-{
- Oid oid; /* oid */
-
- Oid umuser BKI_LOOKUP_OPT(pg_authid); /* Id of the user,
- * InvalidOid if PUBLIC is
- * wanted */
- Oid umserver BKI_LOOKUP(pg_foreign_server); /* server of this
- * mapping */
-
-#ifdef CATALOG_VARLEN /* variable-length fields start here */
- text umoptions[1]; /* user mapping options */
-#endif
-} FormData_pg_user_mapping;
-
-/* ----------------
- * Form_pg_user_mapping corresponds to a pointer to a tuple with
- * the format of pg_user_mapping relation.
- * ----------------
- */
-typedef FormData_pg_user_mapping *Form_pg_user_mapping;
-
-DECLARE_TOAST(pg_user_mapping, 4173, 4174);
-
-DECLARE_UNIQUE_INDEX_PKEY(pg_user_mapping_oid_index, 174, on pg_user_mapping using btree(oid oid_ops));
-#define UserMappingOidIndexId 174
-DECLARE_UNIQUE_INDEX(pg_user_mapping_user_server_index, 175, on pg_user_mapping using btree(umuser oid_ops, umserver oid_ops));
-#define UserMappingUserServerIndexId 175
-
-#endif /* PG_USER_MAPPING_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/pg_user_mapping_d.h b/contrib/libs/postgresql/src/include/catalog/pg_user_mapping_d.h
deleted file mode 100644
index 0f3c9a413fe..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/pg_user_mapping_d.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/pg_user_mapping_d.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/schemapg.h b/contrib/libs/postgresql/src/include/catalog/schemapg.h
deleted file mode 100644
index 7943644b9b5..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/schemapg.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/schemapg.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/storage.h b/contrib/libs/postgresql/src/include/catalog/storage.h
deleted file mode 100644
index 0ab32b44e91..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/storage.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * storage.h
- * prototypes for functions in backend/catalog/storage.c
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/storage.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef STORAGE_H
-#define STORAGE_H
-
-#include "storage/block.h"
-#include "storage/relfilenode.h"
-#include "storage/smgr.h"
-#include "utils/relcache.h"
-
-/* GUC variables */
-extern int wal_skip_threshold;
-
-extern SMgrRelation RelationCreateStorage(RelFileNode rnode, char relpersistence);
-extern void RelationDropStorage(Relation rel);
-extern void RelationPreserveStorage(RelFileNode rnode, bool atCommit);
-extern void RelationPreTruncate(Relation rel);
-extern void RelationTruncate(Relation rel, BlockNumber nblocks);
-extern void RelationCopyStorage(SMgrRelation src, SMgrRelation dst,
- ForkNumber forkNum, char relpersistence);
-extern bool RelFileNodeSkippingWAL(RelFileNode rnode);
-extern Size EstimatePendingSyncsSpace(void);
-extern void SerializePendingSyncs(Size maxSize, char *startAddress);
-extern void RestorePendingSyncs(char *startAddress);
-
-/*
- * These functions used to be in storage/smgr/smgr.c, which explains the
- * naming
- */
-extern void smgrDoPendingDeletes(bool isCommit);
-extern void smgrDoPendingSyncs(bool isCommit, bool isParallelWorker);
-extern int smgrGetPendingDeletes(bool forCommit, RelFileNode **ptr);
-extern void AtSubCommit_smgr(void);
-extern void AtSubAbort_smgr(void);
-extern void PostPrepare_smgr(void);
-
-#endif /* STORAGE_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/storage_xlog.h b/contrib/libs/postgresql/src/include/catalog/storage_xlog.h
deleted file mode 100644
index f0814f14581..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/storage_xlog.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * storage_xlog.h
- * prototypes for XLog support for backend/catalog/storage.c
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/storage_xlog.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef STORAGE_XLOG_H
-#define STORAGE_XLOG_H
-
-#include "access/xlogreader.h"
-#include "lib/stringinfo.h"
-#include "storage/block.h"
-#include "storage/relfilenode.h"
-
-/*
- * Declarations for smgr-related XLOG records
- *
- * Note: we log file creation and truncation here, but logging of deletion
- * actions is handled by xact.c, because it is part of transaction commit.
- */
-
-/* XLOG gives us high 4 bits */
-#define XLOG_SMGR_CREATE 0x10
-#define XLOG_SMGR_TRUNCATE 0x20
-
-typedef struct xl_smgr_create
-{
- RelFileNode rnode;
- ForkNumber forkNum;
-} xl_smgr_create;
-
-/* flags for xl_smgr_truncate */
-#define SMGR_TRUNCATE_HEAP 0x0001
-#define SMGR_TRUNCATE_VM 0x0002
-#define SMGR_TRUNCATE_FSM 0x0004
-#define SMGR_TRUNCATE_ALL \
- (SMGR_TRUNCATE_HEAP|SMGR_TRUNCATE_VM|SMGR_TRUNCATE_FSM)
-
-typedef struct xl_smgr_truncate
-{
- BlockNumber blkno;
- RelFileNode rnode;
- int flags;
-} xl_smgr_truncate;
-
-extern void log_smgrcreate(const RelFileNode *rnode, ForkNumber forkNum);
-
-extern void smgr_redo(XLogReaderState *record);
-extern void smgr_desc(StringInfo buf, XLogReaderState *record);
-extern const char *smgr_identify(uint8 info);
-
-#endif /* STORAGE_XLOG_H */
diff --git a/contrib/libs/postgresql/src/include/catalog/system_fk_info.h b/contrib/libs/postgresql/src/include/catalog/system_fk_info.h
deleted file mode 100644
index 1ad4a0fb721..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/system_fk_info.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../../backend/catalog/system_fk_info.h" /* inclink generated by yamaker */
diff --git a/contrib/libs/postgresql/src/include/catalog/toasting.h b/contrib/libs/postgresql/src/include/catalog/toasting.h
deleted file mode 100644
index 7067c4c61bc..00000000000
--- a/contrib/libs/postgresql/src/include/catalog/toasting.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * toasting.h
- * This file provides some definitions to support creation of toast tables
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/toasting.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef TOASTING_H
-#define TOASTING_H
-
-#include "storage/lock.h"
-
-/*
- * toasting.c prototypes
- */
-extern void NewRelationCreateToastTable(Oid relOid, Datum reloptions);
-extern void NewHeapCreateToastTable(Oid relOid, Datum reloptions,
- LOCKMODE lockmode, Oid OIDOldToast);
-extern void AlterTableCreateToastTable(Oid relOid, Datum reloptions,
- LOCKMODE lockmode);
-extern void BootstrapToastTable(char *relName,
- Oid toastOid, Oid toastIndexOid);
-
-#endif /* TOASTING_H */
diff --git a/contrib/libs/postgresql/src/include/fmgr.h b/contrib/libs/postgresql/src/include/fmgr.h
deleted file mode 100644
index ab7b85c86e1..00000000000
--- a/contrib/libs/postgresql/src/include/fmgr.h
+++ /dev/null
@@ -1,777 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fmgr.h
- * Definitions for the Postgres function manager and function-call
- * interface.
- *
- * This file must be included by all Postgres modules that either define
- * or call fmgr-callable functions.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/fmgr.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef FMGR_H
-#define FMGR_H
-
-/* We don't want to include primnodes.h here, so make some stub references */
-typedef struct Node *fmNodePtr;
-typedef struct Aggref *fmAggrefPtr;
-
-/* Likewise, avoid including execnodes.h here */
-typedef void (*fmExprContextCallbackFunction) (Datum arg);
-
-/* Likewise, avoid including stringinfo.h here */
-typedef struct StringInfoData *fmStringInfo;
-
-
-/*
- * All functions that can be called directly by fmgr must have this signature.
- * (Other functions can be called by using a handler that does have this
- * signature.)
- */
-
-typedef struct FunctionCallInfoBaseData *FunctionCallInfo;
-
-typedef Datum (*PGFunction) (FunctionCallInfo fcinfo);
-
-/*
- * This struct holds the system-catalog information that must be looked up
- * before a function can be called through fmgr. If the same function is
- * to be called multiple times, the lookup need be done only once and the
- * info struct saved for re-use.
- *
- * Note that fn_expr really is parse-time-determined information about the
- * arguments, rather than about the function itself. But it's convenient to
- * store it here rather than in FunctionCallInfoBaseData, where it might more
- * logically belong.
- *
- * fn_extra is available for use by the called function; all other fields
- * should be treated as read-only after the struct is created.
- */
-typedef struct FmgrInfo
-{
- PGFunction fn_addr; /* pointer to function or handler to be called */
- Oid fn_oid; /* OID of function (NOT of handler, if any) */
- short fn_nargs; /* number of input args (0..FUNC_MAX_ARGS) */
- bool fn_strict; /* function is "strict" (NULL in => NULL out) */
- bool fn_retset; /* function returns a set */
- unsigned char fn_stats; /* collect stats if track_functions > this */
- void *fn_extra; /* extra space for use by handler */
- MemoryContext fn_mcxt; /* memory context to store fn_extra in */
- fmNodePtr fn_expr; /* expression parse tree for call, or NULL */
-} FmgrInfo;
-
-/*
- * This struct is the data actually passed to an fmgr-called function.
- *
- * The called function is expected to set isnull, and possibly resultinfo or
- * fields in whatever resultinfo points to. It should not change any other
- * fields. (In particular, scribbling on the argument arrays is a bad idea,
- * since some callers assume they can re-call with the same arguments.)
- *
- * Note that enough space for arguments needs to be provided, either by using
- * SizeForFunctionCallInfo() in dynamic allocations, or by using
- * LOCAL_FCINFO() for on-stack allocations.
- *
- * This struct is named *BaseData, rather than *Data, to break pre v12 code
- * that allocated FunctionCallInfoData itself, as it'd often silently break
- * old code due to no space for arguments being provided.
- */
-typedef struct FunctionCallInfoBaseData
-{
- FmgrInfo *flinfo; /* ptr to lookup info used for this call */
- fmNodePtr context; /* pass info about context of call */
- fmNodePtr resultinfo; /* pass or return extra info about result */
- Oid fncollation; /* collation for function to use */
-#define FIELDNO_FUNCTIONCALLINFODATA_ISNULL 4
- bool isnull; /* function must set true if result is NULL */
- short nargs; /* # arguments actually passed */
-#define FIELDNO_FUNCTIONCALLINFODATA_ARGS 6
- NullableDatum args[FLEXIBLE_ARRAY_MEMBER];
-} FunctionCallInfoBaseData;
-
-/*
- * Space needed for a FunctionCallInfoBaseData struct with sufficient space
- * for `nargs` arguments.
- */
-#define SizeForFunctionCallInfo(nargs) \
- (offsetof(FunctionCallInfoBaseData, args) + \
- sizeof(NullableDatum) * (nargs))
-
-/*
- * This macro ensures that `name` points to a stack-allocated
- * FunctionCallInfoBaseData struct with sufficient space for `nargs` arguments.
- */
-#define LOCAL_FCINFO(name, nargs) \
- /* use union with FunctionCallInfoBaseData to guarantee alignment */ \
- union \
- { \
- FunctionCallInfoBaseData fcinfo; \
- /* ensure enough space for nargs args is available */ \
- char fcinfo_data[SizeForFunctionCallInfo(nargs)]; \
- } name##data; \
- FunctionCallInfo name = &name##data.fcinfo
-
-/*
- * This routine fills a FmgrInfo struct, given the OID
- * of the function to be called.
- */
-extern void fmgr_info(Oid functionId, FmgrInfo *finfo);
-
-/*
- * Same, when the FmgrInfo struct is in a memory context longer-lived than
- * CurrentMemoryContext. The specified context will be set as fn_mcxt
- * and used to hold all subsidiary data of finfo.
- */
-extern void fmgr_info_cxt(Oid functionId, FmgrInfo *finfo,
- MemoryContext mcxt);
-
-/* Convenience macro for setting the fn_expr field */
-#define fmgr_info_set_expr(expr, finfo) \
- ((finfo)->fn_expr = (expr))
-
-/*
- * Copy an FmgrInfo struct
- */
-extern void fmgr_info_copy(FmgrInfo *dstinfo, FmgrInfo *srcinfo,
- MemoryContext destcxt);
-
-extern void fmgr_symbol(Oid functionId, char **mod, char **fn);
-
-/*
- * This macro initializes all the fields of a FunctionCallInfoBaseData except
- * for the args[] array.
- */
-#define InitFunctionCallInfoData(Fcinfo, Flinfo, Nargs, Collation, Context, Resultinfo) \
- do { \
- (Fcinfo).flinfo = (Flinfo); \
- (Fcinfo).context = (Context); \
- (Fcinfo).resultinfo = (Resultinfo); \
- (Fcinfo).fncollation = (Collation); \
- (Fcinfo).isnull = false; \
- (Fcinfo).nargs = (Nargs); \
- } while (0)
-
-/*
- * This macro invokes a function given a filled-in FunctionCallInfoBaseData
- * struct. The macro result is the returned Datum --- but note that
- * caller must still check fcinfo->isnull! Also, if function is strict,
- * it is caller's responsibility to verify that no null arguments are present
- * before calling.
- *
- * Some code performs multiple calls without redoing InitFunctionCallInfoData,
- * possibly altering the argument values. This is okay, but be sure to reset
- * the fcinfo->isnull flag before each call, since callees are permitted to
- * assume that starts out false.
- */
-#define FunctionCallInvoke(fcinfo) ((* (fcinfo)->flinfo->fn_addr) (fcinfo))
-
-
-/*-------------------------------------------------------------------------
- * Support macros to ease writing fmgr-compatible functions
- *
- * A C-coded fmgr-compatible function should be declared as
- *
- * Datum
- * function_name(PG_FUNCTION_ARGS)
- * {
- * ...
- * }
- *
- * It should access its arguments using appropriate PG_GETARG_xxx macros
- * and should return its result using PG_RETURN_xxx.
- *
- *-------------------------------------------------------------------------
- */
-
-/* Standard parameter list for fmgr-compatible functions */
-#define PG_FUNCTION_ARGS FunctionCallInfo fcinfo
-
-/*
- * Get collation function should use.
- */
-#define PG_GET_COLLATION() (fcinfo->fncollation)
-
-/*
- * Get number of arguments passed to function.
- */
-#define PG_NARGS() (fcinfo->nargs)
-
-/*
- * If function is not marked "proisstrict" in pg_proc, it must check for
- * null arguments using this macro. Do not try to GETARG a null argument!
- */
-#define PG_ARGISNULL(n) (fcinfo->args[n].isnull)
-
-/*
- * Support for fetching detoasted copies of toastable datatypes (all of
- * which are varlena types). pg_detoast_datum() gives you either the input
- * datum (if not toasted) or a detoasted copy allocated with palloc().
- * pg_detoast_datum_copy() always gives you a palloc'd copy --- use it
- * if you need a modifiable copy of the input. Caller is expected to have
- * checked for null inputs first, if necessary.
- *
- * pg_detoast_datum_packed() will return packed (1-byte header) datums
- * unmodified. It will still expand an externally toasted or compressed datum.
- * The resulting datum can be accessed using VARSIZE_ANY() and VARDATA_ANY()
- * (beware of multiple evaluations in those macros!)
- *
- * In consumers oblivious to data alignment, call PG_DETOAST_DATUM_PACKED(),
- * VARDATA_ANY(), VARSIZE_ANY() and VARSIZE_ANY_EXHDR(). Elsewhere, call
- * PG_DETOAST_DATUM(), VARDATA() and VARSIZE(). Directly fetching an int16,
- * int32 or wider field in the struct representing the datum layout requires
- * aligned data. memcpy() is alignment-oblivious, as are most operations on
- * datatypes, such as text, whose layout struct contains only char fields.
- *
- * Note: it'd be nice if these could be macros, but I see no way to do that
- * without evaluating the arguments multiple times, which is NOT acceptable.
- */
-extern struct varlena *pg_detoast_datum(struct varlena *datum);
-extern struct varlena *pg_detoast_datum_copy(struct varlena *datum);
-extern struct varlena *pg_detoast_datum_slice(struct varlena *datum,
- int32 first, int32 count);
-extern struct varlena *pg_detoast_datum_packed(struct varlena *datum);
-
-#define PG_DETOAST_DATUM(datum) \
- pg_detoast_datum((struct varlena *) DatumGetPointer(datum))
-#define PG_DETOAST_DATUM_COPY(datum) \
- pg_detoast_datum_copy((struct varlena *) DatumGetPointer(datum))
-#define PG_DETOAST_DATUM_SLICE(datum,f,c) \
- pg_detoast_datum_slice((struct varlena *) DatumGetPointer(datum), \
- (int32) (f), (int32) (c))
-/* WARNING -- unaligned pointer */
-#define PG_DETOAST_DATUM_PACKED(datum) \
- pg_detoast_datum_packed((struct varlena *) DatumGetPointer(datum))
-
-/*
- * Support for cleaning up detoasted copies of inputs. This must only
- * be used for pass-by-ref datatypes, and normally would only be used
- * for toastable types. If the given pointer is different from the
- * original argument, assume it's a palloc'd detoasted copy, and pfree it.
- * NOTE: most functions on toastable types do not have to worry about this,
- * but we currently require that support functions for indexes not leak
- * memory.
- */
-#define PG_FREE_IF_COPY(ptr,n) \
- do { \
- if ((Pointer) (ptr) != PG_GETARG_POINTER(n)) \
- pfree(ptr); \
- } while (0)
-
-/* Macros for fetching arguments of standard types */
-
-#define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
-#define PG_GETARG_INT32(n) DatumGetInt32(PG_GETARG_DATUM(n))
-#define PG_GETARG_UINT32(n) DatumGetUInt32(PG_GETARG_DATUM(n))
-#define PG_GETARG_INT16(n) DatumGetInt16(PG_GETARG_DATUM(n))
-#define PG_GETARG_UINT16(n) DatumGetUInt16(PG_GETARG_DATUM(n))
-#define PG_GETARG_CHAR(n) DatumGetChar(PG_GETARG_DATUM(n))
-#define PG_GETARG_BOOL(n) DatumGetBool(PG_GETARG_DATUM(n))
-#define PG_GETARG_OID(n) DatumGetObjectId(PG_GETARG_DATUM(n))
-#define PG_GETARG_POINTER(n) DatumGetPointer(PG_GETARG_DATUM(n))
-#define PG_GETARG_CSTRING(n) DatumGetCString(PG_GETARG_DATUM(n))
-#define PG_GETARG_NAME(n) DatumGetName(PG_GETARG_DATUM(n))
-#define PG_GETARG_TRANSACTIONID(n) DatumGetTransactionId(PG_GETARG_DATUM(n))
-/* these macros hide the pass-by-reference-ness of the datatype: */
-#define PG_GETARG_FLOAT4(n) DatumGetFloat4(PG_GETARG_DATUM(n))
-#define PG_GETARG_FLOAT8(n) DatumGetFloat8(PG_GETARG_DATUM(n))
-#define PG_GETARG_INT64(n) DatumGetInt64(PG_GETARG_DATUM(n))
-/* use this if you want the raw, possibly-toasted input datum: */
-#define PG_GETARG_RAW_VARLENA_P(n) ((struct varlena *) PG_GETARG_POINTER(n))
-/* use this if you want the input datum de-toasted: */
-#define PG_GETARG_VARLENA_P(n) PG_DETOAST_DATUM(PG_GETARG_DATUM(n))
-/* and this if you can handle 1-byte-header datums: */
-#define PG_GETARG_VARLENA_PP(n) PG_DETOAST_DATUM_PACKED(PG_GETARG_DATUM(n))
-/* DatumGetFoo macros for varlena types will typically look like this: */
-#define DatumGetByteaPP(X) ((bytea *) PG_DETOAST_DATUM_PACKED(X))
-#define DatumGetTextPP(X) ((text *) PG_DETOAST_DATUM_PACKED(X))
-#define DatumGetBpCharPP(X) ((BpChar *) PG_DETOAST_DATUM_PACKED(X))
-#define DatumGetVarCharPP(X) ((VarChar *) PG_DETOAST_DATUM_PACKED(X))
-#define DatumGetHeapTupleHeader(X) ((HeapTupleHeader) PG_DETOAST_DATUM(X))
-/* And we also offer variants that return an OK-to-write copy */
-#define DatumGetByteaPCopy(X) ((bytea *) PG_DETOAST_DATUM_COPY(X))
-#define DatumGetTextPCopy(X) ((text *) PG_DETOAST_DATUM_COPY(X))
-#define DatumGetBpCharPCopy(X) ((BpChar *) PG_DETOAST_DATUM_COPY(X))
-#define DatumGetVarCharPCopy(X) ((VarChar *) PG_DETOAST_DATUM_COPY(X))
-#define DatumGetHeapTupleHeaderCopy(X) ((HeapTupleHeader) PG_DETOAST_DATUM_COPY(X))
-/* Variants which return n bytes starting at pos. m */
-#define DatumGetByteaPSlice(X,m,n) ((bytea *) PG_DETOAST_DATUM_SLICE(X,m,n))
-#define DatumGetTextPSlice(X,m,n) ((text *) PG_DETOAST_DATUM_SLICE(X,m,n))
-#define DatumGetBpCharPSlice(X,m,n) ((BpChar *) PG_DETOAST_DATUM_SLICE(X,m,n))
-#define DatumGetVarCharPSlice(X,m,n) ((VarChar *) PG_DETOAST_DATUM_SLICE(X,m,n))
-/* GETARG macros for varlena types will typically look like this: */
-#define PG_GETARG_BYTEA_PP(n) DatumGetByteaPP(PG_GETARG_DATUM(n))
-#define PG_GETARG_TEXT_PP(n) DatumGetTextPP(PG_GETARG_DATUM(n))
-#define PG_GETARG_BPCHAR_PP(n) DatumGetBpCharPP(PG_GETARG_DATUM(n))
-#define PG_GETARG_VARCHAR_PP(n) DatumGetVarCharPP(PG_GETARG_DATUM(n))
-#define PG_GETARG_HEAPTUPLEHEADER(n) DatumGetHeapTupleHeader(PG_GETARG_DATUM(n))
-/* And we also offer variants that return an OK-to-write copy */
-#define PG_GETARG_BYTEA_P_COPY(n) DatumGetByteaPCopy(PG_GETARG_DATUM(n))
-#define PG_GETARG_TEXT_P_COPY(n) DatumGetTextPCopy(PG_GETARG_DATUM(n))
-#define PG_GETARG_BPCHAR_P_COPY(n) DatumGetBpCharPCopy(PG_GETARG_DATUM(n))
-#define PG_GETARG_VARCHAR_P_COPY(n) DatumGetVarCharPCopy(PG_GETARG_DATUM(n))
-#define PG_GETARG_HEAPTUPLEHEADER_COPY(n) DatumGetHeapTupleHeaderCopy(PG_GETARG_DATUM(n))
-/* And a b-byte slice from position a -also OK to write */
-#define PG_GETARG_BYTEA_P_SLICE(n,a,b) DatumGetByteaPSlice(PG_GETARG_DATUM(n),a,b)
-#define PG_GETARG_TEXT_P_SLICE(n,a,b) DatumGetTextPSlice(PG_GETARG_DATUM(n),a,b)
-#define PG_GETARG_BPCHAR_P_SLICE(n,a,b) DatumGetBpCharPSlice(PG_GETARG_DATUM(n),a,b)
-#define PG_GETARG_VARCHAR_P_SLICE(n,a,b) DatumGetVarCharPSlice(PG_GETARG_DATUM(n),a,b)
-/*
- * Obsolescent variants that guarantee INT alignment for the return value.
- * Few operations on these particular types need alignment, mainly operations
- * that cast the VARDATA pointer to a type like int16[]. Most code should use
- * the ...PP(X) counterpart. Nonetheless, these appear frequently in code
- * predating the PostgreSQL 8.3 introduction of the ...PP(X) variants.
- */
-#define DatumGetByteaP(X) ((bytea *) PG_DETOAST_DATUM(X))
-#define DatumGetTextP(X) ((text *) PG_DETOAST_DATUM(X))
-#define DatumGetBpCharP(X) ((BpChar *) PG_DETOAST_DATUM(X))
-#define DatumGetVarCharP(X) ((VarChar *) PG_DETOAST_DATUM(X))
-#define PG_GETARG_BYTEA_P(n) DatumGetByteaP(PG_GETARG_DATUM(n))
-#define PG_GETARG_TEXT_P(n) DatumGetTextP(PG_GETARG_DATUM(n))
-#define PG_GETARG_BPCHAR_P(n) DatumGetBpCharP(PG_GETARG_DATUM(n))
-#define PG_GETARG_VARCHAR_P(n) DatumGetVarCharP(PG_GETARG_DATUM(n))
-
-/* To access options from opclass support functions use this: */
-#define PG_HAS_OPCLASS_OPTIONS() has_fn_opclass_options(fcinfo->flinfo)
-#define PG_GET_OPCLASS_OPTIONS() get_fn_opclass_options(fcinfo->flinfo)
-
-/* To return a NULL do this: */
-#define PG_RETURN_NULL() \
- do { fcinfo->isnull = true; return (Datum) 0; } while (0)
-
-/* A few internal functions return void (which is not the same as NULL!) */
-#define PG_RETURN_VOID() return (Datum) 0
-
-/* Macros for returning results of standard types */
-
-#define PG_RETURN_DATUM(x) return (x)
-#define PG_RETURN_INT32(x) return Int32GetDatum(x)
-#define PG_RETURN_UINT32(x) return UInt32GetDatum(x)
-#define PG_RETURN_INT16(x) return Int16GetDatum(x)
-#define PG_RETURN_UINT16(x) return UInt16GetDatum(x)
-#define PG_RETURN_CHAR(x) return CharGetDatum(x)
-#define PG_RETURN_BOOL(x) return BoolGetDatum(x)
-#define PG_RETURN_OID(x) return ObjectIdGetDatum(x)
-#define PG_RETURN_POINTER(x) return PointerGetDatum(x)
-#define PG_RETURN_CSTRING(x) return CStringGetDatum(x)
-#define PG_RETURN_NAME(x) return NameGetDatum(x)
-#define PG_RETURN_TRANSACTIONID(x) return TransactionIdGetDatum(x)
-/* these macros hide the pass-by-reference-ness of the datatype: */
-#define PG_RETURN_FLOAT4(x) return Float4GetDatum(x)
-#define PG_RETURN_FLOAT8(x) return Float8GetDatum(x)
-#define PG_RETURN_INT64(x) return Int64GetDatum(x)
-#define PG_RETURN_UINT64(x) return UInt64GetDatum(x)
-/* RETURN macros for other pass-by-ref types will typically look like this: */
-#define PG_RETURN_BYTEA_P(x) PG_RETURN_POINTER(x)
-#define PG_RETURN_TEXT_P(x) PG_RETURN_POINTER(x)
-#define PG_RETURN_BPCHAR_P(x) PG_RETURN_POINTER(x)
-#define PG_RETURN_VARCHAR_P(x) PG_RETURN_POINTER(x)
-#define PG_RETURN_HEAPTUPLEHEADER(x) return HeapTupleHeaderGetDatum(x)
-
-
-/*-------------------------------------------------------------------------
- * Support for detecting call convention of dynamically-loaded functions
- *
- * Dynamically loaded functions currently can only use the version-1 ("new
- * style") calling convention. Version-0 ("old style") is not supported
- * anymore. Version 1 is the call convention defined in this header file, and
- * must be accompanied by the macro call
- *
- * PG_FUNCTION_INFO_V1(function_name);
- *
- * Note that internal functions do not need this decoration since they are
- * assumed to be version-1.
- *
- *-------------------------------------------------------------------------
- */
-
-typedef struct
-{
- int api_version; /* specifies call convention version number */
- /* More fields may be added later, for version numbers > 1. */
-} Pg_finfo_record;
-
-/* Expected signature of an info function */
-typedef const Pg_finfo_record *(*PGFInfoFunction) (void);
-
-/*
- * Macro to build an info function associated with the given function name.
- *
- * As a convenience, also provide an "extern" declaration for the given
- * function name, so that writers of C functions need not write that too.
- *
- * On Windows, the function and info function must be exported. Our normal
- * build processes take care of that via .DEF files or --export-all-symbols.
- * Module authors using a different build process might need to manually
- * declare the function PGDLLEXPORT. We do that automatically here for the
- * info function, since authors shouldn't need to be explicitly aware of it.
- */
-#define PG_FUNCTION_INFO_V1(funcname) \
-extern Datum funcname(PG_FUNCTION_ARGS); \
-extern PGDLLEXPORT const Pg_finfo_record * CppConcat(pg_finfo_,funcname)(void); \
-const Pg_finfo_record * \
-CppConcat(pg_finfo_,funcname) (void) \
-{ \
- static const Pg_finfo_record my_finfo = { 1 }; \
- return &my_finfo; \
-} \
-extern int no_such_variable
-
-
-/*-------------------------------------------------------------------------
- * Support for verifying backend compatibility of loaded modules
- *
- * We require dynamically-loaded modules to include the macro call
- * PG_MODULE_MAGIC;
- * so that we can check for obvious incompatibility, such as being compiled
- * for a different major PostgreSQL version.
- *
- * To compile with versions of PostgreSQL that do not support this,
- * you may put an #ifdef/#endif test around it. Note that in a multiple-
- * source-file module, the macro call should only appear once.
- *
- * The specific items included in the magic block are intended to be ones that
- * are custom-configurable and especially likely to break dynamically loaded
- * modules if they were compiled with other values. Also, the length field
- * can be used to detect definition changes.
- *
- * Note: we compare magic blocks with memcmp(), so there had better not be
- * any alignment pad bytes in them.
- *
- * Note: when changing the contents of magic blocks, be sure to adjust the
- * incompatible_module_error() function in dfmgr.c.
- *-------------------------------------------------------------------------
- */
-
-/* Definition of the magic block structure */
-typedef struct
-{
- int len; /* sizeof(this struct) */
- int version; /* PostgreSQL major version */
- int funcmaxargs; /* FUNC_MAX_ARGS */
- int indexmaxkeys; /* INDEX_MAX_KEYS */
- int namedatalen; /* NAMEDATALEN */
- int float8byval; /* FLOAT8PASSBYVAL */
-} Pg_magic_struct;
-
-/* The actual data block contents */
-#define PG_MODULE_MAGIC_DATA \
-{ \
- sizeof(Pg_magic_struct), \
- PG_VERSION_NUM / 100, \
- FUNC_MAX_ARGS, \
- INDEX_MAX_KEYS, \
- NAMEDATALEN, \
- FLOAT8PASSBYVAL \
-}
-
-/*
- * Declare the module magic function. It needs to be a function as the dlsym
- * in the backend is only guaranteed to work on functions, not data
- */
-typedef const Pg_magic_struct *(*PGModuleMagicFunction) (void);
-
-#define PG_MAGIC_FUNCTION_NAME Pg_magic_func
-#define PG_MAGIC_FUNCTION_NAME_STRING "Pg_magic_func"
-
-#define PG_MODULE_MAGIC \
-extern PGDLLEXPORT const Pg_magic_struct *PG_MAGIC_FUNCTION_NAME(void); \
-const Pg_magic_struct * \
-PG_MAGIC_FUNCTION_NAME(void) \
-{ \
- static const Pg_magic_struct Pg_magic_data = PG_MODULE_MAGIC_DATA; \
- return &Pg_magic_data; \
-} \
-extern int no_such_variable
-
-
-/*-------------------------------------------------------------------------
- * Support routines and macros for callers of fmgr-compatible functions
- *-------------------------------------------------------------------------
- */
-
-/* These are for invocation of a specifically named function with a
- * directly-computed parameter list. Note that neither arguments nor result
- * are allowed to be NULL. Also, the function cannot be one that needs to
- * look at FmgrInfo, since there won't be any.
- */
-extern Datum DirectFunctionCall1Coll(PGFunction func, Oid collation,
- Datum arg1);
-extern Datum DirectFunctionCall2Coll(PGFunction func, Oid collation,
- Datum arg1, Datum arg2);
-extern Datum DirectFunctionCall3Coll(PGFunction func, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3);
-extern Datum DirectFunctionCall4Coll(PGFunction func, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4);
-extern Datum DirectFunctionCall5Coll(PGFunction func, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4, Datum arg5);
-extern Datum DirectFunctionCall6Coll(PGFunction func, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4, Datum arg5,
- Datum arg6);
-extern Datum DirectFunctionCall7Coll(PGFunction func, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4, Datum arg5,
- Datum arg6, Datum arg7);
-extern Datum DirectFunctionCall8Coll(PGFunction func, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4, Datum arg5,
- Datum arg6, Datum arg7, Datum arg8);
-extern Datum DirectFunctionCall9Coll(PGFunction func, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4, Datum arg5,
- Datum arg6, Datum arg7, Datum arg8,
- Datum arg9);
-
-/*
- * These functions work like the DirectFunctionCall functions except that
- * they use the flinfo parameter to initialise the fcinfo for the call.
- * It's recommended that the callee only use the fn_extra and fn_mcxt
- * fields, as other fields will typically describe the calling function
- * not the callee. Conversely, the calling function should not have
- * used fn_extra, unless its use is known to be compatible with the callee's.
- */
-extern Datum CallerFInfoFunctionCall1(PGFunction func, FmgrInfo *flinfo,
- Oid collation, Datum arg1);
-extern Datum CallerFInfoFunctionCall2(PGFunction func, FmgrInfo *flinfo,
- Oid collation, Datum arg1, Datum arg2);
-
-/* These are for invocation of a previously-looked-up function with a
- * directly-computed parameter list. Note that neither arguments nor result
- * are allowed to be NULL.
- */
-extern Datum FunctionCall0Coll(FmgrInfo *flinfo, Oid collation);
-extern Datum FunctionCall1Coll(FmgrInfo *flinfo, Oid collation,
- Datum arg1);
-extern Datum FunctionCall2Coll(FmgrInfo *flinfo, Oid collation,
- Datum arg1, Datum arg2);
-extern Datum FunctionCall3Coll(FmgrInfo *flinfo, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3);
-extern Datum FunctionCall4Coll(FmgrInfo *flinfo, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4);
-extern Datum FunctionCall5Coll(FmgrInfo *flinfo, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4, Datum arg5);
-extern Datum FunctionCall6Coll(FmgrInfo *flinfo, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4, Datum arg5,
- Datum arg6);
-extern Datum FunctionCall7Coll(FmgrInfo *flinfo, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4, Datum arg5,
- Datum arg6, Datum arg7);
-extern Datum FunctionCall8Coll(FmgrInfo *flinfo, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4, Datum arg5,
- Datum arg6, Datum arg7, Datum arg8);
-extern Datum FunctionCall9Coll(FmgrInfo *flinfo, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4, Datum arg5,
- Datum arg6, Datum arg7, Datum arg8,
- Datum arg9);
-
-/* These are for invocation of a function identified by OID with a
- * directly-computed parameter list. Note that neither arguments nor result
- * are allowed to be NULL. These are essentially fmgr_info() followed by
- * FunctionCallN(). If the same function is to be invoked repeatedly, do the
- * fmgr_info() once and then use FunctionCallN().
- */
-extern Datum OidFunctionCall0Coll(Oid functionId, Oid collation);
-extern Datum OidFunctionCall1Coll(Oid functionId, Oid collation,
- Datum arg1);
-extern Datum OidFunctionCall2Coll(Oid functionId, Oid collation,
- Datum arg1, Datum arg2);
-extern Datum OidFunctionCall3Coll(Oid functionId, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3);
-extern Datum OidFunctionCall4Coll(Oid functionId, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4);
-extern Datum OidFunctionCall5Coll(Oid functionId, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4, Datum arg5);
-extern Datum OidFunctionCall6Coll(Oid functionId, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4, Datum arg5,
- Datum arg6);
-extern Datum OidFunctionCall7Coll(Oid functionId, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4, Datum arg5,
- Datum arg6, Datum arg7);
-extern Datum OidFunctionCall8Coll(Oid functionId, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4, Datum arg5,
- Datum arg6, Datum arg7, Datum arg8);
-extern Datum OidFunctionCall9Coll(Oid functionId, Oid collation,
- Datum arg1, Datum arg2,
- Datum arg3, Datum arg4, Datum arg5,
- Datum arg6, Datum arg7, Datum arg8,
- Datum arg9);
-
-/* These macros allow the collation argument to be omitted (with a default of
- * InvalidOid, ie, no collation). They exist mostly for backwards
- * compatibility of source code.
- */
-#define DirectFunctionCall1(func, arg1) \
- DirectFunctionCall1Coll(func, InvalidOid, arg1)
-#define DirectFunctionCall2(func, arg1, arg2) \
- DirectFunctionCall2Coll(func, InvalidOid, arg1, arg2)
-#define DirectFunctionCall3(func, arg1, arg2, arg3) \
- DirectFunctionCall3Coll(func, InvalidOid, arg1, arg2, arg3)
-#define DirectFunctionCall4(func, arg1, arg2, arg3, arg4) \
- DirectFunctionCall4Coll(func, InvalidOid, arg1, arg2, arg3, arg4)
-#define DirectFunctionCall5(func, arg1, arg2, arg3, arg4, arg5) \
- DirectFunctionCall5Coll(func, InvalidOid, arg1, arg2, arg3, arg4, arg5)
-#define DirectFunctionCall6(func, arg1, arg2, arg3, arg4, arg5, arg6) \
- DirectFunctionCall6Coll(func, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6)
-#define DirectFunctionCall7(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
- DirectFunctionCall7Coll(func, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
-#define DirectFunctionCall8(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \
- DirectFunctionCall8Coll(func, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
-#define DirectFunctionCall9(func, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) \
- DirectFunctionCall9Coll(func, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
-#define FunctionCall1(flinfo, arg1) \
- FunctionCall1Coll(flinfo, InvalidOid, arg1)
-#define FunctionCall2(flinfo, arg1, arg2) \
- FunctionCall2Coll(flinfo, InvalidOid, arg1, arg2)
-#define FunctionCall3(flinfo, arg1, arg2, arg3) \
- FunctionCall3Coll(flinfo, InvalidOid, arg1, arg2, arg3)
-#define FunctionCall4(flinfo, arg1, arg2, arg3, arg4) \
- FunctionCall4Coll(flinfo, InvalidOid, arg1, arg2, arg3, arg4)
-#define FunctionCall5(flinfo, arg1, arg2, arg3, arg4, arg5) \
- FunctionCall5Coll(flinfo, InvalidOid, arg1, arg2, arg3, arg4, arg5)
-#define FunctionCall6(flinfo, arg1, arg2, arg3, arg4, arg5, arg6) \
- FunctionCall6Coll(flinfo, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6)
-#define FunctionCall7(flinfo, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
- FunctionCall7Coll(flinfo, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
-#define FunctionCall8(flinfo, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \
- FunctionCall8Coll(flinfo, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
-#define FunctionCall9(flinfo, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) \
- FunctionCall9Coll(flinfo, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
-#define OidFunctionCall0(functionId) \
- OidFunctionCall0Coll(functionId, InvalidOid)
-#define OidFunctionCall1(functionId, arg1) \
- OidFunctionCall1Coll(functionId, InvalidOid, arg1)
-#define OidFunctionCall2(functionId, arg1, arg2) \
- OidFunctionCall2Coll(functionId, InvalidOid, arg1, arg2)
-#define OidFunctionCall3(functionId, arg1, arg2, arg3) \
- OidFunctionCall3Coll(functionId, InvalidOid, arg1, arg2, arg3)
-#define OidFunctionCall4(functionId, arg1, arg2, arg3, arg4) \
- OidFunctionCall4Coll(functionId, InvalidOid, arg1, arg2, arg3, arg4)
-#define OidFunctionCall5(functionId, arg1, arg2, arg3, arg4, arg5) \
- OidFunctionCall5Coll(functionId, InvalidOid, arg1, arg2, arg3, arg4, arg5)
-#define OidFunctionCall6(functionId, arg1, arg2, arg3, arg4, arg5, arg6) \
- OidFunctionCall6Coll(functionId, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6)
-#define OidFunctionCall7(functionId, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
- OidFunctionCall7Coll(functionId, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
-#define OidFunctionCall8(functionId, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \
- OidFunctionCall8Coll(functionId, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
-#define OidFunctionCall9(functionId, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) \
- OidFunctionCall9Coll(functionId, InvalidOid, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
-
-
-/* Special cases for convenient invocation of datatype I/O functions. */
-extern Datum InputFunctionCall(FmgrInfo *flinfo, char *str,
- Oid typioparam, int32 typmod);
-extern Datum OidInputFunctionCall(Oid functionId, char *str,
- Oid typioparam, int32 typmod);
-extern char *OutputFunctionCall(FmgrInfo *flinfo, Datum val);
-extern char *OidOutputFunctionCall(Oid functionId, Datum val);
-extern Datum ReceiveFunctionCall(FmgrInfo *flinfo, fmStringInfo buf,
- Oid typioparam, int32 typmod);
-extern Datum OidReceiveFunctionCall(Oid functionId, fmStringInfo buf,
- Oid typioparam, int32 typmod);
-extern bytea *SendFunctionCall(FmgrInfo *flinfo, Datum val);
-extern bytea *OidSendFunctionCall(Oid functionId, Datum val);
-
-
-/*
- * Routines in fmgr.c
- */
-extern const Pg_finfo_record *fetch_finfo_record(void *filehandle, const char *funcname);
-extern void clear_external_function_hash(void *filehandle);
-extern Oid fmgr_internal_function(const char *proname);
-extern Oid get_fn_expr_rettype(FmgrInfo *flinfo);
-extern Oid get_fn_expr_argtype(FmgrInfo *flinfo, int argnum);
-extern Oid get_call_expr_argtype(fmNodePtr expr, int argnum);
-extern bool get_fn_expr_arg_stable(FmgrInfo *flinfo, int argnum);
-extern bool get_call_expr_arg_stable(fmNodePtr expr, int argnum);
-extern bool get_fn_expr_variadic(FmgrInfo *flinfo);
-extern bytea *get_fn_opclass_options(FmgrInfo *flinfo);
-extern bool has_fn_opclass_options(FmgrInfo *flinfo);
-extern void set_fn_opclass_options(FmgrInfo *flinfo, bytea *options);
-extern bool CheckFunctionValidatorAccess(Oid validatorOid, Oid functionOid);
-
-/*
- * Routines in dfmgr.c
- */
-extern char *Dynamic_library_path;
-
-extern void *load_external_function(const char *filename, const char *funcname,
- bool signalNotFound, void **filehandle);
-extern void *lookup_external_function(void *filehandle, const char *funcname);
-extern void load_file(const char *filename, bool restricted);
-extern void **find_rendezvous_variable(const char *varName);
-extern Size EstimateLibraryStateSpace(void);
-extern void SerializeLibraryState(Size maxsize, char *start_address);
-extern void RestoreLibraryState(char *start_address);
-
-/*
- * Support for aggregate functions
- *
- * These are actually in executor/nodeAgg.c, but we declare them here since
- * the whole point is for callers to not be overly friendly with nodeAgg.
- */
-
-/* AggCheckCallContext can return one of the following codes, or 0: */
-#define AGG_CONTEXT_AGGREGATE 1 /* regular aggregate */
-#define AGG_CONTEXT_WINDOW 2 /* window function */
-
-extern int AggCheckCallContext(FunctionCallInfo fcinfo,
- MemoryContext *aggcontext);
-extern fmAggrefPtr AggGetAggref(FunctionCallInfo fcinfo);
-extern MemoryContext AggGetTempMemoryContext(FunctionCallInfo fcinfo);
-extern bool AggStateIsShared(FunctionCallInfo fcinfo);
-extern void AggRegisterCallback(FunctionCallInfo fcinfo,
- fmExprContextCallbackFunction func,
- Datum arg);
-
-/*
- * We allow plugin modules to hook function entry/exit. This is intended
- * as support for loadable security policy modules, which may want to
- * perform additional privilege checks on function entry or exit, or to do
- * other internal bookkeeping. To make this possible, such modules must be
- * able not only to support normal function entry and exit, but also to trap
- * the case where we bail out due to an error; and they must also be able to
- * prevent inlining.
- */
-typedef enum FmgrHookEventType
-{
- FHET_START,
- FHET_END,
- FHET_ABORT
-} FmgrHookEventType;
-
-typedef bool (*needs_fmgr_hook_type) (Oid fn_oid);
-
-typedef void (*fmgr_hook_type) (FmgrHookEventType event,
- FmgrInfo *flinfo, Datum *arg);
-
-extern PGDLLIMPORT needs_fmgr_hook_type needs_fmgr_hook;
-extern PGDLLIMPORT fmgr_hook_type fmgr_hook;
-
-#define FmgrHookIsNeeded(fn_oid) \
- (!needs_fmgr_hook ? false : (*needs_fmgr_hook)(fn_oid))
-
-#endif /* FMGR_H */
diff --git a/contrib/libs/postgresql/src/include/funcapi.h b/contrib/libs/postgresql/src/include/funcapi.h
deleted file mode 100644
index f1304d47e34..00000000000
--- a/contrib/libs/postgresql/src/include/funcapi.h
+++ /dev/null
@@ -1,348 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * funcapi.h
- * Definitions for functions which return composite type and/or sets
- * or work on VARIADIC inputs.
- *
- * This file must be included by all Postgres modules that either define
- * or call FUNCAPI-callable functions or macros.
- *
- *
- * Copyright (c) 2002-2021, PostgreSQL Global Development Group
- *
- * src/include/funcapi.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef FUNCAPI_H
-#define FUNCAPI_H
-
-#include "access/tupdesc.h"
-#include "executor/executor.h"
-#include "executor/tuptable.h"
-#include "fmgr.h"
-
-/*-------------------------------------------------------------------------
- * Support to ease writing Functions returning composite types
- *-------------------------------------------------------------------------
- *
- * This struct holds arrays of individual attribute information
- * needed to create a tuple from raw C strings. It also requires
- * a copy of the TupleDesc. The information carried here
- * is derived from the TupleDesc, but it is stored here to
- * avoid redundant cpu cycles on each call to an SRF.
- */
-typedef struct AttInMetadata
-{
- /* full TupleDesc */
- TupleDesc tupdesc;
-
- /* array of attribute type input function finfo */
- FmgrInfo *attinfuncs;
-
- /* array of attribute type i/o parameter OIDs */
- Oid *attioparams;
-
- /* array of attribute typmod */
- int32 *atttypmods;
-} AttInMetadata;
-
-/*-------------------------------------------------------------------------
- * Support struct to ease writing Set Returning Functions (SRFs)
- *-------------------------------------------------------------------------
- *
- * This struct holds function context for Set Returning Functions.
- * Use fn_extra to hold a pointer to it across calls
- */
-typedef struct FuncCallContext
-{
- /*
- * Number of times we've been called before
- *
- * call_cntr is initialized to 0 for you by SRF_FIRSTCALL_INIT(), and
- * incremented for you every time SRF_RETURN_NEXT() is called.
- */
- uint64 call_cntr;
-
- /*
- * OPTIONAL maximum number of calls
- *
- * max_calls is here for convenience only and setting it is optional. If
- * not set, you must provide alternative means to know when the function
- * is done.
- */
- uint64 max_calls;
-
- /*
- * OPTIONAL pointer to miscellaneous user-provided context information
- *
- * user_fctx is for use as a pointer to your own struct to retain
- * arbitrary context information between calls of your function.
- */
- void *user_fctx;
-
- /*
- * OPTIONAL pointer to struct containing attribute type input metadata
- *
- * attinmeta is for use when returning tuples (i.e. composite data types)
- * and is not used when returning base data types. It is only needed if
- * you intend to use BuildTupleFromCStrings() to create the return tuple.
- */
- AttInMetadata *attinmeta;
-
- /*
- * memory context used for structures that must live for multiple calls
- *
- * multi_call_memory_ctx is set by SRF_FIRSTCALL_INIT() for you, and used
- * by SRF_RETURN_DONE() for cleanup. It is the most appropriate memory
- * context for any memory that is to be reused across multiple calls of
- * the SRF.
- */
- MemoryContext multi_call_memory_ctx;
-
- /*
- * OPTIONAL pointer to struct containing tuple description
- *
- * tuple_desc is for use when returning tuples (i.e. composite data types)
- * and is only needed if you are going to build the tuples with
- * heap_form_tuple() rather than with BuildTupleFromCStrings(). Note that
- * the TupleDesc pointer stored here should usually have been run through
- * BlessTupleDesc() first.
- */
- TupleDesc tuple_desc;
-
-} FuncCallContext;
-
-/*----------
- * Support to ease writing functions returning composite types
- *
- * External declarations:
- * get_call_result_type:
- * Given a function's call info record, determine the kind of datatype
- * it is supposed to return. If resultTypeId isn't NULL, *resultTypeId
- * receives the actual datatype OID (this is mainly useful for scalar
- * result types). If resultTupleDesc isn't NULL, *resultTupleDesc
- * receives a pointer to a TupleDesc when the result is of a composite
- * type, or NULL when it's a scalar result or the rowtype could not be
- * determined. NB: the tupledesc should be copied if it is to be
- * accessed over a long period.
- * get_expr_result_type:
- * Given an expression node, return the same info as for
- * get_call_result_type. Note: the cases in which rowtypes cannot be
- * determined are different from the cases for get_call_result_type.
- * get_func_result_type:
- * Given only a function's OID, return the same info as for
- * get_call_result_type. Note: the cases in which rowtypes cannot be
- * determined are different from the cases for get_call_result_type.
- * Do *not* use this if you can use one of the others.
- *
- * See also get_expr_result_tupdesc(), which is a convenient wrapper around
- * get_expr_result_type() for use when the caller only cares about
- * determinable-rowtype cases.
- *----------
- */
-
-/* Type categories for get_call_result_type and siblings */
-typedef enum TypeFuncClass
-{
- TYPEFUNC_SCALAR, /* scalar result type */
- TYPEFUNC_COMPOSITE, /* determinable rowtype result */
- TYPEFUNC_COMPOSITE_DOMAIN, /* domain over determinable rowtype result */
- TYPEFUNC_RECORD, /* indeterminate rowtype result */
- TYPEFUNC_OTHER /* bogus type, eg pseudotype */
-} TypeFuncClass;
-
-extern TypeFuncClass get_call_result_type(FunctionCallInfo fcinfo,
- Oid *resultTypeId,
- TupleDesc *resultTupleDesc);
-extern TypeFuncClass get_expr_result_type(Node *expr,
- Oid *resultTypeId,
- TupleDesc *resultTupleDesc);
-extern TypeFuncClass get_func_result_type(Oid functionId,
- Oid *resultTypeId,
- TupleDesc *resultTupleDesc);
-
-extern TupleDesc get_expr_result_tupdesc(Node *expr, bool noError);
-
-extern bool resolve_polymorphic_argtypes(int numargs, Oid *argtypes,
- char *argmodes,
- Node *call_expr);
-
-extern int get_func_arg_info(HeapTuple procTup,
- Oid **p_argtypes, char ***p_argnames,
- char **p_argmodes);
-
-extern int get_func_input_arg_names(Datum proargnames, Datum proargmodes,
- char ***arg_names);
-
-extern int get_func_trftypes(HeapTuple procTup, Oid **p_trftypes);
-extern char *get_func_result_name(Oid functionId);
-
-extern TupleDesc build_function_result_tupdesc_d(char prokind,
- Datum proallargtypes,
- Datum proargmodes,
- Datum proargnames);
-extern TupleDesc build_function_result_tupdesc_t(HeapTuple procTuple);
-
-
-/*----------
- * Support to ease writing functions returning composite types
- *
- * External declarations:
- * TupleDesc BlessTupleDesc(TupleDesc tupdesc) - "Bless" a completed tuple
- * descriptor so that it can be used to return properly labeled tuples.
- * You need to call this if you are going to use heap_form_tuple directly.
- * TupleDescGetAttInMetadata does it for you, however, so no need to call
- * it if you call TupleDescGetAttInMetadata.
- * AttInMetadata *TupleDescGetAttInMetadata(TupleDesc tupdesc) - Build an
- * AttInMetadata struct based on the given TupleDesc. AttInMetadata can
- * be used in conjunction with C strings to produce a properly formed
- * tuple.
- * HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values) -
- * build a HeapTuple given user data in C string form. values is an array
- * of C strings, one for each attribute of the return tuple.
- * Datum HeapTupleHeaderGetDatum(HeapTupleHeader tuple) - convert a
- * HeapTupleHeader to a Datum.
- *
- * Macro declarations:
- * HeapTupleGetDatum(HeapTuple tuple) - convert a HeapTuple to a Datum.
- *
- * Obsolete routines and macros:
- * TupleDesc RelationNameGetTupleDesc(const char *relname) - Use to get a
- * TupleDesc based on a named relation.
- * TupleDesc TypeGetTupleDesc(Oid typeoid, List *colaliases) - Use to get a
- * TupleDesc based on a type OID.
- * TupleGetDatum(TupleTableSlot *slot, HeapTuple tuple) - get a Datum
- * given a tuple and a slot.
- *----------
- */
-
-#define HeapTupleGetDatum(tuple) HeapTupleHeaderGetDatum((tuple)->t_data)
-/* obsolete version of above */
-#define TupleGetDatum(_slot, _tuple) HeapTupleGetDatum(_tuple)
-
-extern TupleDesc RelationNameGetTupleDesc(const char *relname);
-extern TupleDesc TypeGetTupleDesc(Oid typeoid, List *colaliases);
-
-/* from execTuples.c */
-extern TupleDesc BlessTupleDesc(TupleDesc tupdesc);
-extern AttInMetadata *TupleDescGetAttInMetadata(TupleDesc tupdesc);
-extern HeapTuple BuildTupleFromCStrings(AttInMetadata *attinmeta, char **values);
-extern Datum HeapTupleHeaderGetDatum(HeapTupleHeader tuple);
-
-
-/*----------
- * Support for Set Returning Functions (SRFs)
- *
- * The basic API for SRFs using ValuePerCall mode looks something like this:
- *
- * Datum
- * my_Set_Returning_Function(PG_FUNCTION_ARGS)
- * {
- * FuncCallContext *funcctx;
- * Datum result;
- * MemoryContext oldcontext;
- * <user defined declarations>
- *
- * if (SRF_IS_FIRSTCALL())
- * {
- * funcctx = SRF_FIRSTCALL_INIT();
- * // switch context when allocating stuff to be used in later calls
- * oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
- * <user defined code>
- * <if returning composite>
- * <build TupleDesc, and perhaps AttInMetadata>
- * <endif returning composite>
- * <user defined code>
- * // return to original context when allocating transient memory
- * MemoryContextSwitchTo(oldcontext);
- * }
- * <user defined code>
- * funcctx = SRF_PERCALL_SETUP();
- * <user defined code>
- *
- * if (funcctx->call_cntr < funcctx->max_calls)
- * {
- * <user defined code>
- * <obtain result Datum>
- * SRF_RETURN_NEXT(funcctx, result);
- * }
- * else
- * SRF_RETURN_DONE(funcctx);
- * }
- *
- * NOTE: there is no guarantee that a SRF using ValuePerCall mode will be
- * run to completion; for example, a query with LIMIT might stop short of
- * fetching all the rows. Therefore, do not expect that you can do resource
- * cleanup just before SRF_RETURN_DONE(). You need not worry about releasing
- * memory allocated in multi_call_memory_ctx, but holding file descriptors or
- * other non-memory resources open across calls is a bug. SRFs that need
- * such resources should not use these macros, but instead populate a
- * tuplestore during a single call, and return that using SFRM_Materialize
- * mode (see fmgr/README). Alternatively, set up a callback to release
- * resources at query shutdown, using RegisterExprContextCallback().
- *
- *----------
- */
-
-/* from funcapi.c */
-extern FuncCallContext *init_MultiFuncCall(PG_FUNCTION_ARGS);
-extern FuncCallContext *per_MultiFuncCall(PG_FUNCTION_ARGS);
-extern void end_MultiFuncCall(PG_FUNCTION_ARGS, FuncCallContext *funcctx);
-
-#define SRF_IS_FIRSTCALL() (fcinfo->flinfo->fn_extra == NULL)
-
-#define SRF_FIRSTCALL_INIT() init_MultiFuncCall(fcinfo)
-
-#define SRF_PERCALL_SETUP() per_MultiFuncCall(fcinfo)
-
-#define SRF_RETURN_NEXT(_funcctx, _result) \
- do { \
- ReturnSetInfo *rsi; \
- (_funcctx)->call_cntr++; \
- rsi = (ReturnSetInfo *) fcinfo->resultinfo; \
- rsi->isDone = ExprMultipleResult; \
- PG_RETURN_DATUM(_result); \
- } while (0)
-
-#define SRF_RETURN_NEXT_NULL(_funcctx) \
- do { \
- ReturnSetInfo *rsi; \
- (_funcctx)->call_cntr++; \
- rsi = (ReturnSetInfo *) fcinfo->resultinfo; \
- rsi->isDone = ExprMultipleResult; \
- PG_RETURN_NULL(); \
- } while (0)
-
-#define SRF_RETURN_DONE(_funcctx) \
- do { \
- ReturnSetInfo *rsi; \
- end_MultiFuncCall(fcinfo, _funcctx); \
- rsi = (ReturnSetInfo *) fcinfo->resultinfo; \
- rsi->isDone = ExprEndResult; \
- PG_RETURN_NULL(); \
- } while (0)
-
-/*----------
- * Support to ease writing of functions dealing with VARIADIC inputs
- *----------
- *
- * This function extracts a set of argument values, types and NULL markers
- * for a given input function. This returns a set of data:
- * - **values includes the set of Datum values extracted.
- * - **types the data type OID for each element.
- * - **nulls tracks if an element is NULL.
- *
- * variadic_start indicates the argument number where the VARIADIC argument
- * starts.
- * convert_unknown set to true will enforce the conversion of arguments
- * with unknown data type to text.
- *
- * The return result is the number of elements stored, or -1 in the case of
- * "VARIADIC NULL".
- */
-extern int extract_variadic_args(FunctionCallInfo fcinfo, int variadic_start,
- bool convert_unknown, Datum **values,
- Oid **types, bool **nulls);
-
-#endif /* FUNCAPI_H */
diff --git a/contrib/libs/postgresql/src/include/getaddrinfo.h b/contrib/libs/postgresql/src/include/getaddrinfo.h
deleted file mode 100644
index 4cf4c4d4050..00000000000
--- a/contrib/libs/postgresql/src/include/getaddrinfo.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * getaddrinfo.h
- * Support getaddrinfo() on platforms that don't have it.
- *
- * Note: we use our own routines on platforms that don't HAVE_STRUCT_ADDRINFO,
- * whether or not the library routine getaddrinfo() can be found. This
- * policy is needed because on some platforms a manually installed libbind.a
- * may provide getaddrinfo(), yet the system headers may not provide the
- * struct definitions needed to call it. To avoid conflict with the libbind
- * definition in such cases, we rename our routines to pg_xxx() via macros.
- *
- * This code will also work on platforms where struct addrinfo is defined
- * in the system headers but no getaddrinfo() can be located.
- *
- * Copyright (c) 2003-2021, PostgreSQL Global Development Group
- *
- * src/include/getaddrinfo.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef GETADDRINFO_H
-#define GETADDRINFO_H
-
-#include <sys/socket.h>
-#include <netdb.h>
-
-
-/* Various macros that ought to be in <netdb.h>, but might not be */
-
-#ifndef EAI_FAIL
-#ifndef WIN32
-#define EAI_BADFLAGS (-1)
-#define EAI_NONAME (-2)
-#define EAI_AGAIN (-3)
-#define EAI_FAIL (-4)
-#define EAI_FAMILY (-6)
-#define EAI_SOCKTYPE (-7)
-#define EAI_SERVICE (-8)
-#define EAI_MEMORY (-10)
-#define EAI_SYSTEM (-11)
-#else /* WIN32 */
-#ifdef _MSC_VER
-#ifndef WSA_NOT_ENOUGH_MEMORY
-#define WSA_NOT_ENOUGH_MEMORY (WSAENOBUFS)
-#endif
-#define WSATYPE_NOT_FOUND (WSABASEERR+109)
-#endif
-#define EAI_AGAIN WSATRY_AGAIN
-#define EAI_BADFLAGS WSAEINVAL
-#define EAI_FAIL WSANO_RECOVERY
-#define EAI_FAMILY WSAEAFNOSUPPORT
-#define EAI_MEMORY WSA_NOT_ENOUGH_MEMORY
-#define EAI_NODATA WSANO_DATA
-#define EAI_NONAME WSAHOST_NOT_FOUND
-#define EAI_SERVICE WSATYPE_NOT_FOUND
-#define EAI_SOCKTYPE WSAESOCKTNOSUPPORT
-#endif /* !WIN32 */
-#endif /* !EAI_FAIL */
-
-#ifndef AI_PASSIVE
-#define AI_PASSIVE 0x0001
-#endif
-
-#ifndef AI_NUMERICHOST
-/*
- * some platforms don't support AI_NUMERICHOST; define as zero if using
- * the system version of getaddrinfo...
- */
-#if defined(HAVE_STRUCT_ADDRINFO) && defined(HAVE_GETADDRINFO)
-#define AI_NUMERICHOST 0
-#else
-#define AI_NUMERICHOST 0x0004
-#endif
-#endif
-
-#ifndef NI_NUMERICHOST
-#define NI_NUMERICHOST 1
-#endif
-#ifndef NI_NUMERICSERV
-#define NI_NUMERICSERV 2
-#endif
-#ifndef NI_NAMEREQD
-#define NI_NAMEREQD 4
-#endif
-
-#ifndef NI_MAXHOST
-#define NI_MAXHOST 1025
-#endif
-#ifndef NI_MAXSERV
-#define NI_MAXSERV 32
-#endif
-
-
-#ifndef HAVE_STRUCT_ADDRINFO
-
-#ifndef WIN32
-struct addrinfo
-{
- int ai_flags;
- int ai_family;
- int ai_socktype;
- int ai_protocol;
- size_t ai_addrlen;
- struct sockaddr *ai_addr;
- char *ai_canonname;
- struct addrinfo *ai_next;
-};
-#else
-/*
- * The order of the structure elements on Win32 doesn't match the
- * order specified in the standard, but we have to match it for
- * IPv6 to work.
- */
-struct addrinfo
-{
- int ai_flags;
- int ai_family;
- int ai_socktype;
- int ai_protocol;
- size_t ai_addrlen;
- char *ai_canonname;
- struct sockaddr *ai_addr;
- struct addrinfo *ai_next;
-};
-#endif
-#endif /* HAVE_STRUCT_ADDRINFO */
-
-
-#ifndef HAVE_GETADDRINFO
-
-/* Rename private copies per comments above */
-#ifdef getaddrinfo
-#undef getaddrinfo
-#endif
-#define getaddrinfo pg_getaddrinfo
-
-#ifdef freeaddrinfo
-#undef freeaddrinfo
-#endif
-#define freeaddrinfo pg_freeaddrinfo
-
-#ifdef gai_strerror
-#undef gai_strerror
-#endif
-#define gai_strerror pg_gai_strerror
-
-#ifdef getnameinfo
-#undef getnameinfo
-#endif
-#define getnameinfo pg_getnameinfo
-
-extern int getaddrinfo(const char *node, const char *service,
- const struct addrinfo *hints, struct addrinfo **res);
-extern void freeaddrinfo(struct addrinfo *res);
-extern const char *gai_strerror(int errcode);
-extern int getnameinfo(const struct sockaddr *sa, int salen,
- char *node, int nodelen,
- char *service, int servicelen, int flags);
-#endif /* HAVE_GETADDRINFO */
-
-#endif /* GETADDRINFO_H */
diff --git a/contrib/libs/postgresql/src/include/miscadmin.h b/contrib/libs/postgresql/src/include/miscadmin.h
deleted file mode 100644
index 3f155ce4f84..00000000000
--- a/contrib/libs/postgresql/src/include/miscadmin.h
+++ /dev/null
@@ -1,492 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * miscadmin.h
- * This file contains general postgres administration and initialization
- * stuff that used to be spread out between the following files:
- * globals.h global variables
- * pdir.h directory path crud
- * pinit.h postgres initialization
- * pmod.h processing modes
- * Over time, this has also become the preferred place for widely known
- * resource-limitation stuff, such as work_mem and check_stack_depth().
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/miscadmin.h
- *
- * NOTES
- * some of the information in this file should be moved to other files.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef MISCADMIN_H
-#define MISCADMIN_H
-
-#include <signal.h>
-
-#include "datatype/timestamp.h" /* for TimestampTz */
-#include "pgtime.h" /* for pg_time_t */
-
-
-#define InvalidPid (-1)
-
-
-/*****************************************************************************
- * System interrupt and critical section handling
- *
- * There are two types of interrupts that a running backend needs to accept
- * without messing up its state: QueryCancel (SIGINT) and ProcDie (SIGTERM).
- * In both cases, we need to be able to clean up the current transaction
- * gracefully, so we can't respond to the interrupt instantaneously ---
- * there's no guarantee that internal data structures would be self-consistent
- * if the code is interrupted at an arbitrary instant. Instead, the signal
- * handlers set flags that are checked periodically during execution.
- *
- * The CHECK_FOR_INTERRUPTS() macro is called at strategically located spots
- * where it is normally safe to accept a cancel or die interrupt. In some
- * cases, we invoke CHECK_FOR_INTERRUPTS() inside low-level subroutines that
- * might sometimes be called in contexts that do *not* want to allow a cancel
- * or die interrupt. The HOLD_INTERRUPTS() and RESUME_INTERRUPTS() macros
- * allow code to ensure that no cancel or die interrupt will be accepted,
- * even if CHECK_FOR_INTERRUPTS() gets called in a subroutine. The interrupt
- * will be held off until CHECK_FOR_INTERRUPTS() is done outside any
- * HOLD_INTERRUPTS() ... RESUME_INTERRUPTS() section.
- *
- * There is also a mechanism to prevent query cancel interrupts, while still
- * allowing die interrupts: HOLD_CANCEL_INTERRUPTS() and
- * RESUME_CANCEL_INTERRUPTS().
- *
- * Note that ProcessInterrupts() has also acquired a number of tasks that
- * do not necessarily cause a query-cancel-or-die response. Hence, it's
- * possible that it will just clear InterruptPending and return.
- *
- * INTERRUPTS_PENDING_CONDITION() can be checked to see whether an
- * interrupt needs to be serviced, without trying to do so immediately.
- * Some callers are also interested in INTERRUPTS_CAN_BE_PROCESSED(),
- * which tells whether ProcessInterrupts is sure to clear the interrupt.
- *
- * Special mechanisms are used to let an interrupt be accepted when we are
- * waiting for a lock or when we are waiting for command input (but, of
- * course, only if the interrupt holdoff counter is zero). See the
- * related code for details.
- *
- * A lost connection is handled similarly, although the loss of connection
- * does not raise a signal, but is detected when we fail to write to the
- * socket. If there was a signal for a broken connection, we could make use of
- * it by setting ClientConnectionLost in the signal handler.
- *
- * A related, but conceptually distinct, mechanism is the "critical section"
- * mechanism. A critical section not only holds off cancel/die interrupts,
- * but causes any ereport(ERROR) or ereport(FATAL) to become ereport(PANIC)
- * --- that is, a system-wide reset is forced. Needless to say, only really
- * *critical* code should be marked as a critical section! Currently, this
- * mechanism is only used for XLOG-related code.
- *
- *****************************************************************************/
-
-/* in globals.c */
-/* these are marked volatile because they are set by signal handlers: */
-extern PGDLLIMPORT volatile sig_atomic_t InterruptPending;
-extern PGDLLIMPORT volatile sig_atomic_t QueryCancelPending;
-extern PGDLLIMPORT volatile sig_atomic_t ProcDiePending;
-extern PGDLLIMPORT volatile sig_atomic_t IdleInTransactionSessionTimeoutPending;
-extern PGDLLIMPORT volatile sig_atomic_t IdleSessionTimeoutPending;
-extern PGDLLIMPORT volatile sig_atomic_t ProcSignalBarrierPending;
-extern PGDLLIMPORT volatile sig_atomic_t LogMemoryContextPending;
-
-extern PGDLLIMPORT volatile sig_atomic_t CheckClientConnectionPending;
-extern PGDLLIMPORT volatile sig_atomic_t ClientConnectionLost;
-
-/* these are marked volatile because they are examined by signal handlers: */
-extern PGDLLIMPORT volatile uint32 InterruptHoldoffCount;
-extern PGDLLIMPORT volatile uint32 QueryCancelHoldoffCount;
-extern PGDLLIMPORT volatile uint32 CritSectionCount;
-
-/* in tcop/postgres.c */
-extern void ProcessInterrupts(void);
-
-/* Test whether an interrupt is pending */
-#ifndef WIN32
-#define INTERRUPTS_PENDING_CONDITION() \
- (unlikely(InterruptPending))
-#else
-#define INTERRUPTS_PENDING_CONDITION() \
- (unlikely(UNBLOCKED_SIGNAL_QUEUE()) ? pgwin32_dispatch_queued_signals() : 0, \
- unlikely(InterruptPending))
-#endif
-
-/* Service interrupt, if one is pending and it's safe to service it now */
-#define CHECK_FOR_INTERRUPTS() \
-do { \
- if (INTERRUPTS_PENDING_CONDITION()) \
- ProcessInterrupts(); \
-} while(0)
-
-/* Is ProcessInterrupts() guaranteed to clear InterruptPending? */
-#define INTERRUPTS_CAN_BE_PROCESSED() \
- (InterruptHoldoffCount == 0 && CritSectionCount == 0 && \
- QueryCancelHoldoffCount == 0)
-
-#define HOLD_INTERRUPTS() (InterruptHoldoffCount++)
-
-#define RESUME_INTERRUPTS() \
-do { \
- Assert(InterruptHoldoffCount > 0); \
- InterruptHoldoffCount--; \
-} while(0)
-
-#define HOLD_CANCEL_INTERRUPTS() (QueryCancelHoldoffCount++)
-
-#define RESUME_CANCEL_INTERRUPTS() \
-do { \
- Assert(QueryCancelHoldoffCount > 0); \
- QueryCancelHoldoffCount--; \
-} while(0)
-
-#define START_CRIT_SECTION() (CritSectionCount++)
-
-#define END_CRIT_SECTION() \
-do { \
- Assert(CritSectionCount > 0); \
- CritSectionCount--; \
-} while(0)
-
-
-/*****************************************************************************
- * globals.h -- *
- *****************************************************************************/
-
-/*
- * from utils/init/globals.c
- */
-extern PGDLLIMPORT pid_t PostmasterPid;
-extern PGDLLIMPORT bool IsPostmasterEnvironment;
-extern PGDLLIMPORT bool IsUnderPostmaster;
-extern PGDLLIMPORT bool IsBackgroundWorker;
-extern PGDLLIMPORT bool IsBinaryUpgrade;
-
-extern PGDLLIMPORT bool ExitOnAnyError;
-
-extern PGDLLIMPORT char *DataDir;
-extern PGDLLIMPORT int data_directory_mode;
-
-extern PGDLLIMPORT int NBuffers;
-extern PGDLLIMPORT int MaxBackends;
-extern PGDLLIMPORT int MaxConnections;
-extern PGDLLIMPORT int max_worker_processes;
-extern PGDLLIMPORT int max_parallel_workers;
-
-extern PGDLLIMPORT int MyProcPid;
-extern PGDLLIMPORT pg_time_t MyStartTime;
-extern PGDLLIMPORT TimestampTz MyStartTimestamp;
-extern PGDLLIMPORT struct Port *MyProcPort;
-extern PGDLLIMPORT struct Latch *MyLatch;
-extern int32 MyCancelKey;
-extern int MyPMChildSlot;
-
-extern char OutputFileName[];
-extern PGDLLIMPORT char my_exec_path[];
-extern char pkglib_path[];
-
-#ifdef EXEC_BACKEND
-extern char postgres_exec_path[];
-#endif
-
-/*
- * done in storage/backendid.h for now.
- *
- * extern BackendId MyBackendId;
- */
-extern PGDLLIMPORT Oid MyDatabaseId;
-
-extern PGDLLIMPORT Oid MyDatabaseTableSpace;
-
-/*
- * Date/Time Configuration
- *
- * DateStyle defines the output formatting choice for date/time types:
- * USE_POSTGRES_DATES specifies traditional Postgres format
- * USE_ISO_DATES specifies ISO-compliant format
- * USE_SQL_DATES specifies Oracle/Ingres-compliant format
- * USE_GERMAN_DATES specifies German-style dd.mm/yyyy
- *
- * DateOrder defines the field order to be assumed when reading an
- * ambiguous date (anything not in YYYY-MM-DD format, with a four-digit
- * year field first, is taken to be ambiguous):
- * DATEORDER_YMD specifies field order yy-mm-dd
- * DATEORDER_DMY specifies field order dd-mm-yy ("European" convention)
- * DATEORDER_MDY specifies field order mm-dd-yy ("US" convention)
- *
- * In the Postgres and SQL DateStyles, DateOrder also selects output field
- * order: day comes before month in DMY style, else month comes before day.
- *
- * The user-visible "DateStyle" run-time parameter subsumes both of these.
- */
-
-/* valid DateStyle values */
-#define USE_POSTGRES_DATES 0
-#define USE_ISO_DATES 1
-#define USE_SQL_DATES 2
-#define USE_GERMAN_DATES 3
-#define USE_XSD_DATES 4
-
-/* valid DateOrder values */
-#define DATEORDER_YMD 0
-#define DATEORDER_DMY 1
-#define DATEORDER_MDY 2
-
-extern PGDLLIMPORT int DateStyle;
-extern PGDLLIMPORT int DateOrder;
-
-/*
- * IntervalStyles
- * INTSTYLE_POSTGRES Like Postgres < 8.4 when DateStyle = 'iso'
- * INTSTYLE_POSTGRES_VERBOSE Like Postgres < 8.4 when DateStyle != 'iso'
- * INTSTYLE_SQL_STANDARD SQL standard interval literals
- * INTSTYLE_ISO_8601 ISO-8601-basic formatted intervals
- */
-#define INTSTYLE_POSTGRES 0
-#define INTSTYLE_POSTGRES_VERBOSE 1
-#define INTSTYLE_SQL_STANDARD 2
-#define INTSTYLE_ISO_8601 3
-
-extern PGDLLIMPORT int IntervalStyle;
-
-#define MAXTZLEN 10 /* max TZ name len, not counting tr. null */
-
-extern bool enableFsync;
-extern PGDLLIMPORT bool allowSystemTableMods;
-extern PGDLLIMPORT int work_mem;
-extern PGDLLIMPORT double hash_mem_multiplier;
-extern PGDLLIMPORT int maintenance_work_mem;
-extern PGDLLIMPORT int max_parallel_maintenance_workers;
-
-extern int VacuumCostPageHit;
-extern int VacuumCostPageMiss;
-extern int VacuumCostPageDirty;
-extern int VacuumCostLimit;
-extern double VacuumCostDelay;
-
-extern int64 VacuumPageHit;
-extern int64 VacuumPageMiss;
-extern int64 VacuumPageDirty;
-
-extern int VacuumCostBalance;
-extern bool VacuumCostActive;
-
-
-/* in tcop/postgres.c */
-
-#if defined(__ia64__) || defined(__ia64)
-typedef struct
-{
- char *stack_base_ptr;
- char *register_stack_base_ptr;
-} pg_stack_base_t;
-#else
-typedef char *pg_stack_base_t;
-#endif
-
-extern pg_stack_base_t set_stack_base(void);
-extern void restore_stack_base(pg_stack_base_t base);
-extern void check_stack_depth(void);
-extern bool stack_is_too_deep(void);
-
-/* in tcop/utility.c */
-extern void PreventCommandIfReadOnly(const char *cmdname);
-extern void PreventCommandIfParallelMode(const char *cmdname);
-extern void PreventCommandDuringRecovery(const char *cmdname);
-
-/* in utils/misc/guc.c */
-extern int trace_recovery_messages;
-extern int trace_recovery(int trace_level);
-
-/*****************************************************************************
- * pdir.h -- *
- * POSTGRES directory path definitions. *
- *****************************************************************************/
-
-/* flags to be OR'd to form sec_context */
-#define SECURITY_LOCAL_USERID_CHANGE 0x0001
-#define SECURITY_RESTRICTED_OPERATION 0x0002
-#define SECURITY_NOFORCE_RLS 0x0004
-
-extern char *DatabasePath;
-
-/* now in utils/init/miscinit.c */
-extern void InitPostmasterChild(void);
-extern void InitStandaloneProcess(const char *argv0);
-extern void SwitchToSharedLatch(void);
-extern void SwitchBackToLocalLatch(void);
-
-typedef enum BackendType
-{
- B_INVALID = 0,
- B_AUTOVAC_LAUNCHER,
- B_AUTOVAC_WORKER,
- B_BACKEND,
- B_BG_WORKER,
- B_BG_WRITER,
- B_CHECKPOINTER,
- B_STARTUP,
- B_WAL_RECEIVER,
- B_WAL_SENDER,
- B_WAL_WRITER,
- B_ARCHIVER,
- B_STATS_COLLECTOR,
- B_LOGGER,
-} BackendType;
-
-extern BackendType MyBackendType;
-
-extern const char *GetBackendTypeDesc(BackendType backendType);
-
-extern void SetDatabasePath(const char *path);
-extern void checkDataDir(void);
-extern void SetDataDir(const char *dir);
-extern void ChangeToDataDir(void);
-
-extern char *GetUserNameFromId(Oid roleid, bool noerr);
-extern Oid GetUserId(void);
-extern Oid GetOuterUserId(void);
-extern Oid GetSessionUserId(void);
-extern Oid GetAuthenticatedUserId(void);
-extern void GetUserIdAndSecContext(Oid *userid, int *sec_context);
-extern void SetUserIdAndSecContext(Oid userid, int sec_context);
-extern bool InLocalUserIdChange(void);
-extern bool InSecurityRestrictedOperation(void);
-extern bool InNoForceRLSOperation(void);
-extern void GetUserIdAndContext(Oid *userid, bool *sec_def_context);
-extern void SetUserIdAndContext(Oid userid, bool sec_def_context);
-extern void InitializeSessionUserId(const char *rolename, Oid useroid);
-extern void InitializeSessionUserIdStandalone(void);
-extern void SetSessionAuthorization(Oid userid, bool is_superuser);
-extern Oid GetCurrentRoleId(void);
-extern void SetCurrentRoleId(Oid roleid, bool is_superuser);
-
-/* in utils/misc/superuser.c */
-extern bool superuser(void); /* current user is superuser */
-extern bool superuser_arg(Oid roleid); /* given user is superuser */
-
-
-/*****************************************************************************
- * pmod.h -- *
- * POSTGRES processing mode definitions. *
- *****************************************************************************/
-
-/*
- * Description:
- * There are three processing modes in POSTGRES. They are
- * BootstrapProcessing or "bootstrap," InitProcessing or
- * "initialization," and NormalProcessing or "normal."
- *
- * The first two processing modes are used during special times. When the
- * system state indicates bootstrap processing, transactions are all given
- * transaction id "one" and are consequently guaranteed to commit. This mode
- * is used during the initial generation of template databases.
- *
- * Initialization mode: used while starting a backend, until all normal
- * initialization is complete. Some code behaves differently when executed
- * in this mode to enable system bootstrapping.
- *
- * If a POSTGRES backend process is in normal mode, then all code may be
- * executed normally.
- */
-
-typedef enum ProcessingMode
-{
- BootstrapProcessing, /* bootstrap creation of template database */
- InitProcessing, /* initializing system */
- NormalProcessing /* normal processing */
-} ProcessingMode;
-
-extern ProcessingMode Mode;
-
-#define IsBootstrapProcessingMode() (Mode == BootstrapProcessing)
-#define IsInitProcessingMode() (Mode == InitProcessing)
-#define IsNormalProcessingMode() (Mode == NormalProcessing)
-
-#define GetProcessingMode() Mode
-
-#define SetProcessingMode(mode) \
- do { \
- AssertArg((mode) == BootstrapProcessing || \
- (mode) == InitProcessing || \
- (mode) == NormalProcessing); \
- Mode = (mode); \
- } while(0)
-
-
-/*
- * Auxiliary-process type identifiers. These used to be in bootstrap.h
- * but it seems saner to have them here, with the ProcessingMode stuff.
- * The MyAuxProcType global is defined and set in bootstrap.c.
- */
-
-typedef enum
-{
- NotAnAuxProcess = -1,
- CheckerProcess = 0,
- BootstrapProcess,
- StartupProcess,
- BgWriterProcess,
- ArchiverProcess,
- CheckpointerProcess,
- WalWriterProcess,
- WalReceiverProcess,
-
- NUM_AUXPROCTYPES /* Must be last! */
-} AuxProcType;
-
-extern AuxProcType MyAuxProcType;
-
-#define AmBootstrapProcess() (MyAuxProcType == BootstrapProcess)
-#define AmStartupProcess() (MyAuxProcType == StartupProcess)
-#define AmBackgroundWriterProcess() (MyAuxProcType == BgWriterProcess)
-#define AmArchiverProcess() (MyAuxProcType == ArchiverProcess)
-#define AmCheckpointerProcess() (MyAuxProcType == CheckpointerProcess)
-#define AmWalWriterProcess() (MyAuxProcType == WalWriterProcess)
-#define AmWalReceiverProcess() (MyAuxProcType == WalReceiverProcess)
-
-
-/*****************************************************************************
- * pinit.h -- *
- * POSTGRES initialization and cleanup definitions. *
- *****************************************************************************/
-
-/* in utils/init/postinit.c */
-extern void pg_split_opts(char **argv, int *argcp, const char *optstr);
-extern void InitializeMaxBackends(void);
-extern void InitPostgres(const char *in_dbname, Oid dboid, const char *username,
- Oid useroid, char *out_dbname, bool override_allow_connections);
-extern void BaseInit(void);
-
-/* in utils/init/miscinit.c */
-extern bool IgnoreSystemIndexes;
-extern PGDLLIMPORT bool process_shared_preload_libraries_in_progress;
-extern char *session_preload_libraries_string;
-extern char *shared_preload_libraries_string;
-extern char *local_preload_libraries_string;
-
-extern void CreateDataDirLockFile(bool amPostmaster);
-extern void CreateSocketLockFile(const char *socketfile, bool amPostmaster,
- const char *socketDir);
-extern void TouchSocketLockFiles(void);
-extern void AddToDataDirLockFile(int target_line, const char *str);
-extern bool RecheckDataDirLockFile(void);
-extern void ValidatePgVersion(const char *path);
-extern void process_shared_preload_libraries(void);
-extern void process_session_preload_libraries(void);
-extern void pg_bindtextdomain(const char *domain);
-extern bool has_rolreplication(Oid roleid);
-
-/* in access/transam/xlog.c */
-extern bool BackupInProgress(void);
-extern void CancelBackup(void);
-
-/* in executor/nodeHash.c */
-extern size_t get_hash_memory_limit(void);
-extern int get_hash_mem(void);
-
-#endif /* MISCADMIN_H */
diff --git a/contrib/libs/postgresql/src/include/pg_config-linux.h b/contrib/libs/postgresql/src/include/pg_config-linux.h
deleted file mode 100644
index 6bee7adee8f..00000000000
--- a/contrib/libs/postgresql/src/include/pg_config-linux.h
+++ /dev/null
@@ -1,1020 +0,0 @@
-/* src/include/pg_config.h. Generated from pg_config.h.in by configure. */
-/* src/include/pg_config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to the type of arg 1 of 'accept' */
-#define ACCEPT_TYPE_ARG1 int
-
-/* Define to the type of arg 2 of 'accept' */
-#define ACCEPT_TYPE_ARG2 struct sockaddr *
-
-/* Define to the type of arg 3 of 'accept' */
-#define ACCEPT_TYPE_ARG3 socklen_t
-
-/* Define to the return type of 'accept' */
-#define ACCEPT_TYPE_RETURN int
-
-/* Define if building universal (internal helper macro) */
-/* #undef AC_APPLE_UNIVERSAL_BUILD */
-
-/* The normal alignment of `double', in bytes. */
-#define ALIGNOF_DOUBLE 8
-
-/* The normal alignment of `int', in bytes. */
-#define ALIGNOF_INT 4
-
-/* The normal alignment of `long', in bytes. */
-#define ALIGNOF_LONG 8
-
-/* The normal alignment of `long long int', in bytes. */
-/* #undef ALIGNOF_LONG_LONG_INT */
-
-/* The normal alignment of `PG_INT128_TYPE', in bytes. */
-#define ALIGNOF_PG_INT128_TYPE 16
-
-/* The normal alignment of `short', in bytes. */
-#define ALIGNOF_SHORT 2
-
-/* Size of a disk block --- this also limits the size of a tuple. You can set
- it bigger if you need bigger tuples (although TOAST should reduce the need
- to have large tuples, since fields can be spread across multiple tuples).
- BLCKSZ must be a power of 2. The maximum possible value of BLCKSZ is
- currently 2^15 (32768). This is determined by the 15-bit widths of the
- lp_off and lp_len fields in ItemIdData (see include/storage/itemid.h).
- Changing BLCKSZ requires an initdb. */
-#define BLCKSZ 8192
-
-/* Saved arguments from configure */
-#define CONFIGURE_ARGS " '--prefix=/var/empty/postgresql-14.4' '--with-openssl' '--with-libxml' '--sysconfdir=/etc' '--libdir=$(lib)/lib' '--with-system-tzdata=/var/empty/tzdata-2022a/share/zoneinfo' '--enable-debug' '--with-systemd' '--with-ossp-uuid' '--with-icu' '--with-lz4' '--with-gssapi' '--without-gssapi' '--without-systemd' 'CC=cc' 'CXX=g++' 'PKG_CONFIG=pkg-config' 'PKG_CONFIG_PATH=/var/empty/zlib-1.2.12-dev/lib/pkgconfig:/var/empty/ncurses-6.3-dev/lib/pkgconfig:/var/empty/openssl-1.1.1o-dev/lib/pkgconfig:/var/empty/libxml2-2.9.14-dev/lib/pkgconfig:/var/empty/icu4c-71.1-dev/lib/pkgconfig:/var/empty/lz4-1.9.3-dev/lib/pkgconfig:/var/empty/systemd-250.4-dev/lib/pkgconfig:/var/empty/systemd-250.4-dev/share/pkgconfig:/var/empty/libkrb5-1.19.3-dev/lib/pkgconfig:/var/empty/libossp-uuid-1.6.2/lib/pkgconfig'"
-
-/* Define to the default TCP port number on which the server listens and to
- which clients will try to connect. This can be overridden at run-time, but
- it's convenient if your clients have the right default compiled in.
- (--with-pgport=PORTNUM) */
-#define DEF_PGPORT 5432
-
-/* Define to the default TCP port number as a string constant. */
-#define DEF_PGPORT_STR "5432"
-
-/* Define to build with GSSAPI support. (--with-gssapi) */
-/* #undef ENABLE_GSS */
-
-/* Define to 1 if you want National Language Support. (--enable-nls) */
-/* #undef ENABLE_NLS */
-
-/* Define to 1 to build client libraries as thread-safe code.
- (--enable-thread-safety) */
-#define ENABLE_THREAD_SAFETY 1
-
-/* Define to 1 if gettimeofday() takes only 1 argument. */
-/* #undef GETTIMEOFDAY_1ARG */
-
-#ifdef GETTIMEOFDAY_1ARG
-# define gettimeofday(a,b) gettimeofday(a)
-#endif
-
-/* Define to 1 if you have the `append_history' function. */
-#define HAVE_APPEND_HISTORY 1
-
-/* Define to 1 if you have the `ASN1_STRING_get0_data' function. */
-#define HAVE_ASN1_STRING_GET0_DATA 1
-
-/* Define to 1 if you want to use atomics if available. */
-#define HAVE_ATOMICS 1
-
-/* Define to 1 if you have the <atomic.h> header file. */
-/* #undef HAVE_ATOMIC_H */
-
-/* Define to 1 if you have the `backtrace_symbols' function. */
-#define HAVE_BACKTRACE_SYMBOLS 1
-
-/* Define to 1 if you have the `BIO_get_data' function. */
-#define HAVE_BIO_GET_DATA 1
-
-/* Define to 1 if you have the `BIO_meth_new' function. */
-#define HAVE_BIO_METH_NEW 1
-
-/* Define to 1 if you have the `clock_gettime' function. */
-#define HAVE_CLOCK_GETTIME 1
-
-/* Define to 1 if your compiler handles computed gotos. */
-#define HAVE_COMPUTED_GOTO 1
-
-/* Define to 1 if you have the `copyfile' function. */
-/* #undef HAVE_COPYFILE */
-
-/* Define to 1 if you have the <copyfile.h> header file. */
-/* #undef HAVE_COPYFILE_H */
-
-/* Define to 1 if you have the <crtdefs.h> header file. */
-/* #undef HAVE_CRTDEFS_H */
-
-/* Define to 1 if you have the `CRYPTO_lock' function. */
-/* #undef HAVE_CRYPTO_LOCK */
-
-/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you
- don't. */
-#define HAVE_DECL_FDATASYNC 1
-
-/* Define to 1 if you have the declaration of `F_FULLFSYNC', and to 0 if you
- don't. */
-#define HAVE_DECL_F_FULLFSYNC 0
-
-/* Define to 1 if you have the declaration of
- `LLVMCreateGDBRegistrationListener', and to 0 if you don't. */
-/* #undef HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER */
-
-/* Define to 1 if you have the declaration of
- `LLVMCreatePerfJITEventListener', and to 0 if you don't. */
-/* #undef HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER */
-
-/* Define to 1 if you have the declaration of `LLVMGetHostCPUFeatures', and to
- 0 if you don't. */
-/* #undef HAVE_DECL_LLVMGETHOSTCPUFEATURES */
-
-/* Define to 1 if you have the declaration of `LLVMGetHostCPUName', and to 0
- if you don't. */
-/* #undef HAVE_DECL_LLVMGETHOSTCPUNAME */
-
-/* Define to 1 if you have the declaration of `LLVMOrcGetSymbolAddressIn', and
- to 0 if you don't. */
-/* #undef HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN */
-
-/* Define to 1 if you have the declaration of `posix_fadvise', and to 0 if you
- don't. */
-#define HAVE_DECL_POSIX_FADVISE 1
-
-/* Define to 1 if you have the declaration of `preadv', and to 0 if you don't.
- */
-#define HAVE_DECL_PREADV 1
-
-/* Define to 1 if you have the declaration of `pwritev', and to 0 if you
- don't. */
-#define HAVE_DECL_PWRITEV 1
-
-/* Define to 1 if you have the declaration of `RTLD_GLOBAL', and to 0 if you
- don't. */
-#define HAVE_DECL_RTLD_GLOBAL 1
-
-/* Define to 1 if you have the declaration of `RTLD_NOW', and to 0 if you
- don't. */
-#define HAVE_DECL_RTLD_NOW 1
-
-/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
- don't. */
-#define HAVE_DECL_STRLCAT 0
-
-/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
- don't. */
-#define HAVE_DECL_STRLCPY 0
-
-/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
- don't. */
-#define HAVE_DECL_STRNLEN 1
-
-/* Define to 1 if you have the declaration of `strtoll', and to 0 if you
- don't. */
-#define HAVE_DECL_STRTOLL 1
-
-/* Define to 1 if you have the declaration of `strtoull', and to 0 if you
- don't. */
-#define HAVE_DECL_STRTOULL 1
-
-/* Define to 1 if you have the `dlopen' function. */
-#define HAVE_DLOPEN 1
-
-/* Define to 1 if you have the <editline/history.h> header file. */
-/* #undef HAVE_EDITLINE_HISTORY_H */
-
-/* Define to 1 if you have the <editline/readline.h> header file. */
-/* #undef HAVE_EDITLINE_READLINE_H */
-
-/* Define to 1 if you have the <execinfo.h> header file. */
-#define HAVE_EXECINFO_H 1
-
-/* Define to 1 if you have the `explicit_bzero' function. */
-#define HAVE_EXPLICIT_BZERO 1
-
-/* Define to 1 if you have the `fdatasync' function. */
-#define HAVE_FDATASYNC 1
-
-/* Define to 1 if you have the `fls' function. */
-/* #undef HAVE_FLS */
-
-/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
-#define HAVE_FSEEKO 1
-
-/* Define to 1 if your compiler understands __func__. */
-#define HAVE_FUNCNAME__FUNC 1
-
-/* Define to 1 if your compiler understands __FUNCTION__. */
-/* #undef HAVE_FUNCNAME__FUNCTION */
-
-/* Define to 1 if you have __atomic_compare_exchange_n(int *, int *, int). */
-#define HAVE_GCC__ATOMIC_INT32_CAS 1
-
-/* Define to 1 if you have __atomic_compare_exchange_n(int64 *, int64 *,
- int64). */
-#define HAVE_GCC__ATOMIC_INT64_CAS 1
-
-/* Define to 1 if you have __sync_lock_test_and_set(char *) and friends. */
-#define HAVE_GCC__SYNC_CHAR_TAS 1
-
-/* Define to 1 if you have __sync_val_compare_and_swap(int *, int, int). */
-#define HAVE_GCC__SYNC_INT32_CAS 1
-
-/* Define to 1 if you have __sync_lock_test_and_set(int *) and friends. */
-#define HAVE_GCC__SYNC_INT32_TAS 1
-
-/* Define to 1 if you have __sync_val_compare_and_swap(int64 *, int64, int64).
- */
-#define HAVE_GCC__SYNC_INT64_CAS 1
-
-/* Define to 1 if you have the `getaddrinfo' function. */
-#define HAVE_GETADDRINFO 1
-
-/* Define to 1 if you have the `gethostbyname_r' function. */
-#define HAVE_GETHOSTBYNAME_R 1
-
-/* Define to 1 if you have the `getifaddrs' function. */
-#define HAVE_GETIFADDRS 1
-
-/* Define to 1 if you have the `getopt' function. */
-#define HAVE_GETOPT 1
-
-/* Define to 1 if you have the <getopt.h> header file. */
-#define HAVE_GETOPT_H 1
-
-/* Define to 1 if you have the `getopt_long' function. */
-#define HAVE_GETOPT_LONG 1
-
-/* Define to 1 if you have the `getpeereid' function. */
-/* #undef HAVE_GETPEEREID */
-
-/* Define to 1 if you have the `getpeerucred' function. */
-/* #undef HAVE_GETPEERUCRED */
-
-/* Define to 1 if you have the `getpwuid_r' function. */
-#define HAVE_GETPWUID_R 1
-
-/* Define to 1 if you have the `getrlimit' function. */
-#define HAVE_GETRLIMIT 1
-
-/* Define to 1 if you have the `getrusage' function. */
-#define HAVE_GETRUSAGE 1
-
-/* Define to 1 if you have the `gettimeofday' function. */
-/* #undef HAVE_GETTIMEOFDAY */
-
-/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
-/* #undef HAVE_GSSAPI_GSSAPI_H */
-
-/* Define to 1 if you have the <gssapi.h> header file. */
-/* #undef HAVE_GSSAPI_H */
-
-/* Define to 1 if you have the <history.h> header file. */
-/* #undef HAVE_HISTORY_H */
-
-/* Define to 1 if you have the `history_truncate_file' function. */
-#define HAVE_HISTORY_TRUNCATE_FILE 1
-
-/* Define to 1 if you have the `HMAC_CTX_free' function. */
-#define HAVE_HMAC_CTX_FREE 1
-
-/* Define to 1 if you have the `HMAC_CTX_new' function. */
-#define HAVE_HMAC_CTX_NEW 1
-
-/* Define to 1 if you have the <ifaddrs.h> header file. */
-#define HAVE_IFADDRS_H 1
-
-/* Define to 1 if you have the `inet_aton' function. */
-#define HAVE_INET_ATON 1
-
-/* Define to 1 if the system has the type `int64'. */
-/* #undef HAVE_INT64 */
-
-/* Define to 1 if the system has the type `int8'. */
-/* #undef HAVE_INT8 */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the global variable 'int opterr'. */
-#define HAVE_INT_OPTERR 1
-
-/* Define to 1 if you have the global variable 'int optreset'. */
-/* #undef HAVE_INT_OPTRESET */
-
-/* Define to 1 if you have the global variable 'int timezone'. */
-#define HAVE_INT_TIMEZONE 1
-
-/* Define to 1 if you have support for IPv6. */
-#define HAVE_IPV6 1
-
-/* Define to 1 if __builtin_constant_p(x) implies "i"(x) acceptance. */
-/* #undef HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P */
-
-/* Define to 1 if you have the `kqueue' function. */
-/* #undef HAVE_KQUEUE */
-
-/* Define to 1 if you have the <langinfo.h> header file. */
-#define HAVE_LANGINFO_H 1
-
-/* Define to 1 if you have the <ldap.h> header file. */
-/* #undef HAVE_LDAP_H */
-
-/* Define to 1 if you have the `ldap_initialize' function. */
-/* #undef HAVE_LDAP_INITIALIZE */
-
-/* Define to 1 if you have the `crypto' library (-lcrypto). */
-#define HAVE_LIBCRYPTO 1
-
-/* Define to 1 if you have the `ldap' library (-lldap). */
-/* #undef HAVE_LIBLDAP */
-
-/* Define to 1 if you have the `lz4' library (-llz4). */
-#define HAVE_LIBLZ4 1
-
-/* Define to 1 if you have the `m' library (-lm). */
-#define HAVE_LIBM 1
-
-/* Define to 1 if you have the `pam' library (-lpam). */
-/* #undef HAVE_LIBPAM */
-
-/* Define if you have a function readline library */
-#define HAVE_LIBREADLINE 1
-
-/* Define to 1 if you have the `selinux' library (-lselinux). */
-/* #undef HAVE_LIBSELINUX */
-
-/* Define to 1 if you have the `ssl' library (-lssl). */
-#define HAVE_LIBSSL 1
-
-/* Define to 1 if you have the `wldap32' library (-lwldap32). */
-/* #undef HAVE_LIBWLDAP32 */
-
-/* Define to 1 if you have the `xml2' library (-lxml2). */
-#define HAVE_LIBXML2 1
-
-/* Define to 1 if you have the `xslt' library (-lxslt). */
-/* #undef HAVE_LIBXSLT */
-
-/* Define to 1 if you have the `z' library (-lz). */
-#define HAVE_LIBZ 1
-
-/* Define to 1 if you have the `link' function. */
-#define HAVE_LINK 1
-
-/* Define to 1 if the system has the type `locale_t'. */
-#define HAVE_LOCALE_T 1
-
-/* Define to 1 if `long int' works and is 64 bits. */
-#define HAVE_LONG_INT_64 1
-
-/* Define to 1 if `long long int' works and is 64 bits. */
-/* #undef HAVE_LONG_LONG_INT_64 */
-
-/* Define to 1 if you have the <lz4.h> header file. */
-#define HAVE_LZ4_H 1
-
-/* Define to 1 if you have the <mbarrier.h> header file. */
-/* #undef HAVE_MBARRIER_H */
-
-/* Define to 1 if you have the `mbstowcs_l' function. */
-/* #undef HAVE_MBSTOWCS_L */
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the `memset_s' function. */
-/* #undef HAVE_MEMSET_S */
-
-/* Define to 1 if the system has the type `MINIDUMP_TYPE'. */
-/* #undef HAVE_MINIDUMP_TYPE */
-
-/* Define to 1 if you have the `mkdtemp' function. */
-#define HAVE_MKDTEMP 1
-
-/* Define to 1 if you have the <netinet/tcp.h> header file. */
-#define HAVE_NETINET_TCP_H 1
-
-/* Define to 1 if you have the <net/if.h> header file. */
-#define HAVE_NET_IF_H 1
-
-/* Define to 1 if you have the `OPENSSL_init_ssl' function. */
-#define HAVE_OPENSSL_INIT_SSL 1
-
-/* Define to 1 if you have the <ossp/uuid.h> header file. */
-/* #undef HAVE_OSSP_UUID_H */
-
-/* Define to 1 if you have the <pam/pam_appl.h> header file. */
-/* #undef HAVE_PAM_PAM_APPL_H */
-
-/* Define to 1 if you have the `poll' function. */
-#define HAVE_POLL 1
-
-/* Define to 1 if you have the <poll.h> header file. */
-#define HAVE_POLL_H 1
-
-/* Define to 1 if you have the `posix_fadvise' function. */
-#define HAVE_POSIX_FADVISE 1
-
-/* Define to 1 if you have the `posix_fallocate' function. */
-#define HAVE_POSIX_FALLOCATE 1
-
-/* Define to 1 if the assembler supports PPC's LWARX mutex hint bit. */
-/* #undef HAVE_PPC_LWARX_MUTEX_HINT */
-
-/* Define to 1 if you have the `ppoll' function. */
-#define HAVE_PPOLL 1
-
-/* Define to 1 if you have the `pread' function. */
-#define HAVE_PREAD 1
-
-/* Define to 1 if you have the `pstat' function. */
-/* #undef HAVE_PSTAT */
-
-/* Define to 1 if the PS_STRINGS thing exists. */
-/* #undef HAVE_PS_STRINGS */
-
-/* Define if you have POSIX threads libraries and header files. */
-#define HAVE_PTHREAD 1
-
-/* Define to 1 if you have the `pthread_barrier_wait' function. */
-#define HAVE_PTHREAD_BARRIER_WAIT 1
-
-/* Define to 1 if you have the `pthread_is_threaded_np' function. */
-/* #undef HAVE_PTHREAD_IS_THREADED_NP */
-
-/* Have PTHREAD_PRIO_INHERIT. */
-#define HAVE_PTHREAD_PRIO_INHERIT 1
-
-/* Define to 1 if you have the `pwrite' function. */
-#define HAVE_PWRITE 1
-
-/* Define to 1 if you have the `random' function. */
-#define HAVE_RANDOM 1
-
-/* Define to 1 if you have the <readline.h> header file. */
-/* #undef HAVE_READLINE_H */
-
-/* Define to 1 if you have the <readline/history.h> header file. */
-#define HAVE_READLINE_HISTORY_H 1
-
-/* Define to 1 if you have the <readline/readline.h> header file. */
-#define HAVE_READLINE_READLINE_H 1
-
-/* Define to 1 if you have the `readlink' function. */
-#define HAVE_READLINK 1
-
-/* Define to 1 if you have the `readv' function. */
-#define HAVE_READV 1
-
-/* Define to 1 if you have the global variable
- 'rl_completion_append_character'. */
-#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
-
-/* Define to 1 if you have the `rl_completion_matches' function. */
-#define HAVE_RL_COMPLETION_MATCHES 1
-
-/* Define to 1 if you have the global variable 'rl_completion_suppress_quote'.
- */
-#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1
-
-/* Define to 1 if you have the `rl_filename_completion_function' function. */
-#define HAVE_RL_FILENAME_COMPLETION_FUNCTION 1
-
-/* Define to 1 if you have the global variable 'rl_filename_quote_characters'.
- */
-#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1
-
-/* Define to 1 if you have the global variable 'rl_filename_quoting_function'.
- */
-#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1
-
-/* Define to 1 if you have the `rl_reset_screen_size' function. */
-#define HAVE_RL_RESET_SCREEN_SIZE 1
-
-/* Define to 1 if you have the <security/pam_appl.h> header file. */
-/* #undef HAVE_SECURITY_PAM_APPL_H */
-
-/* Define to 1 if you have the `setenv' function. */
-#define HAVE_SETENV 1
-
-/* Define to 1 if you have the `setproctitle' function. */
-/* #undef HAVE_SETPROCTITLE */
-
-/* Define to 1 if you have the `setproctitle_fast' function. */
-/* #undef HAVE_SETPROCTITLE_FAST */
-
-/* Define to 1 if you have the `setsid' function. */
-#define HAVE_SETSID 1
-
-/* Define to 1 if you have the `shm_open' function. */
-#define HAVE_SHM_OPEN 1
-
-/* Define to 1 if you have spinlocks. */
-#define HAVE_SPINLOCKS 1
-
-/* Define to 1 if you have the `srandom' function. */
-#define HAVE_SRANDOM 1
-
-/* Define to 1 if stdbool.h conforms to C99. */
-#define HAVE_STDBOOL_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `strchrnul' function. */
-#define HAVE_STRCHRNUL 1
-
-/* Define to 1 if you have the `strerror_r' function. */
-#define HAVE_STRERROR_R 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the `strlcat' function. */
-/* #undef HAVE_STRLCAT */
-
-/* Define to 1 if you have the `strlcpy' function. */
-/* #undef HAVE_STRLCPY */
-
-/* Define to 1 if you have the `strnlen' function. */
-#define HAVE_STRNLEN 1
-
-/* Define to 1 if you have the `strsignal' function. */
-#define HAVE_STRSIGNAL 1
-
-/* Define to 1 if you have the `strtof' function. */
-#define HAVE_STRTOF 1
-
-/* Define to 1 if you have the `strtoll' function. */
-#define HAVE_STRTOLL 1
-
-/* Define to 1 if you have the `strtoq' function. */
-/* #undef HAVE_STRTOQ */
-
-/* Define to 1 if you have the `strtoull' function. */
-#define HAVE_STRTOULL 1
-
-/* Define to 1 if you have the `strtouq' function. */
-/* #undef HAVE_STRTOUQ */
-
-/* Define to 1 if the system has the type `struct addrinfo'. */
-#define HAVE_STRUCT_ADDRINFO 1
-
-/* Define to 1 if the system has the type `struct cmsgcred'. */
-/* #undef HAVE_STRUCT_CMSGCRED */
-
-/* Define to 1 if the system has the type `struct option'. */
-#define HAVE_STRUCT_OPTION 1
-
-/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */
-/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
-
-/* Define to 1 if the system has the type `struct sockaddr_storage'. */
-#define HAVE_STRUCT_SOCKADDR_STORAGE 1
-
-/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
-#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
-
-/* Define to 1 if `ss_len' is a member of `struct sockaddr_storage'. */
-/* #undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN */
-
-/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */
-/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */
-
-/* Define to 1 if `__ss_len' is a member of `struct sockaddr_storage'. */
-/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN */
-
-/* Define to 1 if the system has the type `struct sockaddr_un'. */
-#define HAVE_STRUCT_SOCKADDR_UN 1
-
-/* Define to 1 if `tm_zone' is a member of `struct tm'. */
-#define HAVE_STRUCT_TM_TM_ZONE 1
-
-/* Define to 1 if you have the `symlink' function. */
-#define HAVE_SYMLINK 1
-
-/* Define to 1 if you have the `syncfs' function. */
-#define HAVE_SYNCFS 1
-
-/* Define to 1 if you have the `sync_file_range' function. */
-#define HAVE_SYNC_FILE_RANGE 1
-
-/* Define to 1 if you have the syslog interface. */
-#define HAVE_SYSLOG 1
-
-/* Define to 1 if you have the <sys/epoll.h> header file. */
-#define HAVE_SYS_EPOLL_H 1
-
-/* Define to 1 if you have the <sys/event.h> header file. */
-/* #undef HAVE_SYS_EVENT_H */
-
-/* Define to 1 if you have the <sys/ipc.h> header file. */
-#define HAVE_SYS_IPC_H 1
-
-/* Define to 1 if you have the <sys/prctl.h> header file. */
-#define HAVE_SYS_PRCTL_H 1
-
-/* Define to 1 if you have the <sys/procctl.h> header file. */
-/* #undef HAVE_SYS_PROCCTL_H */
-
-/* Define to 1 if you have the <sys/pstat.h> header file. */
-/* #undef HAVE_SYS_PSTAT_H */
-
-/* Define to 1 if you have the <sys/resource.h> header file. */
-#define HAVE_SYS_RESOURCE_H 1
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#define HAVE_SYS_SELECT_H 1
-
-/* Define to 1 if you have the <sys/sem.h> header file. */
-#define HAVE_SYS_SEM_H 1
-
-/* Define to 1 if you have the <sys/shm.h> header file. */
-#define HAVE_SYS_SHM_H 1
-
-/* Define to 1 if you have the <sys/signalfd.h> header file. */
-#define HAVE_SYS_SIGNALFD_H 1
-
-/* Define to 1 if you have the <sys/sockio.h> header file. */
-/* #undef HAVE_SYS_SOCKIO_H */
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/tas.h> header file. */
-/* #undef HAVE_SYS_TAS_H */
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <sys/ucred.h> header file. */
-/* #undef HAVE_SYS_UCRED_H */
-
-/* Define to 1 if you have the <sys/uio.h> header file. */
-#define HAVE_SYS_UIO_H 1
-
-/* Define to 1 if you have the <sys/un.h> header file. */
-#define HAVE_SYS_UN_H 1
-
-/* Define to 1 if you have the <termios.h> header file. */
-#define HAVE_TERMIOS_H 1
-
-/* Define to 1 if your compiler understands `typeof' or something similar. */
-#define HAVE_TYPEOF 1
-
-/* Define to 1 if you have the <ucred.h> header file. */
-/* #undef HAVE_UCRED_H */
-
-/* Define to 1 if the system has the type `uint64'. */
-/* #undef HAVE_UINT64 */
-
-/* Define to 1 if the system has the type `uint8'. */
-/* #undef HAVE_UINT8 */
-
-/* Define to 1 if the system has the type `union semun'. */
-/* #undef HAVE_UNION_SEMUN */
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to 1 if you have the `unsetenv' function. */
-#define HAVE_UNSETENV 1
-
-/* Define to 1 if you have the `uselocale' function. */
-#define HAVE_USELOCALE 1
-
-/* Define to 1 if you have BSD UUID support. */
-/* #undef HAVE_UUID_BSD */
-
-/* Define to 1 if you have E2FS UUID support. */
-/* #undef HAVE_UUID_E2FS */
-
-/* Define to 1 if you have the <uuid.h> header file. */
-#define HAVE_UUID_H 1
-
-/* Define to 1 if you have OSSP UUID support. */
-#define HAVE_UUID_OSSP 1
-
-/* Define to 1 if you have the <uuid/uuid.h> header file. */
-/* #undef HAVE_UUID_UUID_H */
-
-/* Define to 1 if you have the `wcstombs_l' function. */
-/* #undef HAVE_WCSTOMBS_L */
-
-/* Define to 1 if you have the <wctype.h> header file. */
-#define HAVE_WCTYPE_H 1
-
-/* Define to 1 if you have the <winldap.h> header file. */
-/* #undef HAVE_WINLDAP_H */
-
-/* Define to 1 if you have the `writev' function. */
-#define HAVE_WRITEV 1
-
-/* Define to 1 if you have the `X509_get_signature_nid' function. */
-#define HAVE_X509_GET_SIGNATURE_NID 1
-
-/* Define to 1 if the assembler supports X86_64's POPCNTQ instruction. */
-#define HAVE_X86_64_POPCNTQ 1
-
-/* Define to 1 if the system has the type `_Bool'. */
-#define HAVE__BOOL 1
-
-/* Define to 1 if your compiler understands __builtin_bswap16. */
-#define HAVE__BUILTIN_BSWAP16 1
-
-/* Define to 1 if your compiler understands __builtin_bswap32. */
-#define HAVE__BUILTIN_BSWAP32 1
-
-/* Define to 1 if your compiler understands __builtin_bswap64. */
-#define HAVE__BUILTIN_BSWAP64 1
-
-/* Define to 1 if your compiler understands __builtin_clz. */
-#define HAVE__BUILTIN_CLZ 1
-
-/* Define to 1 if your compiler understands __builtin_constant_p. */
-#define HAVE__BUILTIN_CONSTANT_P 1
-
-/* Define to 1 if your compiler understands __builtin_ctz. */
-#define HAVE__BUILTIN_CTZ 1
-
-/* Define to 1 if your compiler understands __builtin_frame_address. */
-#define HAVE__BUILTIN_FRAME_ADDRESS 1
-
-/* Define to 1 if your compiler understands __builtin_$op_overflow. */
-#define HAVE__BUILTIN_OP_OVERFLOW 1
-
-/* Define to 1 if your compiler understands __builtin_popcount. */
-#define HAVE__BUILTIN_POPCOUNT 1
-
-/* Define to 1 if your compiler understands __builtin_types_compatible_p. */
-#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1
-
-/* Define to 1 if your compiler understands __builtin_unreachable. */
-#define HAVE__BUILTIN_UNREACHABLE 1
-
-/* Define to 1 if you have the `_configthreadlocale' function. */
-/* #undef HAVE__CONFIGTHREADLOCALE */
-
-/* Define to 1 if you have __cpuid. */
-/* #undef HAVE__CPUID */
-
-/* Define to 1 if you have __get_cpuid. */
-#define HAVE__GET_CPUID 1
-
-/* Define to 1 if your compiler understands _Static_assert. */
-#define HAVE__STATIC_ASSERT 1
-
-/* Define to 1 if you have the `__strtoll' function. */
-/* #undef HAVE___STRTOLL */
-
-/* Define to 1 if you have the `__strtoull' function. */
-/* #undef HAVE___STRTOULL */
-
-/* Define to the appropriate printf length modifier for 64-bit ints. */
-#define INT64_MODIFIER "l"
-
-/* Define to 1 if `locale_t' requires <xlocale.h>. */
-/* #undef LOCALE_T_IN_XLOCALE */
-
-/* Define as the maximum alignment requirement of any C data type. */
-#define MAXIMUM_ALIGNOF 8
-
-/* Define bytes to use libc memset(). */
-#define MEMSET_LOOP_LIMIT 1024
-
-/* Define to the OpenSSL API version in use. This avoids deprecation warnings
- from newer OpenSSL versions. */
-#define OPENSSL_API_COMPAT 0x10001000L
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "pgsql-bugs@lists.postgresql.org"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "PostgreSQL"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PostgreSQL 14.4"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "postgresql"
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL "https://www.postgresql.org/"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "14.4"
-
-/* Define to the name of a signed 128-bit integer type. */
-#define PG_INT128_TYPE __int128
-
-/* Define to the name of a signed 64-bit integer type. */
-#define PG_INT64_TYPE long int
-
-/* Define to the name of the default PostgreSQL service principal in Kerberos
- (GSSAPI). (--with-krb-srvnam=NAME) */
-#define PG_KRB_SRVNAM "postgres"
-
-/* PostgreSQL major version as a string */
-#define PG_MAJORVERSION "14"
-
-/* PostgreSQL major version number */
-#define PG_MAJORVERSION_NUM 14
-
-/* PostgreSQL minor version number */
-#define PG_MINORVERSION_NUM 4
-
-/* Define to best printf format archetype, usually gnu_printf if available. */
-#define PG_PRINTF_ATTRIBUTE gnu_printf
-
-/* Define to 1 to use <stdbool.h> to define type bool. */
-#define PG_USE_STDBOOL 1
-
-/* PostgreSQL version as a string */
-#define PG_VERSION "14.4"
-
-/* PostgreSQL version as a number */
-#define PG_VERSION_NUM 140004
-
-/* A string containing the version number, platform, and C compiler */
-#define PG_VERSION_STR "PostgreSQL 14.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.3.0, 64-bit"
-
-/* Define to 1 to allow profiling output to be saved separately for each
- process. */
-/* #undef PROFILE_PID_DIR */
-
-/* Define to necessary symbol if this constant uses a non-standard name on
- your system. */
-/* #undef PTHREAD_CREATE_JOINABLE */
-
-/* RELSEG_SIZE is the maximum number of blocks allowed in one disk file. Thus,
- the maximum size of a single file is RELSEG_SIZE * BLCKSZ; relations bigger
- than that are divided into multiple files. RELSEG_SIZE * BLCKSZ must be
- less than your OS' limit on file size. This is often 2 GB or 4GB in a
- 32-bit operating system, unless you have large file support enabled. By
- default, we make the limit 1 GB to avoid any possible integer-overflow
- problems within the OS. A limit smaller than necessary only means we divide
- a large relation into more chunks than necessary, so it seems best to err
- in the direction of a small limit. A power-of-2 value is recommended to
- save a few cycles in md.c, but is not absolutely required. Changing
- RELSEG_SIZE requires an initdb. */
-#define RELSEG_SIZE 131072
-
-/* The size of `bool', as computed by sizeof. */
-#define SIZEOF_BOOL 1
-
-/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 8
-
-/* The size of `off_t', as computed by sizeof. */
-#define SIZEOF_OFF_T 8
-
-/* The size of `size_t', as computed by sizeof. */
-#define SIZEOF_SIZE_T 8
-
-/* The size of `void *', as computed by sizeof. */
-#define SIZEOF_VOID_P 8
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define to 1 if strerror_r() returns int. */
-/* #undef STRERROR_R_INT */
-
-/* Define to 1 to use ARMv8 CRC Extension. */
-/* #undef USE_ARMV8_CRC32C */
-
-/* Define to 1 to use ARMv8 CRC Extension with a runtime check. */
-/* #undef USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK */
-
-/* Define to 1 to build with assertion checks. (--enable-cassert) */
-/* #undef USE_ASSERT_CHECKING */
-
-/* Define to 1 to build with Bonjour support. (--with-bonjour) */
-/* #undef USE_BONJOUR */
-
-/* Define to 1 to build with BSD Authentication support. (--with-bsd-auth) */
-/* #undef USE_BSD_AUTH */
-
-/* Define to build with ICU support. (--with-icu) */
-#define USE_ICU 1
-
-/* Define to 1 to build with LDAP support. (--with-ldap) */
-/* #undef USE_LDAP */
-
-/* Define to 1 to build with XML support. (--with-libxml) */
-#define USE_LIBXML 1
-
-/* Define to 1 to use XSLT support when building contrib/xml2.
- (--with-libxslt) */
-/* #undef USE_LIBXSLT */
-
-/* Define to 1 to build with LLVM based JIT support. (--with-llvm) */
-/* #undef USE_LLVM */
-
-/* Define to 1 to build with LZ4 support. (--with-lz4) */
-#define USE_LZ4 1
-
-/* Define to select named POSIX semaphores. */
-/* #undef USE_NAMED_POSIX_SEMAPHORES */
-
-/* Define to 1 to build with OpenSSL support. (--with-ssl=openssl) */
-#define USE_OPENSSL 1
-
-/* Define to 1 to build with PAM support. (--with-pam) */
-/* #undef USE_PAM */
-
-/* Define to 1 to use software CRC-32C implementation (slicing-by-8). */
-/* #undef USE_SLICING_BY_8_CRC32C */
-
-/* Define to 1 use Intel SSE 4.2 CRC instructions. */
-/* #undef USE_SSE42_CRC32C */
-
-/* Define to 1 to use Intel SSE 4.2 CRC instructions with a runtime check. */
-#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1
-
-/* Define to build with systemd support. (--with-systemd) */
-/* #undef USE_SYSTEMD */
-
-/* Define to select SysV-style semaphores. */
-/* #undef USE_SYSV_SEMAPHORES */
-
-/* Define to select SysV-style shared memory. */
-#define USE_SYSV_SHARED_MEMORY 1
-
-/* Define to select unnamed POSIX semaphores. */
-#define USE_UNNAMED_POSIX_SEMAPHORES 1
-
-/* Define to select Win32-style semaphores. */
-/* #undef USE_WIN32_SEMAPHORES */
-
-/* Define to select Win32-style shared memory. */
-/* #undef USE_WIN32_SHARED_MEMORY */
-
-/* Define to 1 if `wcstombs_l' requires <xlocale.h>. */
-/* #undef WCSTOMBS_L_IN_XLOCALE */
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
- significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-# define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-/* # undef WORDS_BIGENDIAN */
-# endif
-#endif
-
-/* Size of a WAL file block. This need have no particular relation to BLCKSZ.
- XLOG_BLCKSZ must be a power of 2, and if your system supports O_DIRECT I/O,
- XLOG_BLCKSZ must be a multiple of the alignment requirement for direct-I/O
- buffers, else direct I/O may fail. Changing XLOG_BLCKSZ requires an initdb.
- */
-#define XLOG_BLCKSZ 8192
-
-
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-/* #undef _FILE_OFFSET_BITS */
-
-/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
-/* #undef _LARGEFILE_SOURCE */
-
-/* Define for large files, on AIX-style hosts. */
-/* #undef _LARGE_FILES */
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-/* #undef inline */
-#endif
-
-/* Define to keyword to use for C99 restrict support, or to nothing if not
- supported */
-#define pg_restrict __restrict
-
-/* Define to the equivalent of the C99 'restrict' keyword, or to
- nothing if this is not supported. Do not define if restrict is
- supported directly. */
-#define restrict __restrict
-/* Work around a bug in Sun C++: it does not support _Restrict or
- __restrict__, even though the corresponding Sun C compiler ends up with
- "#define restrict _Restrict" or "#define restrict __restrict__" in the
- previous line. Perhaps some future version of Sun C++ will work with
- restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
-#if defined __SUNPRO_CC && !defined __RESTRICT
-# define _Restrict
-# define __restrict__
-#endif
-
-/* Define to how the compiler spells `typeof'. */
-/* #undef typeof */
diff --git a/contrib/libs/postgresql/src/include/pg_config-osx.h b/contrib/libs/postgresql/src/include/pg_config-osx.h
deleted file mode 100644
index d1cc3ffce56..00000000000
--- a/contrib/libs/postgresql/src/include/pg_config-osx.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#pragma once
-
-#include "pg_config-linux.h"
-
-/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
- don't. */
-#undef HAVE_DECL_STRLCAT
-#define HAVE_DECL_STRLCAT 1
-
-/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
- don't. */
-#undef HAVE_DECL_STRLCPY
-#define HAVE_DECL_STRLCPY 1
-
-/* Define to 1 if the system has the type `locale_t'. */
-#undef HAVE_LOCALE_T
-
-/* Define to 1 if you have the <sys/prctl.h> header file. */
-#undef HAVE_SYS_PRCTL_H
-
-/* Define to 1 if you have the <sys/signalfd.h> header file. */
-#undef HAVE_SYS_SIGNALFD_H
-
-/* Define to 1 if you have the `sync_file_range' function. */
-#undef HAVE_SYNC_FILE_RANGE
-
-/* Define to 1 if you have the <sys/ucred.h> header file. */
-#define HAVE_SYS_UCRED_H 1
-
-/* Define to 1 if you have the <sys/epoll.h> header file. */
-#undef HAVE_SYS_EPOLL_H
-
-/* Define to 1 if you have the `strchrnul' function. */
-#undef HAVE_STRCHRNUL
-
-/* Define to 1 if you have the `syncfs' function. */
-#undef HAVE_SYNCFS
diff --git a/contrib/libs/postgresql/src/include/pg_config-win.h b/contrib/libs/postgresql/src/include/pg_config-win.h
deleted file mode 100644
index 10c0df78a26..00000000000
--- a/contrib/libs/postgresql/src/include/pg_config-win.h
+++ /dev/null
@@ -1,178 +0,0 @@
-#pragma once
-
-#include "pg_config-linux.h"
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <sys/un.h> header file. */
-#undef HAVE_SYS_UN_H
-
-/* Define to 1 if you have the <termios.h> header file. */
-#undef HAVE_TERMIOS_H
-
-/* Define to 1 if you have the `inet_aton' function. */
-#undef HAVE_INET_ATON
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#undef HAVE_SYS_SELECT_H
-
-/* Define to 1 if you have the <sys/signalfd.h> header file. */
-#undef HAVE_SYS_SIGNALFD_H
-
-/* Define to 1 if you have the <sys/prctl.h> header file. */
-#undef HAVE_SYS_PRCTL_H
-
-/* Define to 1 if you have the <netinet/tcp.h> header file. */
-#undef HAVE_NETINET_TCP_H
-
-/* Define to 1 if you have the <sys/resource.h> header file. */
-#undef HAVE_SYS_RESOURCE_H
-
-/* Define to 1 if you have the `dlopen' function. */
-#undef HAVE_DLOPEN
-
-/* Define to 1 if you have the syslog interface. */
-#undef HAVE_SYSLOG
-
-/* Define to 1 if you have the <getopt.h> header file. */
-#undef HAVE_GETOPT_H
-
-/* Define to 1 if you have the <execinfo.h> header file. */
-#undef HAVE_EXECINFO_H
-
-/* Define to 1 if you have the `sync_file_range' function. */
-#undef HAVE_SYNC_FILE_RANGE
-
-/* Define to 1 if you have the <sys/epoll.h> header file. */
-#undef HAVE_SYS_EPOLL_H
-
-/* Define to 1 if you have the <poll.h> header file. */
-#undef HAVE_POLL_H
-
-/* Define to 1 if you have the `poll' function. */
-#undef HAVE_POLL
-
-/* Define to 1 if you have the <sys/ipc.h> header file. */
-#undef HAVE_SYS_IPC_H
-
-/* Define to 1 if you have the <langinfo.h> header file. */
-#undef HAVE_LANGINFO_H
-
-/* Define to 1 if you have the <sys/shm.h> header file. */
-#undef HAVE_SYS_SHM_H
-
-/* Define to 1 if the assembler supports X86_64's POPCNTQ instruction. */
-#undef HAVE_X86_64_POPCNTQ
-
-/* Define to 1 if you have the declaration of `RTLD_GLOBAL', and to 0 if you
- don't. */
-#undef HAVE_DECL_RTLD_GLOBAL
-
-/* Define to 1 if you have the declaration of `RTLD_NOW', and to 0 if you
- don't. */
-#undef HAVE_DECL_RTLD_NOW
-
-/* Define to 1 if you have the `getrlimit' function. */
-#undef HAVE_GETRLIMIT
-
-/* Define to 1 if you have the `getrusage' function. */
-#undef HAVE_GETRUSAGE
-
-/* Define to 1 if your compiler understands _Static_assert. */
-#undef HAVE__STATIC_ASSERT
-
-/* Define to 1 if you have the global variable 'int opterr'. */
-#undef HAVE_INT_OPTERR
-
-/* Define to 1 if you have the `strchrnul' function. */
-#undef HAVE_STRCHRNUL
-
-/* Define to 1 if you have the `backtrace_symbols' function. */
-#undef HAVE_BACKTRACE_SYMBOLS
-
-/* Define to 1 if you have the `setsid' function. */
-#undef HAVE_SETSID
-
-/* Define to 1 if you have the `fdatasync' function. */
-#undef HAVE_FDATASYNC
-
-/* Define to 1 if the system has the type `locale_t'. */
-#undef HAVE_LOCALE_T
-
-/* Define to 1 if you have the `strerror_r' function. */
-#undef HAVE_STRERROR_R
-
-/* Define to 1 if you have the `getaddrinfo' function. */
-#undef HAVE_GETADDRINFO
-
-/* Define to use OpenSSL for random number generation */
-#undef USE_OPENSSL_RANDOM
-
-/* Define to use native Windows API for random number generation */
-#define USE_WIN32_RANDOM 1
-
-/* Define to 1 if the system has the type `_Bool'. */
-#undef HAVE__BOOL
-
-/* Define to 1 if your compiler understands __builtin_bswap16. */
-#undef HAVE__BUILTIN_BSWAP16
-
-/* Define to 1 if your compiler understands __builtin_bswap32. */
-#undef HAVE__BUILTIN_BSWAP32
-
-/* Define to 1 if your compiler understands __builtin_bswap64. */
-#undef HAVE__BUILTIN_BSWAP64
-
-/* Define to 1 if your compiler understands __builtin_clz. */
-#undef HAVE__BUILTIN_CLZ
-
-/* Define to 1 if your compiler understands __builtin_constant_p. */
-#undef HAVE__BUILTIN_CONSTANT_P
-
-/* Define to 1 if your compiler understands __builtin_ctz. */
-#undef HAVE__BUILTIN_CTZ
-
-/* Define to 1 if your compiler understands __builtin_$op_overflow. */
-#undef HAVE__BUILTIN_OP_OVERFLOW
-
-/* Define to 1 if your compiler understands __builtin_popcount. */
-#undef HAVE__BUILTIN_POPCOUNT
-
-/* Define to 1 if your compiler understands __builtin_types_compatible_p. */
-#undef HAVE__BUILTIN_TYPES_COMPATIBLE_P
-
-/* Define to 1 if your compiler understands __builtin_unreachable. */
-#undef HAVE__BUILTIN_UNREACHABLE
-
-/* Define to 1 if you have the `_configthreadlocale' function. */
-#define HAVE__CONFIGTHREADLOCALE 1
-
-/* Define to 1 if you have __cpuid. */
-#define HAVE__CPUID 1
-
-/* Define to 1 if you have __get_cpuid. */
-#undef HAVE__GET_CPUID
-
-/* Define to 1 if your compiler understands `typeof' or something similar. */
-#undef HAVE_TYPEOF
-
-/* Define to 1 if your compiler handles computed gotos. */
-#undef HAVE_COMPUTED_GOTO
-
-/* Define to 1 if you have the `readlink' function. */
-#undef HAVE_READLINK
-
-/* Define to 1 if you have the `syncfs' function. */
-#undef HAVE_SYNCFS
-
-
-/* PostgreSQL's CFLAG for windows. */
-#define WIN32_STACK_RLIMIT 4194304
-
-/* NO GOOD WAY WAS FOUND TO PROVIDE DEFINITIONS FOR random AND srandom. */
-/* rand is PostgreSQL's implementation of random from stdlib.h for windows. */
-#define random rand
-
-/* srand is PostgreSQL's implementation of srandom from stdlib.h for windows. */
-#define srandom srand
diff --git a/contrib/libs/postgresql/src/include/pg_config.h b/contrib/libs/postgresql/src/include/pg_config.h
deleted file mode 100644
index d18cad5285a..00000000000
--- a/contrib/libs/postgresql/src/include/pg_config.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#pragma once
-
-#if defined(__APPLE__)
-# include "pg_config-osx.h"
-#elif defined(_MSC_VER)
-# include "pg_config-win.h"
-#else
-# include "pg_config-linux.h"
-#endif
diff --git a/contrib/libs/postgresql/src/include/pg_config_ext.h b/contrib/libs/postgresql/src/include/pg_config_ext.h
deleted file mode 100644
index b4c07dd8572..00000000000
--- a/contrib/libs/postgresql/src/include/pg_config_ext.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* src/include/pg_config_ext.h. Generated from pg_config_ext.h.in by configure. */
-/*
- * src/include/pg_config_ext.h.in. This is generated manually, not by
- * autoheader, since we want to limit which symbols get defined here.
- */
-
-/* Define to the name of a signed 64-bit integer type. */
-#define PG_INT64_TYPE long int
diff --git a/contrib/libs/postgresql/src/include/pg_config_manual.h b/contrib/libs/postgresql/src/include/pg_config_manual.h
deleted file mode 100644
index 071f36d2db9..00000000000
--- a/contrib/libs/postgresql/src/include/pg_config_manual.h
+++ /dev/null
@@ -1,404 +0,0 @@
-/*------------------------------------------------------------------------
- * PostgreSQL manual configuration settings
- *
- * This file contains various configuration symbols and limits. In
- * all cases, changing them is only useful in very rare situations or
- * for developers. If you edit any of these, be sure to do a *full*
- * rebuild (and an initdb if noted).
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/pg_config_manual.h
- *------------------------------------------------------------------------
- */
-
-/*
- * This is the default value for wal_segment_size to be used when initdb is run
- * without the --wal-segsize option. It must be a valid segment size.
- */
-#define DEFAULT_XLOG_SEG_SIZE (16*1024*1024)
-
-/*
- * Maximum length for identifiers (e.g. table names, column names,
- * function names). Names actually are limited to one fewer byte than this,
- * because the length must include a trailing zero byte.
- *
- * Changing this requires an initdb.
- */
-#define NAMEDATALEN 64
-
-/*
- * Maximum number of arguments to a function.
- *
- * The minimum value is 8 (GIN indexes use 8-argument support functions).
- * The maximum possible value is around 600 (limited by index tuple size in
- * pg_proc's index; BLCKSZ larger than 8K would allow more). Values larger
- * than needed will waste memory and processing time, but do not directly
- * cost disk space.
- *
- * Changing this does not require an initdb, but it does require a full
- * backend recompile (including any user-defined C functions).
- */
-#define FUNC_MAX_ARGS 100
-
-/*
- * Maximum number of columns in an index. There is little point in making
- * this anything but a multiple of 32, because the main cost is associated
- * with index tuple header size (see access/itup.h).
- *
- * Changing this requires an initdb.
- */
-#define INDEX_MAX_KEYS 32
-
-/*
- * Maximum number of columns in a partition key
- */
-#define PARTITION_MAX_KEYS 32
-
-/*
- * Decide whether built-in 8-byte types, including float8, int8, and
- * timestamp, are passed by value. This is on by default if sizeof(Datum) >=
- * 8 (that is, on 64-bit platforms). If sizeof(Datum) < 8 (32-bit platforms),
- * this must be off. We keep this here as an option so that it is easy to
- * test the pass-by-reference code paths on 64-bit platforms.
- *
- * Changing this requires an initdb.
- */
-#if SIZEOF_VOID_P >= 8
-#define USE_FLOAT8_BYVAL 1
-#endif
-
-/*
- * When we don't have native spinlocks, we use semaphores to simulate them.
- * Decreasing this value reduces consumption of OS resources; increasing it
- * may improve performance, but supplying a real spinlock implementation is
- * probably far better.
- */
-#define NUM_SPINLOCK_SEMAPHORES 128
-
-/*
- * When we have neither spinlocks nor atomic operations support we're
- * implementing atomic operations on top of spinlock on top of semaphores. To
- * be safe against atomic operations while holding a spinlock separate
- * semaphores have to be used.
- */
-#define NUM_ATOMICS_SEMAPHORES 64
-
-/*
- * MAXPGPATH: standard size of a pathname buffer in PostgreSQL (hence,
- * maximum usable pathname length is one less).
- *
- * We'd use a standard system header symbol for this, if there weren't
- * so many to choose from: MAXPATHLEN, MAX_PATH, PATH_MAX are all
- * defined by different "standards", and often have different values
- * on the same platform! So we just punt and use a reasonably
- * generous setting here.
- */
-#define MAXPGPATH 1024
-
-/*
- * PG_SOMAXCONN: maximum accept-queue length limit passed to
- * listen(2). You'd think we should use SOMAXCONN from
- * <sys/socket.h>, but on many systems that symbol is much smaller
- * than the kernel's actual limit. In any case, this symbol need be
- * twiddled only if you have a kernel that refuses large limit values,
- * rather than silently reducing the value to what it can handle
- * (which is what most if not all Unixen do).
- */
-#define PG_SOMAXCONN 10000
-
-/*
- * You can try changing this if you have a machine with bytes of
- * another size, but no guarantee...
- */
-#define BITS_PER_BYTE 8
-
-/*
- * Preferred alignment for disk I/O buffers. On some CPUs, copies between
- * user space and kernel space are significantly faster if the user buffer
- * is aligned on a larger-than-MAXALIGN boundary. Ideally this should be
- * a platform-dependent value, but for now we just hard-wire it.
- */
-#define ALIGNOF_BUFFER 32
-
-/*
- * If EXEC_BACKEND is defined, the postmaster uses an alternative method for
- * starting subprocesses: Instead of simply using fork(), as is standard on
- * Unix platforms, it uses fork()+exec() or something equivalent on Windows,
- * as well as lots of extra code to bring the required global state to those
- * new processes. This must be enabled on Windows (because there is no
- * fork()). On other platforms, it's only useful for verifying those
- * otherwise Windows-specific code paths.
- */
-#if defined(WIN32) && !defined(__CYGWIN__)
-#define EXEC_BACKEND
-#endif
-
-/*
- * Define this if your operating system supports link()
- */
-#if !defined(WIN32) && !defined(__CYGWIN__)
-#define HAVE_WORKING_LINK 1
-#endif
-
-/*
- * USE_POSIX_FADVISE controls whether Postgres will attempt to use the
- * posix_fadvise() kernel call. Usually the automatic configure tests are
- * sufficient, but some older Linux distributions had broken versions of
- * posix_fadvise(). If necessary you can remove the #define here.
- */
-#if HAVE_DECL_POSIX_FADVISE && defined(HAVE_POSIX_FADVISE)
-#define USE_POSIX_FADVISE
-#endif
-
-/*
- * USE_PREFETCH code should be compiled only if we have a way to implement
- * prefetching. (This is decoupled from USE_POSIX_FADVISE because there
- * might in future be support for alternative low-level prefetch APIs.
- * If you change this, you probably need to adjust the error message in
- * check_effective_io_concurrency.)
- */
-#ifdef USE_POSIX_FADVISE
-#define USE_PREFETCH
-#endif
-
-/*
- * Default and maximum values for backend_flush_after, bgwriter_flush_after
- * and checkpoint_flush_after; measured in blocks. Currently, these are
- * enabled by default if sync_file_range() exists, ie, only on Linux. Perhaps
- * we could also enable by default if we have mmap and msync(MS_ASYNC)?
- */
-#ifdef HAVE_SYNC_FILE_RANGE
-#define DEFAULT_BACKEND_FLUSH_AFTER 0 /* never enabled by default */
-#define DEFAULT_BGWRITER_FLUSH_AFTER 64
-#define DEFAULT_CHECKPOINT_FLUSH_AFTER 32
-#else
-#define DEFAULT_BACKEND_FLUSH_AFTER 0
-#define DEFAULT_BGWRITER_FLUSH_AFTER 0
-#define DEFAULT_CHECKPOINT_FLUSH_AFTER 0
-#endif
-/* upper limit for all three variables */
-#define WRITEBACK_MAX_PENDING_FLUSHES 256
-
-/*
- * USE_SSL code should be compiled only when compiling with an SSL
- * implementation.
- */
-#ifdef USE_OPENSSL
-#define USE_SSL
-#endif
-
-/*
- * This is the default directory in which AF_UNIX socket files are
- * placed. Caution: changing this risks breaking your existing client
- * applications, which are likely to continue to look in the old
- * directory. But if you just hate the idea of sockets in /tmp,
- * here's where to twiddle it. You can also override this at runtime
- * with the postmaster's -k switch.
- *
- * If set to an empty string, then AF_UNIX sockets are not used by default: A
- * server will not create an AF_UNIX socket unless the run-time configuration
- * is changed, a client will connect via TCP/IP by default and will only use
- * an AF_UNIX socket if one is explicitly specified.
- *
- * This is done by default on Windows because there is no good standard
- * location for AF_UNIX sockets and many installations on Windows don't
- * support them yet.
- */
-#ifndef WIN32
-#define DEFAULT_PGSOCKET_DIR "/run/postgresql"
-#else
-#define DEFAULT_PGSOCKET_DIR ""
-#endif
-
-/*
- * This is the default event source for Windows event log.
- */
-#define DEFAULT_EVENT_SOURCE "PostgreSQL"
-
-/*
- * The random() function is expected to yield values between 0 and
- * MAX_RANDOM_VALUE. Currently, all known implementations yield
- * 0..2^31-1, so we just hardwire this constant. We could do a
- * configure test if it proves to be necessary. CAUTION: Think not to
- * replace this with RAND_MAX. RAND_MAX defines the maximum value of
- * the older rand() function, which is often different from --- and
- * considerably inferior to --- random().
- */
-#define MAX_RANDOM_VALUE PG_INT32_MAX
-
-/*
- * On PPC machines, decide whether to use the mutex hint bit in LWARX
- * instructions. Setting the hint bit will slightly improve spinlock
- * performance on POWER6 and later machines, but does nothing before that,
- * and will result in illegal-instruction failures on some pre-POWER4
- * machines. By default we use the hint bit when building for 64-bit PPC,
- * which should be safe in nearly all cases. You might want to override
- * this if you are building 32-bit code for a known-recent PPC machine.
- */
-#ifdef HAVE_PPC_LWARX_MUTEX_HINT /* must have assembler support in any case */
-#if defined(__ppc64__) || defined(__powerpc64__)
-#define USE_PPC_LWARX_MUTEX_HINT
-#endif
-#endif
-
-/*
- * On PPC machines, decide whether to use LWSYNC instructions in place of
- * ISYNC and SYNC. This provides slightly better performance, but will
- * result in illegal-instruction failures on some pre-POWER4 machines.
- * By default we use LWSYNC when building for 64-bit PPC, which should be
- * safe in nearly all cases.
- */
-#if defined(__ppc64__) || defined(__powerpc64__)
-#define USE_PPC_LWSYNC
-#endif
-
-/*
- * Assumed cache line size. This doesn't affect correctness, but can be used
- * for low-level optimizations. Currently, this is used to pad some data
- * structures in xlog.c, to ensure that highly-contended fields are on
- * different cache lines. Too small a value can hurt performance due to false
- * sharing, while the only downside of too large a value is a few bytes of
- * wasted memory. The default is 128, which should be large enough for all
- * supported platforms.
- */
-#define PG_CACHE_LINE_SIZE 128
-
-/*
- *------------------------------------------------------------------------
- * The following symbols are for enabling debugging code, not for
- * controlling user-visible features or resource limits.
- *------------------------------------------------------------------------
- */
-
-/*
- * Include Valgrind "client requests", mostly in the memory allocator, so
- * Valgrind understands PostgreSQL memory contexts. This permits detecting
- * memory errors that Valgrind would not detect on a vanilla build. It also
- * enables detection of buffer accesses that take place without holding a
- * buffer pin (or without holding a buffer lock in the case of index access
- * methods that superimpose their own custom client requests on top of the
- * generic bufmgr.c requests).
- *
- * "make installcheck" is significantly slower under Valgrind. The client
- * requests fall in hot code paths, so USE_VALGRIND slows execution by a few
- * percentage points even when not run under Valgrind.
- *
- * Do not try to test the server under Valgrind without having built the
- * server with USE_VALGRIND; else you will get false positives from sinval
- * messaging (see comments in AddCatcacheInvalidationMessage). It's also
- * important to use the suppression file src/tools/valgrind.supp to
- * exclude other known false positives.
- *
- * You should normally use MEMORY_CONTEXT_CHECKING with USE_VALGRIND;
- * instrumentation of repalloc() is inferior without it.
- */
-/* #define USE_VALGRIND */
-
-/*
- * Define this to cause pfree()'d memory to be cleared immediately, to
- * facilitate catching bugs that refer to already-freed values.
- * Right now, this gets defined automatically if --enable-cassert.
- */
-#ifdef USE_ASSERT_CHECKING
-#define CLOBBER_FREED_MEMORY
-#endif
-
-/*
- * Define this to check memory allocation errors (scribbling on more
- * bytes than were allocated). Right now, this gets defined
- * automatically if --enable-cassert or USE_VALGRIND.
- */
-#if defined(USE_ASSERT_CHECKING) || defined(USE_VALGRIND)
-#define MEMORY_CONTEXT_CHECKING
-#endif
-
-/*
- * Define this to cause palloc()'d memory to be filled with random data, to
- * facilitate catching code that depends on the contents of uninitialized
- * memory. Caution: this is horrendously expensive.
- */
-/* #define RANDOMIZE_ALLOCATED_MEMORY */
-
-/*
- * For cache-invalidation debugging, define DISCARD_CACHES_ENABLED to enable
- * use of the debug_discard_caches GUC to aggressively flush syscache/relcache
- * entries whenever it's possible to deliver invalidations. See
- * AcceptInvalidationMessages() in src/backend/utils/cache/inval.c for
- * details.
- *
- * USE_ASSERT_CHECKING builds default to enabling this. It's possible to use
- * DISCARD_CACHES_ENABLED without a cassert build and the implied
- * CLOBBER_FREED_MEMORY and MEMORY_CONTEXT_CHECKING options, but it's unlikely
- * to be as effective at identifying problems.
- */
-/* #define DISCARD_CACHES_ENABLED */
-
-#if defined(USE_ASSERT_CHECKING) && !defined(DISCARD_CACHES_ENABLED)
-#define DISCARD_CACHES_ENABLED
-#endif
-
-/*
- * Backwards compatibility for the older compile-time-only clobber-cache
- * macros.
- */
-#if !defined(DISCARD_CACHES_ENABLED) && (defined(CLOBBER_CACHE_ALWAYS) || defined(CLOBBER_CACHE_RECURSIVELY))
-#define DISCARD_CACHES_ENABLED
-#endif
-
-/*
- * Recover memory used for relcache entries when invalidated. See
- * RelationBuildDescr() in src/backend/utils/cache/relcache.c.
- *
- * This is active automatically for clobber-cache builds when clobbering is
- * active, but can be overridden here by explicitly defining
- * RECOVER_RELATION_BUILD_MEMORY. Define to 1 to always free relation cache
- * memory even when clobber is off, or to 0 to never free relation cache
- * memory even when clobbering is on.
- */
- /* #define RECOVER_RELATION_BUILD_MEMORY 0 */ /* Force disable */
- /* #define RECOVER_RELATION_BUILD_MEMORY 1 */ /* Force enable */
-
-/*
- * Define this to force all parse and plan trees to be passed through
- * copyObject(), to facilitate catching errors and omissions in
- * copyObject().
- */
-/* #define COPY_PARSE_PLAN_TREES */
-
-/*
- * Define this to force all parse and plan trees to be passed through
- * outfuncs.c/readfuncs.c, to facilitate catching errors and omissions in
- * those modules.
- */
-/* #define WRITE_READ_PARSE_PLAN_TREES */
-
-/*
- * Define this to force all raw parse trees for DML statements to be scanned
- * by raw_expression_tree_walker(), to facilitate catching errors and
- * omissions in that function.
- */
-/* #define RAW_EXPRESSION_COVERAGE_TEST */
-
-/*
- * Enable debugging print statements for lock-related operations.
- */
-/* #define LOCK_DEBUG */
-
-/*
- * Enable debugging print statements for WAL-related operations; see
- * also the wal_debug GUC var.
- */
-/* #define WAL_DEBUG */
-
-/*
- * Enable tracing of resource consumption during sort operations;
- * see also the trace_sort GUC var. For 8.1 this is enabled by default.
- */
-#define TRACE_SORT 1
-
-/*
- * Enable tracing of syncscan operations (see also the trace_syncscan GUC var).
- */
-/* #define TRACE_SYNCSCAN */
diff --git a/contrib/libs/postgresql/src/include/pg_config_os-linux.h b/contrib/libs/postgresql/src/include/pg_config_os-linux.h
deleted file mode 100644
index 331e1b2cf17..00000000000
--- a/contrib/libs/postgresql/src/include/pg_config_os-linux.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <contrib/libs/libpq/src/include/port/linux.h>
diff --git a/contrib/libs/postgresql/src/include/pg_config_os-osx.h b/contrib/libs/postgresql/src/include/pg_config_os-osx.h
deleted file mode 100644
index f77fb9d4dad..00000000000
--- a/contrib/libs/postgresql/src/include/pg_config_os-osx.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <contrib/libs/libpq/src/include/port/darwin.h>
diff --git a/contrib/libs/postgresql/src/include/pg_config_os-win.h b/contrib/libs/postgresql/src/include/pg_config_os-win.h
deleted file mode 100644
index e26ba922091..00000000000
--- a/contrib/libs/postgresql/src/include/pg_config_os-win.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <contrib/libs/libpq/src/include/port/win32.h>
diff --git a/contrib/libs/postgresql/src/include/pg_config_os.h b/contrib/libs/postgresql/src/include/pg_config_os.h
deleted file mode 100644
index 86db251be23..00000000000
--- a/contrib/libs/postgresql/src/include/pg_config_os.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#pragma once
-
-#if defined(__APPLE__)
-# include "pg_config_os-osx.h"
-#elif defined(_MSC_VER)
-# include "pg_config_os-win.h"
-#else
-# include "pg_config_os-linux.h"
-#endif
diff --git a/contrib/libs/postgresql/src/include/pg_getopt.h b/contrib/libs/postgresql/src/include/pg_getopt.h
deleted file mode 100644
index 66f1b750604..00000000000
--- a/contrib/libs/postgresql/src/include/pg_getopt.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Postgres files that use getopt(3) always include this file.
- * We must cope with three different scenarios:
- * 1. We're using the platform's getopt(), and we should just import the
- * appropriate declarations.
- * 2. The platform lacks getopt(), and we must declare everything.
- * 3. The platform has getopt(), but we're not using it because we don't
- * like its behavior. The declarations we make here must be compatible
- * with both the platform's getopt() and our src/port/getopt.c.
- *
- * Portions Copyright (c) 1987, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Portions Copyright (c) 2003-2021, PostgreSQL Global Development Group
- *
- * src/include/pg_getopt.h
- */
-#ifndef PG_GETOPT_H
-#define PG_GETOPT_H
-
-/* POSIX says getopt() is provided by unistd.h */
-#include <unistd.h>
-
-/* rely on the system's getopt.h if present */
-#ifdef HAVE_GETOPT_H
-#include <getopt.h>
-#endif
-
-/*
- * If we have <getopt.h>, assume it declares these variables, else do that
- * ourselves. (We used to just declare them unconditionally, but Cygwin
- * doesn't like that.)
- */
-#ifndef HAVE_GETOPT_H
-
-extern char *optarg;
-extern int optind;
-extern int opterr;
-extern int optopt;
-
-#endif /* HAVE_GETOPT_H */
-
-/*
- * Some platforms have optreset but fail to declare it in <getopt.h>, so cope.
- * Cygwin, however, doesn't like this either.
- */
-#if defined(HAVE_INT_OPTRESET) && !defined(__CYGWIN__)
-extern int optreset;
-#endif
-
-/* Provide getopt() declaration if the platform doesn't have it */
-#ifndef HAVE_GETOPT
-extern int getopt(int nargc, char *const *nargv, const char *ostr);
-#endif
-
-#endif /* PG_GETOPT_H */
diff --git a/contrib/libs/postgresql/src/include/pg_trace.h b/contrib/libs/postgresql/src/include/pg_trace.h
deleted file mode 100644
index a1ecedb7dd0..00000000000
--- a/contrib/libs/postgresql/src/include/pg_trace.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* ----------
- * pg_trace.h
- *
- * Definitions for the PostgreSQL tracing framework
- *
- * Copyright (c) 2006-2021, PostgreSQL Global Development Group
- *
- * src/include/pg_trace.h
- * ----------
- */
-
-#ifndef PG_TRACE_H
-#define PG_TRACE_H
-
-#include "utils/probes.h" /* pgrminclude ignore */
-
-#endif /* PG_TRACE_H */
diff --git a/contrib/libs/postgresql/src/include/pgstat.h b/contrib/libs/postgresql/src/include/pgstat.h
deleted file mode 100644
index 9a90bd81133..00000000000
--- a/contrib/libs/postgresql/src/include/pgstat.h
+++ /dev/null
@@ -1,1110 +0,0 @@
-/* ----------
- * pgstat.h
- *
- * Definitions for the PostgreSQL statistics collector daemon.
- *
- * Copyright (c) 2001-2021, PostgreSQL Global Development Group
- *
- * src/include/pgstat.h
- * ----------
- */
-#ifndef PGSTAT_H
-#define PGSTAT_H
-
-#include "datatype/timestamp.h"
-#include "portability/instr_time.h"
-#include "postmaster/pgarch.h" /* for MAX_XFN_CHARS */
-#include "utils/backend_progress.h" /* for backward compatibility */
-#include "utils/backend_status.h" /* for backward compatibility */
-#include "utils/hsearch.h"
-#include "utils/relcache.h"
-#include "utils/wait_event.h" /* for backward compatibility */
-
-
-/* ----------
- * Paths for the statistics files (relative to installation's $PGDATA).
- * ----------
- */
-#define PGSTAT_STAT_PERMANENT_DIRECTORY "pg_stat"
-#define PGSTAT_STAT_PERMANENT_FILENAME "pg_stat/global.stat"
-#define PGSTAT_STAT_PERMANENT_TMPFILE "pg_stat/global.tmp"
-
-/* Default directory to store temporary statistics data in */
-#define PG_STAT_TMP_DIR "pg_stat_tmp"
-
-/* Values for track_functions GUC variable --- order is significant! */
-typedef enum TrackFunctionsLevel
-{
- TRACK_FUNC_OFF,
- TRACK_FUNC_PL,
- TRACK_FUNC_ALL
-} TrackFunctionsLevel;
-
-/* Values to track the cause of session termination */
-typedef enum SessionEndType
-{
- DISCONNECT_NOT_YET, /* still active */
- DISCONNECT_NORMAL,
- DISCONNECT_CLIENT_EOF,
- DISCONNECT_FATAL,
- DISCONNECT_KILLED
-} SessionEndType;
-
-/* ----------
- * The types of backend -> collector messages
- * ----------
- */
-typedef enum StatMsgType
-{
- PGSTAT_MTYPE_DUMMY,
- PGSTAT_MTYPE_INQUIRY,
- PGSTAT_MTYPE_TABSTAT,
- PGSTAT_MTYPE_TABPURGE,
- PGSTAT_MTYPE_DROPDB,
- PGSTAT_MTYPE_RESETCOUNTER,
- PGSTAT_MTYPE_RESETSHAREDCOUNTER,
- PGSTAT_MTYPE_RESETSINGLECOUNTER,
- PGSTAT_MTYPE_RESETSLRUCOUNTER,
- PGSTAT_MTYPE_RESETREPLSLOTCOUNTER,
- PGSTAT_MTYPE_AUTOVAC_START,
- PGSTAT_MTYPE_VACUUM,
- PGSTAT_MTYPE_ANALYZE,
- PGSTAT_MTYPE_ARCHIVER,
- PGSTAT_MTYPE_BGWRITER,
- PGSTAT_MTYPE_WAL,
- PGSTAT_MTYPE_SLRU,
- PGSTAT_MTYPE_FUNCSTAT,
- PGSTAT_MTYPE_FUNCPURGE,
- PGSTAT_MTYPE_RECOVERYCONFLICT,
- PGSTAT_MTYPE_TEMPFILE,
- PGSTAT_MTYPE_DEADLOCK,
- PGSTAT_MTYPE_CHECKSUMFAILURE,
- PGSTAT_MTYPE_REPLSLOT,
- PGSTAT_MTYPE_CONNECT,
- PGSTAT_MTYPE_DISCONNECT,
-} StatMsgType;
-
-/* ----------
- * The data type used for counters.
- * ----------
- */
-typedef int64 PgStat_Counter;
-
-/* ----------
- * PgStat_TableCounts The actual per-table counts kept by a backend
- *
- * This struct should contain only actual event counters, because we memcmp
- * it against zeroes to detect whether there are any counts to transmit.
- * It is a component of PgStat_TableStatus (within-backend state) and
- * PgStat_TableEntry (the transmitted message format).
- *
- * Note: for a table, tuples_returned is the number of tuples successfully
- * fetched by heap_getnext, while tuples_fetched is the number of tuples
- * successfully fetched by heap_fetch under the control of bitmap indexscans.
- * For an index, tuples_returned is the number of index entries returned by
- * the index AM, while tuples_fetched is the number of tuples successfully
- * fetched by heap_fetch under the control of simple indexscans for this index.
- *
- * tuples_inserted/updated/deleted/hot_updated count attempted actions,
- * regardless of whether the transaction committed. delta_live_tuples,
- * delta_dead_tuples, and changed_tuples are set depending on commit or abort.
- * Note that delta_live_tuples and delta_dead_tuples can be negative!
- * ----------
- */
-typedef struct PgStat_TableCounts
-{
- PgStat_Counter t_numscans;
-
- PgStat_Counter t_tuples_returned;
- PgStat_Counter t_tuples_fetched;
-
- PgStat_Counter t_tuples_inserted;
- PgStat_Counter t_tuples_updated;
- PgStat_Counter t_tuples_deleted;
- PgStat_Counter t_tuples_hot_updated;
- bool t_truncated;
-
- PgStat_Counter t_delta_live_tuples;
- PgStat_Counter t_delta_dead_tuples;
- PgStat_Counter t_changed_tuples;
-
- PgStat_Counter t_blocks_fetched;
- PgStat_Counter t_blocks_hit;
-} PgStat_TableCounts;
-
-/* Possible targets for resetting cluster-wide shared values */
-typedef enum PgStat_Shared_Reset_Target
-{
- RESET_ARCHIVER,
- RESET_BGWRITER,
- RESET_WAL
-} PgStat_Shared_Reset_Target;
-
-/* Possible object types for resetting single counters */
-typedef enum PgStat_Single_Reset_Type
-{
- RESET_TABLE,
- RESET_FUNCTION
-} PgStat_Single_Reset_Type;
-
-/* ------------------------------------------------------------
- * Structures kept in backend local memory while accumulating counts
- * ------------------------------------------------------------
- */
-
-
-/* ----------
- * PgStat_TableStatus Per-table status within a backend
- *
- * Many of the event counters are nontransactional, ie, we count events
- * in committed and aborted transactions alike. For these, we just count
- * directly in the PgStat_TableStatus. However, delta_live_tuples,
- * delta_dead_tuples, and changed_tuples must be derived from event counts
- * with awareness of whether the transaction or subtransaction committed or
- * aborted. Hence, we also keep a stack of per-(sub)transaction status
- * records for every table modified in the current transaction. At commit
- * or abort, we propagate tuples_inserted/updated/deleted up to the
- * parent subtransaction level, or out to the parent PgStat_TableStatus,
- * as appropriate.
- * ----------
- */
-typedef struct PgStat_TableStatus
-{
- Oid t_id; /* table's OID */
- bool t_shared; /* is it a shared catalog? */
- struct PgStat_TableXactStatus *trans; /* lowest subxact's counts */
- PgStat_TableCounts t_counts; /* event counts to be sent */
-} PgStat_TableStatus;
-
-/* ----------
- * PgStat_TableXactStatus Per-table, per-subtransaction status
- * ----------
- */
-typedef struct PgStat_TableXactStatus
-{
- PgStat_Counter tuples_inserted; /* tuples inserted in (sub)xact */
- PgStat_Counter tuples_updated; /* tuples updated in (sub)xact */
- PgStat_Counter tuples_deleted; /* tuples deleted in (sub)xact */
- bool truncated; /* relation truncated in this (sub)xact */
- PgStat_Counter inserted_pre_trunc; /* tuples inserted prior to truncate */
- PgStat_Counter updated_pre_trunc; /* tuples updated prior to truncate */
- PgStat_Counter deleted_pre_trunc; /* tuples deleted prior to truncate */
- int nest_level; /* subtransaction nest level */
- /* links to other structs for same relation: */
- struct PgStat_TableXactStatus *upper; /* next higher subxact if any */
- PgStat_TableStatus *parent; /* per-table status */
- /* structs of same subxact level are linked here: */
- struct PgStat_TableXactStatus *next; /* next of same subxact */
-} PgStat_TableXactStatus;
-
-
-/* ------------------------------------------------------------
- * Message formats follow
- * ------------------------------------------------------------
- */
-
-
-/* ----------
- * PgStat_MsgHdr The common message header
- * ----------
- */
-typedef struct PgStat_MsgHdr
-{
- StatMsgType m_type;
- int m_size;
-} PgStat_MsgHdr;
-
-/* ----------
- * Space available in a message. This will keep the UDP packets below 1K,
- * which should fit unfragmented into the MTU of the loopback interface.
- * (Larger values of PGSTAT_MAX_MSG_SIZE would work for that on most
- * platforms, but we're being conservative here.)
- * ----------
- */
-#define PGSTAT_MAX_MSG_SIZE 1000
-#define PGSTAT_MSG_PAYLOAD (PGSTAT_MAX_MSG_SIZE - sizeof(PgStat_MsgHdr))
-
-
-/* ----------
- * PgStat_MsgDummy A dummy message, ignored by the collector
- * ----------
- */
-typedef struct PgStat_MsgDummy
-{
- PgStat_MsgHdr m_hdr;
-} PgStat_MsgDummy;
-
-
-/* ----------
- * PgStat_MsgInquiry Sent by a backend to ask the collector
- * to write the stats file(s).
- *
- * Ordinarily, an inquiry message prompts writing of the global stats file,
- * the stats file for shared catalogs, and the stats file for the specified
- * database. If databaseid is InvalidOid, only the first two are written.
- *
- * New file(s) will be written only if the existing file has a timestamp
- * older than the specified cutoff_time; this prevents duplicated effort
- * when multiple requests arrive at nearly the same time, assuming that
- * backends send requests with cutoff_times a little bit in the past.
- *
- * clock_time should be the requestor's current local time; the collector
- * uses this to check for the system clock going backward, but it has no
- * effect unless that occurs. We assume clock_time >= cutoff_time, though.
- * ----------
- */
-
-typedef struct PgStat_MsgInquiry
-{
- PgStat_MsgHdr m_hdr;
- TimestampTz clock_time; /* observed local clock time */
- TimestampTz cutoff_time; /* minimum acceptable file timestamp */
- Oid databaseid; /* requested DB (InvalidOid => shared only) */
-} PgStat_MsgInquiry;
-
-
-/* ----------
- * PgStat_TableEntry Per-table info in a MsgTabstat
- * ----------
- */
-typedef struct PgStat_TableEntry
-{
- Oid t_id;
- PgStat_TableCounts t_counts;
-} PgStat_TableEntry;
-
-/* ----------
- * PgStat_MsgTabstat Sent by the backend to report table
- * and buffer access statistics.
- * ----------
- */
-#define PGSTAT_NUM_TABENTRIES \
- ((PGSTAT_MSG_PAYLOAD - sizeof(Oid) - 3 * sizeof(int) - 5 * sizeof(PgStat_Counter)) \
- / sizeof(PgStat_TableEntry))
-
-typedef struct PgStat_MsgTabstat
-{
- PgStat_MsgHdr m_hdr;
- Oid m_databaseid;
- int m_nentries;
- int m_xact_commit;
- int m_xact_rollback;
- PgStat_Counter m_block_read_time; /* times in microseconds */
- PgStat_Counter m_block_write_time;
- PgStat_Counter m_session_time;
- PgStat_Counter m_active_time;
- PgStat_Counter m_idle_in_xact_time;
- PgStat_TableEntry m_entry[PGSTAT_NUM_TABENTRIES];
-} PgStat_MsgTabstat;
-
-
-/* ----------
- * PgStat_MsgTabpurge Sent by the backend to tell the collector
- * about dead tables.
- * ----------
- */
-#define PGSTAT_NUM_TABPURGE \
- ((PGSTAT_MSG_PAYLOAD - sizeof(Oid) - sizeof(int)) \
- / sizeof(Oid))
-
-typedef struct PgStat_MsgTabpurge
-{
- PgStat_MsgHdr m_hdr;
- Oid m_databaseid;
- int m_nentries;
- Oid m_tableid[PGSTAT_NUM_TABPURGE];
-} PgStat_MsgTabpurge;
-
-
-/* ----------
- * PgStat_MsgDropdb Sent by the backend to tell the collector
- * about a dropped database
- * ----------
- */
-typedef struct PgStat_MsgDropdb
-{
- PgStat_MsgHdr m_hdr;
- Oid m_databaseid;
-} PgStat_MsgDropdb;
-
-
-/* ----------
- * PgStat_MsgResetcounter Sent by the backend to tell the collector
- * to reset counters
- * ----------
- */
-typedef struct PgStat_MsgResetcounter
-{
- PgStat_MsgHdr m_hdr;
- Oid m_databaseid;
-} PgStat_MsgResetcounter;
-
-/* ----------
- * PgStat_MsgResetsharedcounter Sent by the backend to tell the collector
- * to reset a shared counter
- * ----------
- */
-typedef struct PgStat_MsgResetsharedcounter
-{
- PgStat_MsgHdr m_hdr;
- PgStat_Shared_Reset_Target m_resettarget;
-} PgStat_MsgResetsharedcounter;
-
-/* ----------
- * PgStat_MsgResetsinglecounter Sent by the backend to tell the collector
- * to reset a single counter
- * ----------
- */
-typedef struct PgStat_MsgResetsinglecounter
-{
- PgStat_MsgHdr m_hdr;
- Oid m_databaseid;
- PgStat_Single_Reset_Type m_resettype;
- Oid m_objectid;
-} PgStat_MsgResetsinglecounter;
-
-/* ----------
- * PgStat_MsgResetslrucounter Sent by the backend to tell the collector
- * to reset a SLRU counter
- * ----------
- */
-typedef struct PgStat_MsgResetslrucounter
-{
- PgStat_MsgHdr m_hdr;
- int m_index;
-} PgStat_MsgResetslrucounter;
-
-/* ----------
- * PgStat_MsgResetreplslotcounter Sent by the backend to tell the collector
- * to reset replication slot counter(s)
- * ----------
- */
-typedef struct PgStat_MsgResetreplslotcounter
-{
- PgStat_MsgHdr m_hdr;
- NameData m_slotname;
- bool clearall;
-} PgStat_MsgResetreplslotcounter;
-
-/* ----------
- * PgStat_MsgAutovacStart Sent by the autovacuum daemon to signal
- * that a database is going to be processed
- * ----------
- */
-typedef struct PgStat_MsgAutovacStart
-{
- PgStat_MsgHdr m_hdr;
- Oid m_databaseid;
- TimestampTz m_start_time;
-} PgStat_MsgAutovacStart;
-
-
-/* ----------
- * PgStat_MsgVacuum Sent by the backend or autovacuum daemon
- * after VACUUM
- * ----------
- */
-typedef struct PgStat_MsgVacuum
-{
- PgStat_MsgHdr m_hdr;
- Oid m_databaseid;
- Oid m_tableoid;
- bool m_autovacuum;
- TimestampTz m_vacuumtime;
- PgStat_Counter m_live_tuples;
- PgStat_Counter m_dead_tuples;
-} PgStat_MsgVacuum;
-
-
-/* ----------
- * PgStat_MsgAnalyze Sent by the backend or autovacuum daemon
- * after ANALYZE
- * ----------
- */
-typedef struct PgStat_MsgAnalyze
-{
- PgStat_MsgHdr m_hdr;
- Oid m_databaseid;
- Oid m_tableoid;
- bool m_autovacuum;
- bool m_resetcounter;
- TimestampTz m_analyzetime;
- PgStat_Counter m_live_tuples;
- PgStat_Counter m_dead_tuples;
-} PgStat_MsgAnalyze;
-
-
-/* ----------
- * PgStat_MsgArchiver Sent by the archiver to update statistics.
- * ----------
- */
-typedef struct PgStat_MsgArchiver
-{
- PgStat_MsgHdr m_hdr;
- bool m_failed; /* Failed attempt */
- char m_xlog[MAX_XFN_CHARS + 1];
- TimestampTz m_timestamp;
-} PgStat_MsgArchiver;
-
-/* ----------
- * PgStat_MsgBgWriter Sent by the bgwriter to update statistics.
- * ----------
- */
-typedef struct PgStat_MsgBgWriter
-{
- PgStat_MsgHdr m_hdr;
-
- PgStat_Counter m_timed_checkpoints;
- PgStat_Counter m_requested_checkpoints;
- PgStat_Counter m_buf_written_checkpoints;
- PgStat_Counter m_buf_written_clean;
- PgStat_Counter m_maxwritten_clean;
- PgStat_Counter m_buf_written_backend;
- PgStat_Counter m_buf_fsync_backend;
- PgStat_Counter m_buf_alloc;
- PgStat_Counter m_checkpoint_write_time; /* times in milliseconds */
- PgStat_Counter m_checkpoint_sync_time;
-} PgStat_MsgBgWriter;
-
-/* ----------
- * PgStat_MsgWal Sent by backends and background processes to update WAL statistics.
- * ----------
- */
-typedef struct PgStat_MsgWal
-{
- PgStat_MsgHdr m_hdr;
- PgStat_Counter m_wal_records;
- PgStat_Counter m_wal_fpi;
- uint64 m_wal_bytes;
- PgStat_Counter m_wal_buffers_full;
- PgStat_Counter m_wal_write;
- PgStat_Counter m_wal_sync;
- PgStat_Counter m_wal_write_time; /* time spent writing wal records in
- * microseconds */
- PgStat_Counter m_wal_sync_time; /* time spent syncing wal records in
- * microseconds */
-} PgStat_MsgWal;
-
-/* ----------
- * PgStat_MsgSLRU Sent by a backend to update SLRU statistics.
- * ----------
- */
-typedef struct PgStat_MsgSLRU
-{
- PgStat_MsgHdr m_hdr;
- PgStat_Counter m_index;
- PgStat_Counter m_blocks_zeroed;
- PgStat_Counter m_blocks_hit;
- PgStat_Counter m_blocks_read;
- PgStat_Counter m_blocks_written;
- PgStat_Counter m_blocks_exists;
- PgStat_Counter m_flush;
- PgStat_Counter m_truncate;
-} PgStat_MsgSLRU;
-
-/* ----------
- * PgStat_MsgReplSlot Sent by a backend or a wal sender to update replication
- * slot statistics.
- * ----------
- */
-typedef struct PgStat_MsgReplSlot
-{
- PgStat_MsgHdr m_hdr;
- NameData m_slotname;
- bool m_create;
- bool m_drop;
- PgStat_Counter m_spill_txns;
- PgStat_Counter m_spill_count;
- PgStat_Counter m_spill_bytes;
- PgStat_Counter m_stream_txns;
- PgStat_Counter m_stream_count;
- PgStat_Counter m_stream_bytes;
- PgStat_Counter m_total_txns;
- PgStat_Counter m_total_bytes;
-} PgStat_MsgReplSlot;
-
-
-/* ----------
- * PgStat_MsgRecoveryConflict Sent by the backend upon recovery conflict
- * ----------
- */
-typedef struct PgStat_MsgRecoveryConflict
-{
- PgStat_MsgHdr m_hdr;
-
- Oid m_databaseid;
- int m_reason;
-} PgStat_MsgRecoveryConflict;
-
-/* ----------
- * PgStat_MsgTempFile Sent by the backend upon creating a temp file
- * ----------
- */
-typedef struct PgStat_MsgTempFile
-{
- PgStat_MsgHdr m_hdr;
-
- Oid m_databaseid;
- size_t m_filesize;
-} PgStat_MsgTempFile;
-
-/* ----------
- * PgStat_FunctionCounts The actual per-function counts kept by a backend
- *
- * This struct should contain only actual event counters, because we memcmp
- * it against zeroes to detect whether there are any counts to transmit.
- *
- * Note that the time counters are in instr_time format here. We convert to
- * microseconds in PgStat_Counter format when transmitting to the collector.
- * ----------
- */
-typedef struct PgStat_FunctionCounts
-{
- PgStat_Counter f_numcalls;
- instr_time f_total_time;
- instr_time f_self_time;
-} PgStat_FunctionCounts;
-
-/* ----------
- * PgStat_BackendFunctionEntry Entry in backend's per-function hash table
- * ----------
- */
-typedef struct PgStat_BackendFunctionEntry
-{
- Oid f_id;
- PgStat_FunctionCounts f_counts;
-} PgStat_BackendFunctionEntry;
-
-/* ----------
- * PgStat_FunctionEntry Per-function info in a MsgFuncstat
- * ----------
- */
-typedef struct PgStat_FunctionEntry
-{
- Oid f_id;
- PgStat_Counter f_numcalls;
- PgStat_Counter f_total_time; /* times in microseconds */
- PgStat_Counter f_self_time;
-} PgStat_FunctionEntry;
-
-/* ----------
- * PgStat_MsgFuncstat Sent by the backend to report function
- * usage statistics.
- * ----------
- */
-#define PGSTAT_NUM_FUNCENTRIES \
- ((PGSTAT_MSG_PAYLOAD - sizeof(Oid) - sizeof(int)) \
- / sizeof(PgStat_FunctionEntry))
-
-typedef struct PgStat_MsgFuncstat
-{
- PgStat_MsgHdr m_hdr;
- Oid m_databaseid;
- int m_nentries;
- PgStat_FunctionEntry m_entry[PGSTAT_NUM_FUNCENTRIES];
-} PgStat_MsgFuncstat;
-
-/* ----------
- * PgStat_MsgFuncpurge Sent by the backend to tell the collector
- * about dead functions.
- * ----------
- */
-#define PGSTAT_NUM_FUNCPURGE \
- ((PGSTAT_MSG_PAYLOAD - sizeof(Oid) - sizeof(int)) \
- / sizeof(Oid))
-
-typedef struct PgStat_MsgFuncpurge
-{
- PgStat_MsgHdr m_hdr;
- Oid m_databaseid;
- int m_nentries;
- Oid m_functionid[PGSTAT_NUM_FUNCPURGE];
-} PgStat_MsgFuncpurge;
-
-/* ----------
- * PgStat_MsgDeadlock Sent by the backend to tell the collector
- * about a deadlock that occurred.
- * ----------
- */
-typedef struct PgStat_MsgDeadlock
-{
- PgStat_MsgHdr m_hdr;
- Oid m_databaseid;
-} PgStat_MsgDeadlock;
-
-/* ----------
- * PgStat_MsgChecksumFailure Sent by the backend to tell the collector
- * about checksum failures noticed.
- * ----------
- */
-typedef struct PgStat_MsgChecksumFailure
-{
- PgStat_MsgHdr m_hdr;
- Oid m_databaseid;
- int m_failurecount;
- TimestampTz m_failure_time;
-} PgStat_MsgChecksumFailure;
-
-/* ----------
- * PgStat_MsgConnect Sent by the backend upon connection
- * establishment
- * ----------
- */
-typedef struct PgStat_MsgConnect
-{
- PgStat_MsgHdr m_hdr;
- Oid m_databaseid;
-} PgStat_MsgConnect;
-
-/* ----------
- * PgStat_MsgDisconnect Sent by the backend when disconnecting
- * ----------
- */
-typedef struct PgStat_MsgDisconnect
-{
- PgStat_MsgHdr m_hdr;
- Oid m_databaseid;
- SessionEndType m_cause;
-} PgStat_MsgDisconnect;
-
-/* ----------
- * PgStat_Msg Union over all possible messages.
- * ----------
- */
-typedef union PgStat_Msg
-{
- PgStat_MsgHdr msg_hdr;
- PgStat_MsgDummy msg_dummy;
- PgStat_MsgInquiry msg_inquiry;
- PgStat_MsgTabstat msg_tabstat;
- PgStat_MsgTabpurge msg_tabpurge;
- PgStat_MsgDropdb msg_dropdb;
- PgStat_MsgResetcounter msg_resetcounter;
- PgStat_MsgResetsharedcounter msg_resetsharedcounter;
- PgStat_MsgResetsinglecounter msg_resetsinglecounter;
- PgStat_MsgResetslrucounter msg_resetslrucounter;
- PgStat_MsgResetreplslotcounter msg_resetreplslotcounter;
- PgStat_MsgAutovacStart msg_autovacuum_start;
- PgStat_MsgVacuum msg_vacuum;
- PgStat_MsgAnalyze msg_analyze;
- PgStat_MsgArchiver msg_archiver;
- PgStat_MsgBgWriter msg_bgwriter;
- PgStat_MsgWal msg_wal;
- PgStat_MsgSLRU msg_slru;
- PgStat_MsgFuncstat msg_funcstat;
- PgStat_MsgFuncpurge msg_funcpurge;
- PgStat_MsgRecoveryConflict msg_recoveryconflict;
- PgStat_MsgDeadlock msg_deadlock;
- PgStat_MsgTempFile msg_tempfile;
- PgStat_MsgChecksumFailure msg_checksumfailure;
- PgStat_MsgReplSlot msg_replslot;
- PgStat_MsgConnect msg_connect;
- PgStat_MsgDisconnect msg_disconnect;
-} PgStat_Msg;
-
-
-/* ------------------------------------------------------------
- * Statistic collector data structures follow
- *
- * PGSTAT_FILE_FORMAT_ID should be changed whenever any of these
- * data structures change.
- * ------------------------------------------------------------
- */
-
-#define PGSTAT_FILE_FORMAT_ID 0x01A5BCA2
-
-/* ----------
- * PgStat_StatDBEntry The collector's data per database
- * ----------
- */
-typedef struct PgStat_StatDBEntry
-{
- Oid databaseid;
- PgStat_Counter n_xact_commit;
- PgStat_Counter n_xact_rollback;
- PgStat_Counter n_blocks_fetched;
- PgStat_Counter n_blocks_hit;
- PgStat_Counter n_tuples_returned;
- PgStat_Counter n_tuples_fetched;
- PgStat_Counter n_tuples_inserted;
- PgStat_Counter n_tuples_updated;
- PgStat_Counter n_tuples_deleted;
- TimestampTz last_autovac_time;
- PgStat_Counter n_conflict_tablespace;
- PgStat_Counter n_conflict_lock;
- PgStat_Counter n_conflict_snapshot;
- PgStat_Counter n_conflict_bufferpin;
- PgStat_Counter n_conflict_startup_deadlock;
- PgStat_Counter n_temp_files;
- PgStat_Counter n_temp_bytes;
- PgStat_Counter n_deadlocks;
- PgStat_Counter n_checksum_failures;
- TimestampTz last_checksum_failure;
- PgStat_Counter n_block_read_time; /* times in microseconds */
- PgStat_Counter n_block_write_time;
- PgStat_Counter n_sessions;
- PgStat_Counter total_session_time;
- PgStat_Counter total_active_time;
- PgStat_Counter total_idle_in_xact_time;
- PgStat_Counter n_sessions_abandoned;
- PgStat_Counter n_sessions_fatal;
- PgStat_Counter n_sessions_killed;
-
- TimestampTz stat_reset_timestamp;
- TimestampTz stats_timestamp; /* time of db stats file update */
-
- /*
- * tables and functions must be last in the struct, because we don't write
- * the pointers out to the stats file.
- */
- HTAB *tables;
- HTAB *functions;
-} PgStat_StatDBEntry;
-
-
-/* ----------
- * PgStat_StatTabEntry The collector's data per table (or index)
- * ----------
- */
-typedef struct PgStat_StatTabEntry
-{
- Oid tableid;
-
- PgStat_Counter numscans;
-
- PgStat_Counter tuples_returned;
- PgStat_Counter tuples_fetched;
-
- PgStat_Counter tuples_inserted;
- PgStat_Counter tuples_updated;
- PgStat_Counter tuples_deleted;
- PgStat_Counter tuples_hot_updated;
-
- PgStat_Counter n_live_tuples;
- PgStat_Counter n_dead_tuples;
- PgStat_Counter changes_since_analyze;
- PgStat_Counter unused_counter; /* kept for ABI compatibility */
- PgStat_Counter inserts_since_vacuum;
-
- PgStat_Counter blocks_fetched;
- PgStat_Counter blocks_hit;
-
- TimestampTz vacuum_timestamp; /* user initiated vacuum */
- PgStat_Counter vacuum_count;
- TimestampTz autovac_vacuum_timestamp; /* autovacuum initiated */
- PgStat_Counter autovac_vacuum_count;
- TimestampTz analyze_timestamp; /* user initiated */
- PgStat_Counter analyze_count;
- TimestampTz autovac_analyze_timestamp; /* autovacuum initiated */
- PgStat_Counter autovac_analyze_count;
-} PgStat_StatTabEntry;
-
-
-/* ----------
- * PgStat_StatFuncEntry The collector's data per function
- * ----------
- */
-typedef struct PgStat_StatFuncEntry
-{
- Oid functionid;
-
- PgStat_Counter f_numcalls;
-
- PgStat_Counter f_total_time; /* times in microseconds */
- PgStat_Counter f_self_time;
-} PgStat_StatFuncEntry;
-
-
-/*
- * Archiver statistics kept in the stats collector
- */
-typedef struct PgStat_ArchiverStats
-{
- PgStat_Counter archived_count; /* archival successes */
- char last_archived_wal[MAX_XFN_CHARS + 1]; /* last WAL file
- * archived */
- TimestampTz last_archived_timestamp; /* last archival success time */
- PgStat_Counter failed_count; /* failed archival attempts */
- char last_failed_wal[MAX_XFN_CHARS + 1]; /* WAL file involved in
- * last failure */
- TimestampTz last_failed_timestamp; /* last archival failure time */
- TimestampTz stat_reset_timestamp;
-} PgStat_ArchiverStats;
-
-/*
- * Global statistics kept in the stats collector
- */
-typedef struct PgStat_GlobalStats
-{
- TimestampTz stats_timestamp; /* time of stats file update */
- PgStat_Counter timed_checkpoints;
- PgStat_Counter requested_checkpoints;
- PgStat_Counter checkpoint_write_time; /* times in milliseconds */
- PgStat_Counter checkpoint_sync_time;
- PgStat_Counter buf_written_checkpoints;
- PgStat_Counter buf_written_clean;
- PgStat_Counter maxwritten_clean;
- PgStat_Counter buf_written_backend;
- PgStat_Counter buf_fsync_backend;
- PgStat_Counter buf_alloc;
- TimestampTz stat_reset_timestamp;
-} PgStat_GlobalStats;
-
-/*
- * WAL statistics kept in the stats collector
- */
-typedef struct PgStat_WalStats
-{
- PgStat_Counter wal_records;
- PgStat_Counter wal_fpi;
- uint64 wal_bytes;
- PgStat_Counter wal_buffers_full;
- PgStat_Counter wal_write;
- PgStat_Counter wal_sync;
- PgStat_Counter wal_write_time;
- PgStat_Counter wal_sync_time;
- TimestampTz stat_reset_timestamp;
-} PgStat_WalStats;
-
-/*
- * SLRU statistics kept in the stats collector
- */
-typedef struct PgStat_SLRUStats
-{
- PgStat_Counter blocks_zeroed;
- PgStat_Counter blocks_hit;
- PgStat_Counter blocks_read;
- PgStat_Counter blocks_written;
- PgStat_Counter blocks_exists;
- PgStat_Counter flush;
- PgStat_Counter truncate;
- TimestampTz stat_reset_timestamp;
-} PgStat_SLRUStats;
-
-/*
- * Replication slot statistics kept in the stats collector
- */
-typedef struct PgStat_StatReplSlotEntry
-{
- NameData slotname;
- PgStat_Counter spill_txns;
- PgStat_Counter spill_count;
- PgStat_Counter spill_bytes;
- PgStat_Counter stream_txns;
- PgStat_Counter stream_count;
- PgStat_Counter stream_bytes;
- PgStat_Counter total_txns;
- PgStat_Counter total_bytes;
- TimestampTz stat_reset_timestamp;
-} PgStat_StatReplSlotEntry;
-
-
-/*
- * Working state needed to accumulate per-function-call timing statistics.
- */
-typedef struct PgStat_FunctionCallUsage
-{
- /* Link to function's hashtable entry (must still be there at exit!) */
- /* NULL means we are not tracking the current function call */
- PgStat_FunctionCounts *fs;
- /* Total time previously charged to function, as of function start */
- instr_time save_f_total_time;
- /* Backend-wide total time as of function start */
- instr_time save_total;
- /* system clock as of function start */
- instr_time f_start;
-} PgStat_FunctionCallUsage;
-
-
-/* ----------
- * GUC parameters
- * ----------
- */
-extern PGDLLIMPORT bool pgstat_track_counts;
-extern PGDLLIMPORT int pgstat_track_functions;
-extern char *pgstat_stat_directory;
-extern char *pgstat_stat_tmpname;
-extern char *pgstat_stat_filename;
-
-/*
- * BgWriter statistics counters are updated directly by bgwriter and bufmgr
- */
-extern PgStat_MsgBgWriter BgWriterStats;
-
-/*
- * WAL statistics counter is updated by backends and background processes
- */
-extern PgStat_MsgWal WalStats;
-
-/*
- * Updated by pgstat_count_buffer_*_time macros
- */
-extern PgStat_Counter pgStatBlockReadTime;
-extern PgStat_Counter pgStatBlockWriteTime;
-
-/*
- * Updated by pgstat_count_conn_*_time macros, called by
- * pgstat_report_activity().
- */
-extern PgStat_Counter pgStatActiveTime;
-extern PgStat_Counter pgStatTransactionIdleTime;
-
-
-/*
- * Updated by the traffic cop and in errfinish()
- */
-extern SessionEndType pgStatSessionEndCause;
-
-/* ----------
- * Functions called from postmaster
- * ----------
- */
-extern void pgstat_init(void);
-extern int pgstat_start(void);
-extern void pgstat_reset_all(void);
-extern void allow_immediate_pgstat_restart(void);
-
-#ifdef EXEC_BACKEND
-extern void PgstatCollectorMain(int argc, char *argv[]) pg_attribute_noreturn();
-#endif
-
-
-/* ----------
- * Functions called from backends
- * ----------
- */
-extern void pgstat_ping(void);
-
-extern void pgstat_report_stat(bool force);
-extern void pgstat_vacuum_stat(void);
-extern void pgstat_drop_database(Oid databaseid);
-
-extern void pgstat_clear_snapshot(void);
-extern void pgstat_reset_counters(void);
-extern void pgstat_reset_shared_counters(const char *);
-extern void pgstat_reset_single_counter(Oid objectid, PgStat_Single_Reset_Type type);
-extern void pgstat_reset_slru_counter(const char *);
-extern void pgstat_reset_replslot_counter(const char *name);
-
-extern void pgstat_report_connect(Oid dboid);
-extern void pgstat_report_autovac(Oid dboid);
-extern void pgstat_report_vacuum(Oid tableoid, bool shared,
- PgStat_Counter livetuples, PgStat_Counter deadtuples);
-extern void pgstat_report_analyze(Relation rel,
- PgStat_Counter livetuples, PgStat_Counter deadtuples,
- bool resetcounter);
-
-extern void pgstat_report_recovery_conflict(int reason);
-extern void pgstat_report_deadlock(void);
-extern void pgstat_report_checksum_failures_in_db(Oid dboid, int failurecount);
-extern void pgstat_report_checksum_failure(void);
-extern void pgstat_report_replslot(const PgStat_StatReplSlotEntry *repSlotStat);
-extern void pgstat_report_replslot_create(const char *slotname);
-extern void pgstat_report_replslot_drop(const char *slotname);
-
-extern void pgstat_initialize(void);
-
-
-extern PgStat_TableStatus *find_tabstat_entry(Oid rel_id);
-extern PgStat_BackendFunctionEntry *find_funcstat_entry(Oid func_id);
-
-extern void pgstat_initstats(Relation rel);
-
-/* nontransactional event counts are simple enough to inline */
-
-#define pgstat_count_heap_scan(rel) \
- do { \
- if ((rel)->pgstat_info != NULL) \
- (rel)->pgstat_info->t_counts.t_numscans++; \
- } while (0)
-#define pgstat_count_heap_getnext(rel) \
- do { \
- if ((rel)->pgstat_info != NULL) \
- (rel)->pgstat_info->t_counts.t_tuples_returned++; \
- } while (0)
-#define pgstat_count_heap_fetch(rel) \
- do { \
- if ((rel)->pgstat_info != NULL) \
- (rel)->pgstat_info->t_counts.t_tuples_fetched++; \
- } while (0)
-#define pgstat_count_index_scan(rel) \
- do { \
- if ((rel)->pgstat_info != NULL) \
- (rel)->pgstat_info->t_counts.t_numscans++; \
- } while (0)
-#define pgstat_count_index_tuples(rel, n) \
- do { \
- if ((rel)->pgstat_info != NULL) \
- (rel)->pgstat_info->t_counts.t_tuples_returned += (n); \
- } while (0)
-#define pgstat_count_buffer_read(rel) \
- do { \
- if ((rel)->pgstat_info != NULL) \
- (rel)->pgstat_info->t_counts.t_blocks_fetched++; \
- } while (0)
-#define pgstat_count_buffer_hit(rel) \
- do { \
- if ((rel)->pgstat_info != NULL) \
- (rel)->pgstat_info->t_counts.t_blocks_hit++; \
- } while (0)
-#define pgstat_count_buffer_read_time(n) \
- (pgStatBlockReadTime += (n))
-#define pgstat_count_buffer_write_time(n) \
- (pgStatBlockWriteTime += (n))
-#define pgstat_count_conn_active_time(n) \
- (pgStatActiveTime += (n))
-#define pgstat_count_conn_txn_idle_time(n) \
- (pgStatTransactionIdleTime += (n))
-
-extern void pgstat_count_heap_insert(Relation rel, PgStat_Counter n);
-extern void pgstat_count_heap_update(Relation rel, bool hot);
-extern void pgstat_count_heap_delete(Relation rel);
-extern void pgstat_count_truncate(Relation rel);
-extern void pgstat_update_heap_dead_tuples(Relation rel, int delta);
-
-struct FunctionCallInfoBaseData;
-extern void pgstat_init_function_usage(struct FunctionCallInfoBaseData *fcinfo,
- PgStat_FunctionCallUsage *fcu);
-extern void pgstat_end_function_usage(PgStat_FunctionCallUsage *fcu,
- bool finalize);
-
-extern void AtEOXact_PgStat(bool isCommit, bool parallel);
-extern void AtEOSubXact_PgStat(bool isCommit, int nestDepth);
-
-extern void AtPrepare_PgStat(void);
-extern void PostPrepare_PgStat(void);
-
-extern void pgstat_twophase_postcommit(TransactionId xid, uint16 info,
- void *recdata, uint32 len);
-extern void pgstat_twophase_postabort(TransactionId xid, uint16 info,
- void *recdata, uint32 len);
-
-extern void pgstat_send_archiver(const char *xlog, bool failed);
-extern void pgstat_send_bgwriter(void);
-extern void pgstat_send_wal(bool force);
-
-/* ----------
- * Support functions for the SQL-callable functions to
- * generate the pgstat* views.
- * ----------
- */
-extern PgStat_StatDBEntry *pgstat_fetch_stat_dbentry(Oid dbid);
-extern PgStat_StatTabEntry *pgstat_fetch_stat_tabentry(Oid relid);
-extern PgStat_StatFuncEntry *pgstat_fetch_stat_funcentry(Oid funcid);
-extern PgStat_ArchiverStats *pgstat_fetch_stat_archiver(void);
-extern PgStat_GlobalStats *pgstat_fetch_global(void);
-extern PgStat_WalStats *pgstat_fetch_stat_wal(void);
-extern PgStat_SLRUStats *pgstat_fetch_slru(void);
-extern PgStat_StatReplSlotEntry *pgstat_fetch_replslot(NameData slotname);
-
-extern void pgstat_count_slru_page_zeroed(int slru_idx);
-extern void pgstat_count_slru_page_hit(int slru_idx);
-extern void pgstat_count_slru_page_read(int slru_idx);
-extern void pgstat_count_slru_page_written(int slru_idx);
-extern void pgstat_count_slru_page_exists(int slru_idx);
-extern void pgstat_count_slru_flush(int slru_idx);
-extern void pgstat_count_slru_truncate(int slru_idx);
-extern const char *pgstat_slru_name(int slru_idx);
-extern int pgstat_slru_index(const char *name);
-
-#endif /* PGSTAT_H */
diff --git a/contrib/libs/postgresql/src/include/pgtar.h b/contrib/libs/postgresql/src/include/pgtar.h
deleted file mode 100644
index 6d47ece6520..00000000000
--- a/contrib/libs/postgresql/src/include/pgtar.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pgtar.h
- * Functions for manipulating tarfile datastructures (src/port/tar.c)
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/pgtar.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_TAR_H
-#define PG_TAR_H
-
-#define TAR_BLOCK_SIZE 512
-
-enum tarError
-{
- TAR_OK = 0,
- TAR_NAME_TOO_LONG,
- TAR_SYMLINK_TOO_LONG
-};
-
-extern enum tarError tarCreateHeader(char *h, const char *filename,
- const char *linktarget, pgoff_t size,
- mode_t mode, uid_t uid, gid_t gid,
- time_t mtime);
-extern uint64 read_tar_number(const char *s, int len);
-extern void print_tar_number(char *s, int len, uint64 val);
-extern int tarChecksum(char *header);
-
-/*
- * Compute the number of padding bytes required for an entry in a tar
- * archive. We must pad out to a multiple of TAR_BLOCK_SIZE. Since that's
- * a power of 2, we can use TYPEALIGN().
- */
-static inline size_t
-tarPaddingBytesRequired(size_t len)
-{
- return TYPEALIGN(TAR_BLOCK_SIZE, len) - len;
-}
-
-#endif
diff --git a/contrib/libs/postgresql/src/include/pgtime.h b/contrib/libs/postgresql/src/include/pgtime.h
deleted file mode 100644
index 28bd27e7f79..00000000000
--- a/contrib/libs/postgresql/src/include/pgtime.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pgtime.h
- * PostgreSQL internal timezone library
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- * src/include/pgtime.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef _PGTIME_H
-#define _PGTIME_H
-
-
-/*
- * The API of this library is generally similar to the corresponding
- * C library functions, except that we use pg_time_t which (we hope) is
- * 64 bits wide, and which is most definitely signed not unsigned.
- */
-
-typedef int64 pg_time_t;
-
-struct pg_tm
-{
- int tm_sec;
- int tm_min;
- int tm_hour;
- int tm_mday;
- int tm_mon; /* origin 1, not 0! */
- int tm_year; /* relative to 1900 */
- int tm_wday;
- int tm_yday;
- int tm_isdst;
- long int tm_gmtoff;
- const char *tm_zone;
-};
-
-typedef struct pg_tz pg_tz;
-typedef struct pg_tzenum pg_tzenum;
-
-/* Maximum length of a timezone name (not including trailing null) */
-#define TZ_STRLEN_MAX 255
-
-/* these functions are in localtime.c */
-
-extern struct pg_tm *pg_localtime(const pg_time_t *timep, const pg_tz *tz);
-extern struct pg_tm *pg_gmtime(const pg_time_t *timep);
-extern int pg_next_dst_boundary(const pg_time_t *timep,
- long int *before_gmtoff,
- int *before_isdst,
- pg_time_t *boundary,
- long int *after_gmtoff,
- int *after_isdst,
- const pg_tz *tz);
-extern bool pg_interpret_timezone_abbrev(const char *abbrev,
- const pg_time_t *timep,
- long int *gmtoff,
- int *isdst,
- const pg_tz *tz);
-extern bool pg_get_timezone_offset(const pg_tz *tz, long int *gmtoff);
-extern const char *pg_get_timezone_name(pg_tz *tz);
-extern bool pg_tz_acceptable(pg_tz *tz);
-
-/* these functions are in strftime.c */
-
-extern size_t pg_strftime(char *s, size_t max, const char *format,
- const struct pg_tm *tm);
-
-/* these functions and variables are in pgtz.c */
-
-extern PGDLLIMPORT pg_tz *session_timezone;
-extern pg_tz *log_timezone;
-
-extern void pg_timezone_initialize(void);
-extern pg_tz *pg_tzset(const char *tzname);
-extern pg_tz *pg_tzset_offset(long gmtoffset);
-
-extern pg_tzenum *pg_tzenumerate_start(void);
-extern pg_tz *pg_tzenumerate_next(pg_tzenum *dir);
-extern void pg_tzenumerate_end(pg_tzenum *dir);
-
-#endif /* _PGTIME_H */
diff --git a/contrib/libs/postgresql/src/include/port.h b/contrib/libs/postgresql/src/include/port.h
deleted file mode 100644
index 82f63de3250..00000000000
--- a/contrib/libs/postgresql/src/include/port.h
+++ /dev/null
@@ -1,555 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * port.h
- * Header for src/port/ compatibility functions.
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/port.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_PORT_H
-#define PG_PORT_H
-
-#include <ctype.h>
-#include <netdb.h>
-#include <pwd.h>
-
-/*
- * Windows has enough specialized port stuff that we push most of it off
- * into another file.
- * Note: Some CYGWIN includes might #define WIN32.
- */
-#if defined(WIN32) && !defined(__CYGWIN__)
-#include "port/win32_port.h"
-#endif
-
-/* socket has a different definition on WIN32 */
-#ifndef WIN32
-typedef int pgsocket;
-
-#define PGINVALID_SOCKET (-1)
-#else
-typedef SOCKET pgsocket;
-
-#define PGINVALID_SOCKET INVALID_SOCKET
-#endif
-
-/* non-blocking */
-extern bool pg_set_noblock(pgsocket sock);
-extern bool pg_set_block(pgsocket sock);
-
-/* Portable path handling for Unix/Win32 (in path.c) */
-
-extern bool has_drive_prefix(const char *filename);
-extern char *first_dir_separator(const char *filename);
-extern char *last_dir_separator(const char *filename);
-extern char *first_path_var_separator(const char *pathlist);
-extern void join_path_components(char *ret_path,
- const char *head, const char *tail);
-extern void canonicalize_path(char *path);
-extern void make_native_path(char *path);
-extern void cleanup_path(char *path);
-extern bool path_contains_parent_reference(const char *path);
-extern bool path_is_relative_and_below_cwd(const char *path);
-extern bool path_is_prefix_of_path(const char *path1, const char *path2);
-extern char *make_absolute_path(const char *path);
-extern const char *get_progname(const char *argv0);
-extern void get_share_path(const char *my_exec_path, char *ret_path);
-extern void get_etc_path(const char *my_exec_path, char *ret_path);
-extern void get_include_path(const char *my_exec_path, char *ret_path);
-extern void get_pkginclude_path(const char *my_exec_path, char *ret_path);
-extern void get_includeserver_path(const char *my_exec_path, char *ret_path);
-extern void get_lib_path(const char *my_exec_path, char *ret_path);
-extern void get_pkglib_path(const char *my_exec_path, char *ret_path);
-extern void get_locale_path(const char *my_exec_path, char *ret_path);
-extern void get_doc_path(const char *my_exec_path, char *ret_path);
-extern void get_html_path(const char *my_exec_path, char *ret_path);
-extern void get_man_path(const char *my_exec_path, char *ret_path);
-extern bool get_home_path(char *ret_path);
-extern void get_parent_directory(char *path);
-
-/* common/pgfnames.c */
-extern char **pgfnames(const char *path);
-extern void pgfnames_cleanup(char **filenames);
-
-/*
- * is_absolute_path
- *
- * By making this a macro we avoid needing to include path.c in libpq.
- */
-#ifndef WIN32
-#define IS_DIR_SEP(ch) ((ch) == '/')
-
-#define is_absolute_path(filename) \
-( \
- IS_DIR_SEP((filename)[0]) \
-)
-#else
-#define IS_DIR_SEP(ch) ((ch) == '/' || (ch) == '\\')
-
-/* See path_is_relative_and_below_cwd() for how we handle 'E:abc'. */
-#define is_absolute_path(filename) \
-( \
- IS_DIR_SEP((filename)[0]) || \
- (isalpha((unsigned char) ((filename)[0])) && (filename)[1] == ':' && \
- IS_DIR_SEP((filename)[2])) \
-)
-#endif
-
-/*
- * This macro provides a centralized list of all errnos that identify
- * hard failure of a previously-established network connection.
- * The macro is intended to be used in a switch statement, in the form
- * "case ALL_CONNECTION_FAILURE_ERRNOS:".
- *
- * Note: this groups EPIPE and ECONNRESET, which we take to indicate a
- * probable server crash, with other errors that indicate loss of network
- * connectivity without proving much about the server's state. Places that
- * are actually reporting errors typically single out EPIPE and ECONNRESET,
- * while allowing the network failures to be reported generically.
- */
-#define ALL_CONNECTION_FAILURE_ERRNOS \
- EPIPE: \
- case ECONNRESET: \
- case ECONNABORTED: \
- case EHOSTDOWN: \
- case EHOSTUNREACH: \
- case ENETDOWN: \
- case ENETRESET: \
- case ENETUNREACH
-
-/* Portable locale initialization (in exec.c) */
-extern void set_pglocale_pgservice(const char *argv0, const char *app);
-
-/* Portable way to find and execute binaries (in exec.c) */
-extern int validate_exec(const char *path);
-extern int find_my_exec(const char *argv0, char *retpath);
-extern int find_other_exec(const char *argv0, const char *target,
- const char *versionstr, char *retpath);
-extern char *pipe_read_line(char *cmd, char *line, int maxsize);
-
-/* Doesn't belong here, but this is used with find_other_exec(), so... */
-#define PG_BACKEND_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n"
-
-
-#if defined(WIN32) || defined(__CYGWIN__)
-#define EXE ".exe"
-#else
-#define EXE ""
-#endif
-
-#if defined(WIN32) && !defined(__CYGWIN__)
-#define DEVNULL "nul"
-#else
-#define DEVNULL "/dev/null"
-#endif
-
-/* Portable delay handling */
-extern void pg_usleep(long microsec);
-
-/* Portable SQL-like case-independent comparisons and conversions */
-extern int pg_strcasecmp(const char *s1, const char *s2);
-extern int pg_strncasecmp(const char *s1, const char *s2, size_t n);
-extern unsigned char pg_toupper(unsigned char ch);
-extern unsigned char pg_tolower(unsigned char ch);
-extern unsigned char pg_ascii_toupper(unsigned char ch);
-extern unsigned char pg_ascii_tolower(unsigned char ch);
-
-/*
- * Beginning in v12, we always replace snprintf() and friends with our own
- * implementation. This symbol is no longer consulted by the core code,
- * but keep it defined anyway in case any extensions are looking at it.
- */
-#define USE_REPL_SNPRINTF 1
-
-/*
- * Versions of libintl >= 0.13 try to replace printf() and friends with
- * macros to their own versions that understand the %$ format. We do the
- * same, so disable their macros, if they exist.
- */
-#ifdef vsnprintf
-#undef vsnprintf
-#endif
-#ifdef snprintf
-#undef snprintf
-#endif
-#ifdef vsprintf
-#undef vsprintf
-#endif
-#ifdef sprintf
-#undef sprintf
-#endif
-#ifdef vfprintf
-#undef vfprintf
-#endif
-#ifdef fprintf
-#undef fprintf
-#endif
-#ifdef vprintf
-#undef vprintf
-#endif
-#ifdef printf
-#undef printf
-#endif
-
-extern int pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
-extern int pg_snprintf(char *str, size_t count, const char *fmt,...) pg_attribute_printf(3, 4);
-extern int pg_vsprintf(char *str, const char *fmt, va_list args);
-extern int pg_sprintf(char *str, const char *fmt,...) pg_attribute_printf(2, 3);
-extern int pg_vfprintf(FILE *stream, const char *fmt, va_list args);
-extern int pg_fprintf(FILE *stream, const char *fmt,...) pg_attribute_printf(2, 3);
-extern int pg_vprintf(const char *fmt, va_list args);
-extern int pg_printf(const char *fmt,...) pg_attribute_printf(1, 2);
-
-/*
- * We use __VA_ARGS__ for printf to prevent replacing references to
- * the "printf" format archetype in format() attribute declarations.
- * That unfortunately means that taking a function pointer to printf
- * will not do what we'd wish. (If you need to do that, you must name
- * pg_printf explicitly.) For printf's sibling functions, use
- * parameterless macros so that function pointers will work unsurprisingly.
- */
-#define vsnprintf pg_vsnprintf
-#define snprintf pg_snprintf
-#define vsprintf pg_vsprintf
-#define sprintf pg_sprintf
-#define vfprintf pg_vfprintf
-#define fprintf pg_fprintf
-#define vprintf pg_vprintf
-#define printf(...) pg_printf(__VA_ARGS__)
-
-/* This is also provided by snprintf.c */
-extern int pg_strfromd(char *str, size_t count, int precision, double value);
-
-/* Replace strerror() with our own, somewhat more robust wrapper */
-extern char *pg_strerror(int errnum);
-#define strerror pg_strerror
-
-/* Likewise for strerror_r(); note we prefer the GNU API for that */
-extern char *pg_strerror_r(int errnum, char *buf, size_t buflen);
-#define strerror_r pg_strerror_r
-#define PG_STRERROR_R_BUFLEN 256 /* Recommended buffer size for strerror_r */
-
-/* Wrap strsignal(), or provide our own version if necessary */
-extern const char *pg_strsignal(int signum);
-
-extern int pclose_check(FILE *stream);
-
-/* Global variable holding time zone information. */
-#if defined(WIN32) || defined(__CYGWIN__)
-#define TIMEZONE_GLOBAL _timezone
-#define TZNAME_GLOBAL _tzname
-#else
-#define TIMEZONE_GLOBAL timezone
-#define TZNAME_GLOBAL tzname
-#endif
-
-#if defined(WIN32) || defined(__CYGWIN__)
-/*
- * Win32 doesn't have reliable rename/unlink during concurrent access.
- */
-extern int pgrename(const char *from, const char *to);
-extern int pgunlink(const char *path);
-
-/* Include this first so later includes don't see these defines */
-#ifdef _MSC_VER
-#include <io.h>
-#endif
-
-#define rename(from, to) pgrename(from, to)
-#define unlink(path) pgunlink(path)
-#endif /* defined(WIN32) || defined(__CYGWIN__) */
-
-/*
- * Win32 also doesn't have symlinks, but we can emulate them with
- * junction points on newer Win32 versions.
- *
- * Cygwin has its own symlinks which work on Win95/98/ME where
- * junction points don't, so use those instead. We have no way of
- * knowing what type of system Cygwin binaries will be run on.
- * Note: Some CYGWIN includes might #define WIN32.
- */
-#if defined(WIN32) && !defined(__CYGWIN__)
-extern int pgsymlink(const char *oldpath, const char *newpath);
-extern int pgreadlink(const char *path, char *buf, size_t size);
-extern bool pgwin32_is_junction(const char *path);
-
-#define symlink(oldpath, newpath) pgsymlink(oldpath, newpath)
-#define readlink(path, buf, size) pgreadlink(path, buf, size)
-#endif
-
-extern bool rmtree(const char *path, bool rmtopdir);
-
-#if defined(WIN32) && !defined(__CYGWIN__)
-
-/*
- * open() and fopen() replacements to allow deletion of open files and
- * passing of other special options.
- */
-#define O_DIRECT 0x80000000
-extern int pgwin32_open(const char *, int,...);
-extern FILE *pgwin32_fopen(const char *, const char *);
-#define open(a,b,c) pgwin32_open(a,b,c)
-#define fopen(a,b) pgwin32_fopen(a,b)
-
-/*
- * Mingw-w64 headers #define popen and pclose to _popen and _pclose. We want
- * to use our popen wrapper, rather than plain _popen, so override that. For
- * consistency, use our version of pclose, too.
- */
-#ifdef popen
-#undef popen
-#endif
-#ifdef pclose
-#undef pclose
-#endif
-
-/*
- * system() and popen() replacements to enclose the command in an extra
- * pair of quotes.
- */
-extern int pgwin32_system(const char *command);
-extern FILE *pgwin32_popen(const char *command, const char *type);
-
-#define system(a) pgwin32_system(a)
-#define popen(a,b) pgwin32_popen(a,b)
-#define pclose(a) _pclose(a)
-
-/* New versions of MingW have gettimeofday, old mingw and msvc don't */
-#ifndef HAVE_GETTIMEOFDAY
-/* Last parameter not used */
-extern int gettimeofday(struct timeval *tp, struct timezone *tzp);
-#endif
-#else /* !WIN32 */
-
-/*
- * Win32 requires a special close for sockets and pipes, while on Unix
- * close() does them all.
- */
-#define closesocket close
-#endif /* WIN32 */
-
-/*
- * On Windows, setvbuf() does not support _IOLBF mode, and interprets that
- * as _IOFBF. To add insult to injury, setvbuf(file, NULL, _IOFBF, 0)
- * crashes outright if "parameter validation" is enabled. Therefore, in
- * places where we'd like to select line-buffered mode, we fall back to
- * unbuffered mode instead on Windows. Always use PG_IOLBF not _IOLBF
- * directly in order to implement this behavior.
- */
-#ifndef WIN32
-#define PG_IOLBF _IOLBF
-#else
-#define PG_IOLBF _IONBF
-#endif
-
-/*
- * Default "extern" declarations or macro substitutes for library routines.
- * When necessary, these routines are provided by files in src/port/.
- */
-
-/* Type to use with fseeko/ftello */
-#ifndef WIN32 /* WIN32 is handled in port/win32_port.h */
-#define pgoff_t off_t
-#endif
-
-extern double pg_erand48(unsigned short xseed[3]);
-extern long pg_lrand48(void);
-extern long pg_jrand48(unsigned short xseed[3]);
-extern void pg_srand48(long seed);
-
-#ifndef HAVE_FLS
-extern int fls(int mask);
-#endif
-
-#ifndef HAVE_GETPEEREID
-/* On Windows, Perl might have incompatible definitions of uid_t and gid_t. */
-#ifndef PLPERL_HAVE_UID_GID
-extern int getpeereid(int sock, uid_t *uid, gid_t *gid);
-#endif
-#endif
-
-/*
- * Glibc doesn't use the builtin for clang due to a *gcc* bug in a version
- * newer than the gcc compatibility clang claims to have. This would cause a
- * *lot* of superfluous function calls, therefore revert when using clang. In
- * C++ there's issues with libc++ (not libstdc++), so disable as well.
- */
-#if defined(__clang__) && !defined(__cplusplus)
-/* needs to be separate to not confuse other compilers */
-#if __has_builtin(__builtin_isinf)
-/* need to include before, to avoid getting overwritten */
-#include <math.h>
-#undef isinf
-#define isinf __builtin_isinf
-#endif /* __has_builtin(isinf) */
-#endif /* __clang__ && !__cplusplus */
-
-#ifndef HAVE_EXPLICIT_BZERO
-extern void explicit_bzero(void *buf, size_t len);
-#endif
-
-#ifndef HAVE_STRTOF
-extern float strtof(const char *nptr, char **endptr);
-#endif
-
-#ifdef HAVE_BUGGY_STRTOF
-extern float pg_strtof(const char *nptr, char **endptr);
-#define strtof(a,b) (pg_strtof((a),(b)))
-#endif
-
-#ifndef HAVE_LINK
-extern int link(const char *src, const char *dst);
-#endif
-
-#ifndef HAVE_MKDTEMP
-extern char *mkdtemp(char *path);
-#endif
-
-#ifndef HAVE_INET_ATON
-#include <netinet/in.h>
-#include <arpa/inet.h>
-extern int inet_aton(const char *cp, struct in_addr *addr);
-#endif
-
-/*
- * Windows and older Unix don't have pread(2) and pwrite(2). We have
- * replacement functions, but they have slightly different semantics so we'll
- * use a name with a pg_ prefix to avoid confusion.
- */
-#ifdef HAVE_PREAD
-#define pg_pread pread
-#else
-extern ssize_t pg_pread(int fd, void *buf, size_t nbyte, off_t offset);
-#endif
-
-#ifdef HAVE_PWRITE
-#define pg_pwrite pwrite
-#else
-extern ssize_t pg_pwrite(int fd, const void *buf, size_t nbyte, off_t offset);
-#endif
-
-/* For pg_pwritev() and pg_preadv(), see port/pg_iovec.h. */
-
-#if !HAVE_DECL_STRLCAT
-extern size_t strlcat(char *dst, const char *src, size_t siz);
-#endif
-
-#if !HAVE_DECL_STRLCPY
-extern size_t strlcpy(char *dst, const char *src, size_t siz);
-#endif
-
-#if !HAVE_DECL_STRNLEN
-extern size_t strnlen(const char *str, size_t maxlen);
-#endif
-
-#if !defined(HAVE_RANDOM)
-extern long random(void);
-#endif
-
-#ifndef HAVE_SETENV
-extern int setenv(const char *name, const char *value, int overwrite);
-#endif
-
-#ifndef HAVE_UNSETENV
-extern int unsetenv(const char *name);
-#endif
-
-#ifndef HAVE_SRANDOM
-extern void srandom(unsigned int seed);
-#endif
-
-#ifndef HAVE_DLOPEN
-extern void *dlopen(const char *file, int mode);
-extern void *dlsym(void *handle, const char *symbol);
-extern int dlclose(void *handle);
-extern char *dlerror(void);
-#endif
-
-/*
- * In some older systems, the RTLD_NOW flag isn't defined and the mode
- * argument to dlopen must always be 1.
- */
-#if !HAVE_DECL_RTLD_NOW
-#define RTLD_NOW 1
-#endif
-
-/*
- * The RTLD_GLOBAL flag is wanted if available, but it doesn't exist
- * everywhere. If it doesn't exist, set it to 0 so it has no effect.
- */
-#if !HAVE_DECL_RTLD_GLOBAL
-#define RTLD_GLOBAL 0
-#endif
-
-/* thread.h */
-#ifndef WIN32
-extern int pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
- size_t buflen, struct passwd **result);
-#endif
-
-extern int pqGethostbyname(const char *name,
- struct hostent *resultbuf,
- char *buffer, size_t buflen,
- struct hostent **result,
- int *herrno);
-
-extern void pg_qsort(void *base, size_t nel, size_t elsize,
- int (*cmp) (const void *, const void *));
-extern int pg_qsort_strcmp(const void *a, const void *b);
-
-#define qsort(a,b,c,d) pg_qsort(a,b,c,d)
-
-typedef int (*qsort_arg_comparator) (const void *a, const void *b, void *arg);
-
-extern void qsort_arg(void *base, size_t nel, size_t elsize,
- qsort_arg_comparator cmp, void *arg);
-
-extern void *bsearch_arg(const void *key, const void *base,
- size_t nmemb, size_t size,
- int (*compar) (const void *, const void *, void *),
- void *arg);
-
-/* port/chklocale.c */
-extern int pg_get_encoding_from_locale(const char *ctype, bool write_message);
-
-#if defined(WIN32) && !defined(FRONTEND)
-extern int pg_codepage_to_encoding(UINT cp);
-#endif
-
-/* port/inet_net_ntop.c */
-extern char *pg_inet_net_ntop(int af, const void *src, int bits,
- char *dst, size_t size);
-
-/* port/pg_strong_random.c */
-extern void pg_strong_random_init(void);
-extern bool pg_strong_random(void *buf, size_t len);
-
-/*
- * pg_backend_random used to be a wrapper for pg_strong_random before
- * Postgres 12 for the backend code.
- */
-#define pg_backend_random pg_strong_random
-
-/* port/pgcheckdir.c */
-extern int pg_check_dir(const char *dir);
-
-/* port/pgmkdirp.c */
-extern int pg_mkdir_p(char *path, int omode);
-
-/* port/pqsignal.c */
-typedef void (*pqsigfunc) (int signo);
-extern pqsigfunc pqsignal(int signo, pqsigfunc func);
-
-/* port/quotes.c */
-extern char *escape_single_quotes_ascii(const char *src);
-
-/* common/wait_error.c */
-extern char *wait_result_to_str(int exit_status);
-extern bool wait_result_is_signal(int exit_status, int signum);
-extern bool wait_result_is_any_signal(int exit_status, bool include_command_not_found);
-
-#endif /* PG_PORT_H */
diff --git a/contrib/libs/postgresql/src/include/postgres.h b/contrib/libs/postgresql/src/include/postgres.h
deleted file mode 100644
index 0446daa0e61..00000000000
--- a/contrib/libs/postgresql/src/include/postgres.h
+++ /dev/null
@@ -1,808 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * postgres.h
- * Primary include file for PostgreSQL server .c files
- *
- * This should be the first file included by PostgreSQL backend modules.
- * Client-side code should include postgres_fe.h instead.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1995, Regents of the University of California
- *
- * src/include/postgres.h
- *
- *-------------------------------------------------------------------------
- */
-/*
- *----------------------------------------------------------------
- * TABLE OF CONTENTS
- *
- * When adding stuff to this file, please try to put stuff
- * into the relevant section, or add new sections as appropriate.
- *
- * section description
- * ------- ------------------------------------------------
- * 1) variable-length datatypes (TOAST support)
- * 2) Datum type + support macros
- *
- * NOTES
- *
- * In general, this file should contain declarations that are widely needed
- * in the backend environment, but are of no interest outside the backend.
- *
- * Simple type definitions live in c.h, where they are shared with
- * postgres_fe.h. We do that since those type definitions are needed by
- * frontend modules that want to deal with binary data transmission to or
- * from the backend. Type definitions in this file should be for
- * representations that never escape the backend, such as Datum or
- * TOASTed varlena objects.
- *
- *----------------------------------------------------------------
- */
-#ifndef POSTGRES_H
-#define POSTGRES_H
-
-#include "c.h"
-#include "utils/elog.h"
-#include "utils/palloc.h"
-
-/* ----------------------------------------------------------------
- * Section 1: variable-length datatypes (TOAST support)
- * ----------------------------------------------------------------
- */
-
-/*
- * struct varatt_external is a traditional "TOAST pointer", that is, the
- * information needed to fetch a Datum stored out-of-line in a TOAST table.
- * The data is compressed if and only if the external size stored in
- * va_extinfo is less than va_rawsize - VARHDRSZ.
- *
- * This struct must not contain any padding, because we sometimes compare
- * these pointers using memcmp.
- *
- * Note that this information is stored unaligned within actual tuples, so
- * you need to memcpy from the tuple into a local struct variable before
- * you can look at these fields! (The reason we use memcmp is to avoid
- * having to do that just to detect equality of two TOAST pointers...)
- */
-typedef struct varatt_external
-{
- int32 va_rawsize; /* Original data size (includes header) */
- uint32 va_extinfo; /* External saved size (without header) and
- * compression method */
- Oid va_valueid; /* Unique ID of value within TOAST table */
- Oid va_toastrelid; /* RelID of TOAST table containing it */
-} varatt_external;
-
-/*
- * These macros define the "saved size" portion of va_extinfo. Its remaining
- * two high-order bits identify the compression method.
- */
-#define VARLENA_EXTSIZE_BITS 30
-#define VARLENA_EXTSIZE_MASK ((1U << VARLENA_EXTSIZE_BITS) - 1)
-
-/*
- * struct varatt_indirect is a "TOAST pointer" representing an out-of-line
- * Datum that's stored in memory, not in an external toast relation.
- * The creator of such a Datum is entirely responsible that the referenced
- * storage survives for as long as referencing pointer Datums can exist.
- *
- * Note that just as for struct varatt_external, this struct is stored
- * unaligned within any containing tuple.
- */
-typedef struct varatt_indirect
-{
- struct varlena *pointer; /* Pointer to in-memory varlena */
-} varatt_indirect;
-
-/*
- * struct varatt_expanded is a "TOAST pointer" representing an out-of-line
- * Datum that is stored in memory, in some type-specific, not necessarily
- * physically contiguous format that is convenient for computation not
- * storage. APIs for this, in particular the definition of struct
- * ExpandedObjectHeader, are in src/include/utils/expandeddatum.h.
- *
- * Note that just as for struct varatt_external, this struct is stored
- * unaligned within any containing tuple.
- */
-typedef struct ExpandedObjectHeader ExpandedObjectHeader;
-
-typedef struct varatt_expanded
-{
- ExpandedObjectHeader *eohptr;
-} varatt_expanded;
-
-/*
- * Type tag for the various sorts of "TOAST pointer" datums. The peculiar
- * value for VARTAG_ONDISK comes from a requirement for on-disk compatibility
- * with a previous notion that the tag field was the pointer datum's length.
- */
-typedef enum vartag_external
-{
- VARTAG_INDIRECT = 1,
- VARTAG_EXPANDED_RO = 2,
- VARTAG_EXPANDED_RW = 3,
- VARTAG_ONDISK = 18
-} vartag_external;
-
-/* this test relies on the specific tag values above */
-#define VARTAG_IS_EXPANDED(tag) \
- (((tag) & ~1) == VARTAG_EXPANDED_RO)
-
-#define VARTAG_SIZE(tag) \
- ((tag) == VARTAG_INDIRECT ? sizeof(varatt_indirect) : \
- VARTAG_IS_EXPANDED(tag) ? sizeof(varatt_expanded) : \
- (tag) == VARTAG_ONDISK ? sizeof(varatt_external) : \
- TrapMacro(true, "unrecognized TOAST vartag"))
-
-/*
- * These structs describe the header of a varlena object that may have been
- * TOASTed. Generally, don't reference these structs directly, but use the
- * macros below.
- *
- * We use separate structs for the aligned and unaligned cases because the
- * compiler might otherwise think it could generate code that assumes
- * alignment while touching fields of a 1-byte-header varlena.
- */
-typedef union
-{
- struct /* Normal varlena (4-byte length) */
- {
- uint32 va_header;
- char va_data[FLEXIBLE_ARRAY_MEMBER];
- } va_4byte;
- struct /* Compressed-in-line format */
- {
- uint32 va_header;
- uint32 va_tcinfo; /* Original data size (excludes header) and
- * compression method; see va_extinfo */
- char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
- } va_compressed;
-} varattrib_4b;
-
-typedef struct
-{
- uint8 va_header;
- char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Data begins here */
-} varattrib_1b;
-
-/* TOAST pointers are a subset of varattrib_1b with an identifying tag byte */
-typedef struct
-{
- uint8 va_header; /* Always 0x80 or 0x01 */
- uint8 va_tag; /* Type of datum */
- char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Type-specific data */
-} varattrib_1b_e;
-
-/*
- * Bit layouts for varlena headers on big-endian machines:
- *
- * 00xxxxxx 4-byte length word, aligned, uncompressed data (up to 1G)
- * 01xxxxxx 4-byte length word, aligned, *compressed* data (up to 1G)
- * 10000000 1-byte length word, unaligned, TOAST pointer
- * 1xxxxxxx 1-byte length word, unaligned, uncompressed data (up to 126b)
- *
- * Bit layouts for varlena headers on little-endian machines:
- *
- * xxxxxx00 4-byte length word, aligned, uncompressed data (up to 1G)
- * xxxxxx10 4-byte length word, aligned, *compressed* data (up to 1G)
- * 00000001 1-byte length word, unaligned, TOAST pointer
- * xxxxxxx1 1-byte length word, unaligned, uncompressed data (up to 126b)
- *
- * The "xxx" bits are the length field (which includes itself in all cases).
- * In the big-endian case we mask to extract the length, in the little-endian
- * case we shift. Note that in both cases the flag bits are in the physically
- * first byte. Also, it is not possible for a 1-byte length word to be zero;
- * this lets us disambiguate alignment padding bytes from the start of an
- * unaligned datum. (We now *require* pad bytes to be filled with zero!)
- *
- * In TOAST pointers the va_tag field (see varattrib_1b_e) is used to discern
- * the specific type and length of the pointer datum.
- */
-
-/*
- * Endian-dependent macros. These are considered internal --- use the
- * external macros below instead of using these directly.
- *
- * Note: IS_1B is true for external toast records but VARSIZE_1B will return 0
- * for such records. Hence you should usually check for IS_EXTERNAL before
- * checking for IS_1B.
- */
-
-#ifdef WORDS_BIGENDIAN
-
-#define VARATT_IS_4B(PTR) \
- ((((varattrib_1b *) (PTR))->va_header & 0x80) == 0x00)
-#define VARATT_IS_4B_U(PTR) \
- ((((varattrib_1b *) (PTR))->va_header & 0xC0) == 0x00)
-#define VARATT_IS_4B_C(PTR) \
- ((((varattrib_1b *) (PTR))->va_header & 0xC0) == 0x40)
-#define VARATT_IS_1B(PTR) \
- ((((varattrib_1b *) (PTR))->va_header & 0x80) == 0x80)
-#define VARATT_IS_1B_E(PTR) \
- ((((varattrib_1b *) (PTR))->va_header) == 0x80)
-#define VARATT_NOT_PAD_BYTE(PTR) \
- (*((uint8 *) (PTR)) != 0)
-
-/* VARSIZE_4B() should only be used on known-aligned data */
-#define VARSIZE_4B(PTR) \
- (((varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
-#define VARSIZE_1B(PTR) \
- (((varattrib_1b *) (PTR))->va_header & 0x7F)
-#define VARTAG_1B_E(PTR) \
- (((varattrib_1b_e *) (PTR))->va_tag)
-
-#define SET_VARSIZE_4B(PTR,len) \
- (((varattrib_4b *) (PTR))->va_4byte.va_header = (len) & 0x3FFFFFFF)
-#define SET_VARSIZE_4B_C(PTR,len) \
- (((varattrib_4b *) (PTR))->va_4byte.va_header = ((len) & 0x3FFFFFFF) | 0x40000000)
-#define SET_VARSIZE_1B(PTR,len) \
- (((varattrib_1b *) (PTR))->va_header = (len) | 0x80)
-#define SET_VARTAG_1B_E(PTR,tag) \
- (((varattrib_1b_e *) (PTR))->va_header = 0x80, \
- ((varattrib_1b_e *) (PTR))->va_tag = (tag))
-
-#else /* !WORDS_BIGENDIAN */
-
-#define VARATT_IS_4B(PTR) \
- ((((varattrib_1b *) (PTR))->va_header & 0x01) == 0x00)
-#define VARATT_IS_4B_U(PTR) \
- ((((varattrib_1b *) (PTR))->va_header & 0x03) == 0x00)
-#define VARATT_IS_4B_C(PTR) \
- ((((varattrib_1b *) (PTR))->va_header & 0x03) == 0x02)
-#define VARATT_IS_1B(PTR) \
- ((((varattrib_1b *) (PTR))->va_header & 0x01) == 0x01)
-#define VARATT_IS_1B_E(PTR) \
- ((((varattrib_1b *) (PTR))->va_header) == 0x01)
-#define VARATT_NOT_PAD_BYTE(PTR) \
- (*((uint8 *) (PTR)) != 0)
-
-/* VARSIZE_4B() should only be used on known-aligned data */
-#define VARSIZE_4B(PTR) \
- ((((varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
-#define VARSIZE_1B(PTR) \
- ((((varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
-#define VARTAG_1B_E(PTR) \
- (((varattrib_1b_e *) (PTR))->va_tag)
-
-#define SET_VARSIZE_4B(PTR,len) \
- (((varattrib_4b *) (PTR))->va_4byte.va_header = (((uint32) (len)) << 2))
-#define SET_VARSIZE_4B_C(PTR,len) \
- (((varattrib_4b *) (PTR))->va_4byte.va_header = (((uint32) (len)) << 2) | 0x02)
-#define SET_VARSIZE_1B(PTR,len) \
- (((varattrib_1b *) (PTR))->va_header = (((uint8) (len)) << 1) | 0x01)
-#define SET_VARTAG_1B_E(PTR,tag) \
- (((varattrib_1b_e *) (PTR))->va_header = 0x01, \
- ((varattrib_1b_e *) (PTR))->va_tag = (tag))
-
-#endif /* WORDS_BIGENDIAN */
-
-#define VARDATA_4B(PTR) (((varattrib_4b *) (PTR))->va_4byte.va_data)
-#define VARDATA_4B_C(PTR) (((varattrib_4b *) (PTR))->va_compressed.va_data)
-#define VARDATA_1B(PTR) (((varattrib_1b *) (PTR))->va_data)
-#define VARDATA_1B_E(PTR) (((varattrib_1b_e *) (PTR))->va_data)
-
-/*
- * Externally visible TOAST macros begin here.
- */
-
-#define VARHDRSZ_EXTERNAL offsetof(varattrib_1b_e, va_data)
-#define VARHDRSZ_COMPRESSED offsetof(varattrib_4b, va_compressed.va_data)
-#define VARHDRSZ_SHORT offsetof(varattrib_1b, va_data)
-
-#define VARATT_SHORT_MAX 0x7F
-#define VARATT_CAN_MAKE_SHORT(PTR) \
- (VARATT_IS_4B_U(PTR) && \
- (VARSIZE(PTR) - VARHDRSZ + VARHDRSZ_SHORT) <= VARATT_SHORT_MAX)
-#define VARATT_CONVERTED_SHORT_SIZE(PTR) \
- (VARSIZE(PTR) - VARHDRSZ + VARHDRSZ_SHORT)
-
-/*
- * In consumers oblivious to data alignment, call PG_DETOAST_DATUM_PACKED(),
- * VARDATA_ANY(), VARSIZE_ANY() and VARSIZE_ANY_EXHDR(). Elsewhere, call
- * PG_DETOAST_DATUM(), VARDATA() and VARSIZE(). Directly fetching an int16,
- * int32 or wider field in the struct representing the datum layout requires
- * aligned data. memcpy() is alignment-oblivious, as are most operations on
- * datatypes, such as text, whose layout struct contains only char fields.
- *
- * Code assembling a new datum should call VARDATA() and SET_VARSIZE().
- * (Datums begin life untoasted.)
- *
- * Other macros here should usually be used only by tuple assembly/disassembly
- * code and code that specifically wants to work with still-toasted Datums.
- */
-#define VARDATA(PTR) VARDATA_4B(PTR)
-#define VARSIZE(PTR) VARSIZE_4B(PTR)
-
-#define VARSIZE_SHORT(PTR) VARSIZE_1B(PTR)
-#define VARDATA_SHORT(PTR) VARDATA_1B(PTR)
-
-#define VARTAG_EXTERNAL(PTR) VARTAG_1B_E(PTR)
-#define VARSIZE_EXTERNAL(PTR) (VARHDRSZ_EXTERNAL + VARTAG_SIZE(VARTAG_EXTERNAL(PTR)))
-#define VARDATA_EXTERNAL(PTR) VARDATA_1B_E(PTR)
-
-#define VARATT_IS_COMPRESSED(PTR) VARATT_IS_4B_C(PTR)
-#define VARATT_IS_EXTERNAL(PTR) VARATT_IS_1B_E(PTR)
-#define VARATT_IS_EXTERNAL_ONDISK(PTR) \
- (VARATT_IS_EXTERNAL(PTR) && VARTAG_EXTERNAL(PTR) == VARTAG_ONDISK)
-#define VARATT_IS_EXTERNAL_INDIRECT(PTR) \
- (VARATT_IS_EXTERNAL(PTR) && VARTAG_EXTERNAL(PTR) == VARTAG_INDIRECT)
-#define VARATT_IS_EXTERNAL_EXPANDED_RO(PTR) \
- (VARATT_IS_EXTERNAL(PTR) && VARTAG_EXTERNAL(PTR) == VARTAG_EXPANDED_RO)
-#define VARATT_IS_EXTERNAL_EXPANDED_RW(PTR) \
- (VARATT_IS_EXTERNAL(PTR) && VARTAG_EXTERNAL(PTR) == VARTAG_EXPANDED_RW)
-#define VARATT_IS_EXTERNAL_EXPANDED(PTR) \
- (VARATT_IS_EXTERNAL(PTR) && VARTAG_IS_EXPANDED(VARTAG_EXTERNAL(PTR)))
-#define VARATT_IS_EXTERNAL_NON_EXPANDED(PTR) \
- (VARATT_IS_EXTERNAL(PTR) && !VARTAG_IS_EXPANDED(VARTAG_EXTERNAL(PTR)))
-#define VARATT_IS_SHORT(PTR) VARATT_IS_1B(PTR)
-#define VARATT_IS_EXTENDED(PTR) (!VARATT_IS_4B_U(PTR))
-
-#define SET_VARSIZE(PTR, len) SET_VARSIZE_4B(PTR, len)
-#define SET_VARSIZE_SHORT(PTR, len) SET_VARSIZE_1B(PTR, len)
-#define SET_VARSIZE_COMPRESSED(PTR, len) SET_VARSIZE_4B_C(PTR, len)
-
-#define SET_VARTAG_EXTERNAL(PTR, tag) SET_VARTAG_1B_E(PTR, tag)
-
-#define VARSIZE_ANY(PTR) \
- (VARATT_IS_1B_E(PTR) ? VARSIZE_EXTERNAL(PTR) : \
- (VARATT_IS_1B(PTR) ? VARSIZE_1B(PTR) : \
- VARSIZE_4B(PTR)))
-
-/* Size of a varlena data, excluding header */
-#define VARSIZE_ANY_EXHDR(PTR) \
- (VARATT_IS_1B_E(PTR) ? VARSIZE_EXTERNAL(PTR)-VARHDRSZ_EXTERNAL : \
- (VARATT_IS_1B(PTR) ? VARSIZE_1B(PTR)-VARHDRSZ_SHORT : \
- VARSIZE_4B(PTR)-VARHDRSZ))
-
-/* caution: this will not work on an external or compressed-in-line Datum */
-/* caution: this will return a possibly unaligned pointer */
-#define VARDATA_ANY(PTR) \
- (VARATT_IS_1B(PTR) ? VARDATA_1B(PTR) : VARDATA_4B(PTR))
-
-/* Decompressed size and compression method of a compressed-in-line Datum */
-#define VARDATA_COMPRESSED_GET_EXTSIZE(PTR) \
- (((varattrib_4b *) (PTR))->va_compressed.va_tcinfo & VARLENA_EXTSIZE_MASK)
-#define VARDATA_COMPRESSED_GET_COMPRESS_METHOD(PTR) \
- (((varattrib_4b *) (PTR))->va_compressed.va_tcinfo >> VARLENA_EXTSIZE_BITS)
-
-/* Same for external Datums; but note argument is a struct varatt_external */
-#define VARATT_EXTERNAL_GET_EXTSIZE(toast_pointer) \
- ((toast_pointer).va_extinfo & VARLENA_EXTSIZE_MASK)
-#define VARATT_EXTERNAL_GET_COMPRESS_METHOD(toast_pointer) \
- ((toast_pointer).va_extinfo >> VARLENA_EXTSIZE_BITS)
-
-#define VARATT_EXTERNAL_SET_SIZE_AND_COMPRESS_METHOD(toast_pointer, len, cm) \
- do { \
- Assert((cm) == TOAST_PGLZ_COMPRESSION_ID || \
- (cm) == TOAST_LZ4_COMPRESSION_ID); \
- ((toast_pointer).va_extinfo = \
- (len) | ((uint32) (cm) << VARLENA_EXTSIZE_BITS)); \
- } while (0)
-
-/*
- * Testing whether an externally-stored value is compressed now requires
- * comparing size stored in va_extinfo (the actual length of the external data)
- * to rawsize (the original uncompressed datum's size). The latter includes
- * VARHDRSZ overhead, the former doesn't. We never use compression unless it
- * actually saves space, so we expect either equality or less-than.
- */
-#define VARATT_EXTERNAL_IS_COMPRESSED(toast_pointer) \
- (VARATT_EXTERNAL_GET_EXTSIZE(toast_pointer) < \
- (toast_pointer).va_rawsize - VARHDRSZ)
-
-
-/* ----------------------------------------------------------------
- * Section 2: Datum type + support macros
- * ----------------------------------------------------------------
- */
-
-/*
- * A Datum contains either a value of a pass-by-value type or a pointer to a
- * value of a pass-by-reference type. Therefore, we require:
- *
- * sizeof(Datum) == sizeof(void *) == 4 or 8
- *
- * The macros below and the analogous macros for other types should be used to
- * convert between a Datum and the appropriate C type.
- */
-
-typedef uintptr_t Datum;
-
-/*
- * A NullableDatum is used in places where both a Datum and its nullness needs
- * to be stored. This can be more efficient than storing datums and nullness
- * in separate arrays, due to better spatial locality, even if more space may
- * be wasted due to padding.
- */
-typedef struct NullableDatum
-{
-#define FIELDNO_NULLABLE_DATUM_DATUM 0
- Datum value;
-#define FIELDNO_NULLABLE_DATUM_ISNULL 1
- bool isnull;
- /* due to alignment padding this could be used for flags for free */
-} NullableDatum;
-
-#define SIZEOF_DATUM SIZEOF_VOID_P
-
-/*
- * DatumGetBool
- * Returns boolean value of a datum.
- *
- * Note: any nonzero value will be considered true.
- */
-
-#define DatumGetBool(X) ((bool) ((X) != 0))
-
-/*
- * BoolGetDatum
- * Returns datum representation for a boolean.
- *
- * Note: any nonzero value will be considered true.
- */
-
-#define BoolGetDatum(X) ((Datum) ((X) ? 1 : 0))
-
-/*
- * DatumGetChar
- * Returns character value of a datum.
- */
-
-#define DatumGetChar(X) ((char) (X))
-
-/*
- * CharGetDatum
- * Returns datum representation for a character.
- */
-
-#define CharGetDatum(X) ((Datum) (X))
-
-/*
- * Int8GetDatum
- * Returns datum representation for an 8-bit integer.
- */
-
-#define Int8GetDatum(X) ((Datum) (X))
-
-/*
- * DatumGetUInt8
- * Returns 8-bit unsigned integer value of a datum.
- */
-
-#define DatumGetUInt8(X) ((uint8) (X))
-
-/*
- * UInt8GetDatum
- * Returns datum representation for an 8-bit unsigned integer.
- */
-
-#define UInt8GetDatum(X) ((Datum) (X))
-
-/*
- * DatumGetInt16
- * Returns 16-bit integer value of a datum.
- */
-
-#define DatumGetInt16(X) ((int16) (X))
-
-/*
- * Int16GetDatum
- * Returns datum representation for a 16-bit integer.
- */
-
-#define Int16GetDatum(X) ((Datum) (X))
-
-/*
- * DatumGetUInt16
- * Returns 16-bit unsigned integer value of a datum.
- */
-
-#define DatumGetUInt16(X) ((uint16) (X))
-
-/*
- * UInt16GetDatum
- * Returns datum representation for a 16-bit unsigned integer.
- */
-
-#define UInt16GetDatum(X) ((Datum) (X))
-
-/*
- * DatumGetInt32
- * Returns 32-bit integer value of a datum.
- */
-
-#define DatumGetInt32(X) ((int32) (X))
-
-/*
- * Int32GetDatum
- * Returns datum representation for a 32-bit integer.
- */
-
-#define Int32GetDatum(X) ((Datum) (X))
-
-/*
- * DatumGetUInt32
- * Returns 32-bit unsigned integer value of a datum.
- */
-
-#define DatumGetUInt32(X) ((uint32) (X))
-
-/*
- * UInt32GetDatum
- * Returns datum representation for a 32-bit unsigned integer.
- */
-
-#define UInt32GetDatum(X) ((Datum) (X))
-
-/*
- * DatumGetObjectId
- * Returns object identifier value of a datum.
- */
-
-#define DatumGetObjectId(X) ((Oid) (X))
-
-/*
- * ObjectIdGetDatum
- * Returns datum representation for an object identifier.
- */
-
-#define ObjectIdGetDatum(X) ((Datum) (X))
-
-/*
- * DatumGetTransactionId
- * Returns transaction identifier value of a datum.
- */
-
-#define DatumGetTransactionId(X) ((TransactionId) (X))
-
-/*
- * TransactionIdGetDatum
- * Returns datum representation for a transaction identifier.
- */
-
-#define TransactionIdGetDatum(X) ((Datum) (X))
-
-/*
- * MultiXactIdGetDatum
- * Returns datum representation for a multixact identifier.
- */
-
-#define MultiXactIdGetDatum(X) ((Datum) (X))
-
-/*
- * DatumGetCommandId
- * Returns command identifier value of a datum.
- */
-
-#define DatumGetCommandId(X) ((CommandId) (X))
-
-/*
- * CommandIdGetDatum
- * Returns datum representation for a command identifier.
- */
-
-#define CommandIdGetDatum(X) ((Datum) (X))
-
-/*
- * DatumGetPointer
- * Returns pointer value of a datum.
- */
-
-#define DatumGetPointer(X) ((Pointer) (X))
-
-/*
- * PointerGetDatum
- * Returns datum representation for a pointer.
- */
-
-#define PointerGetDatum(X) ((Datum) (X))
-
-/*
- * DatumGetCString
- * Returns C string (null-terminated string) value of a datum.
- *
- * Note: C string is not a full-fledged Postgres type at present,
- * but type input functions use this conversion for their inputs.
- */
-
-#define DatumGetCString(X) ((char *) DatumGetPointer(X))
-
-/*
- * CStringGetDatum
- * Returns datum representation for a C string (null-terminated string).
- *
- * Note: C string is not a full-fledged Postgres type at present,
- * but type output functions use this conversion for their outputs.
- * Note: CString is pass-by-reference; caller must ensure the pointed-to
- * value has adequate lifetime.
- */
-
-#define CStringGetDatum(X) PointerGetDatum(X)
-
-/*
- * DatumGetName
- * Returns name value of a datum.
- */
-
-#define DatumGetName(X) ((Name) DatumGetPointer(X))
-
-/*
- * NameGetDatum
- * Returns datum representation for a name.
- *
- * Note: Name is pass-by-reference; caller must ensure the pointed-to
- * value has adequate lifetime.
- */
-
-#define NameGetDatum(X) CStringGetDatum(NameStr(*(X)))
-
-/*
- * DatumGetInt64
- * Returns 64-bit integer value of a datum.
- *
- * Note: this macro hides whether int64 is pass by value or by reference.
- */
-
-#ifdef USE_FLOAT8_BYVAL
-#define DatumGetInt64(X) ((int64) (X))
-#else
-#define DatumGetInt64(X) (* ((int64 *) DatumGetPointer(X)))
-#endif
-
-/*
- * Int64GetDatum
- * Returns datum representation for a 64-bit integer.
- *
- * Note: if int64 is pass by reference, this function returns a reference
- * to palloc'd space.
- */
-
-#ifdef USE_FLOAT8_BYVAL
-#define Int64GetDatum(X) ((Datum) (X))
-#else
-extern Datum Int64GetDatum(int64 X);
-#endif
-
-/*
- * DatumGetUInt64
- * Returns 64-bit unsigned integer value of a datum.
- *
- * Note: this macro hides whether int64 is pass by value or by reference.
- */
-
-#ifdef USE_FLOAT8_BYVAL
-#define DatumGetUInt64(X) ((uint64) (X))
-#else
-#define DatumGetUInt64(X) (* ((uint64 *) DatumGetPointer(X)))
-#endif
-
-/*
- * UInt64GetDatum
- * Returns datum representation for a 64-bit unsigned integer.
- *
- * Note: if int64 is pass by reference, this function returns a reference
- * to palloc'd space.
- */
-
-#ifdef USE_FLOAT8_BYVAL
-#define UInt64GetDatum(X) ((Datum) (X))
-#else
-#define UInt64GetDatum(X) Int64GetDatum((int64) (X))
-#endif
-
-/*
- * Float <-> Datum conversions
- *
- * These have to be implemented as inline functions rather than macros, when
- * passing by value, because many machines pass int and float function
- * parameters/results differently; so we need to play weird games with unions.
- */
-
-/*
- * DatumGetFloat4
- * Returns 4-byte floating point value of a datum.
- */
-static inline float4
-DatumGetFloat4(Datum X)
-{
- union
- {
- int32 value;
- float4 retval;
- } myunion;
-
- myunion.value = DatumGetInt32(X);
- return myunion.retval;
-}
-
-/*
- * Float4GetDatum
- * Returns datum representation for a 4-byte floating point number.
- */
-static inline Datum
-Float4GetDatum(float4 X)
-{
- union
- {
- float4 value;
- int32 retval;
- } myunion;
-
- myunion.value = X;
- return Int32GetDatum(myunion.retval);
-}
-
-/*
- * DatumGetFloat8
- * Returns 8-byte floating point value of a datum.
- *
- * Note: this macro hides whether float8 is pass by value or by reference.
- */
-
-#ifdef USE_FLOAT8_BYVAL
-static inline float8
-DatumGetFloat8(Datum X)
-{
- union
- {
- int64 value;
- float8 retval;
- } myunion;
-
- myunion.value = DatumGetInt64(X);
- return myunion.retval;
-}
-#else
-#define DatumGetFloat8(X) (* ((float8 *) DatumGetPointer(X)))
-#endif
-
-/*
- * Float8GetDatum
- * Returns datum representation for an 8-byte floating point number.
- *
- * Note: if float8 is pass by reference, this function returns a reference
- * to palloc'd space.
- */
-
-#ifdef USE_FLOAT8_BYVAL
-static inline Datum
-Float8GetDatum(float8 X)
-{
- union
- {
- float8 value;
- int64 retval;
- } myunion;
-
- myunion.value = X;
- return Int64GetDatum(myunion.retval);
-}
-#else
-extern Datum Float8GetDatum(float8 X);
-#endif
-
-
-/*
- * Int64GetDatumFast
- * Float8GetDatumFast
- *
- * These macros are intended to allow writing code that does not depend on
- * whether int64 and float8 are pass-by-reference types, while not
- * sacrificing performance when they are. The argument must be a variable
- * that will exist and have the same value for as long as the Datum is needed.
- * In the pass-by-ref case, the address of the variable is taken to use as
- * the Datum. In the pass-by-val case, these will be the same as the non-Fast
- * macros.
- */
-
-#ifdef USE_FLOAT8_BYVAL
-#define Int64GetDatumFast(X) Int64GetDatum(X)
-#define Float8GetDatumFast(X) Float8GetDatum(X)
-#else
-#define Int64GetDatumFast(X) PointerGetDatum(&(X))
-#define Float8GetDatumFast(X) PointerGetDatum(&(X))
-#endif
-
-#endif /* POSTGRES_H */
diff --git a/contrib/libs/postgresql/src/include/postgres_ext.h b/contrib/libs/postgresql/src/include/postgres_ext.h
deleted file mode 100644
index fdb61b7cf54..00000000000
--- a/contrib/libs/postgresql/src/include/postgres_ext.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * postgres_ext.h
- *
- * This file contains declarations of things that are visible everywhere
- * in PostgreSQL *and* are visible to clients of frontend interface libraries.
- * For example, the Oid type is part of the API of libpq and other libraries.
- *
- * Declarations which are specific to a particular interface should
- * go in the header file for that interface (such as libpq-fe.h). This
- * file is only for fundamental Postgres declarations.
- *
- * User-written C functions don't count as "external to Postgres."
- * Those function much as local modifications to the backend itself, and
- * use header files that are otherwise internal to Postgres to interface
- * with the backend.
- *
- * src/include/postgres_ext.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef POSTGRES_EXT_H
-#define POSTGRES_EXT_H
-
-#include "pg_config_ext.h"
-
-/*
- * Object ID is a fundamental type in Postgres.
- */
-typedef unsigned int Oid;
-
-#ifdef __cplusplus
-#define InvalidOid (Oid(0))
-#else
-#define InvalidOid ((Oid) 0)
-#endif
-
-#define OID_MAX UINT_MAX
-/* you will need to include <limits.h> to use the above #define */
-
-#define atooid(x) ((Oid) strtoul((x), NULL, 10))
-/* the above needs <stdlib.h> */
-
-
-/* Define a signed 64-bit integer type for use in client API declarations. */
-typedef PG_INT64_TYPE pg_int64;
-
-
-/*
- * Identifiers of error message fields. Kept here to keep common
- * between frontend and backend, and also to export them to libpq
- * applications.
- */
-#define PG_DIAG_SEVERITY 'S'
-#define PG_DIAG_SEVERITY_NONLOCALIZED 'V'
-#define PG_DIAG_SQLSTATE 'C'
-#define PG_DIAG_MESSAGE_PRIMARY 'M'
-#define PG_DIAG_MESSAGE_DETAIL 'D'
-#define PG_DIAG_MESSAGE_HINT 'H'
-#define PG_DIAG_STATEMENT_POSITION 'P'
-#define PG_DIAG_INTERNAL_POSITION 'p'
-#define PG_DIAG_INTERNAL_QUERY 'q'
-#define PG_DIAG_CONTEXT 'W'
-#define PG_DIAG_SCHEMA_NAME 's'
-#define PG_DIAG_TABLE_NAME 't'
-#define PG_DIAG_COLUMN_NAME 'c'
-#define PG_DIAG_DATATYPE_NAME 'd'
-#define PG_DIAG_CONSTRAINT_NAME 'n'
-#define PG_DIAG_SOURCE_FILE 'F'
-#define PG_DIAG_SOURCE_LINE 'L'
-#define PG_DIAG_SOURCE_FUNCTION 'R'
-
-#endif /* POSTGRES_EXT_H */
diff --git a/contrib/libs/postgresql/src/include/postgres_fe.h b/contrib/libs/postgresql/src/include/postgres_fe.h
deleted file mode 100644
index 3cdb911faa6..00000000000
--- a/contrib/libs/postgresql/src/include/postgres_fe.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * postgres_fe.h
- * Primary include file for PostgreSQL client-side .c files
- *
- * This should be the first file included by PostgreSQL client libraries and
- * application programs --- but not by backend modules, which should include
- * postgres.h.
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1995, Regents of the University of California
- *
- * src/include/postgres_fe.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef POSTGRES_FE_H
-#define POSTGRES_FE_H
-
-#ifndef FRONTEND
-#define FRONTEND 1
-#endif
-
-#include "c.h"
-
-#include "common/fe_memutils.h"
-
-#endif /* POSTGRES_FE_H */
diff --git a/contrib/libs/postgresql/src/include/rusagestub.h b/contrib/libs/postgresql/src/include/rusagestub.h
deleted file mode 100644
index 211750380bf..00000000000
--- a/contrib/libs/postgresql/src/include/rusagestub.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * rusagestub.h
- * Stubs for getrusage(3).
- *
- *
- * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/rusagestub.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef RUSAGESTUB_H
-#define RUSAGESTUB_H
-
-#include <sys/time.h> /* for struct timeval */
-#ifndef WIN32
-#include <sys/times.h> /* for struct tms */
-#endif
-#include <limits.h> /* for CLK_TCK */
-
-#define RUSAGE_SELF 0
-#define RUSAGE_CHILDREN (-1)
-
-struct rusage
-{
- struct timeval ru_utime; /* user time used */
- struct timeval ru_stime; /* system time used */
-};
-
-extern int getrusage(int who, struct rusage *rusage);
-
-#endif /* RUSAGESTUB_H */
diff --git a/contrib/libs/postgresql/src/include/windowapi.h b/contrib/libs/postgresql/src/include/windowapi.h
deleted file mode 100644
index c5324aa8f1d..00000000000
--- a/contrib/libs/postgresql/src/include/windowapi.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * windowapi.h
- * API for window functions to extract data from their window
- *
- * A window function does not receive its arguments in the normal way
- * (and therefore the concept of strictness is irrelevant). Instead it
- * receives a "WindowObject", which it can fetch with PG_WINDOW_OBJECT()
- * (note V1 calling convention must be used). Correct call context can
- * be tested with WindowObjectIsValid(). Although argument values are
- * not passed, the call is correctly set up so that PG_NARGS() can be
- * used and argument type information can be obtained with
- * get_fn_expr_argtype(), get_fn_expr_arg_stable(), etc.
- *
- * Operations on the WindowObject allow the window function to find out
- * the current row number, total number of rows in the partition, etc
- * and to evaluate its argument expression(s) at various rows in the
- * window partition. See the header comments for each WindowObject API
- * function in nodeWindowAgg.c for details.
- *
- *
- * Portions Copyright (c) 2000-2021, PostgreSQL Global Development Group
- *
- * src/include/windowapi.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef WINDOWAPI_H
-#define WINDOWAPI_H
-
-/* values of "seektype" */
-#define WINDOW_SEEK_CURRENT 0
-#define WINDOW_SEEK_HEAD 1
-#define WINDOW_SEEK_TAIL 2
-
-/* this struct is private in nodeWindowAgg.c */
-typedef struct WindowObjectData *WindowObject;
-
-#define PG_WINDOW_OBJECT() ((WindowObject) fcinfo->context)
-
-#define WindowObjectIsValid(winobj) \
- ((winobj) != NULL && IsA(winobj, WindowObjectData))
-
-extern void *WinGetPartitionLocalMemory(WindowObject winobj, Size sz);
-
-extern int64 WinGetCurrentPosition(WindowObject winobj);
-extern int64 WinGetPartitionRowCount(WindowObject winobj);
-
-extern void WinSetMarkPosition(WindowObject winobj, int64 markpos);
-
-extern bool WinRowsArePeers(WindowObject winobj, int64 pos1, int64 pos2);
-
-extern Datum WinGetFuncArgInPartition(WindowObject winobj, int argno,
- int relpos, int seektype, bool set_mark,
- bool *isnull, bool *isout);
-
-extern Datum WinGetFuncArgInFrame(WindowObject winobj, int argno,
- int relpos, int seektype, bool set_mark,
- bool *isnull, bool *isout);
-
-extern Datum WinGetFuncArgCurrent(WindowObject winobj, int argno,
- bool *isnull);
-
-#endif /* WINDOWAPI_H */