diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-03-03 15:11:51 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-03-03 15:11:51 +0300 |
commit | 4987b564a17b88bee8c7ab434bdc053c5440e46f (patch) | |
tree | e3187a2aeb42c27635864a6f6d8c6792047ed76e /contrib/libs/postgresql | |
parent | a5d3b02fe5c80d9fb8a6fe5e9c486e45046c0291 (diff) | |
download | ydb-4987b564a17b88bee8c7ab434bdc053c5440e46f.tar.gz |
intermediate changes
ref:73c1399b919c53b6b72f20d0e9f66f789717fc47
Diffstat (limited to 'contrib/libs/postgresql')
126 files changed, 4855 insertions, 2184 deletions
diff --git a/contrib/libs/postgresql/COPYRIGHT b/contrib/libs/postgresql/COPYRIGHT index 655a3c59d6..9d65dbea7e 100644 --- a/contrib/libs/postgresql/COPYRIGHT +++ b/contrib/libs/postgresql/COPYRIGHT @@ -1,7 +1,7 @@ PostgreSQL Database Management System (formerly known as Postgres, then as Postgres95) -Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group +Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group Portions Copyright (c) 1994, The Regents of the University of California diff --git a/contrib/libs/postgresql/INSTALL b/contrib/libs/postgresql/INSTALL index 15c36afbda..2072657e1e 100644 --- a/contrib/libs/postgresql/INSTALL +++ b/contrib/libs/postgresql/INSTALL @@ -96,9 +96,9 @@ are enabled, as explained below: the case). - To build the PL/Python server programming language, you need a - Python installation with the header files and the distutils module. - The minimum required version is Python 2.6. Python 3 is supported if - it's version 3.1 or later; but see the PL/Python documentation when + Python installation with the header files and the sysconfig module. + The minimum required version is Python 2.7. Python 3 is supported if + it's version 3.2 or later; but see the PL/Python documentation when using Python 3. Since PL/Python will be a shared library, the "libpython" library @@ -119,7 +119,7 @@ are enabled, as explained below: need an implementation of the Gettext API. Some operating systems have this built-in (e.g., Linux, NetBSD, Solaris), for other systems you can download an add-on package from - http://www.gnu.org/software/gettext/. If you are using the Gettext + https://www.gnu.org/software/gettext/. If you are using the Gettext implementation in the GNU C library then you will additionally need the GNU Gettext package for some utility programs. For any of the other implementations you will not need it. @@ -132,6 +132,9 @@ are enabled, as explained below: - You need Kerberos, OpenLDAP, and/or PAM, if you want to support authentication using those services. +- You need LZ4, if you want to support compression of data with this + method; see the configuration parameter default_toast_compression. + - To build the PostgreSQL documentation, there is a separate set of requirements; see the main documentation's appendix on documentation. @@ -297,9 +300,6 @@ Installation Procedure The standard installation provides all the header files needed for client application development as well as for server-side program development, such as custom functions or data types written in C. - (Prior to PostgreSQL 8.0, a separate make install-all-headers - command was needed for the latter, but this step has been folded - into the standard install.) CLIENT-ONLY INSTALLATION: If you want to install only the client applications and interface libraries, then you can use these @@ -523,12 +523,22 @@ in the section called "Requirements". compiler (specified, if necessary, using the CXX environment variable). ---with-openssl +--with-lz4 + + Build with LZ4 compression support. This allows the use of LZ4 for + compression of table data. + +--with-ssl=LIBRARY + + Build with support for SSL (encrypted) connections. The only + "LIBRARY" supported is "openssl". This requires the OpenSSL package + to be installed. "configure" will check for the required header + files and libraries to make sure that your OpenSSL installation is + sufficient before proceeding. + +--with-openssl - Build with support for SSL (encrypted) connections. This requires - the OpenSSL package to be installed. "configure" will check for the - required header files and libraries to make sure that your OpenSSL - installation is sufficient before proceeding. + Obsolete equivalent of --with-ssl=openssl. --with-gssapi diff --git a/contrib/libs/postgresql/src/include/c.h b/contrib/libs/postgresql/src/include/c.h index 9cd5e233ac..1bb3fc6770 100644 --- a/contrib/libs/postgresql/src/include/c.h +++ b/contrib/libs/postgresql/src/include/c.h @@ -9,7 +9,7 @@ * polluting the namespace with lots of stuff... * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/c.h @@ -98,11 +98,21 @@ * * 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)) @@ -111,6 +121,18 @@ #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" @@ -191,6 +213,39 @@ #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. @@ -278,6 +333,13 @@ #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[]". @@ -541,14 +603,6 @@ typedef uint32 CommandId; #define FirstCommandId ((CommandId) 0) #define InvalidCommandId (~(CommandId)0) -/* - * Array indexing support - */ -#define MAXDIM 6 -typedef struct -{ - int indx[MAXDIM]; -} IntArray; /* ---------------- * Variable-length datatypes all share the 'struct varlena' header. @@ -937,35 +991,6 @@ extern void ExceptionalCondition(const char *conditionName, */ #define Abs(x) ((x) >= 0 ? (x) : -(x)) -/* - * StrNCpy - * Like standard library function strncpy(), except that result string - * is guaranteed to be null-terminated --- that is, at most N-1 bytes - * of the source string will be kept. - * Also, the macro returns no result (too hard to do that without - * evaluating the arguments multiple times, which seems worse). - * - * BTW: when you need to copy a non-null-terminated string (like a text - * datum) and add a null, do not do it with StrNCpy(..., len+1). That - * might seem to work, but it fetches one byte more than there is in the - * text object. One fine day you'll have a SIGSEGV because there isn't - * another byte before the end of memory. Don't laugh, we've had real - * live bug reports from real live users over exactly this mistake. - * Do it honestly with "memcpy(dst,src,len); dst[len] = '\0';", instead. - */ -#define StrNCpy(dst,src,len) \ - do \ - { \ - char * _dst = (dst); \ - Size _len = (len); \ -\ - if (_len > 0) \ - { \ - strncpy(_dst, (src), _len); \ - _dst[_len-1] = '\0'; \ - } \ - } while (0) - /* Get a bit mask of the bits set in non-long aligned addresses */ #define LONG_ALIGN_MASK (sizeof(long) - 1) @@ -1145,7 +1170,6 @@ typedef union PGAlignedXLogBlock #define STATUS_OK (0) #define STATUS_ERROR (-1) #define STATUS_EOF (-2) -#define STATUS_WAITING (2) /* * gettext support @@ -1167,7 +1191,8 @@ typedef union PGAlignedXLogBlock * access to the original string and translated string, and for cases where * immediate translation is not possible, like when initializing global * variables. - * http://www.gnu.org/software/autoconf/manual/gettext/Special-cases.html + * + * https://www.gnu.org/software/gettext/manual/html_node/Special-cases.html */ #define gettext_noop(x) (x) @@ -1305,14 +1330,21 @@ extern unsigned long long strtoull(const char *str, char **endptr, int base); /* * When there is no sigsetjmp, its functionality is provided by plain - * setjmp. Incidentally, nothing provides setjmp's functionality in - * that case. We now support the case only on Windows. + * 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 +#endif /* __MINGW64__ */ +#endif /* WIN32 */ /* EXEC_BACKEND defines */ #ifdef EXEC_BACKEND diff --git a/contrib/libs/postgresql/src/include/catalog/binary_upgrade.h b/contrib/libs/postgresql/src/include/catalog/binary_upgrade.h index 12d94fe1b3..f6e82e7ac5 100644 --- a/contrib/libs/postgresql/src/include/catalog/binary_upgrade.h +++ b/contrib/libs/postgresql/src/include/catalog/binary_upgrade.h @@ -4,7 +4,7 @@ * variables used for binary upgrades * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -16,7 +16,8 @@ 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_toast_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; diff --git a/contrib/libs/postgresql/src/include/catalog/catalog.h b/contrib/libs/postgresql/src/include/catalog/catalog.h index 7824a123c2..f247be50b4 100644 --- a/contrib/libs/postgresql/src/include/catalog/catalog.h +++ b/contrib/libs/postgresql/src/include/catalog/catalog.h @@ -4,7 +4,7 @@ * prototypes for functions in backend/catalog/catalog.c * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/catalog/catalog.h diff --git a/contrib/libs/postgresql/src/include/catalog/catversion.h b/contrib/libs/postgresql/src/include/catalog/catversion.h index 282019c49d..0a4f4abdb3 100644 --- a/contrib/libs/postgresql/src/include/catalog/catversion.h +++ b/contrib/libs/postgresql/src/include/catalog/catversion.h @@ -34,7 +34,7 @@ * database contents or layout, such as altering tuple headers. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/catalog/catversion.h @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 202007201 +#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 index 7fe3fb7e7c..fd44081e74 100644 --- a/contrib/libs/postgresql/src/include/catalog/dependency.h +++ b/contrib/libs/postgresql/src/include/catalog/dependency.h @@ -4,7 +4,7 @@ * Routines to support inter-object dependencies. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/catalog/dependency.h @@ -228,8 +228,6 @@ 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_constraint_index(Oid constraintId); - extern Oid get_index_constraint(Oid indexId); extern List *get_index_ref_constraints(Oid indexId); diff --git a/contrib/libs/postgresql/src/include/catalog/genbki.h b/contrib/libs/postgresql/src/include/catalog/genbki.h index 4a6c8636da..b1fee54d3c 100644 --- a/contrib/libs/postgresql/src/include/catalog/genbki.h +++ b/contrib/libs/postgresql/src/include/catalog/genbki.h @@ -9,7 +9,7 @@ * bootstrap file from these header files.) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/catalog/genbki.h @@ -36,18 +36,84 @@ /* Specifies a default value for auto-generated array types */ #define BKI_ARRAY_DEFAULT(value) /* - * Indicates how to perform name lookups, typically for an OID or - * OID-array field + * 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 MARKNOTNULL in bootstrap.c for how this is - * handled. + * of an undefined symbol. See also the BOOTCOL_NULL_AUTO code in bootstrap.c + * for how this is handled. */ #undef CATALOG_VARLEN diff --git a/contrib/libs/postgresql/src/include/catalog/heap.h b/contrib/libs/postgresql/src/include/catalog/heap.h index bec795abac..6ce480b49c 100644 --- a/contrib/libs/postgresql/src/include/catalog/heap.h +++ b/contrib/libs/postgresql/src/include/catalog/heap.h @@ -4,7 +4,7 @@ * prototypes for functions in backend/catalog/heap.c * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/catalog/heap.h @@ -93,10 +93,11 @@ extern void heap_truncate_check_FKs(List *relations, bool tempTables); extern List *heap_truncate_find_FKs(List *relationIds); -extern void InsertPgAttributeTuple(Relation pg_attribute_rel, - Form_pg_attribute new_attribute, - Datum attoptions, - CatalogIndexState indstate); +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, diff --git a/contrib/libs/postgresql/src/include/catalog/index.h b/contrib/libs/postgresql/src/include/catalog/index.h index f58e8675f3..008f723e10 100644 --- a/contrib/libs/postgresql/src/include/catalog/index.h +++ b/contrib/libs/postgresql/src/include/catalog/index.h @@ -4,7 +4,7 @@ * prototypes for catalog/index.c. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/catalog/index.h @@ -29,6 +29,20 @@ typedef enum 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 { @@ -80,6 +94,7 @@ extern Oid index_create(Relation heapRelation, extern Oid index_concurrently_create_copy(Relation heapRelation, Oid oldIndexId, + Oid tablespaceOid, const char *newName); extern void index_concurrently_build(Oid heapRelationId, @@ -134,7 +149,7 @@ 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, int options); + char relpersistence, ReindexParams *params); /* Flag bits for reindex_relation(): */ #define REINDEX_REL_PROCESS_TOAST 0x01 @@ -143,7 +158,7 @@ extern void reindex_index(Oid indexId, bool skip_constraint_checks, #define REINDEX_REL_FORCE_INDEXES_UNLOGGED 0x08 #define REINDEX_REL_FORCE_INDEXES_PERMANENT 0x10 -extern bool reindex_relation(Oid relid, int flags, int options); +extern bool reindex_relation(Oid relid, int flags, ReindexParams *params); extern bool ReindexIsProcessingHeap(Oid heapOid); extern bool ReindexIsProcessingIndex(Oid indexOid); diff --git a/contrib/libs/postgresql/src/include/catalog/indexing.h b/contrib/libs/postgresql/src/include/catalog/indexing.h index 8be303870f..758ec42e50 100644 --- a/contrib/libs/postgresql/src/include/catalog/indexing.h +++ b/contrib/libs/postgresql/src/include/catalog/indexing.h @@ -4,11 +4,8 @@ * This file provides some definitions to support indexing * on system catalogs * - * Caution: all #define's with numeric values in this file had better be - * object OIDs, else renumber_oids.pl might change them inappropriately. * - * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/catalog/indexing.h @@ -19,6 +16,7 @@ #define INDEXING_H #include "access/htup.h" +#include "nodes/execnodes.h" #include "utils/relcache.h" /* @@ -29,6 +27,12 @@ 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); @@ -36,6 +40,10 @@ 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, @@ -43,324 +51,4 @@ extern void CatalogTupleUpdateWithInfo(Relation heapRel, CatalogIndexState indstate); extern void CatalogTupleDelete(Relation heapRel, ItemPointer tid); - -/* - * These macros are just to keep the C compiler from spitting up on the - * upcoming commands for Catalog.pm. - */ -#define DECLARE_INDEX(name,oid,decl) extern int no_such_variable -#define DECLARE_UNIQUE_INDEX(name,oid,decl) extern int no_such_variable - - -/* - * What follows are lines 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. The first two - * arguments are the index 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). - */ - -DECLARE_UNIQUE_INDEX(pg_aggregate_fnoid_index, 2650, on pg_aggregate using btree(aggfnoid oid_ops)); -#define AggregateFnoidIndexId 2650 - -DECLARE_UNIQUE_INDEX(pg_am_name_index, 2651, on pg_am using btree(amname name_ops)); -#define AmNameIndexId 2651 -DECLARE_UNIQUE_INDEX(pg_am_oid_index, 2652, on pg_am using btree(oid oid_ops)); -#define AmOidIndexId 2652 - -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(pg_amop_oid_index, 2756, on pg_amop using btree(oid oid_ops)); -#define AccessMethodOperatorOidIndexId 2756 - -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(pg_amproc_oid_index, 2757, on pg_amproc using btree(oid oid_ops)); -#define AccessMethodProcedureOidIndexId 2757 - -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(pg_attrdef_oid_index, 2657, on pg_attrdef using btree(oid oid_ops)); -#define AttrDefaultOidIndexId 2657 - -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(pg_attribute_relid_attnum_index, 2659, on pg_attribute using btree(attrelid oid_ops, attnum int2_ops)); -#define AttributeRelidNumIndexId 2659 - -DECLARE_UNIQUE_INDEX(pg_authid_rolname_index, 2676, on pg_authid using btree(rolname name_ops)); -#define AuthIdRolnameIndexId 2676 -DECLARE_UNIQUE_INDEX(pg_authid_oid_index, 2677, on pg_authid using btree(oid oid_ops)); -#define AuthIdOidIndexId 2677 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(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 - -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(pg_collation_oid_index, 3085, on pg_collation using btree(oid oid_ops)); -#define CollationOidIndexId 3085 - -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(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 - -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(pg_conversion_oid_index, 2670, on pg_conversion using btree(oid oid_ops)); -#define ConversionOidIndexId 2670 - -DECLARE_UNIQUE_INDEX(pg_database_datname_index, 2671, on pg_database using btree(datname name_ops)); -#define DatabaseNameIndexId 2671 -DECLARE_UNIQUE_INDEX(pg_database_oid_index, 2672, on pg_database using btree(oid oid_ops)); -#define DatabaseOidIndexId 2672 - -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 - -DECLARE_UNIQUE_INDEX(pg_description_o_c_o_index, 2675, on pg_description using btree(objoid oid_ops, classoid oid_ops, objsubid int4_ops)); -#define DescriptionObjIndexId 2675 -DECLARE_UNIQUE_INDEX(pg_shdescription_o_c_index, 2397, on pg_shdescription using btree(objoid oid_ops, classoid oid_ops)); -#define SharedDescriptionObjIndexId 2397 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_INDEX(pg_index_indrelid_index, 2678, on pg_index using btree(indrelid oid_ops)); -#define IndexIndrelidIndexId 2678 -DECLARE_UNIQUE_INDEX(pg_index_indexrelid_index, 2679, on pg_index using btree(indexrelid oid_ops)); -#define IndexRelidIndexId 2679 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(pg_language_name_index, 2681, on pg_language using btree(lanname name_ops)); -#define LanguageNameIndexId 2681 -DECLARE_UNIQUE_INDEX(pg_language_oid_index, 2682, on pg_language using btree(oid oid_ops)); -#define LanguageOidIndexId 2682 - -DECLARE_UNIQUE_INDEX(pg_largeobject_loid_pn_index, 2683, on pg_largeobject using btree(loid oid_ops, pageno int4_ops)); -#define LargeObjectLOidPNIndexId 2683 - -DECLARE_UNIQUE_INDEX(pg_largeobject_metadata_oid_index, 2996, on pg_largeobject_metadata using btree(oid oid_ops)); -#define LargeObjectMetadataOidIndexId 2996 - -DECLARE_UNIQUE_INDEX(pg_namespace_nspname_index, 2684, on pg_namespace using btree(nspname name_ops)); -#define NamespaceNameIndexId 2684 -DECLARE_UNIQUE_INDEX(pg_namespace_oid_index, 2685, on pg_namespace using btree(oid oid_ops)); -#define NamespaceOidIndexId 2685 - -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(pg_opclass_oid_index, 2687, on pg_opclass using btree(oid oid_ops)); -#define OpclassOidIndexId 2687 - -DECLARE_UNIQUE_INDEX(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 - -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(pg_opfamily_oid_index, 2755, on pg_opfamily using btree(oid oid_ops)); -#define OpfamilyOidIndexId 2755 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(pg_sequence_seqrelid_index, 5002, on pg_sequence using btree(seqrelid oid_ops)); -#define SequenceRelidIndexId 5002 - -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 - -DECLARE_UNIQUE_INDEX(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_UNIQUE_INDEX(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_UNIQUE_INDEX(pg_statistic_ext_data_stxoid_index, 3433, on pg_statistic_ext_data using btree(stxoid oid_ops)); -#define StatisticExtDataStxoidIndexId 3433 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(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 - -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(pg_trigger_oid_index, 2702, on pg_trigger using btree(oid oid_ops)); -#define TriggerOidIndexId 2702 - -DECLARE_UNIQUE_INDEX(pg_event_trigger_evtname_index, 3467, on pg_event_trigger using btree(evtname name_ops)); -#define EventTriggerNameIndexId 3467 -DECLARE_UNIQUE_INDEX(pg_event_trigger_oid_index, 3468, on pg_event_trigger using btree(oid oid_ops)); -#define EventTriggerOidIndexId 3468 - -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(pg_ts_config_oid_index, 3712, on pg_ts_config using btree(oid oid_ops)); -#define TSConfigOidIndexId 3712 - -DECLARE_UNIQUE_INDEX(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 - -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(pg_ts_dict_oid_index, 3605, on pg_ts_dict using btree(oid oid_ops)); -#define TSDictionaryOidIndexId 3605 - -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(pg_ts_parser_oid_index, 3607, on pg_ts_parser using btree(oid oid_ops)); -#define TSParserOidIndexId 3607 - -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(pg_ts_template_oid_index, 3767, on pg_ts_template using btree(oid oid_ops)); -#define TSTemplateOidIndexId 3767 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(pg_foreign_table_relid_index, 3119, on pg_foreign_table using btree(ftrelid oid_ops)); -#define ForeignTableRelidIndexId 3119 - -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(pg_default_acl_oid_index, 828, on pg_default_acl using btree(oid oid_ops)); -#define DefaultAclOidIndexId 828 - -DECLARE_UNIQUE_INDEX(pg_db_role_setting_databaseid_rol_index, 2965, on pg_db_role_setting using btree(setdatabase oid_ops, setrole oid_ops)); -#define DbRoleSettingDatidRolidIndexId 2965 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(pg_shseclabel_object_index, 3593, on pg_shseclabel using btree(objoid oid_ops, classoid oid_ops, provider text_ops)); -#define SharedSecLabelObjectIndexId 3593 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(pg_range_rngtypid_index, 3542, on pg_range using btree(rngtypid oid_ops)); -#define RangeTypidIndexId 3542 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(pg_partitioned_table_partrelid_index, 3351, on pg_partitioned_table using btree(partrelid oid_ops)); -#define PartitionedRelidIndexId 3351 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(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 - -DECLARE_UNIQUE_INDEX(pg_subscription_rel_srrelid_srsubid_index, 6117, on pg_subscription_rel using btree(srrelid oid_ops, srsubid oid_ops)); -#define SubscriptionRelSrrelidSrsubidIndexId 6117 - #endif /* INDEXING_H */ diff --git a/contrib/libs/postgresql/src/include/catalog/namespace.h b/contrib/libs/postgresql/src/include/catalog/namespace.h index 2456c08bf7..b98f284356 100644 --- a/contrib/libs/postgresql/src/include/catalog/namespace.h +++ b/contrib/libs/postgresql/src/include/catalog/namespace.h @@ -4,7 +4,7 @@ * prototypes for functions in backend/catalog/namespace.c * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/catalog/namespace.h @@ -30,6 +30,7 @@ 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 */ @@ -99,6 +100,7 @@ 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); diff --git a/contrib/libs/postgresql/src/include/catalog/objectaccess.h b/contrib/libs/postgresql/src/include/catalog/objectaccess.h index fef383692f..896c3a0fdc 100644 --- a/contrib/libs/postgresql/src/include/catalog/objectaccess.h +++ b/contrib/libs/postgresql/src/include/catalog/objectaccess.h @@ -3,7 +3,7 @@ * * Object access hooks. * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California */ diff --git a/contrib/libs/postgresql/src/include/catalog/objectaddress.h b/contrib/libs/postgresql/src/include/catalog/objectaddress.h index 7f15efd58a..2b4e104bb9 100644 --- a/contrib/libs/postgresql/src/include/catalog/objectaddress.h +++ b/contrib/libs/postgresql/src/include/catalog/objectaddress.h @@ -3,7 +3,7 @@ * objectaddress.h * functions for working with object addresses * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/catalog/objectaddress.h @@ -55,6 +55,7 @@ extern void check_object_ownership(Oid roleid, 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); @@ -69,14 +70,18 @@ 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); +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); -extern char *getObjectIdentity(const ObjectAddress *address); +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); + List **objname, List **objargs, + bool missing_ok); extern struct ArrayType *strlist_to_textarray(List *list); extern ObjectType get_relkind_objtype(char relkind); diff --git a/contrib/libs/postgresql/src/include/catalog/opfam_internal.h b/contrib/libs/postgresql/src/include/catalog/opfam_internal.h deleted file mode 100644 index d63bd9ffa3..0000000000 --- a/contrib/libs/postgresql/src/include/catalog/opfam_internal.h +++ /dev/null @@ -1,28 +0,0 @@ -/*------------------------------------------------------------------------- - * - * opfam_internal.h - * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group - * Portions Copyright (c) 1994, Regents of the University of California - * - * src/include/catalog/opfam_internal.h - * - *------------------------------------------------------------------------- - */ -#ifndef OPFAM_INTERNAL_H -#define OPFAM_INTERNAL_H - -/* - * We use lists of this struct type to keep track of both operators and - * procedures while building or adding to an opfamily. - */ -typedef struct -{ - Oid object; /* operator or support proc's OID */ - int number; /* strategy or support proc number */ - Oid lefttype; /* lefttype */ - Oid righttype; /* righttype */ - Oid sortfamily; /* ordering operator's sort opfamily, or 0 */ -} OpFamilyMember; - -#endif /* OPFAM_INTERNAL_H */ diff --git a/contrib/libs/postgresql/src/include/catalog/partition.h b/contrib/libs/postgresql/src/include/catalog/partition.h index 27873aff6e..c8c7bc1d99 100644 --- a/contrib/libs/postgresql/src/include/catalog/partition.h +++ b/contrib/libs/postgresql/src/include/catalog/partition.h @@ -4,7 +4,7 @@ * Header file for structures and utility functions related to * partitioning * - * Copyright (c) 2007-2020, PostgreSQL Global Development Group + * Copyright (c) 2007-2021, PostgreSQL Global Development Group * * src/include/catalog/partition.h * @@ -19,7 +19,7 @@ /* Seed for the extended hash function */ #define HASH_PARTITION_SEED UINT64CONST(0x7A5B22367996DCFD) -extern Oid get_partition_parent(Oid relid); +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, diff --git a/contrib/libs/postgresql/src/include/catalog/pg_aggregate.dat b/contrib/libs/postgresql/src/include/catalog/pg_aggregate.dat index ffabe275c0..fc6d3bfd94 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_aggregate.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_aggregate.dat @@ -3,7 +3,7 @@ # pg_aggregate.dat # Initial contents of the pg_aggregate system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # # src/include/catalog/pg_aggregate.dat @@ -505,18 +505,26 @@ aggcombinefn => 'int2and', aggtranstype => 'int2' }, { aggfnoid => 'bit_or(int2)', aggtransfn => 'int2or', aggcombinefn => 'int2or', aggtranstype => 'int2' }, +{ aggfnoid => 'bit_xor(int2)', aggtransfn => 'int2xor', + aggcombinefn => 'int2xor', aggtranstype => 'int2' }, { aggfnoid => 'bit_and(int4)', aggtransfn => 'int4and', aggcombinefn => 'int4and', aggtranstype => 'int4' }, { aggfnoid => 'bit_or(int4)', aggtransfn => 'int4or', aggcombinefn => 'int4or', aggtranstype => 'int4' }, +{ aggfnoid => 'bit_xor(int4)', aggtransfn => 'int4xor', + aggcombinefn => 'int4xor', aggtranstype => 'int4' }, { aggfnoid => 'bit_and(int8)', aggtransfn => 'int8and', aggcombinefn => 'int8and', aggtranstype => 'int8' }, { aggfnoid => 'bit_or(int8)', aggtransfn => 'int8or', aggcombinefn => 'int8or', aggtranstype => 'int8' }, +{ aggfnoid => 'bit_xor(int8)', aggtransfn => 'int8xor', + aggcombinefn => 'int8xor', aggtranstype => 'int8' }, { aggfnoid => 'bit_and(bit)', aggtransfn => 'bitand', aggcombinefn => 'bitand', aggtranstype => 'bit' }, { aggfnoid => 'bit_or(bit)', aggtransfn => 'bitor', aggcombinefn => 'bitor', aggtranstype => 'bit' }, +{ aggfnoid => 'bit_xor(bit)', aggtransfn => 'bitxor', aggcombinefn => 'bitxor', + aggtranstype => 'bit' }, # xml { aggfnoid => 'xmlagg', aggtransfn => 'xmlconcat2', aggtranstype => 'xml' }, @@ -538,6 +546,18 @@ aggtransfn => 'bytea_string_agg_transfn', aggfinalfn => 'bytea_string_agg_finalfn', aggtranstype => 'internal' }, +# range +{ aggfnoid => 'range_intersect_agg(anyrange)', + aggtransfn => 'range_intersect_agg_transfn', + aggcombinefn => 'range_intersect_agg_transfn', aggtranstype => 'anyrange' }, +{ aggfnoid => 'range_intersect_agg(anymultirange)', + aggtransfn => 'multirange_intersect_agg_transfn', + aggcombinefn => 'multirange_intersect_agg_transfn', + aggtranstype => 'anymultirange' }, +{ aggfnoid => 'range_agg(anyrange)', aggtransfn => 'range_agg_transfn', + aggfinalfn => 'range_agg_finalfn', aggfinalextra => 't', + aggtranstype => 'internal' }, + # json { aggfnoid => 'json_agg', aggtransfn => 'json_agg_transfn', aggfinalfn => 'json_agg_finalfn', aggtranstype => 'internal' }, diff --git a/contrib/libs/postgresql/src/include/catalog/pg_aggregate.h b/contrib/libs/postgresql/src/include/catalog/pg_aggregate.h index 457ca18444..25feb41678 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_aggregate.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_aggregate.h @@ -4,7 +4,7 @@ * definition of the "aggregate" system catalog (pg_aggregate) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -44,25 +44,25 @@ CATALOG(pg_aggregate,2600,AggregateRelationId) regproc aggtransfn BKI_LOOKUP(pg_proc); /* final function (0 if none) */ - regproc aggfinalfn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc); + regproc aggfinalfn BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc); /* combine function (0 if none) */ - regproc aggcombinefn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc); + regproc aggcombinefn BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc); /* function to convert transtype to bytea (0 if none) */ - regproc aggserialfn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc); + regproc aggserialfn BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc); /* function to convert bytea to transtype (0 if none) */ - regproc aggdeserialfn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc); + regproc aggdeserialfn BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc); /* forward function for moving-aggregate mode (0 if none) */ - regproc aggmtransfn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc); + regproc aggmtransfn BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc); /* inverse function for moving-aggregate mode (0 if none) */ - regproc aggminvtransfn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc); + regproc aggminvtransfn BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc); /* final function for moving-aggregate mode (0 if none) */ - regproc aggmfinalfn BKI_DEFAULT(-) BKI_LOOKUP(pg_proc); + regproc aggmfinalfn BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc); /* true to pass extra dummy arguments to aggfinalfn */ bool aggfinalextra BKI_DEFAULT(f); @@ -77,7 +77,7 @@ CATALOG(pg_aggregate,2600,AggregateRelationId) char aggmfinalmodify BKI_DEFAULT(r); /* associated sort operator (0 if none) */ - Oid aggsortop BKI_DEFAULT(0) BKI_LOOKUP(pg_operator); + Oid aggsortop BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_operator); /* type of aggregate's transition (state) data */ Oid aggtranstype BKI_LOOKUP(pg_type); @@ -86,7 +86,7 @@ CATALOG(pg_aggregate,2600,AggregateRelationId) int32 aggtransspace BKI_DEFAULT(0); /* type of moving-aggregate state data (0 if none) */ - Oid aggmtranstype BKI_DEFAULT(0) BKI_LOOKUP(pg_type); + 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); @@ -108,6 +108,11 @@ CATALOG(pg_aggregate,2600,AggregateRelationId) */ 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 /* diff --git a/contrib/libs/postgresql/src/include/catalog/pg_am.dat b/contrib/libs/postgresql/src/include/catalog/pg_am.dat index 0f051277a6..6082f0e6a8 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_am.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_am.dat @@ -3,7 +3,7 @@ # pg_am.dat # Initial contents of the pg_am system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 diff --git a/contrib/libs/postgresql/src/include/catalog/pg_am.h b/contrib/libs/postgresql/src/include/catalog/pg_am.h index 63c03c4324..ced86faef8 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_am.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_am.h @@ -4,7 +4,7 @@ * definition of the "access method" system catalog (pg_am) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -47,6 +47,11 @@ CATALOG(pg_am,2601,AccessMethodRelationId) */ 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 /* diff --git a/contrib/libs/postgresql/src/include/catalog/pg_amop.dat b/contrib/libs/postgresql/src/include/catalog/pg_amop.dat index 1dfb6fd373..8135854163 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_amop.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_amop.dat @@ -3,7 +3,7 @@ # pg_amop.dat # Initial contents of the pg_amop system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # # src/include/catalog/pg_amop.dat @@ -979,6 +979,11 @@ amoprighttype => 'oidvector', amopstrategy => '1', amopopr => '=(oidvector,oidvector)', amopmethod => 'hash' }, +# record_ops +{ amopfamily => 'hash/record_ops', amoplefttype => 'record', + amoprighttype => 'record', amopstrategy => '1', amopopr => '=(record,record)', + amopmethod => 'hash' }, + # text_ops { amopfamily => 'hash/text_ops', amoplefttype => 'text', amoprighttype => 'text', amopstrategy => '1', amopopr => '=(text,text)', @@ -1100,17 +1105,16 @@ amopstrategy => '11', amopopr => '|>>(box,box)', amopmethod => 'gist' }, { amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box', amopstrategy => '12', amopopr => '|&>(box,box)', amopmethod => 'gist' }, -{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box', - amopstrategy => '13', amopopr => '~(box,box)', amopmethod => 'gist' }, -{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box', - amopstrategy => '14', amopopr => '@(box,box)', amopmethod => 'gist' }, { amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'point', amopstrategy => '15', amoppurpose => 'o', amopopr => '<->(box,point)', amopmethod => 'gist', amopsortfamily => 'btree/float_ops' }, # gist point_ops { amopfamily => 'gist/point_ops', amoplefttype => 'point', - amoprighttype => 'point', amopstrategy => '11', amopopr => '>^(point,point)', + amoprighttype => 'point', amopstrategy => '11', amopopr => '|>>(point,point)', + amopmethod => 'gist' }, +{ amopfamily => 'gist/point_ops', amoplefttype => 'point', + amoprighttype => 'point', amopstrategy => '30', amopopr => '>^(point,point)', amopmethod => 'gist' }, { amopfamily => 'gist/point_ops', amoplefttype => 'point', amoprighttype => 'point', amopstrategy => '1', amopopr => '<<(point,point)', @@ -1119,7 +1123,10 @@ amoprighttype => 'point', amopstrategy => '5', amopopr => '>>(point,point)', amopmethod => 'gist' }, { amopfamily => 'gist/point_ops', amoplefttype => 'point', - amoprighttype => 'point', amopstrategy => '10', amopopr => '<^(point,point)', + amoprighttype => 'point', amopstrategy => '10', amopopr => '<<|(point,point)', + amopmethod => 'gist' }, +{ amopfamily => 'gist/point_ops', amoplefttype => 'point', + amoprighttype => 'point', amopstrategy => '29', amopopr => '<^(point,point)', amopmethod => 'gist' }, { amopfamily => 'gist/point_ops', amoplefttype => 'point', amoprighttype => 'point', amopstrategy => '6', amopopr => '~=(point,point)', @@ -1176,12 +1183,6 @@ amoprighttype => 'polygon', amopstrategy => '12', amopopr => '|&>(polygon,polygon)', amopmethod => 'gist' }, { amopfamily => 'gist/poly_ops', amoplefttype => 'polygon', - amoprighttype => 'polygon', amopstrategy => '13', - amopopr => '~(polygon,polygon)', amopmethod => 'gist' }, -{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon', - amoprighttype => 'polygon', amopstrategy => '14', - amopopr => '@(polygon,polygon)', amopmethod => 'gist' }, -{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon', amoprighttype => 'point', amopstrategy => '15', amoppurpose => 'o', amopopr => '<->(polygon,point)', amopmethod => 'gist', amopsortfamily => 'btree/float_ops' }, @@ -1224,12 +1225,6 @@ amoprighttype => 'circle', amopstrategy => '12', amopopr => '|&>(circle,circle)', amopmethod => 'gist' }, { amopfamily => 'gist/circle_ops', amoplefttype => 'circle', - amoprighttype => 'circle', amopstrategy => '13', - amopopr => '~(circle,circle)', amopmethod => 'gist' }, -{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle', - amoprighttype => 'circle', amopstrategy => '14', - amopopr => '@(circle,circle)', amopmethod => 'gist' }, -{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle', amoprighttype => 'point', amopstrategy => '15', amoppurpose => 'o', amopopr => '<->(circle,point)', amopmethod => 'gist', amopsortfamily => 'btree/float_ops' }, @@ -1352,36 +1347,141 @@ amoprighttype => 'anyrange', amopstrategy => '1', amopopr => '<<(anyrange,anyrange)', amopmethod => 'gist' }, { amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', + amoprighttype => 'anymultirange', amopstrategy => '1', + amopopr => '<<(anyrange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', amoprighttype => 'anyrange', amopstrategy => '2', amopopr => '&<(anyrange,anyrange)', amopmethod => 'gist' }, { amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', + amoprighttype => 'anymultirange', amopstrategy => '2', + amopopr => '&<(anyrange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', amoprighttype => 'anyrange', amopstrategy => '3', amopopr => '&&(anyrange,anyrange)', amopmethod => 'gist' }, { amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', + amoprighttype => 'anymultirange', amopstrategy => '3', + amopopr => '&&(anyrange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', amoprighttype => 'anyrange', amopstrategy => '4', amopopr => '&>(anyrange,anyrange)', amopmethod => 'gist' }, { amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', + amoprighttype => 'anymultirange', amopstrategy => '4', + amopopr => '&>(anyrange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', amoprighttype => 'anyrange', amopstrategy => '5', amopopr => '>>(anyrange,anyrange)', amopmethod => 'gist' }, { amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', + amoprighttype => 'anymultirange', amopstrategy => '5', + amopopr => '>>(anyrange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', amoprighttype => 'anyrange', amopstrategy => '6', amopopr => '-|-(anyrange,anyrange)', amopmethod => 'gist' }, { amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', + amoprighttype => 'anymultirange', amopstrategy => '6', + amopopr => '-|-(anyrange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', amoprighttype => 'anyrange', amopstrategy => '7', amopopr => '@>(anyrange,anyrange)', amopmethod => 'gist' }, { amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', + amoprighttype => 'anymultirange', amopstrategy => '7', + amopopr => '@>(anyrange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', amoprighttype => 'anyrange', amopstrategy => '8', amopopr => '<@(anyrange,anyrange)', amopmethod => 'gist' }, { amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', + amoprighttype => 'anymultirange', amopstrategy => '8', + amopopr => '<@(anyrange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', amoprighttype => 'anyelement', amopstrategy => '16', amopopr => '@>(anyrange,anyelement)', amopmethod => 'gist' }, { amopfamily => 'gist/range_ops', amoplefttype => 'anyrange', amoprighttype => 'anyrange', amopstrategy => '18', amopopr => '=(anyrange,anyrange)', amopmethod => 'gist' }, +# GiST multirange_ops +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anymultirange', amopstrategy => '1', + amopopr => '<<(anymultirange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anyrange', amopstrategy => '1', + amopopr => '<<(anymultirange,anyrange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anymultirange', amopstrategy => '2', + amopopr => '&<(anymultirange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anyrange', amopstrategy => '2', + amopopr => '&<(anymultirange,anyrange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anymultirange', amopstrategy => '3', + amopopr => '&&(anymultirange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anyrange', amopstrategy => '3', + amopopr => '&&(anymultirange,anyrange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anymultirange', amopstrategy => '4', + amopopr => '&>(anymultirange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anyrange', amopstrategy => '4', + amopopr => '&>(anymultirange,anyrange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anymultirange', amopstrategy => '5', + amopopr => '>>(anymultirange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anyrange', amopstrategy => '5', + amopopr => '>>(anymultirange,anyrange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anymultirange', amopstrategy => '6', + amopopr => '-|-(anymultirange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anyrange', amopstrategy => '6', + amopopr => '-|-(anymultirange,anyrange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anymultirange', amopstrategy => '7', + amopopr => '@>(anymultirange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anyrange', amopstrategy => '7', + amopopr => '@>(anymultirange,anyrange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anymultirange', amopstrategy => '8', + amopopr => '<@(anymultirange,anymultirange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anyrange', amopstrategy => '8', + amopopr => '<@(anymultirange,anyrange)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anyelement', amopstrategy => '16', + amopopr => '@>(anymultirange,anyelement)', amopmethod => 'gist' }, +{ amopfamily => 'gist/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anymultirange', amopstrategy => '18', + amopopr => '=(anymultirange,anymultirange)', amopmethod => 'gist' }, + +# btree multirange_ops +{ amopfamily => 'btree/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anymultirange', amopstrategy => '1', + amopopr => '<(anymultirange,anymultirange)', amopmethod => 'btree' }, +{ amopfamily => 'btree/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anymultirange', amopstrategy => '2', + amopopr => '<=(anymultirange,anymultirange)', amopmethod => 'btree' }, +{ amopfamily => 'btree/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anymultirange', amopstrategy => '3', + amopopr => '=(anymultirange,anymultirange)', amopmethod => 'btree' }, +{ amopfamily => 'btree/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anymultirange', amopstrategy => '4', + amopopr => '>=(anymultirange,anymultirange)', amopmethod => 'btree' }, +{ amopfamily => 'btree/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anymultirange', amopstrategy => '5', + amopopr => '>(anymultirange,anymultirange)', amopmethod => 'btree' }, + +# hash multirange_ops +{ amopfamily => 'hash/multirange_ops', amoplefttype => 'anymultirange', + amoprighttype => 'anymultirange', amopstrategy => '1', + amopopr => '=(anymultirange,anymultirange)', amopmethod => 'hash' }, + # SP-GiST quad_point_ops { amopfamily => 'spgist/quad_point_ops', amoplefttype => 'point', - amoprighttype => 'point', amopstrategy => '11', amopopr => '>^(point,point)', + amoprighttype => 'point', amopstrategy => '11', amopopr => '|>>(point,point)', + amopmethod => 'spgist' }, +{ amopfamily => 'spgist/quad_point_ops', amoplefttype => 'point', + amoprighttype => 'point', amopstrategy => '30', amopopr => '>^(point,point)', amopmethod => 'spgist' }, { amopfamily => 'spgist/quad_point_ops', amoplefttype => 'point', amoprighttype => 'point', amopstrategy => '1', amopopr => '<<(point,point)', @@ -1390,7 +1490,10 @@ amoprighttype => 'point', amopstrategy => '5', amopopr => '>>(point,point)', amopmethod => 'spgist' }, { amopfamily => 'spgist/quad_point_ops', amoplefttype => 'point', - amoprighttype => 'point', amopstrategy => '10', amopopr => '<^(point,point)', + amoprighttype => 'point', amopstrategy => '10', amopopr => '<<|(point,point)', + amopmethod => 'spgist' }, +{ amopfamily => 'spgist/quad_point_ops', amoplefttype => 'point', + amoprighttype => 'point', amopstrategy => '29', amopopr => '<^(point,point)', amopmethod => 'spgist' }, { amopfamily => 'spgist/quad_point_ops', amoplefttype => 'point', amoprighttype => 'point', amopstrategy => '6', amopopr => '~=(point,point)', @@ -1405,7 +1508,10 @@ # SP-GiST kd_point_ops { amopfamily => 'spgist/kd_point_ops', amoplefttype => 'point', - amoprighttype => 'point', amopstrategy => '11', amopopr => '>^(point,point)', + amoprighttype => 'point', amopstrategy => '11', amopopr => '|>>(point,point)', + amopmethod => 'spgist' }, +{ amopfamily => 'spgist/kd_point_ops', amoplefttype => 'point', + amoprighttype => 'point', amopstrategy => '30', amopopr => '>^(point,point)', amopmethod => 'spgist' }, { amopfamily => 'spgist/kd_point_ops', amoplefttype => 'point', amoprighttype => 'point', amopstrategy => '1', amopopr => '<<(point,point)', @@ -1414,7 +1520,10 @@ amoprighttype => 'point', amopstrategy => '5', amopopr => '>>(point,point)', amopmethod => 'spgist' }, { amopfamily => 'spgist/kd_point_ops', amoplefttype => 'point', - amoprighttype => 'point', amopstrategy => '10', amopopr => '<^(point,point)', + amoprighttype => 'point', amopstrategy => '10', amopopr => '<<|(point,point)', + amopmethod => 'spgist' }, +{ amopfamily => 'spgist/kd_point_ops', amoplefttype => 'point', + amoprighttype => 'point', amopstrategy => '29', amopopr => '<^(point,point)', amopmethod => 'spgist' }, { amopfamily => 'spgist/kd_point_ops', amoplefttype => 'point', amoprighttype => 'point', amopstrategy => '6', amopopr => '~=(point,point)', @@ -1705,6 +1814,11 @@ amoprighttype => 'bytea', amopstrategy => '5', amopopr => '>(bytea,bytea)', amopmethod => 'brin' }, +# bloom bytea +{ amopfamily => 'brin/bytea_bloom_ops', amoplefttype => 'bytea', + amoprighttype => 'bytea', amopstrategy => '1', amopopr => '=(bytea,bytea)', + amopmethod => 'brin' }, + # minmax "char" { amopfamily => 'brin/char_minmax_ops', amoplefttype => 'char', amoprighttype => 'char', amopstrategy => '1', amopopr => '<(char,char)', @@ -1722,6 +1836,11 @@ amoprighttype => 'char', amopstrategy => '5', amopopr => '>(char,char)', amopmethod => 'brin' }, +# bloom "char" +{ amopfamily => 'brin/char_bloom_ops', amoplefttype => 'char', + amoprighttype => 'char', amopstrategy => '1', amopopr => '=(char,char)', + amopmethod => 'brin' }, + # minmax name { amopfamily => 'brin/name_minmax_ops', amoplefttype => 'name', amoprighttype => 'name', amopstrategy => '1', amopopr => '<(name,name)', @@ -1739,6 +1858,11 @@ amoprighttype => 'name', amopstrategy => '5', amopopr => '>(name,name)', amopmethod => 'brin' }, +# bloom name +{ amopfamily => 'brin/name_bloom_ops', amoplefttype => 'name', + amoprighttype => 'name', amopstrategy => '1', amopopr => '=(name,name)', + amopmethod => 'brin' }, + # minmax integer { amopfamily => 'brin/integer_minmax_ops', amoplefttype => 'int8', @@ -1885,6 +2009,166 @@ amoprighttype => 'int8', amopstrategy => '5', amopopr => '>(int4,int8)', amopmethod => 'brin' }, +# minmax multi integer + +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8', + amoprighttype => 'int8', amopstrategy => '1', amopopr => '<(int8,int8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8', + amoprighttype => 'int8', amopstrategy => '2', amopopr => '<=(int8,int8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8', + amoprighttype => 'int8', amopstrategy => '3', amopopr => '=(int8,int8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8', + amoprighttype => 'int8', amopstrategy => '4', amopopr => '>=(int8,int8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8', + amoprighttype => 'int8', amopstrategy => '5', amopopr => '>(int8,int8)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8', + amoprighttype => 'int2', amopstrategy => '1', amopopr => '<(int8,int2)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8', + amoprighttype => 'int2', amopstrategy => '2', amopopr => '<=(int8,int2)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8', + amoprighttype => 'int2', amopstrategy => '3', amopopr => '=(int8,int2)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8', + amoprighttype => 'int2', amopstrategy => '4', amopopr => '>=(int8,int2)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8', + amoprighttype => 'int2', amopstrategy => '5', amopopr => '>(int8,int2)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8', + amoprighttype => 'int4', amopstrategy => '1', amopopr => '<(int8,int4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8', + amoprighttype => 'int4', amopstrategy => '2', amopopr => '<=(int8,int4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8', + amoprighttype => 'int4', amopstrategy => '3', amopopr => '=(int8,int4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8', + amoprighttype => 'int4', amopstrategy => '4', amopopr => '>=(int8,int4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int8', + amoprighttype => 'int4', amopstrategy => '5', amopopr => '>(int8,int4)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2', + amoprighttype => 'int2', amopstrategy => '1', amopopr => '<(int2,int2)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2', + amoprighttype => 'int2', amopstrategy => '2', amopopr => '<=(int2,int2)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2', + amoprighttype => 'int2', amopstrategy => '3', amopopr => '=(int2,int2)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2', + amoprighttype => 'int2', amopstrategy => '4', amopopr => '>=(int2,int2)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2', + amoprighttype => 'int2', amopstrategy => '5', amopopr => '>(int2,int2)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2', + amoprighttype => 'int8', amopstrategy => '1', amopopr => '<(int2,int8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2', + amoprighttype => 'int8', amopstrategy => '2', amopopr => '<=(int2,int8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2', + amoprighttype => 'int8', amopstrategy => '3', amopopr => '=(int2,int8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2', + amoprighttype => 'int8', amopstrategy => '4', amopopr => '>=(int2,int8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2', + amoprighttype => 'int8', amopstrategy => '5', amopopr => '>(int2,int8)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2', + amoprighttype => 'int4', amopstrategy => '1', amopopr => '<(int2,int4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2', + amoprighttype => 'int4', amopstrategy => '2', amopopr => '<=(int2,int4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2', + amoprighttype => 'int4', amopstrategy => '3', amopopr => '=(int2,int4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2', + amoprighttype => 'int4', amopstrategy => '4', amopopr => '>=(int2,int4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int2', + amoprighttype => 'int4', amopstrategy => '5', amopopr => '>(int2,int4)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4', + amoprighttype => 'int4', amopstrategy => '1', amopopr => '<(int4,int4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4', + amoprighttype => 'int4', amopstrategy => '2', amopopr => '<=(int4,int4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4', + amoprighttype => 'int4', amopstrategy => '3', amopopr => '=(int4,int4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4', + amoprighttype => 'int4', amopstrategy => '4', amopopr => '>=(int4,int4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4', + amoprighttype => 'int4', amopstrategy => '5', amopopr => '>(int4,int4)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4', + amoprighttype => 'int2', amopstrategy => '1', amopopr => '<(int4,int2)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4', + amoprighttype => 'int2', amopstrategy => '2', amopopr => '<=(int4,int2)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4', + amoprighttype => 'int2', amopstrategy => '3', amopopr => '=(int4,int2)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4', + amoprighttype => 'int2', amopstrategy => '4', amopopr => '>=(int4,int2)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4', + amoprighttype => 'int2', amopstrategy => '5', amopopr => '>(int4,int2)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4', + amoprighttype => 'int8', amopstrategy => '1', amopopr => '<(int4,int8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4', + amoprighttype => 'int8', amopstrategy => '2', amopopr => '<=(int4,int8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4', + amoprighttype => 'int8', amopstrategy => '3', amopopr => '=(int4,int8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4', + amoprighttype => 'int8', amopstrategy => '4', amopopr => '>=(int4,int8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/integer_minmax_multi_ops', amoplefttype => 'int4', + amoprighttype => 'int8', amopstrategy => '5', amopopr => '>(int4,int8)', + amopmethod => 'brin' }, + +# bloom integer + +{ amopfamily => 'brin/integer_bloom_ops', amoplefttype => 'int8', + amoprighttype => 'int8', amopstrategy => '1', amopopr => '=(int8,int8)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/integer_bloom_ops', amoplefttype => 'int2', + amoprighttype => 'int2', amopstrategy => '1', amopopr => '=(int2,int2)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/integer_bloom_ops', amoplefttype => 'int4', + amoprighttype => 'int4', amopstrategy => '1', amopopr => '=(int4,int4)', + amopmethod => 'brin' }, + # minmax text { amopfamily => 'brin/text_minmax_ops', amoplefttype => 'text', amoprighttype => 'text', amopstrategy => '1', amopopr => '<(text,text)', @@ -1902,6 +2186,11 @@ amoprighttype => 'text', amopstrategy => '5', amopopr => '>(text,text)', amopmethod => 'brin' }, +# bloom text +{ amopfamily => 'brin/text_bloom_ops', amoplefttype => 'text', + amoprighttype => 'text', amopstrategy => '1', amopopr => '=(text,text)', + amopmethod => 'brin' }, + # minmax oid { amopfamily => 'brin/oid_minmax_ops', amoplefttype => 'oid', amoprighttype => 'oid', amopstrategy => '1', amopopr => '<(oid,oid)', @@ -1919,6 +2208,28 @@ amoprighttype => 'oid', amopstrategy => '5', amopopr => '>(oid,oid)', amopmethod => 'brin' }, +# minmax multi oid +{ amopfamily => 'brin/oid_minmax_multi_ops', amoplefttype => 'oid', + amoprighttype => 'oid', amopstrategy => '1', amopopr => '<(oid,oid)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/oid_minmax_multi_ops', amoplefttype => 'oid', + amoprighttype => 'oid', amopstrategy => '2', amopopr => '<=(oid,oid)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/oid_minmax_multi_ops', amoplefttype => 'oid', + amoprighttype => 'oid', amopstrategy => '3', amopopr => '=(oid,oid)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/oid_minmax_multi_ops', amoplefttype => 'oid', + amoprighttype => 'oid', amopstrategy => '4', amopopr => '>=(oid,oid)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/oid_minmax_multi_ops', amoplefttype => 'oid', + amoprighttype => 'oid', amopstrategy => '5', amopopr => '>(oid,oid)', + amopmethod => 'brin' }, + +# bloom oid +{ amopfamily => 'brin/oid_bloom_ops', amoplefttype => 'oid', + amoprighttype => 'oid', amopstrategy => '1', amopopr => '=(oid,oid)', + amopmethod => 'brin' }, + # minmax tid { amopfamily => 'brin/tid_minmax_ops', amoplefttype => 'tid', amoprighttype => 'tid', amopstrategy => '1', amopopr => '<(tid,tid)', @@ -1936,6 +2247,27 @@ amoprighttype => 'tid', amopstrategy => '5', amopopr => '>(tid,tid)', amopmethod => 'brin' }, +# tid oid +{ amopfamily => 'brin/tid_bloom_ops', amoplefttype => 'tid', + amoprighttype => 'tid', amopstrategy => '1', amopopr => '=(tid,tid)', + amopmethod => 'brin' }, +# minmax multi tid +{ amopfamily => 'brin/tid_minmax_multi_ops', amoplefttype => 'tid', + amoprighttype => 'tid', amopstrategy => '1', amopopr => '<(tid,tid)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/tid_minmax_multi_ops', amoplefttype => 'tid', + amoprighttype => 'tid', amopstrategy => '2', amopopr => '<=(tid,tid)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/tid_minmax_multi_ops', amoplefttype => 'tid', + amoprighttype => 'tid', amopstrategy => '3', amopopr => '=(tid,tid)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/tid_minmax_multi_ops', amoplefttype => 'tid', + amoprighttype => 'tid', amopstrategy => '4', amopopr => '>=(tid,tid)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/tid_minmax_multi_ops', amoplefttype => 'tid', + amoprighttype => 'tid', amopstrategy => '5', amopopr => '>(tid,tid)', + amopmethod => 'brin' }, + # minmax float (float4, float8) { amopfamily => 'brin/float_minmax_ops', amoplefttype => 'float4', @@ -2002,6 +2334,80 @@ amoprighttype => 'float8', amopstrategy => '5', amopopr => '>(float8,float8)', amopmethod => 'brin' }, +# minmax multi float (float4, float8) + +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4', + amoprighttype => 'float4', amopstrategy => '1', amopopr => '<(float4,float4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4', + amoprighttype => 'float4', amopstrategy => '2', + amopopr => '<=(float4,float4)', amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4', + amoprighttype => 'float4', amopstrategy => '3', amopopr => '=(float4,float4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4', + amoprighttype => 'float4', amopstrategy => '4', + amopopr => '>=(float4,float4)', amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4', + amoprighttype => 'float4', amopstrategy => '5', amopopr => '>(float4,float4)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4', + amoprighttype => 'float8', amopstrategy => '1', amopopr => '<(float4,float8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4', + amoprighttype => 'float8', amopstrategy => '2', + amopopr => '<=(float4,float8)', amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4', + amoprighttype => 'float8', amopstrategy => '3', amopopr => '=(float4,float8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4', + amoprighttype => 'float8', amopstrategy => '4', + amopopr => '>=(float4,float8)', amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float4', + amoprighttype => 'float8', amopstrategy => '5', amopopr => '>(float4,float8)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8', + amoprighttype => 'float4', amopstrategy => '1', amopopr => '<(float8,float4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8', + amoprighttype => 'float4', amopstrategy => '2', + amopopr => '<=(float8,float4)', amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8', + amoprighttype => 'float4', amopstrategy => '3', amopopr => '=(float8,float4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8', + amoprighttype => 'float4', amopstrategy => '4', + amopopr => '>=(float8,float4)', amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8', + amoprighttype => 'float4', amopstrategy => '5', amopopr => '>(float8,float4)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8', + amoprighttype => 'float8', amopstrategy => '1', amopopr => '<(float8,float8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8', + amoprighttype => 'float8', amopstrategy => '2', + amopopr => '<=(float8,float8)', amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8', + amoprighttype => 'float8', amopstrategy => '3', amopopr => '=(float8,float8)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8', + amoprighttype => 'float8', amopstrategy => '4', + amopopr => '>=(float8,float8)', amopmethod => 'brin' }, +{ amopfamily => 'brin/float_minmax_multi_ops', amoplefttype => 'float8', + amoprighttype => 'float8', amopstrategy => '5', amopopr => '>(float8,float8)', + amopmethod => 'brin' }, + +# bloom float +{ amopfamily => 'brin/float_bloom_ops', amoplefttype => 'float4', + amoprighttype => 'float4', amopstrategy => '1', amopopr => '=(float4,float4)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/float_bloom_ops', amoplefttype => 'float8', + amoprighttype => 'float8', amopstrategy => '1', amopopr => '=(float8,float8)', + amopmethod => 'brin' }, + # minmax macaddr { amopfamily => 'brin/macaddr_minmax_ops', amoplefttype => 'macaddr', amoprighttype => 'macaddr', amopstrategy => '1', @@ -2019,6 +2425,28 @@ amoprighttype => 'macaddr', amopstrategy => '5', amopopr => '>(macaddr,macaddr)', amopmethod => 'brin' }, +# minmax multi macaddr +{ amopfamily => 'brin/macaddr_minmax_multi_ops', amoplefttype => 'macaddr', + amoprighttype => 'macaddr', amopstrategy => '1', + amopopr => '<(macaddr,macaddr)', amopmethod => 'brin' }, +{ amopfamily => 'brin/macaddr_minmax_multi_ops', amoplefttype => 'macaddr', + amoprighttype => 'macaddr', amopstrategy => '2', + amopopr => '<=(macaddr,macaddr)', amopmethod => 'brin' }, +{ amopfamily => 'brin/macaddr_minmax_multi_ops', amoplefttype => 'macaddr', + amoprighttype => 'macaddr', amopstrategy => '3', + amopopr => '=(macaddr,macaddr)', amopmethod => 'brin' }, +{ amopfamily => 'brin/macaddr_minmax_multi_ops', amoplefttype => 'macaddr', + amoprighttype => 'macaddr', amopstrategy => '4', + amopopr => '>=(macaddr,macaddr)', amopmethod => 'brin' }, +{ amopfamily => 'brin/macaddr_minmax_multi_ops', amoplefttype => 'macaddr', + amoprighttype => 'macaddr', amopstrategy => '5', + amopopr => '>(macaddr,macaddr)', amopmethod => 'brin' }, + +# bloom macaddr +{ amopfamily => 'brin/macaddr_bloom_ops', amoplefttype => 'macaddr', + amoprighttype => 'macaddr', amopstrategy => '1', + amopopr => '=(macaddr,macaddr)', amopmethod => 'brin' }, + # minmax macaddr8 { amopfamily => 'brin/macaddr8_minmax_ops', amoplefttype => 'macaddr8', amoprighttype => 'macaddr8', amopstrategy => '1', @@ -2036,6 +2464,28 @@ amoprighttype => 'macaddr8', amopstrategy => '5', amopopr => '>(macaddr8,macaddr8)', amopmethod => 'brin' }, +# minmax multi macaddr8 +{ amopfamily => 'brin/macaddr8_minmax_multi_ops', amoplefttype => 'macaddr8', + amoprighttype => 'macaddr8', amopstrategy => '1', + amopopr => '<(macaddr8,macaddr8)', amopmethod => 'brin' }, +{ amopfamily => 'brin/macaddr8_minmax_multi_ops', amoplefttype => 'macaddr8', + amoprighttype => 'macaddr8', amopstrategy => '2', + amopopr => '<=(macaddr8,macaddr8)', amopmethod => 'brin' }, +{ amopfamily => 'brin/macaddr8_minmax_multi_ops', amoplefttype => 'macaddr8', + amoprighttype => 'macaddr8', amopstrategy => '3', + amopopr => '=(macaddr8,macaddr8)', amopmethod => 'brin' }, +{ amopfamily => 'brin/macaddr8_minmax_multi_ops', amoplefttype => 'macaddr8', + amoprighttype => 'macaddr8', amopstrategy => '4', + amopopr => '>=(macaddr8,macaddr8)', amopmethod => 'brin' }, +{ amopfamily => 'brin/macaddr8_minmax_multi_ops', amoplefttype => 'macaddr8', + amoprighttype => 'macaddr8', amopstrategy => '5', + amopopr => '>(macaddr8,macaddr8)', amopmethod => 'brin' }, + +# bloom macaddr8 +{ amopfamily => 'brin/macaddr8_bloom_ops', amoplefttype => 'macaddr8', + amoprighttype => 'macaddr8', amopstrategy => '1', + amopopr => '=(macaddr8,macaddr8)', amopmethod => 'brin' }, + # minmax inet { amopfamily => 'brin/network_minmax_ops', amoplefttype => 'inet', amoprighttype => 'inet', amopstrategy => '1', amopopr => '<(inet,inet)', @@ -2053,6 +2503,28 @@ amoprighttype => 'inet', amopstrategy => '5', amopopr => '>(inet,inet)', amopmethod => 'brin' }, +# minmax multi inet +{ amopfamily => 'brin/network_minmax_multi_ops', amoplefttype => 'inet', + amoprighttype => 'inet', amopstrategy => '1', amopopr => '<(inet,inet)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/network_minmax_multi_ops', amoplefttype => 'inet', + amoprighttype => 'inet', amopstrategy => '2', amopopr => '<=(inet,inet)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/network_minmax_multi_ops', amoplefttype => 'inet', + amoprighttype => 'inet', amopstrategy => '3', amopopr => '=(inet,inet)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/network_minmax_multi_ops', amoplefttype => 'inet', + amoprighttype => 'inet', amopstrategy => '4', amopopr => '>=(inet,inet)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/network_minmax_multi_ops', amoplefttype => 'inet', + amoprighttype => 'inet', amopstrategy => '5', amopopr => '>(inet,inet)', + amopmethod => 'brin' }, + +# bloom inet +{ amopfamily => 'brin/network_bloom_ops', amoplefttype => 'inet', + amoprighttype => 'inet', amopstrategy => '1', amopopr => '=(inet,inet)', + amopmethod => 'brin' }, + # inclusion inet { amopfamily => 'brin/network_inclusion_ops', amoplefttype => 'inet', amoprighttype => 'inet', amopstrategy => '3', amopopr => '&&(inet,inet)', @@ -2090,6 +2562,11 @@ amoprighttype => 'bpchar', amopstrategy => '5', amopopr => '>(bpchar,bpchar)', amopmethod => 'brin' }, +# bloom character +{ amopfamily => 'brin/bpchar_bloom_ops', amoplefttype => 'bpchar', + amoprighttype => 'bpchar', amopstrategy => '1', amopopr => '=(bpchar,bpchar)', + amopmethod => 'brin' }, + # minmax time without time zone { amopfamily => 'brin/time_minmax_ops', amoplefttype => 'time', amoprighttype => 'time', amopstrategy => '1', amopopr => '<(time,time)', @@ -2107,6 +2584,28 @@ amoprighttype => 'time', amopstrategy => '5', amopopr => '>(time,time)', amopmethod => 'brin' }, +# minmax multi time without time zone +{ amopfamily => 'brin/time_minmax_multi_ops', amoplefttype => 'time', + amoprighttype => 'time', amopstrategy => '1', amopopr => '<(time,time)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/time_minmax_multi_ops', amoplefttype => 'time', + amoprighttype => 'time', amopstrategy => '2', amopopr => '<=(time,time)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/time_minmax_multi_ops', amoplefttype => 'time', + amoprighttype => 'time', amopstrategy => '3', amopopr => '=(time,time)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/time_minmax_multi_ops', amoplefttype => 'time', + amoprighttype => 'time', amopstrategy => '4', amopopr => '>=(time,time)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/time_minmax_multi_ops', amoplefttype => 'time', + amoprighttype => 'time', amopstrategy => '5', amopopr => '>(time,time)', + amopmethod => 'brin' }, + +# bloom time without time zone +{ amopfamily => 'brin/time_bloom_ops', amoplefttype => 'time', + amoprighttype => 'time', amopstrategy => '1', amopopr => '=(time,time)', + amopmethod => 'brin' }, + # minmax datetime (date, timestamp, timestamptz) { amopfamily => 'brin/datetime_minmax_ops', amoplefttype => 'timestamp', @@ -2253,6 +2752,166 @@ amoprighttype => 'timestamptz', amopstrategy => '5', amopopr => '>(timestamptz,timestamptz)', amopmethod => 'brin' }, +# minmax multi datetime (date, timestamp, timestamptz) + +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp', + amoprighttype => 'timestamp', amopstrategy => '1', + amopopr => '<(timestamp,timestamp)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp', + amoprighttype => 'timestamp', amopstrategy => '2', + amopopr => '<=(timestamp,timestamp)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp', + amoprighttype => 'timestamp', amopstrategy => '3', + amopopr => '=(timestamp,timestamp)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp', + amoprighttype => 'timestamp', amopstrategy => '4', + amopopr => '>=(timestamp,timestamp)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp', + amoprighttype => 'timestamp', amopstrategy => '5', + amopopr => '>(timestamp,timestamp)', amopmethod => 'brin' }, + +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp', + amoprighttype => 'date', amopstrategy => '1', amopopr => '<(timestamp,date)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp', + amoprighttype => 'date', amopstrategy => '2', amopopr => '<=(timestamp,date)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp', + amoprighttype => 'date', amopstrategy => '3', amopopr => '=(timestamp,date)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp', + amoprighttype => 'date', amopstrategy => '4', amopopr => '>=(timestamp,date)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp', + amoprighttype => 'date', amopstrategy => '5', amopopr => '>(timestamp,date)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp', + amoprighttype => 'timestamptz', amopstrategy => '1', + amopopr => '<(timestamp,timestamptz)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp', + amoprighttype => 'timestamptz', amopstrategy => '2', + amopopr => '<=(timestamp,timestamptz)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp', + amoprighttype => 'timestamptz', amopstrategy => '3', + amopopr => '=(timestamp,timestamptz)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp', + amoprighttype => 'timestamptz', amopstrategy => '4', + amopopr => '>=(timestamp,timestamptz)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamp', + amoprighttype => 'timestamptz', amopstrategy => '5', + amopopr => '>(timestamp,timestamptz)', amopmethod => 'brin' }, + +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date', + amoprighttype => 'date', amopstrategy => '1', amopopr => '<(date,date)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date', + amoprighttype => 'date', amopstrategy => '2', amopopr => '<=(date,date)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date', + amoprighttype => 'date', amopstrategy => '3', amopopr => '=(date,date)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date', + amoprighttype => 'date', amopstrategy => '4', amopopr => '>=(date,date)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date', + amoprighttype => 'date', amopstrategy => '5', amopopr => '>(date,date)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date', + amoprighttype => 'timestamp', amopstrategy => '1', + amopopr => '<(date,timestamp)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date', + amoprighttype => 'timestamp', amopstrategy => '2', + amopopr => '<=(date,timestamp)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date', + amoprighttype => 'timestamp', amopstrategy => '3', + amopopr => '=(date,timestamp)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date', + amoprighttype => 'timestamp', amopstrategy => '4', + amopopr => '>=(date,timestamp)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date', + amoprighttype => 'timestamp', amopstrategy => '5', + amopopr => '>(date,timestamp)', amopmethod => 'brin' }, + +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date', + amoprighttype => 'timestamptz', amopstrategy => '1', + amopopr => '<(date,timestamptz)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date', + amoprighttype => 'timestamptz', amopstrategy => '2', + amopopr => '<=(date,timestamptz)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date', + amoprighttype => 'timestamptz', amopstrategy => '3', + amopopr => '=(date,timestamptz)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date', + amoprighttype => 'timestamptz', amopstrategy => '4', + amopopr => '>=(date,timestamptz)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'date', + amoprighttype => 'timestamptz', amopstrategy => '5', + amopopr => '>(date,timestamptz)', amopmethod => 'brin' }, + +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz', + amoprighttype => 'date', amopstrategy => '1', + amopopr => '<(timestamptz,date)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz', + amoprighttype => 'date', amopstrategy => '2', + amopopr => '<=(timestamptz,date)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz', + amoprighttype => 'date', amopstrategy => '3', + amopopr => '=(timestamptz,date)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz', + amoprighttype => 'date', amopstrategy => '4', + amopopr => '>=(timestamptz,date)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz', + amoprighttype => 'date', amopstrategy => '5', + amopopr => '>(timestamptz,date)', amopmethod => 'brin' }, + +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz', + amoprighttype => 'timestamp', amopstrategy => '1', + amopopr => '<(timestamptz,timestamp)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz', + amoprighttype => 'timestamp', amopstrategy => '2', + amopopr => '<=(timestamptz,timestamp)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz', + amoprighttype => 'timestamp', amopstrategy => '3', + amopopr => '=(timestamptz,timestamp)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz', + amoprighttype => 'timestamp', amopstrategy => '4', + amopopr => '>=(timestamptz,timestamp)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz', + amoprighttype => 'timestamp', amopstrategy => '5', + amopopr => '>(timestamptz,timestamp)', amopmethod => 'brin' }, + +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz', + amoprighttype => 'timestamptz', amopstrategy => '1', + amopopr => '<(timestamptz,timestamptz)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz', + amoprighttype => 'timestamptz', amopstrategy => '2', + amopopr => '<=(timestamptz,timestamptz)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz', + amoprighttype => 'timestamptz', amopstrategy => '3', + amopopr => '=(timestamptz,timestamptz)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz', + amoprighttype => 'timestamptz', amopstrategy => '4', + amopopr => '>=(timestamptz,timestamptz)', amopmethod => 'brin' }, +{ amopfamily => 'brin/datetime_minmax_multi_ops', amoplefttype => 'timestamptz', + amoprighttype => 'timestamptz', amopstrategy => '5', + amopopr => '>(timestamptz,timestamptz)', amopmethod => 'brin' }, + +# bloom datetime (date, timestamp, timestamptz) + +{ amopfamily => 'brin/datetime_bloom_ops', amoplefttype => 'timestamp', + amoprighttype => 'timestamp', amopstrategy => '1', + amopopr => '=(timestamp,timestamp)', amopmethod => 'brin' }, + +{ amopfamily => 'brin/datetime_bloom_ops', amoplefttype => 'date', + amoprighttype => 'date', amopstrategy => '1', amopopr => '=(date,date)', + amopmethod => 'brin' }, + +{ amopfamily => 'brin/datetime_bloom_ops', amoplefttype => 'timestamptz', + amoprighttype => 'timestamptz', amopstrategy => '1', + amopopr => '=(timestamptz,timestamptz)', amopmethod => 'brin' }, + # minmax interval { amopfamily => 'brin/interval_minmax_ops', amoplefttype => 'interval', amoprighttype => 'interval', amopstrategy => '1', @@ -2270,6 +2929,28 @@ amoprighttype => 'interval', amopstrategy => '5', amopopr => '>(interval,interval)', amopmethod => 'brin' }, +# minmax multi interval +{ amopfamily => 'brin/interval_minmax_multi_ops', amoplefttype => 'interval', + amoprighttype => 'interval', amopstrategy => '1', + amopopr => '<(interval,interval)', amopmethod => 'brin' }, +{ amopfamily => 'brin/interval_minmax_multi_ops', amoplefttype => 'interval', + amoprighttype => 'interval', amopstrategy => '2', + amopopr => '<=(interval,interval)', amopmethod => 'brin' }, +{ amopfamily => 'brin/interval_minmax_multi_ops', amoplefttype => 'interval', + amoprighttype => 'interval', amopstrategy => '3', + amopopr => '=(interval,interval)', amopmethod => 'brin' }, +{ amopfamily => 'brin/interval_minmax_multi_ops', amoplefttype => 'interval', + amoprighttype => 'interval', amopstrategy => '4', + amopopr => '>=(interval,interval)', amopmethod => 'brin' }, +{ amopfamily => 'brin/interval_minmax_multi_ops', amoplefttype => 'interval', + amoprighttype => 'interval', amopstrategy => '5', + amopopr => '>(interval,interval)', amopmethod => 'brin' }, + +# bloom interval +{ amopfamily => 'brin/interval_bloom_ops', amoplefttype => 'interval', + amoprighttype => 'interval', amopstrategy => '1', + amopopr => '=(interval,interval)', amopmethod => 'brin' }, + # minmax time with time zone { amopfamily => 'brin/timetz_minmax_ops', amoplefttype => 'timetz', amoprighttype => 'timetz', amopstrategy => '1', amopopr => '<(timetz,timetz)', @@ -2287,6 +2968,28 @@ amoprighttype => 'timetz', amopstrategy => '5', amopopr => '>(timetz,timetz)', amopmethod => 'brin' }, +# minmax multi time with time zone +{ amopfamily => 'brin/timetz_minmax_multi_ops', amoplefttype => 'timetz', + amoprighttype => 'timetz', amopstrategy => '1', amopopr => '<(timetz,timetz)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/timetz_minmax_multi_ops', amoplefttype => 'timetz', + amoprighttype => 'timetz', amopstrategy => '2', + amopopr => '<=(timetz,timetz)', amopmethod => 'brin' }, +{ amopfamily => 'brin/timetz_minmax_multi_ops', amoplefttype => 'timetz', + amoprighttype => 'timetz', amopstrategy => '3', amopopr => '=(timetz,timetz)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/timetz_minmax_multi_ops', amoplefttype => 'timetz', + amoprighttype => 'timetz', amopstrategy => '4', + amopopr => '>=(timetz,timetz)', amopmethod => 'brin' }, +{ amopfamily => 'brin/timetz_minmax_multi_ops', amoplefttype => 'timetz', + amoprighttype => 'timetz', amopstrategy => '5', amopopr => '>(timetz,timetz)', + amopmethod => 'brin' }, + +# bloom time with time zone +{ amopfamily => 'brin/timetz_bloom_ops', amoplefttype => 'timetz', + amoprighttype => 'timetz', amopstrategy => '1', amopopr => '=(timetz,timetz)', + amopmethod => 'brin' }, + # minmax bit { amopfamily => 'brin/bit_minmax_ops', amoplefttype => 'bit', amoprighttype => 'bit', amopstrategy => '1', amopopr => '<(bit,bit)', @@ -2338,6 +3041,28 @@ amoprighttype => 'numeric', amopstrategy => '5', amopopr => '>(numeric,numeric)', amopmethod => 'brin' }, +# minmax multi numeric +{ amopfamily => 'brin/numeric_minmax_multi_ops', amoplefttype => 'numeric', + amoprighttype => 'numeric', amopstrategy => '1', + amopopr => '<(numeric,numeric)', amopmethod => 'brin' }, +{ amopfamily => 'brin/numeric_minmax_multi_ops', amoplefttype => 'numeric', + amoprighttype => 'numeric', amopstrategy => '2', + amopopr => '<=(numeric,numeric)', amopmethod => 'brin' }, +{ amopfamily => 'brin/numeric_minmax_multi_ops', amoplefttype => 'numeric', + amoprighttype => 'numeric', amopstrategy => '3', + amopopr => '=(numeric,numeric)', amopmethod => 'brin' }, +{ amopfamily => 'brin/numeric_minmax_multi_ops', amoplefttype => 'numeric', + amoprighttype => 'numeric', amopstrategy => '4', + amopopr => '>=(numeric,numeric)', amopmethod => 'brin' }, +{ amopfamily => 'brin/numeric_minmax_multi_ops', amoplefttype => 'numeric', + amoprighttype => 'numeric', amopstrategy => '5', + amopopr => '>(numeric,numeric)', amopmethod => 'brin' }, + +# bloom numeric +{ amopfamily => 'brin/numeric_bloom_ops', amoplefttype => 'numeric', + amoprighttype => 'numeric', amopstrategy => '1', + amopopr => '=(numeric,numeric)', amopmethod => 'brin' }, + # minmax uuid { amopfamily => 'brin/uuid_minmax_ops', amoplefttype => 'uuid', amoprighttype => 'uuid', amopstrategy => '1', amopopr => '<(uuid,uuid)', @@ -2355,6 +3080,28 @@ amoprighttype => 'uuid', amopstrategy => '5', amopopr => '>(uuid,uuid)', amopmethod => 'brin' }, +# minmax multi uuid +{ amopfamily => 'brin/uuid_minmax_multi_ops', amoplefttype => 'uuid', + amoprighttype => 'uuid', amopstrategy => '1', amopopr => '<(uuid,uuid)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/uuid_minmax_multi_ops', amoplefttype => 'uuid', + amoprighttype => 'uuid', amopstrategy => '2', amopopr => '<=(uuid,uuid)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/uuid_minmax_multi_ops', amoplefttype => 'uuid', + amoprighttype => 'uuid', amopstrategy => '3', amopopr => '=(uuid,uuid)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/uuid_minmax_multi_ops', amoplefttype => 'uuid', + amoprighttype => 'uuid', amopstrategy => '4', amopopr => '>=(uuid,uuid)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/uuid_minmax_multi_ops', amoplefttype => 'uuid', + amoprighttype => 'uuid', amopstrategy => '5', amopopr => '>(uuid,uuid)', + amopmethod => 'brin' }, + +# bloom uuid +{ amopfamily => 'brin/uuid_bloom_ops', amoplefttype => 'uuid', + amoprighttype => 'uuid', amopstrategy => '1', amopopr => '=(uuid,uuid)', + amopmethod => 'brin' }, + # inclusion range types { amopfamily => 'brin/range_inclusion_ops', amoplefttype => 'anyrange', amoprighttype => 'anyrange', amopstrategy => '1', @@ -2416,6 +3163,28 @@ amoprighttype => 'pg_lsn', amopstrategy => '5', amopopr => '>(pg_lsn,pg_lsn)', amopmethod => 'brin' }, +# minmax multi pg_lsn +{ amopfamily => 'brin/pg_lsn_minmax_multi_ops', amoplefttype => 'pg_lsn', + amoprighttype => 'pg_lsn', amopstrategy => '1', amopopr => '<(pg_lsn,pg_lsn)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/pg_lsn_minmax_multi_ops', amoplefttype => 'pg_lsn', + amoprighttype => 'pg_lsn', amopstrategy => '2', + amopopr => '<=(pg_lsn,pg_lsn)', amopmethod => 'brin' }, +{ amopfamily => 'brin/pg_lsn_minmax_multi_ops', amoplefttype => 'pg_lsn', + amoprighttype => 'pg_lsn', amopstrategy => '3', amopopr => '=(pg_lsn,pg_lsn)', + amopmethod => 'brin' }, +{ amopfamily => 'brin/pg_lsn_minmax_multi_ops', amoplefttype => 'pg_lsn', + amoprighttype => 'pg_lsn', amopstrategy => '4', + amopopr => '>=(pg_lsn,pg_lsn)', amopmethod => 'brin' }, +{ amopfamily => 'brin/pg_lsn_minmax_multi_ops', amoplefttype => 'pg_lsn', + amoprighttype => 'pg_lsn', amopstrategy => '5', amopopr => '>(pg_lsn,pg_lsn)', + amopmethod => 'brin' }, + +# bloom pg_lsn +{ amopfamily => 'brin/pg_lsn_bloom_ops', amoplefttype => 'pg_lsn', + amoprighttype => 'pg_lsn', amopstrategy => '1', amopopr => '=(pg_lsn,pg_lsn)', + amopmethod => 'brin' }, + # inclusion box { amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box', amoprighttype => 'box', amopstrategy => '1', amopopr => '<<(box,box)', @@ -2454,8 +3223,6 @@ amoprighttype => 'box', amopstrategy => '12', amopopr => '|&>(box,box)', amopmethod => 'brin' }, -# we could, but choose not to, supply entries for strategies 13 and 14 - { amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box', amoprighttype => 'point', amopstrategy => '7', amopopr => '@>(box,point)', amopmethod => 'brin' }, diff --git a/contrib/libs/postgresql/src/include/catalog/pg_amop.h b/contrib/libs/postgresql/src/include/catalog/pg_amop.h index 81a7eb6049..e1cca35e31 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_amop.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_amop.h @@ -29,7 +29,7 @@ * intentional denormalization of the catalogs to buy lookup speed. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -77,7 +77,7 @@ CATALOG(pg_amop,2602,AccessMethodOperatorRelationId) Oid amopmethod BKI_LOOKUP(pg_am); /* ordering opfamily OID, or 0 if search op */ - Oid amopsortfamily BKI_DEFAULT(0) BKI_LOOKUP(pg_opfamily); + Oid amopsortfamily BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_opfamily); } FormData_pg_amop; /* ---------------- @@ -87,6 +87,13 @@ CATALOG(pg_amop,2602,AccessMethodOperatorRelationId) */ 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: */ diff --git a/contrib/libs/postgresql/src/include/catalog/pg_amproc.dat b/contrib/libs/postgresql/src/include/catalog/pg_amproc.dat index 37b580883f..5460aa2422 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_amproc.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_amproc.dat @@ -3,7 +3,7 @@ # pg_amproc.dat # Initial contents of the pg_amproc system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # # src/include/catalog/pg_amproc.dat @@ -285,6 +285,9 @@ amprocrighttype => 'tsquery', amprocnum => '1', amproc => 'tsquery_cmp' }, { amprocfamily => 'btree/range_ops', amproclefttype => 'anyrange', amprocrighttype => 'anyrange', amprocnum => '1', amproc => 'range_cmp' }, +{ amprocfamily => 'btree/multirange_ops', amproclefttype => 'anymultirange', + amprocrighttype => 'anymultirange', amprocnum => '1', + amproc => 'multirange_cmp' }, { amprocfamily => 'btree/jsonb_ops', amproclefttype => 'jsonb', amprocrighttype => 'jsonb', amprocnum => '1', amproc => 'jsonb_cmp' }, { amprocfamily => 'btree/xid8_ops', amproclefttype => 'xid8', @@ -433,6 +436,11 @@ amprocrighttype => 'uuid', amprocnum => '1', amproc => 'uuid_hash' }, { amprocfamily => 'hash/uuid_ops', amproclefttype => 'uuid', amprocrighttype => 'uuid', amprocnum => '2', amproc => 'uuid_hash_extended' }, +{ amprocfamily => 'hash/record_ops', amproclefttype => 'record', + amprocrighttype => 'record', amprocnum => '1', amproc => 'hash_record' }, +{ amprocfamily => 'hash/record_ops', amproclefttype => 'record', + amprocrighttype => 'record', amprocnum => '2', + amproc => 'hash_record_extended' }, { amprocfamily => 'hash/pg_lsn_ops', amproclefttype => 'pg_lsn', amprocrighttype => 'pg_lsn', amprocnum => '1', amproc => 'pg_lsn_hash' }, { amprocfamily => 'hash/pg_lsn_ops', amproclefttype => 'pg_lsn', @@ -453,6 +461,12 @@ { amprocfamily => 'hash/range_ops', amproclefttype => 'anyrange', amprocrighttype => 'anyrange', amprocnum => '2', amproc => 'hash_range_extended' }, +{ amprocfamily => 'hash/multirange_ops', amproclefttype => 'anymultirange', + amprocrighttype => 'anymultirange', amprocnum => '1', + amproc => 'hash_multirange' }, +{ amprocfamily => 'hash/multirange_ops', amproclefttype => 'anymultirange', + amprocrighttype => 'anymultirange', amprocnum => '2', + amproc => 'hash_multirange_extended' }, { amprocfamily => 'hash/jsonb_ops', amproclefttype => 'jsonb', amprocrighttype => 'jsonb', amprocnum => '1', amproc => 'jsonb_hash' }, { amprocfamily => 'hash/jsonb_ops', amproclefttype => 'jsonb', @@ -480,6 +494,9 @@ amproc => 'gist_point_distance' }, { amprocfamily => 'gist/point_ops', amproclefttype => 'point', amprocrighttype => 'point', amprocnum => '9', amproc => 'gist_point_fetch' }, +{ amprocfamily => 'gist/point_ops', amproclefttype => 'point', + amprocrighttype => 'point', amprocnum => '11', + amproc => 'gist_point_sortsupport' }, { amprocfamily => 'gist/box_ops', amproclefttype => 'box', amprocrighttype => 'box', amprocnum => '1', amproc => 'gist_box_consistent' }, { amprocfamily => 'gist/box_ops', amproclefttype => 'box', @@ -599,6 +616,24 @@ amprocrighttype => 'inet', amprocnum => '7', amproc => 'inet_gist_same' }, { amprocfamily => 'gist/network_ops', amproclefttype => 'inet', amprocrighttype => 'inet', amprocnum => '9', amproc => 'inet_gist_fetch' }, +{ amprocfamily => 'gist/multirange_ops', amproclefttype => 'anymultirange', + amprocrighttype => 'anymultirange', amprocnum => '1', + amproc => 'multirange_gist_consistent' }, +{ amprocfamily => 'gist/multirange_ops', amproclefttype => 'anymultirange', + amprocrighttype => 'anymultirange', amprocnum => '2', + amproc => 'range_gist_union' }, +{ amprocfamily => 'gist/multirange_ops', amproclefttype => 'anymultirange', + amprocrighttype => 'anymultirange', amprocnum => '3', + amproc => 'multirange_gist_compress' }, +{ amprocfamily => 'gist/multirange_ops', amproclefttype => 'anymultirange', + amprocrighttype => 'anymultirange', amprocnum => '5', + amproc => 'range_gist_penalty' }, +{ amprocfamily => 'gist/multirange_ops', amproclefttype => 'anymultirange', + amprocrighttype => 'anymultirange', amprocnum => '6', + amproc => 'range_gist_picksplit' }, +{ amprocfamily => 'gist/multirange_ops', amproclefttype => 'anymultirange', + amprocrighttype => 'anymultirange', amprocnum => '7', + amproc => 'range_gist_same' }, # gin { amprocfamily => 'gin/array_ops', amproclefttype => 'anyarray', @@ -770,6 +805,24 @@ { amprocfamily => 'brin/bytea_minmax_ops', amproclefttype => 'bytea', amprocrighttype => 'bytea', amprocnum => '4', amproc => 'brin_minmax_union' }, +# bloom bytea +{ amprocfamily => 'brin/bytea_bloom_ops', amproclefttype => 'bytea', + amprocrighttype => 'bytea', amprocnum => '1', + amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/bytea_bloom_ops', amproclefttype => 'bytea', + amprocrighttype => 'bytea', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/bytea_bloom_ops', amproclefttype => 'bytea', + amprocrighttype => 'bytea', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/bytea_bloom_ops', amproclefttype => 'bytea', + amprocrighttype => 'bytea', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/bytea_bloom_ops', amproclefttype => 'bytea', + amprocrighttype => 'bytea', amprocnum => '5', + amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/bytea_bloom_ops', amproclefttype => 'bytea', + amprocrighttype => 'bytea', amprocnum => '11', amproc => 'hashvarlena' }, + # minmax "char" { amprocfamily => 'brin/char_minmax_ops', amproclefttype => 'char', amprocrighttype => 'char', amprocnum => '1', @@ -783,6 +836,22 @@ { amprocfamily => 'brin/char_minmax_ops', amproclefttype => 'char', amprocrighttype => 'char', amprocnum => '4', amproc => 'brin_minmax_union' }, +# bloom "char" +{ amprocfamily => 'brin/char_bloom_ops', amproclefttype => 'char', + amprocrighttype => 'char', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/char_bloom_ops', amproclefttype => 'char', + amprocrighttype => 'char', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/char_bloom_ops', amproclefttype => 'char', + amprocrighttype => 'char', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/char_bloom_ops', amproclefttype => 'char', + amprocrighttype => 'char', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/char_bloom_ops', amproclefttype => 'char', + amprocrighttype => 'char', amprocnum => '5', amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/char_bloom_ops', amproclefttype => 'char', + amprocrighttype => 'char', amprocnum => '11', amproc => 'hashchar' }, + # minmax name { amprocfamily => 'brin/name_minmax_ops', amproclefttype => 'name', amprocrighttype => 'name', amprocnum => '1', @@ -796,6 +865,22 @@ { amprocfamily => 'brin/name_minmax_ops', amproclefttype => 'name', amprocrighttype => 'name', amprocnum => '4', amproc => 'brin_minmax_union' }, +# bloom name +{ amprocfamily => 'brin/name_bloom_ops', amproclefttype => 'name', + amprocrighttype => 'name', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/name_bloom_ops', amproclefttype => 'name', + amprocrighttype => 'name', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/name_bloom_ops', amproclefttype => 'name', + amprocrighttype => 'name', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/name_bloom_ops', amproclefttype => 'name', + amprocrighttype => 'name', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/name_bloom_ops', amproclefttype => 'name', + amprocrighttype => 'name', amprocnum => '5', amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/name_bloom_ops', amproclefttype => 'name', + amprocrighttype => 'name', amprocnum => '11', amproc => 'hashname' }, + # minmax integer: int2, int4, int8 { amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8', amprocrighttype => 'int8', amprocnum => '1', @@ -808,28 +893,7 @@ amproc => 'brin_minmax_consistent' }, { amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8', amprocrighttype => 'int8', amprocnum => '4', amproc => 'brin_minmax_union' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8', - amprocrighttype => 'int2', amprocnum => '1', - amproc => 'brin_minmax_opcinfo' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8', - amprocrighttype => 'int2', amprocnum => '2', - amproc => 'brin_minmax_add_value' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8', - amprocrighttype => 'int2', amprocnum => '3', - amproc => 'brin_minmax_consistent' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8', - amprocrighttype => 'int2', amprocnum => '4', amproc => 'brin_minmax_union' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8', - amprocrighttype => 'int4', amprocnum => '1', - amproc => 'brin_minmax_opcinfo' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8', - amprocrighttype => 'int4', amprocnum => '2', - amproc => 'brin_minmax_add_value' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8', - amprocrighttype => 'int4', amprocnum => '3', - amproc => 'brin_minmax_consistent' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8', - amprocrighttype => 'int4', amprocnum => '4', amproc => 'brin_minmax_union' }, + { amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2', amprocrighttype => 'int2', amprocnum => '1', amproc => 'brin_minmax_opcinfo' }, @@ -841,28 +905,7 @@ amproc => 'brin_minmax_consistent' }, { amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2', amprocrighttype => 'int2', amprocnum => '4', amproc => 'brin_minmax_union' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2', - amprocrighttype => 'int8', amprocnum => '1', - amproc => 'brin_minmax_opcinfo' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2', - amprocrighttype => 'int8', amprocnum => '2', - amproc => 'brin_minmax_add_value' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2', - amprocrighttype => 'int8', amprocnum => '3', - amproc => 'brin_minmax_consistent' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2', - amprocrighttype => 'int8', amprocnum => '4', amproc => 'brin_minmax_union' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2', - amprocrighttype => 'int4', amprocnum => '1', - amproc => 'brin_minmax_opcinfo' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2', - amprocrighttype => 'int4', amprocnum => '2', - amproc => 'brin_minmax_add_value' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2', - amprocrighttype => 'int4', amprocnum => '3', - amproc => 'brin_minmax_consistent' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2', - amprocrighttype => 'int4', amprocnum => '4', amproc => 'brin_minmax_union' }, + { amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4', amprocrighttype => 'int4', amprocnum => '1', amproc => 'brin_minmax_opcinfo' }, @@ -874,28 +917,110 @@ amproc => 'brin_minmax_consistent' }, { amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4', amprocrighttype => 'int4', amprocnum => '4', amproc => 'brin_minmax_union' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4', + +# minmax multi integer: int2, int4, int8 +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int2', + amprocrighttype => 'int2', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int2', + amprocrighttype => 'int2', amprocnum => '2', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int2', + amprocrighttype => 'int2', amprocnum => '3', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int2', + amprocrighttype => 'int2', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int2', + amprocrighttype => 'int2', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int2', + amprocrighttype => 'int2', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_int2' }, + +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4', + amprocrighttype => 'int4', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4', + amprocrighttype => 'int4', amprocnum => '2', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4', + amprocrighttype => 'int4', amprocnum => '3', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4', + amprocrighttype => 'int4', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4', + amprocrighttype => 'int4', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4', + amprocrighttype => 'int4', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_int4' }, + +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8', amprocrighttype => 'int8', amprocnum => '1', - amproc => 'brin_minmax_opcinfo' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8', amprocrighttype => 'int8', amprocnum => '2', - amproc => 'brin_minmax_add_value' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8', amprocrighttype => 'int8', amprocnum => '3', - amproc => 'brin_minmax_consistent' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4', - amprocrighttype => 'int8', amprocnum => '4', amproc => 'brin_minmax_union' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4', - amprocrighttype => 'int2', amprocnum => '1', - amproc => 'brin_minmax_opcinfo' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8', + amprocrighttype => 'int8', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8', + amprocrighttype => 'int8', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8', + amprocrighttype => 'int8', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_int8' }, + +# bloom integer: int2, int4, int8 +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int8', + amprocrighttype => 'int8', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int8', + amprocrighttype => 'int8', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int8', + amprocrighttype => 'int8', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int8', + amprocrighttype => 'int8', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int8', + amprocrighttype => 'int8', amprocnum => '5', amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int8', + amprocrighttype => 'int8', amprocnum => '11', amproc => 'hashint8' }, + +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int2', + amprocrighttype => 'int2', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int2', amprocrighttype => 'int2', amprocnum => '2', - amproc => 'brin_minmax_add_value' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int2', amprocrighttype => 'int2', amprocnum => '3', - amproc => 'brin_minmax_consistent' }, -{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4', - amprocrighttype => 'int2', amprocnum => '4', amproc => 'brin_minmax_union' }, + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int2', + amprocrighttype => 'int2', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int2', + amprocrighttype => 'int2', amprocnum => '5', amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int2', + amprocrighttype => 'int2', amprocnum => '11', amproc => 'hashint2' }, + +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int4', + amprocrighttype => 'int4', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int4', + amprocrighttype => 'int4', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int4', + amprocrighttype => 'int4', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int4', + amprocrighttype => 'int4', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int4', + amprocrighttype => 'int4', amprocnum => '5', amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int4', + amprocrighttype => 'int4', amprocnum => '11', amproc => 'hashint4' }, # minmax text { amprocfamily => 'brin/text_minmax_ops', amproclefttype => 'text', @@ -910,6 +1035,22 @@ { amprocfamily => 'brin/text_minmax_ops', amproclefttype => 'text', amprocrighttype => 'text', amprocnum => '4', amproc => 'brin_minmax_union' }, +# bloom text +{ amprocfamily => 'brin/text_bloom_ops', amproclefttype => 'text', + amprocrighttype => 'text', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/text_bloom_ops', amproclefttype => 'text', + amprocrighttype => 'text', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/text_bloom_ops', amproclefttype => 'text', + amprocrighttype => 'text', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/text_bloom_ops', amproclefttype => 'text', + amprocrighttype => 'text', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/text_bloom_ops', amproclefttype => 'text', + amprocrighttype => 'text', amprocnum => '5', amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/text_bloom_ops', amproclefttype => 'text', + amprocrighttype => 'text', amprocnum => '11', amproc => 'hashtext' }, + # minmax oid { amprocfamily => 'brin/oid_minmax_ops', amproclefttype => 'oid', amprocrighttype => 'oid', amprocnum => '1', amproc => 'brin_minmax_opcinfo' }, @@ -922,6 +1063,42 @@ { amprocfamily => 'brin/oid_minmax_ops', amproclefttype => 'oid', amprocrighttype => 'oid', amprocnum => '4', amproc => 'brin_minmax_union' }, +# minmax multi oid +{ amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid', + amprocrighttype => 'oid', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid', + amprocrighttype => 'oid', amprocnum => '2', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid', + amprocrighttype => 'oid', amprocnum => '3', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid', + amprocrighttype => 'oid', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid', + amprocrighttype => 'oid', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid', + amprocrighttype => 'oid', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_int4' }, + +# bloom oid +{ amprocfamily => 'brin/oid_bloom_ops', amproclefttype => 'oid', + amprocrighttype => 'oid', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/oid_bloom_ops', amproclefttype => 'oid', + amprocrighttype => 'oid', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/oid_bloom_ops', amproclefttype => 'oid', + amprocrighttype => 'oid', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/oid_bloom_ops', amproclefttype => 'oid', + amprocrighttype => 'oid', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/oid_bloom_ops', amproclefttype => 'oid', + amprocrighttype => 'oid', amprocnum => '5', amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/oid_bloom_ops', amproclefttype => 'oid', + amprocrighttype => 'oid', amprocnum => '11', amproc => 'hashoid' }, + # minmax tid { amprocfamily => 'brin/tid_minmax_ops', amproclefttype => 'tid', amprocrighttype => 'tid', amprocnum => '1', amproc => 'brin_minmax_opcinfo' }, @@ -934,6 +1111,42 @@ { amprocfamily => 'brin/tid_minmax_ops', amproclefttype => 'tid', amprocrighttype => 'tid', amprocnum => '4', amproc => 'brin_minmax_union' }, +# bloom tid +{ amprocfamily => 'brin/tid_bloom_ops', amproclefttype => 'tid', + amprocrighttype => 'tid', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/tid_bloom_ops', amproclefttype => 'tid', + amprocrighttype => 'tid', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/tid_bloom_ops', amproclefttype => 'tid', + amprocrighttype => 'tid', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/tid_bloom_ops', amproclefttype => 'tid', + amprocrighttype => 'tid', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/tid_bloom_ops', amproclefttype => 'tid', + amprocrighttype => 'tid', amprocnum => '5', amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/tid_bloom_ops', amproclefttype => 'tid', + amprocrighttype => 'tid', amprocnum => '11', amproc => 'hashtid' }, + +# minmax multi tid +{ amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid', + amprocrighttype => 'tid', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid', + amprocrighttype => 'tid', amprocnum => '2', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid', + amprocrighttype => 'tid', amprocnum => '3', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid', + amprocrighttype => 'tid', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid', + amprocrighttype => 'tid', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid', + amprocrighttype => 'tid', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_tid' }, + # minmax float { amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4', amprocrighttype => 'float4', amprocnum => '1', @@ -947,18 +1160,7 @@ { amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4', amprocrighttype => 'float4', amprocnum => '4', amproc => 'brin_minmax_union' }, -{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4', - amprocrighttype => 'float8', amprocnum => '1', - amproc => 'brin_minmax_opcinfo' }, -{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4', - amprocrighttype => 'float8', amprocnum => '2', - amproc => 'brin_minmax_add_value' }, -{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4', - amprocrighttype => 'float8', amprocnum => '3', - amproc => 'brin_minmax_consistent' }, -{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4', - amprocrighttype => 'float8', amprocnum => '4', - amproc => 'brin_minmax_union' }, + { amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8', amprocrighttype => 'float8', amprocnum => '1', amproc => 'brin_minmax_opcinfo' }, @@ -971,18 +1173,80 @@ { amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8', amprocrighttype => 'float8', amprocnum => '4', amproc => 'brin_minmax_union' }, -{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8', + +# minmax multi float +{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float4', amprocrighttype => 'float4', amprocnum => '1', - amproc => 'brin_minmax_opcinfo' }, -{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float4', amprocrighttype => 'float4', amprocnum => '2', - amproc => 'brin_minmax_add_value' }, -{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float4', amprocrighttype => 'float4', amprocnum => '3', - amproc => 'brin_minmax_consistent' }, -{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float4', amprocrighttype => 'float4', amprocnum => '4', - amproc => 'brin_minmax_union' }, + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float4', + amprocrighttype => 'float4', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float4', + amprocrighttype => 'float4', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_float4' }, + +{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float8', + amprocrighttype => 'float8', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float8', + amprocrighttype => 'float8', amprocnum => '2', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float8', + amprocrighttype => 'float8', amprocnum => '3', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float8', + amprocrighttype => 'float8', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float8', + amprocrighttype => 'float8', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/float_minmax_multi_ops', amproclefttype => 'float8', + amprocrighttype => 'float8', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_float8' }, + +# bloom float +{ amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float4', + amprocrighttype => 'float4', amprocnum => '1', + amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float4', + amprocrighttype => 'float4', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float4', + amprocrighttype => 'float4', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float4', + amprocrighttype => 'float4', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float4', + amprocrighttype => 'float4', amprocnum => '5', + amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float4', + amprocrighttype => 'float4', amprocnum => '11', amproc => 'hashfloat4' }, + +{ amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float8', + amprocrighttype => 'float8', amprocnum => '1', + amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float8', + amprocrighttype => 'float8', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float8', + amprocrighttype => 'float8', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float8', + amprocrighttype => 'float8', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float8', + amprocrighttype => 'float8', amprocnum => '5', + amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float8', + amprocrighttype => 'float8', amprocnum => '11', amproc => 'hashfloat8' }, # minmax macaddr { amprocfamily => 'brin/macaddr_minmax_ops', amproclefttype => 'macaddr', @@ -998,6 +1262,45 @@ amprocrighttype => 'macaddr', amprocnum => '4', amproc => 'brin_minmax_union' }, +# minmax multi macaddr +{ amprocfamily => 'brin/macaddr_minmax_multi_ops', amproclefttype => 'macaddr', + amprocrighttype => 'macaddr', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/macaddr_minmax_multi_ops', amproclefttype => 'macaddr', + amprocrighttype => 'macaddr', amprocnum => '2', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/macaddr_minmax_multi_ops', amproclefttype => 'macaddr', + amprocrighttype => 'macaddr', amprocnum => '3', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/macaddr_minmax_multi_ops', amproclefttype => 'macaddr', + amprocrighttype => 'macaddr', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/macaddr_minmax_multi_ops', amproclefttype => 'macaddr', + amprocrighttype => 'macaddr', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/macaddr_minmax_multi_ops', amproclefttype => 'macaddr', + amprocrighttype => 'macaddr', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_macaddr' }, + +# bloom macaddr +{ amprocfamily => 'brin/macaddr_bloom_ops', amproclefttype => 'macaddr', + amprocrighttype => 'macaddr', amprocnum => '1', + amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/macaddr_bloom_ops', amproclefttype => 'macaddr', + amprocrighttype => 'macaddr', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/macaddr_bloom_ops', amproclefttype => 'macaddr', + amprocrighttype => 'macaddr', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/macaddr_bloom_ops', amproclefttype => 'macaddr', + amprocrighttype => 'macaddr', amprocnum => '4', + amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/macaddr_bloom_ops', amproclefttype => 'macaddr', + amprocrighttype => 'macaddr', amprocnum => '5', + amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/macaddr_bloom_ops', amproclefttype => 'macaddr', + amprocrighttype => 'macaddr', amprocnum => '11', amproc => 'hashmacaddr' }, + # minmax macaddr8 { amprocfamily => 'brin/macaddr8_minmax_ops', amproclefttype => 'macaddr8', amprocrighttype => 'macaddr8', amprocnum => '1', @@ -1012,6 +1315,45 @@ amprocrighttype => 'macaddr8', amprocnum => '4', amproc => 'brin_minmax_union' }, +# minmax multi macaddr8 +{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', + amproclefttype => 'macaddr8', amprocrighttype => 'macaddr8', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', + amproclefttype => 'macaddr8', amprocrighttype => 'macaddr8', amprocnum => '2', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', + amproclefttype => 'macaddr8', amprocrighttype => 'macaddr8', amprocnum => '3', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', + amproclefttype => 'macaddr8', amprocrighttype => 'macaddr8', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', + amproclefttype => 'macaddr8', amprocrighttype => 'macaddr8', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', + amproclefttype => 'macaddr8', amprocrighttype => 'macaddr8', + amprocnum => '11', amproc => 'brin_minmax_multi_distance_macaddr8' }, + +# bloom macaddr8 +{ amprocfamily => 'brin/macaddr8_bloom_ops', amproclefttype => 'macaddr8', + amprocrighttype => 'macaddr8', amprocnum => '1', + amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/macaddr8_bloom_ops', amproclefttype => 'macaddr8', + amprocrighttype => 'macaddr8', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/macaddr8_bloom_ops', amproclefttype => 'macaddr8', + amprocrighttype => 'macaddr8', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/macaddr8_bloom_ops', amproclefttype => 'macaddr8', + amprocrighttype => 'macaddr8', amprocnum => '4', + amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/macaddr8_bloom_ops', amproclefttype => 'macaddr8', + amprocrighttype => 'macaddr8', amprocnum => '5', + amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/macaddr8_bloom_ops', amproclefttype => 'macaddr8', + amprocrighttype => 'macaddr8', amprocnum => '11', amproc => 'hashmacaddr8' }, + # minmax inet { amprocfamily => 'brin/network_minmax_ops', amproclefttype => 'inet', amprocrighttype => 'inet', amprocnum => '1', @@ -1025,6 +1367,42 @@ { amprocfamily => 'brin/network_minmax_ops', amproclefttype => 'inet', amprocrighttype => 'inet', amprocnum => '4', amproc => 'brin_minmax_union' }, +# minmax multi inet +{ amprocfamily => 'brin/network_minmax_multi_ops', amproclefttype => 'inet', + amprocrighttype => 'inet', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/network_minmax_multi_ops', amproclefttype => 'inet', + amprocrighttype => 'inet', amprocnum => '2', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/network_minmax_multi_ops', amproclefttype => 'inet', + amprocrighttype => 'inet', amprocnum => '3', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/network_minmax_multi_ops', amproclefttype => 'inet', + amprocrighttype => 'inet', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/network_minmax_multi_ops', amproclefttype => 'inet', + amprocrighttype => 'inet', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/network_minmax_multi_ops', amproclefttype => 'inet', + amprocrighttype => 'inet', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_inet' }, + +# bloom inet +{ amprocfamily => 'brin/network_bloom_ops', amproclefttype => 'inet', + amprocrighttype => 'inet', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/network_bloom_ops', amproclefttype => 'inet', + amprocrighttype => 'inet', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/network_bloom_ops', amproclefttype => 'inet', + amprocrighttype => 'inet', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/network_bloom_ops', amproclefttype => 'inet', + amprocrighttype => 'inet', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/network_bloom_ops', amproclefttype => 'inet', + amprocrighttype => 'inet', amprocnum => '5', amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/network_bloom_ops', amproclefttype => 'inet', + amprocrighttype => 'inet', amprocnum => '11', amproc => 'hashinet' }, + # inclusion inet { amprocfamily => 'brin/network_inclusion_ops', amproclefttype => 'inet', amprocrighttype => 'inet', amprocnum => '1', @@ -1059,6 +1437,24 @@ amprocrighttype => 'bpchar', amprocnum => '4', amproc => 'brin_minmax_union' }, +# bloom character +{ amprocfamily => 'brin/bpchar_bloom_ops', amproclefttype => 'bpchar', + amprocrighttype => 'bpchar', amprocnum => '1', + amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/bpchar_bloom_ops', amproclefttype => 'bpchar', + amprocrighttype => 'bpchar', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/bpchar_bloom_ops', amproclefttype => 'bpchar', + amprocrighttype => 'bpchar', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/bpchar_bloom_ops', amproclefttype => 'bpchar', + amprocrighttype => 'bpchar', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/bpchar_bloom_ops', amproclefttype => 'bpchar', + amprocrighttype => 'bpchar', amprocnum => '5', + amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/bpchar_bloom_ops', amproclefttype => 'bpchar', + amprocrighttype => 'bpchar', amprocnum => '11', amproc => 'hashbpchar' }, + # minmax time without time zone { amprocfamily => 'brin/time_minmax_ops', amproclefttype => 'time', amprocrighttype => 'time', amprocnum => '1', @@ -1072,6 +1468,42 @@ { amprocfamily => 'brin/time_minmax_ops', amproclefttype => 'time', amprocrighttype => 'time', amprocnum => '4', amproc => 'brin_minmax_union' }, +# minmax multi time without time zone +{ amprocfamily => 'brin/time_minmax_multi_ops', amproclefttype => 'time', + amprocrighttype => 'time', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/time_minmax_multi_ops', amproclefttype => 'time', + amprocrighttype => 'time', amprocnum => '2', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/time_minmax_multi_ops', amproclefttype => 'time', + amprocrighttype => 'time', amprocnum => '3', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/time_minmax_multi_ops', amproclefttype => 'time', + amprocrighttype => 'time', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/time_minmax_multi_ops', amproclefttype => 'time', + amprocrighttype => 'time', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/time_minmax_multi_ops', amproclefttype => 'time', + amprocrighttype => 'time', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_time' }, + +# bloom time without time zone +{ amprocfamily => 'brin/time_bloom_ops', amproclefttype => 'time', + amprocrighttype => 'time', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/time_bloom_ops', amproclefttype => 'time', + amprocrighttype => 'time', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/time_bloom_ops', amproclefttype => 'time', + amprocrighttype => 'time', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/time_bloom_ops', amproclefttype => 'time', + amprocrighttype => 'time', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/time_bloom_ops', amproclefttype => 'time', + amprocrighttype => 'time', amprocnum => '5', amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/time_bloom_ops', amproclefttype => 'time', + amprocrighttype => 'time', amprocnum => '11', amproc => 'time_hash' }, + # minmax datetime (date, timestamp, timestamptz) { amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp', amprocrighttype => 'timestamp', amprocnum => '1', @@ -1085,29 +1517,7 @@ { amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp', amprocrighttype => 'timestamp', amprocnum => '4', amproc => 'brin_minmax_union' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp', - amprocrighttype => 'timestamptz', amprocnum => '1', - amproc => 'brin_minmax_opcinfo' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp', - amprocrighttype => 'timestamptz', amprocnum => '2', - amproc => 'brin_minmax_add_value' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp', - amprocrighttype => 'timestamptz', amprocnum => '3', - amproc => 'brin_minmax_consistent' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp', - amprocrighttype => 'timestamptz', amprocnum => '4', - amproc => 'brin_minmax_union' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp', - amprocrighttype => 'date', amprocnum => '1', - amproc => 'brin_minmax_opcinfo' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp', - amprocrighttype => 'date', amprocnum => '2', - amproc => 'brin_minmax_add_value' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp', - amprocrighttype => 'date', amprocnum => '3', - amproc => 'brin_minmax_consistent' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp', - amprocrighttype => 'date', amprocnum => '4', amproc => 'brin_minmax_union' }, + { amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', amprocnum => '1', amproc => 'brin_minmax_opcinfo' }, @@ -1120,29 +1530,7 @@ { amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', amprocnum => '4', amproc => 'brin_minmax_union' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz', - amprocrighttype => 'timestamp', amprocnum => '1', - amproc => 'brin_minmax_opcinfo' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz', - amprocrighttype => 'timestamp', amprocnum => '2', - amproc => 'brin_minmax_add_value' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz', - amprocrighttype => 'timestamp', amprocnum => '3', - amproc => 'brin_minmax_consistent' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz', - amprocrighttype => 'timestamp', amprocnum => '4', - amproc => 'brin_minmax_union' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz', - amprocrighttype => 'date', amprocnum => '1', - amproc => 'brin_minmax_opcinfo' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz', - amprocrighttype => 'date', amprocnum => '2', - amproc => 'brin_minmax_add_value' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz', - amprocrighttype => 'date', amprocnum => '3', - amproc => 'brin_minmax_consistent' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz', - amprocrighttype => 'date', amprocnum => '4', amproc => 'brin_minmax_union' }, + { amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date', amprocrighttype => 'date', amprocnum => '1', amproc => 'brin_minmax_opcinfo' }, @@ -1154,30 +1542,118 @@ amproc => 'brin_minmax_consistent' }, { amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date', amprocrighttype => 'date', amprocnum => '4', amproc => 'brin_minmax_union' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date', + +# minmax multi datetime (date, timestamp, timestamptz) +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamp', amprocrighttype => 'timestamp', + amprocnum => '1', amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamp', amprocrighttype => 'timestamp', + amprocnum => '2', amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamp', amprocrighttype => 'timestamp', + amprocnum => '3', amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamp', amprocrighttype => 'timestamp', + amprocnum => '4', amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamp', amprocrighttype => 'timestamp', + amprocnum => '5', amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamp', amprocrighttype => 'timestamp', + amprocnum => '11', amproc => 'brin_minmax_multi_distance_timestamp' }, + +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', + amprocnum => '1', amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', + amprocnum => '2', amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', + amprocnum => '3', amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', + amprocnum => '4', amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', + amprocnum => '5', amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', + amprocnum => '11', amproc => 'brin_minmax_multi_distance_timestamp' }, + +{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'date', + amprocrighttype => 'date', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'date', + amprocrighttype => 'date', amprocnum => '2', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'date', + amprocrighttype => 'date', amprocnum => '3', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'date', + amprocrighttype => 'date', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'date', + amprocrighttype => 'date', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'date', + amprocrighttype => 'date', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_date' }, + +# bloom datetime (date, timestamp, timestamptz) +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'timestamp', amprocrighttype => 'timestamp', amprocnum => '1', - amproc => 'brin_minmax_opcinfo' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date', + amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'timestamp', amprocrighttype => 'timestamp', amprocnum => '2', - amproc => 'brin_minmax_add_value' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'timestamp', amprocrighttype => 'timestamp', amprocnum => '3', - amproc => 'brin_minmax_consistent' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'timestamp', amprocrighttype => 'timestamp', amprocnum => '4', - amproc => 'brin_minmax_union' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date', + amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'timestamp', + amprocrighttype => 'timestamp', amprocnum => '5', + amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'timestamp', + amprocrighttype => 'timestamp', amprocnum => '11', + amproc => 'timestamp_hash' }, + +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', amprocnum => '1', - amproc => 'brin_minmax_opcinfo' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date', + amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', amprocnum => '2', - amproc => 'brin_minmax_add_value' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', amprocnum => '3', - amproc => 'brin_minmax_consistent' }, -{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', amprocnum => '4', - amproc => 'brin_minmax_union' }, + amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'timestamptz', + amprocrighttype => 'timestamptz', amprocnum => '5', + amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'timestamptz', + amprocrighttype => 'timestamptz', amprocnum => '11', + amproc => 'timestamp_hash' }, + +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'date', + amprocrighttype => 'date', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'date', + amprocrighttype => 'date', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'date', + amprocrighttype => 'date', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'date', + amprocrighttype => 'date', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'date', + amprocrighttype => 'date', amprocnum => '5', amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'date', + amprocrighttype => 'date', amprocnum => '11', amproc => 'hashint4' }, # minmax interval { amprocfamily => 'brin/interval_minmax_ops', amproclefttype => 'interval', @@ -1193,6 +1669,45 @@ amprocrighttype => 'interval', amprocnum => '4', amproc => 'brin_minmax_union' }, +# minmax multi interval +{ amprocfamily => 'brin/interval_minmax_multi_ops', + amproclefttype => 'interval', amprocrighttype => 'interval', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/interval_minmax_multi_ops', + amproclefttype => 'interval', amprocrighttype => 'interval', amprocnum => '2', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/interval_minmax_multi_ops', + amproclefttype => 'interval', amprocrighttype => 'interval', amprocnum => '3', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/interval_minmax_multi_ops', + amproclefttype => 'interval', amprocrighttype => 'interval', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/interval_minmax_multi_ops', + amproclefttype => 'interval', amprocrighttype => 'interval', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/interval_minmax_multi_ops', + amproclefttype => 'interval', amprocrighttype => 'interval', + amprocnum => '11', amproc => 'brin_minmax_multi_distance_interval' }, + +# bloom interval +{ amprocfamily => 'brin/interval_bloom_ops', amproclefttype => 'interval', + amprocrighttype => 'interval', amprocnum => '1', + amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/interval_bloom_ops', amproclefttype => 'interval', + amprocrighttype => 'interval', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/interval_bloom_ops', amproclefttype => 'interval', + amprocrighttype => 'interval', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/interval_bloom_ops', amproclefttype => 'interval', + amprocrighttype => 'interval', amprocnum => '4', + amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/interval_bloom_ops', amproclefttype => 'interval', + amprocrighttype => 'interval', amprocnum => '5', + amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/interval_bloom_ops', amproclefttype => 'interval', + amprocrighttype => 'interval', amprocnum => '11', amproc => 'interval_hash' }, + # minmax time with time zone { amprocfamily => 'brin/timetz_minmax_ops', amproclefttype => 'timetz', amprocrighttype => 'timetz', amprocnum => '1', @@ -1207,6 +1722,44 @@ amprocrighttype => 'timetz', amprocnum => '4', amproc => 'brin_minmax_union' }, +# minmax multi time with time zone +{ amprocfamily => 'brin/timetz_minmax_multi_ops', amproclefttype => 'timetz', + amprocrighttype => 'timetz', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/timetz_minmax_multi_ops', amproclefttype => 'timetz', + amprocrighttype => 'timetz', amprocnum => '2', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/timetz_minmax_multi_ops', amproclefttype => 'timetz', + amprocrighttype => 'timetz', amprocnum => '3', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/timetz_minmax_multi_ops', amproclefttype => 'timetz', + amprocrighttype => 'timetz', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/timetz_minmax_multi_ops', amproclefttype => 'timetz', + amprocrighttype => 'timetz', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/timetz_minmax_multi_ops', amproclefttype => 'timetz', + amprocrighttype => 'timetz', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_timetz' }, + +# bloom time with time zone +{ amprocfamily => 'brin/timetz_bloom_ops', amproclefttype => 'timetz', + amprocrighttype => 'timetz', amprocnum => '1', + amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/timetz_bloom_ops', amproclefttype => 'timetz', + amprocrighttype => 'timetz', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/timetz_bloom_ops', amproclefttype => 'timetz', + amprocrighttype => 'timetz', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/timetz_bloom_ops', amproclefttype => 'timetz', + amprocrighttype => 'timetz', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/timetz_bloom_ops', amproclefttype => 'timetz', + amprocrighttype => 'timetz', amprocnum => '5', + amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/timetz_bloom_ops', amproclefttype => 'timetz', + amprocrighttype => 'timetz', amprocnum => '11', amproc => 'timetz_hash' }, + # minmax bit { amprocfamily => 'brin/bit_minmax_ops', amproclefttype => 'bit', amprocrighttype => 'bit', amprocnum => '1', amproc => 'brin_minmax_opcinfo' }, @@ -1247,6 +1800,45 @@ amprocrighttype => 'numeric', amprocnum => '4', amproc => 'brin_minmax_union' }, +# minmax multi numeric +{ amprocfamily => 'brin/numeric_minmax_multi_ops', amproclefttype => 'numeric', + amprocrighttype => 'numeric', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/numeric_minmax_multi_ops', amproclefttype => 'numeric', + amprocrighttype => 'numeric', amprocnum => '2', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/numeric_minmax_multi_ops', amproclefttype => 'numeric', + amprocrighttype => 'numeric', amprocnum => '3', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/numeric_minmax_multi_ops', amproclefttype => 'numeric', + amprocrighttype => 'numeric', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/numeric_minmax_multi_ops', amproclefttype => 'numeric', + amprocrighttype => 'numeric', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/numeric_minmax_multi_ops', amproclefttype => 'numeric', + amprocrighttype => 'numeric', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_numeric' }, + +# bloom numeric +{ amprocfamily => 'brin/numeric_bloom_ops', amproclefttype => 'numeric', + amprocrighttype => 'numeric', amprocnum => '1', + amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/numeric_bloom_ops', amproclefttype => 'numeric', + amprocrighttype => 'numeric', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/numeric_bloom_ops', amproclefttype => 'numeric', + amprocrighttype => 'numeric', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/numeric_bloom_ops', amproclefttype => 'numeric', + amprocrighttype => 'numeric', amprocnum => '4', + amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/numeric_bloom_ops', amproclefttype => 'numeric', + amprocrighttype => 'numeric', amprocnum => '5', + amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/numeric_bloom_ops', amproclefttype => 'numeric', + amprocrighttype => 'numeric', amprocnum => '11', amproc => 'hash_numeric' }, + # minmax uuid { amprocfamily => 'brin/uuid_minmax_ops', amproclefttype => 'uuid', amprocrighttype => 'uuid', amprocnum => '1', @@ -1260,6 +1852,42 @@ { amprocfamily => 'brin/uuid_minmax_ops', amproclefttype => 'uuid', amprocrighttype => 'uuid', amprocnum => '4', amproc => 'brin_minmax_union' }, +# minmax multi uuid +{ amprocfamily => 'brin/uuid_minmax_multi_ops', amproclefttype => 'uuid', + amprocrighttype => 'uuid', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/uuid_minmax_multi_ops', amproclefttype => 'uuid', + amprocrighttype => 'uuid', amprocnum => '2', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/uuid_minmax_multi_ops', amproclefttype => 'uuid', + amprocrighttype => 'uuid', amprocnum => '3', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/uuid_minmax_multi_ops', amproclefttype => 'uuid', + amprocrighttype => 'uuid', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/uuid_minmax_multi_ops', amproclefttype => 'uuid', + amprocrighttype => 'uuid', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/uuid_minmax_multi_ops', amproclefttype => 'uuid', + amprocrighttype => 'uuid', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_uuid' }, + +# bloom uuid +{ amprocfamily => 'brin/uuid_bloom_ops', amproclefttype => 'uuid', + amprocrighttype => 'uuid', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/uuid_bloom_ops', amproclefttype => 'uuid', + amprocrighttype => 'uuid', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/uuid_bloom_ops', amproclefttype => 'uuid', + amprocrighttype => 'uuid', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/uuid_bloom_ops', amproclefttype => 'uuid', + amprocrighttype => 'uuid', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/uuid_bloom_ops', amproclefttype => 'uuid', + amprocrighttype => 'uuid', amprocnum => '5', amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/uuid_bloom_ops', amproclefttype => 'uuid', + amprocrighttype => 'uuid', amprocnum => '11', amproc => 'uuid_hash' }, + # inclusion range types { amprocfamily => 'brin/range_inclusion_ops', amproclefttype => 'anyrange', amprocrighttype => 'anyrange', amprocnum => '1', @@ -1274,12 +1902,14 @@ amprocrighttype => 'anyrange', amprocnum => '4', amproc => 'brin_inclusion_union' }, { amprocfamily => 'brin/range_inclusion_ops', amproclefttype => 'anyrange', - amprocrighttype => 'anyrange', amprocnum => '11', amproc => 'range_merge' }, + amprocrighttype => 'anyrange', amprocnum => '11', + amproc => 'range_merge(anyrange,anyrange)' }, { amprocfamily => 'brin/range_inclusion_ops', amproclefttype => 'anyrange', amprocrighttype => 'anyrange', amprocnum => '13', amproc => 'range_contains' }, { amprocfamily => 'brin/range_inclusion_ops', amproclefttype => 'anyrange', - amprocrighttype => 'anyrange', amprocnum => '14', amproc => 'isempty' }, + amprocrighttype => 'anyrange', amprocnum => '14', + amproc => 'isempty(anyrange)' }, # minmax pg_lsn { amprocfamily => 'brin/pg_lsn_minmax_ops', amproclefttype => 'pg_lsn', @@ -1295,6 +1925,44 @@ amprocrighttype => 'pg_lsn', amprocnum => '4', amproc => 'brin_minmax_union' }, +# minmax multi pg_lsn +{ amprocfamily => 'brin/pg_lsn_minmax_multi_ops', amproclefttype => 'pg_lsn', + amprocrighttype => 'pg_lsn', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/pg_lsn_minmax_multi_ops', amproclefttype => 'pg_lsn', + amprocrighttype => 'pg_lsn', amprocnum => '2', + amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/pg_lsn_minmax_multi_ops', amproclefttype => 'pg_lsn', + amprocrighttype => 'pg_lsn', amprocnum => '3', + amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/pg_lsn_minmax_multi_ops', amproclefttype => 'pg_lsn', + amprocrighttype => 'pg_lsn', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/pg_lsn_minmax_multi_ops', amproclefttype => 'pg_lsn', + amprocrighttype => 'pg_lsn', amprocnum => '5', + amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/pg_lsn_minmax_multi_ops', amproclefttype => 'pg_lsn', + amprocrighttype => 'pg_lsn', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_pg_lsn' }, + +# bloom pg_lsn +{ amprocfamily => 'brin/pg_lsn_bloom_ops', amproclefttype => 'pg_lsn', + amprocrighttype => 'pg_lsn', amprocnum => '1', + amproc => 'brin_bloom_opcinfo' }, +{ amprocfamily => 'brin/pg_lsn_bloom_ops', amproclefttype => 'pg_lsn', + amprocrighttype => 'pg_lsn', amprocnum => '2', + amproc => 'brin_bloom_add_value' }, +{ amprocfamily => 'brin/pg_lsn_bloom_ops', amproclefttype => 'pg_lsn', + amprocrighttype => 'pg_lsn', amprocnum => '3', + amproc => 'brin_bloom_consistent' }, +{ amprocfamily => 'brin/pg_lsn_bloom_ops', amproclefttype => 'pg_lsn', + amprocrighttype => 'pg_lsn', amprocnum => '4', amproc => 'brin_bloom_union' }, +{ amprocfamily => 'brin/pg_lsn_bloom_ops', amproclefttype => 'pg_lsn', + amprocrighttype => 'pg_lsn', amprocnum => '5', + amproc => 'brin_bloom_options' }, +{ amprocfamily => 'brin/pg_lsn_bloom_ops', amproclefttype => 'pg_lsn', + amprocrighttype => 'pg_lsn', amprocnum => '11', amproc => 'pg_lsn_hash' }, + # inclusion box { amprocfamily => 'brin/box_inclusion_ops', amproclefttype => 'box', amprocrighttype => 'box', amprocnum => '1', diff --git a/contrib/libs/postgresql/src/include/catalog/pg_amproc.h b/contrib/libs/postgresql/src/include/catalog/pg_amproc.h index e39bd70c29..8a727c359a 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_amproc.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_amproc.h @@ -18,7 +18,7 @@ * some don't pay attention to non-default functions at all. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -67,4 +67,9 @@ CATALOG(pg_amproc,2603,AccessMethodProcedureRelationId) */ 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_attrdef.h b/contrib/libs/postgresql/src/include/catalog/pg_attrdef.h index 7b661df311..d689ca20c8 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_attrdef.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_attrdef.h @@ -4,7 +4,7 @@ * definition of the "attribute defaults" system catalog (pg_attrdef) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -30,7 +30,8 @@ CATALOG(pg_attrdef,2604,AttrDefaultRelationId) { Oid oid; /* oid */ - Oid adrelid; /* OID of table containing attribute */ + Oid adrelid BKI_LOOKUP(pg_class); /* OID of table containing + * attribute */ int16 adnum; /* attnum of attribute */ #ifdef CATALOG_VARLEN /* variable-length fields start here */ @@ -46,4 +47,13 @@ CATALOG(pg_attrdef,2604,AttrDefaultRelationId) */ 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_attribute.h b/contrib/libs/postgresql/src/include/catalog/pg_attribute.h index a4cc80adad..603392fe81 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_attribute.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_attribute.h @@ -8,7 +8,7 @@ * relations need be included. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -36,7 +36,8 @@ */ CATALOG(pg_attribute,1249,AttributeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(75,AttributeRelation_Rowtype_Id) BKI_SCHEMA_MACRO { - Oid attrelid; /* OID of relation containing this attribute */ + Oid attrelid BKI_LOOKUP(pg_class); /* OID of relation containing + * this attribute */ NameData attname; /* name of attribute */ /* @@ -44,9 +45,12 @@ CATALOG(pg_attribute,1249,AttributeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(75, * 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. + * 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; + Oid atttypid BKI_LOOKUP_OPT(pg_type); /* * attstattarget is the target number of statistics datapoints to collect @@ -107,6 +111,12 @@ CATALOG(pg_attribute,1249,AttributeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(75, */ 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. @@ -116,10 +126,14 @@ CATALOG(pg_attribute,1249,AttributeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(75, char attstorage; /* - * attalign is a copy of the typalign field from pg_type for this - * attribute. See atttypid comments above. + * 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 attalign; + char attcompression BKI_DEFAULT('\0'); /* This flag represents the "NOT NULL" constraint */ bool attnotnull; @@ -153,8 +167,8 @@ CATALOG(pg_attribute,1249,AttributeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(75, /* Number of times inherited from direct parent relation(s) */ int32 attinhcount BKI_DEFAULT(0); - /* attribute's collation */ - Oid attcollation; + /* 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. */ @@ -180,7 +194,7 @@ CATALOG(pg_attribute,1249,AttributeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(75, * 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 fields beyond attcollation except in a real tuple! + * can access the variable-length fields except in a real tuple! */ #define ATTRIBUTE_FIXED_PART_SIZE \ (offsetof(FormData_pg_attribute,attcollation) + sizeof(Oid)) @@ -192,6 +206,11 @@ CATALOG(pg_attribute,1249,AttributeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(75, */ 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' diff --git a/contrib/libs/postgresql/src/include/catalog/pg_auth_members.h b/contrib/libs/postgresql/src/include/catalog/pg_auth_members.h index 8563feb6c5..76ab90c939 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_auth_members.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_auth_members.h @@ -5,7 +5,7 @@ * (pg_auth_members). * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -29,9 +29,9 @@ */ CATALOG(pg_auth_members,1261,AuthMemRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2843,AuthMemRelation_Rowtype_Id) BKI_SCHEMA_MACRO { - Oid roleid; /* ID of a role */ - Oid member; /* ID of a member of that role */ - Oid grantor; /* who granted the membership */ + 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; @@ -42,4 +42,9 @@ CATALOG(pg_auth_members,1261,AuthMemRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_ */ 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_authid.dat b/contrib/libs/postgresql/src/include/catalog/pg_authid.dat index 7c08851550..3da68016b6 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_authid.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_authid.dat @@ -3,7 +3,7 @@ # pg_authid.dat # Initial contents of the pg_authid system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 @@ -15,47 +15,66 @@ # 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 => '3373', oid_symbol => 'DEFAULT_ROLE_MONITOR', +{ 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 => 'DEFAULT_ROLE_READ_ALL_SETTINGS', +{ 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 => 'DEFAULT_ROLE_READ_ALL_STATS', +{ 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 => 'DEFAULT_ROLE_STAT_SCAN_TABLES', +{ 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 => 'DEFAULT_ROLE_READ_SERVER_FILES', +{ 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 => 'DEFAULT_ROLE_WRITE_SERVER_FILES', +{ 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 => 'DEFAULT_ROLE_EXECUTE_SERVER_PROGRAM', +{ 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 => 'DEFAULT_ROLE_SIGNAL_BACKENDID', +{ 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', diff --git a/contrib/libs/postgresql/src/include/catalog/pg_authid.h b/contrib/libs/postgresql/src/include/catalog/pg_authid.h index 88a5373080..609bd7fcbc 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_authid.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_authid.h @@ -6,7 +6,7 @@ * pg_shadow and pg_group are now publicly accessible views on pg_authid. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -38,7 +38,7 @@ CATALOG(pg_authid,1260,AuthIdRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(284 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? */ + 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! */ @@ -55,4 +55,13 @@ CATALOG(pg_authid,1260,AuthIdRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(284 */ 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_cast.dat b/contrib/libs/postgresql/src/include/catalog/pg_cast.dat index 5a58f50fbb..67f73cb6fb 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_cast.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_cast.dat @@ -3,7 +3,7 @@ # pg_cast.dat # Initial contents of the pg_cast system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # # src/include/catalog/pg_cast.dat @@ -530,4 +530,22 @@ { castsource => 'jsonb', casttarget => 'float8', castfunc => 'float8(jsonb)', castcontext => 'e', castmethod => 'f' }, +# range to multirange +{ castsource => 'int4range', casttarget => 'int4multirange', + castfunc => 'int4multirange(int4range)', castcontext => 'e', + castmethod => 'f' }, +{ castsource => 'int8range', casttarget => 'int8multirange', + castfunc => 'int8multirange(int8range)', castcontext => 'e', + castmethod => 'f' }, +{ castsource => 'numrange', casttarget => 'nummultirange', + castfunc => 'nummultirange(numrange)', castcontext => 'e', + castmethod => 'f' }, +{ castsource => 'daterange', casttarget => 'datemultirange', + castfunc => 'datemultirange(daterange)', castcontext => 'e', + castmethod => 'f' }, +{ castsource => 'tsrange', casttarget => 'tsmultirange', + castfunc => 'tsmultirange(tsrange)', castcontext => 'e', castmethod => 'f' }, +{ castsource => 'tstzrange', casttarget => 'tstzmultirange', + castfunc => 'tstzmultirange(tstzrange)', castcontext => 'e', + castmethod => 'f' }, ] diff --git a/contrib/libs/postgresql/src/include/catalog/pg_cast.h b/contrib/libs/postgresql/src/include/catalog/pg_cast.h index 2620ff40f0..f64a9df54c 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_cast.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_cast.h @@ -6,7 +6,7 @@ * As of Postgres 8.0, pg_cast describes not only type coercion functions * but also length coercion functions. * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -40,7 +40,7 @@ CATALOG(pg_cast,2605,CastRelationId) Oid casttarget BKI_LOOKUP(pg_type); /* cast function; 0 = binary coercible */ - Oid castfunc BKI_LOOKUP(pg_proc); + Oid castfunc BKI_LOOKUP_OPT(pg_proc); /* contexts in which cast can be used */ char castcontext; @@ -56,6 +56,11 @@ CATALOG(pg_cast,2605,CastRelationId) */ 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 /* diff --git a/contrib/libs/postgresql/src/include/catalog/pg_class.dat b/contrib/libs/postgresql/src/include/catalog/pg_class.dat index b28bba7cc3..601abb98e4 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_class.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_class.dat @@ -3,7 +3,7 @@ # pg_class.dat # Initial contents of the pg_class system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 diff --git a/contrib/libs/postgresql/src/include/catalog/pg_class.h b/contrib/libs/postgresql/src/include/catalog/pg_class.h index e675520f08..97e329e42a 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_class.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_class.h @@ -4,7 +4,7 @@ * definition of the "relation" system catalog (pg_class) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -38,38 +38,38 @@ CATALOG(pg_class,1259,RelationRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83,Relat NameData relname; /* OID of namespace containing this class */ - Oid relnamespace BKI_DEFAULT(PGNSP); + Oid relnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace); - /* OID of entry in pg_type for table's implicit row type */ - Oid reltype BKI_LOOKUP(pg_type); + /* 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 */ - Oid reloftype BKI_DEFAULT(0) BKI_LOOKUP(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(PGUID); + Oid relowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid); /* access method; 0 if not a table / index */ - Oid relam BKI_DEFAULT(heap) BKI_LOOKUP(pg_am); + 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(pg_tablespace); + 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) */ - float4 reltuples 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); + Oid reltoastrelid BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_class); /* T if has (or has had) any indexes */ bool relhasindex BKI_DEFAULT(f); @@ -119,8 +119,8 @@ CATALOG(pg_class,1259,RelationRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83,Relat /* is relation a partition? */ bool relispartition BKI_DEFAULT(f); - /* heap for rewrite during DDL, link to original rel */ - Oid relrewrite BKI_DEFAULT(0); + /* 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 */ @@ -152,6 +152,13 @@ CATALOG(pg_class,1259,RelationRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83,Relat */ 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 */ diff --git a/contrib/libs/postgresql/src/include/catalog/pg_collation.dat b/contrib/libs/postgresql/src/include/catalog/pg_collation.dat index ba1b3e201b..6e0ab1ab4b 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_collation.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_collation.dat @@ -3,7 +3,7 @@ # pg_collation.dat # Initial contents of the pg_collation system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 @@ -14,18 +14,15 @@ { oid => '100', oid_symbol => 'DEFAULT_COLLATION_OID', descr => 'database\'s default collation', - collname => 'default', collnamespace => 'PGNSP', collowner => 'PGUID', - collprovider => 'd', collencoding => '-1', collcollate => '', collctype => '', - collversion => '_null_' }, + collname => 'default', collprovider => 'd', collencoding => '-1', + collcollate => '', collctype => '' }, { oid => '950', oid_symbol => 'C_COLLATION_OID', descr => 'standard C collation', - collname => 'C', collnamespace => 'PGNSP', collowner => 'PGUID', - collprovider => 'c', collencoding => '-1', collcollate => 'C', - collctype => 'C', collversion => '_null_' }, + collname => 'C', collprovider => 'c', collencoding => '-1', + collcollate => 'C', collctype => 'C' }, { oid => '951', oid_symbol => 'POSIX_COLLATION_OID', descr => 'standard POSIX collation', - collname => 'POSIX', collnamespace => 'PGNSP', collowner => 'PGUID', - collprovider => 'c', collencoding => '-1', collcollate => 'POSIX', - collctype => 'POSIX', collversion => '_null_' }, + 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 index 6955bb1273..6adbeab690 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_collation.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_collation.h @@ -4,7 +4,7 @@ * definition of the "collation" system catalog (pg_collation) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -30,16 +30,21 @@ CATALOG(pg_collation,3456,CollationRelationId) { Oid oid; /* oid */ NameData collname; /* collation name */ - Oid collnamespace; /* OID of namespace containing collation */ - Oid collowner; /* owner of collation */ + + /* 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; /* provider-dependent version of collation - * data */ + text collversion BKI_DEFAULT(_null_); /* provider-dependent + * version of collation + * data */ #endif } FormData_pg_collation; @@ -50,6 +55,13 @@ CATALOG(pg_collation,3456,CollationRelationId) */ 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' @@ -68,6 +80,5 @@ extern Oid CollationCreate(const char *collname, Oid collnamespace, const char *collversion, bool if_not_exists, bool quiet); -extern void RemoveCollationById(Oid collationOid); #endif /* PG_COLLATION_H */ diff --git a/contrib/libs/postgresql/src/include/catalog/pg_constraint.h b/contrib/libs/postgresql/src/include/catalog/pg_constraint.h index 9600ece93c..63f0f8bf41 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_constraint.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_constraint.h @@ -4,7 +4,7 @@ * definition of the "constraint" system catalog (pg_constraint) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -46,7 +46,8 @@ CATALOG(pg_constraint,2606,ConstraintRelationId) * conrelid + contypid + conname. */ NameData conname; /* name of this constraint */ - Oid connamespace; /* OID of namespace containing 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? */ @@ -57,7 +58,8 @@ CATALOG(pg_constraint,2606,ConstraintRelationId) * specific relation (this excludes domain constraints and assertions). * Otherwise conrelid is 0 and conkey is NULL. */ - Oid conrelid; /* relation this constraint constrains */ + 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 @@ -66,7 +68,8 @@ CATALOG(pg_constraint,2606,ConstraintRelationId) * For SQL-style global ASSERTIONs, both conrelid and contypid would be * zero. This is not presently supported, however. */ - Oid contypid; /* domain this constraint constrains */ + Oid contypid BKI_LOOKUP_OPT(pg_type); /* domain this constraint + * constrains */ /* * conindid links to the index supporting the constraint, if any; @@ -76,19 +79,21 @@ CATALOG(pg_constraint,2606,ConstraintRelationId) * columns). Notice that the index is on conrelid in the first case but * confrelid in the second. */ - Oid conindid; /* index supporting this constraint */ + 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; + 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; /* relation referenced by foreign key */ + 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 */ @@ -119,25 +124,25 @@ CATALOG(pg_constraint,2606,ConstraintRelationId) * If a foreign key, the OIDs of the PK = FK equality operators for each * column of the constraint */ - Oid conpfeqop[1]; + 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]; + 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]; + 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]; + Oid conexclop[1] BKI_LOOKUP(pg_operator); /* * If a check constraint, nodeToString representation of expression @@ -153,6 +158,23 @@ CATALOG(pg_constraint,2606,ConstraintRelationId) */ 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 */ diff --git a/contrib/libs/postgresql/src/include/catalog/pg_control.h b/contrib/libs/postgresql/src/include/catalog/pg_control.h index 9201330160..749bce0cc6 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_control.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_control.h @@ -5,7 +5,7 @@ * However, we define it here so that the format is documented. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -40,7 +40,7 @@ typedef struct CheckPoint TimeLineID PrevTimeLineID; /* previous TLI, if this record begins a new * timeline (equals ThisTimeLineID otherwise) */ bool fullPageWrites; /* current full_page_writes */ - FullTransactionId nextFullXid; /* next free full transaction ID */ + FullTransactionId nextXid; /* next free transaction ID */ Oid nextOid; /* next free OID */ MultiXactId nextMulti; /* next free MultiXactId */ MultiXactOffset nextMultiOffset; /* next free MultiXact offset */ diff --git a/contrib/libs/postgresql/src/include/catalog/pg_conversion.dat b/contrib/libs/postgresql/src/include/catalog/pg_conversion.dat index d7120f2fb0..d8ba3a6c52 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_conversion.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_conversion.dat @@ -3,7 +3,7 @@ # pg_conversion.dat # Initial contents of the pg_conversion system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 diff --git a/contrib/libs/postgresql/src/include/catalog/pg_conversion.h b/contrib/libs/postgresql/src/include/catalog/pg_conversion.h index 0e7f13e1b6..ca556f6030 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_conversion.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_conversion.h @@ -3,7 +3,7 @@ * pg_conversion.h * definition of the "conversion" system catalog (pg_conversion) * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -35,10 +35,10 @@ CATALOG(pg_conversion,2607,ConversionRelationId) NameData conname; /* namespace that the conversion belongs to */ - Oid connamespace BKI_DEFAULT(PGNSP); + Oid connamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace); /* owner of the conversion */ - Oid conowner BKI_DEFAULT(PGUID); + Oid conowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid); /* FOR encoding id */ int32 conforencoding BKI_LOOKUP(encoding); @@ -60,12 +60,18 @@ CATALOG(pg_conversion,2607,ConversionRelationId) */ 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 void RemoveConversionById(Oid conversionOid); extern Oid FindDefaultConversion(Oid connamespace, int32 for_encoding, int32 to_encoding); diff --git a/contrib/libs/postgresql/src/include/catalog/pg_database.dat b/contrib/libs/postgresql/src/include/catalog/pg_database.dat index 21cd6604f3..b8aa1364a0 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_database.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_database.dat @@ -3,7 +3,7 @@ # pg_database.dat # Initial contents of the pg_database system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 diff --git a/contrib/libs/postgresql/src/include/catalog/pg_database.h b/contrib/libs/postgresql/src/include/catalog/pg_database.h index f623ee81b7..d3de45821c 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_database.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_database.h @@ -4,7 +4,7 @@ * definition of the "database" system catalog (pg_database) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -35,7 +35,7 @@ CATALOG(pg_database,1262,DatabaseRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID NameData datname; /* owner of database */ - Oid datdba BKI_DEFAULT(PGUID); + Oid datdba BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid); /* character encoding */ int32 encoding; @@ -80,4 +80,13 @@ CATALOG(pg_database,1262,DatabaseRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID */ 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_db_role_setting.h b/contrib/libs/postgresql/src/include/catalog/pg_db_role_setting.h index 5713fa2315..705f698ae7 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_db_role_setting.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_db_role_setting.h @@ -5,7 +5,7 @@ * configuration settings (pg_db_role_setting) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -33,8 +33,11 @@ */ CATALOG(pg_db_role_setting,2964,DbRoleSettingRelationId) BKI_SHARED_RELATION { - Oid setdatabase; /* database */ - Oid setrole; /* role */ + /* 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 */ @@ -43,6 +46,13 @@ CATALOG(pg_db_role_setting,2964,DbRoleSettingRelationId) BKI_SHARED_RELATION 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 */ diff --git a/contrib/libs/postgresql/src/include/catalog/pg_default_acl.h b/contrib/libs/postgresql/src/include/catalog/pg_default_acl.h index 2bac5e23e1..156fc0712d 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_default_acl.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_default_acl.h @@ -5,7 +5,7 @@ * (pg_default_acl) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -30,8 +30,10 @@ CATALOG(pg_default_acl,826,DefaultAclRelationId) { Oid oid; /* oid */ - Oid defaclrole; /* OID of role owning this ACL */ - Oid defaclnamespace; /* OID of namespace, or 0 for all */ + 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 */ @@ -47,6 +49,13 @@ CATALOG(pg_default_acl,826,DefaultAclRelationId) */ 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 /* diff --git a/contrib/libs/postgresql/src/include/catalog/pg_depend.h b/contrib/libs/postgresql/src/include/catalog/pg_depend.h index ccf0a98330..e0bc114145 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_depend.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_depend.h @@ -16,7 +16,7 @@ * convenient to find from the contents of other catalogs. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -45,14 +45,16 @@ CATALOG(pg_depend,2608,DependRelationId) * * These fields are all zeroes for a DEPENDENCY_PIN entry. */ - Oid classid; /* OID of table 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. */ - Oid refclassid; /* OID of table containing 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 */ @@ -70,4 +72,9 @@ CATALOG(pg_depend,2608,DependRelationId) */ 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_description.h b/contrib/libs/postgresql/src/include/catalog/pg_description.h index c40e8b7373..adc06a854d 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_description.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_description.h @@ -23,7 +23,7 @@ * for example). * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -63,4 +63,12 @@ CATALOG(pg_description,2609,DescriptionRelationId) */ 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_enum.h b/contrib/libs/postgresql/src/include/catalog/pg_enum.h index b28d441ba7..78a183b27d 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_enum.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_enum.h @@ -4,7 +4,7 @@ * definition of the "enum" system catalog (pg_enum) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -31,7 +31,7 @@ CATALOG(pg_enum,3501,EnumRelationId) { Oid oid; /* oid */ - Oid enumtypid; /* OID of owning enum type */ + 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; @@ -43,6 +43,13 @@ CATALOG(pg_enum,3501,EnumRelationId) */ 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 */ @@ -53,10 +60,10 @@ extern void AddEnumLabel(Oid enumTypeOid, const char *newVal, bool skipIfExists); extern void RenameEnumLabel(Oid enumTypeOid, const char *oldVal, const char *newVal); -extern bool EnumBlacklisted(Oid enum_id); -extern Size EstimateEnumBlacklistSpace(void); -extern void SerializeEnumBlacklist(void *space, Size size); -extern void RestoreEnumBlacklist(void *space); +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_event_trigger.h b/contrib/libs/postgresql/src/include/catalog/pg_event_trigger.h index 24e4b1a181..eeaa6be518 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_event_trigger.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_event_trigger.h @@ -4,7 +4,7 @@ * definition of the "event trigger" system catalog (pg_event_trigger) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -31,8 +31,9 @@ CATALOG(pg_event_trigger,3466,EventTriggerRelationId) Oid oid; /* oid */ NameData evtname; /* trigger's name */ NameData evtevent; /* trigger's event */ - Oid evtowner; /* trigger's owner */ - Oid evtfoid; /* OID of function to be called */ + 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 */ @@ -48,4 +49,11 @@ CATALOG(pg_event_trigger,3466,EventTriggerRelationId) */ 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_extension.h b/contrib/libs/postgresql/src/include/catalog/pg_extension.h index b6f4128cf3..2d6ad9fa88 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_extension.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_extension.h @@ -4,7 +4,7 @@ * definition of the "extension" system catalog (pg_extension) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -30,14 +30,16 @@ CATALOG(pg_extension,3079,ExtensionRelationId) { Oid oid; /* oid */ NameData extname; /* extension name */ - Oid extowner; /* extension owner */ - Oid extnamespace; /* namespace of contained objects */ + 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]; /* dumpable configuration tables */ + Oid extconfig[1] BKI_LOOKUP(pg_class); /* dumpable configuration + * tables */ text extcondition[1]; /* WHERE clauses for config tables */ #endif } FormData_pg_extension; @@ -49,4 +51,11 @@ CATALOG(pg_extension,3079,ExtensionRelationId) */ 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_foreign_data_wrapper.h b/contrib/libs/postgresql/src/include/catalog/pg_foreign_data_wrapper.h index 44d8558c41..f6240d9eb3 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_foreign_data_wrapper.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_foreign_data_wrapper.h @@ -4,7 +4,7 @@ * definition of the "foreign-data wrapper" system catalog (pg_foreign_data_wrapper) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -30,9 +30,12 @@ CATALOG(pg_foreign_data_wrapper,2328,ForeignDataWrapperRelationId) { Oid oid; /* oid */ NameData fdwname; /* foreign-data wrapper name */ - Oid fdwowner; /* FDW owner */ - Oid fdwhandler; /* handler function, or 0 if none */ - Oid fdwvalidator; /* option validation function, or 0 if none */ + 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 */ @@ -47,4 +50,11 @@ CATALOG(pg_foreign_data_wrapper,2328,ForeignDataWrapperRelationId) */ 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_server.h b/contrib/libs/postgresql/src/include/catalog/pg_foreign_server.h index 5c17004151..a173699aef 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_foreign_server.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_foreign_server.h @@ -3,7 +3,7 @@ * pg_foreign_server.h * definition of the "foreign server" system catalog (pg_foreign_server) * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -29,8 +29,8 @@ CATALOG(pg_foreign_server,1417,ForeignServerRelationId) { Oid oid; /* oid */ NameData srvname; /* foreign server name */ - Oid srvowner; /* server owner */ - Oid srvfdw; /* server FDW */ + 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; @@ -47,4 +47,11 @@ CATALOG(pg_foreign_server,1417,ForeignServerRelationId) */ 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_table.h b/contrib/libs/postgresql/src/include/catalog/pg_foreign_table.h index 31c1faed03..3b6221b0e6 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_foreign_table.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_foreign_table.h @@ -3,7 +3,7 @@ * pg_foreign_table.h * definition of the "foreign table" system catalog (pg_foreign_table) * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -27,8 +27,8 @@ */ CATALOG(pg_foreign_table,3118,ForeignTableRelationId) { - Oid ftrelid; /* OID of foreign table */ - Oid ftserver; /* OID of foreign server */ + 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 */ @@ -42,4 +42,9 @@ CATALOG(pg_foreign_table,3118,ForeignTableRelationId) */ 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_index.h b/contrib/libs/postgresql/src/include/catalog/pg_index.h index d3d7ea77fb..00d0b439f5 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_index.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_index.h @@ -4,7 +4,7 @@ * definition of the "index" system catalog (pg_index) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -28,8 +28,9 @@ */ CATALOG(pg_index,2610,IndexRelationId) BKI_SCHEMA_MACRO { - Oid indexrelid; /* OID of the index */ - Oid indrelid; /* OID of the relation it indexes */ + 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? */ @@ -44,12 +45,14 @@ CATALOG(pg_index,2610,IndexRelationId) BKI_SCHEMA_MACRO bool indisreplident; /* is this index the identity for replication? */ /* variable-length fields start here, but we allow direct access to indkey */ - int2vector indkey; /* column numbers of indexed cols, or 0 */ + int2vector indkey BKI_FORCE_NOT_NULL; /* column numbers of indexed cols, + * or 0 */ #ifdef CATALOG_VARLEN - oidvector indcollation; /* collation identifiers */ - oidvector indclass; /* opclass identifiers */ - int2vector indoption; /* per-column flags (AM-specific meanings) */ + 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[] */ @@ -65,6 +68,14 @@ CATALOG(pg_index,2610,IndexRelationId) BKI_SCHEMA_MACRO */ 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 /* diff --git a/contrib/libs/postgresql/src/include/catalog/pg_inherits.h b/contrib/libs/postgresql/src/include/catalog/pg_inherits.h index 0432c3ab88..f47c0a8cd8 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_inherits.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_inherits.h @@ -4,7 +4,7 @@ * definition of the "inherits" system catalog (pg_inherits) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -31,9 +31,10 @@ */ CATALOG(pg_inherits,2611,InheritsRelationId) { - Oid inhrelid; - Oid inhparent; + Oid inhrelid BKI_LOOKUP(pg_class); + Oid inhparent BKI_LOOKUP(pg_class); int32 inhseqno; + bool inhdetachpending; } FormData_pg_inherits; /* ---------------- @@ -43,8 +44,16 @@ CATALOG(pg_inherits,2611,InheritsRelationId) */ 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); @@ -52,6 +61,8 @@ 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); +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_init_privs.h b/contrib/libs/postgresql/src/include/catalog/pg_init_privs.h index 7734b72c04..4aafeb246d 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_init_privs.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_init_privs.h @@ -21,7 +21,7 @@ * are loaded near the end of initdb. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -46,7 +46,8 @@ CATALOG(pg_init_privs,3394,InitPrivsRelationId) { Oid objoid; /* OID of object itself */ - Oid classoid; /* OID of table containing object */ + 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? */ @@ -62,6 +63,11 @@ CATALOG(pg_init_privs,3394,InitPrivsRelationId) */ 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 diff --git a/contrib/libs/postgresql/src/include/catalog/pg_language.dat b/contrib/libs/postgresql/src/include/catalog/pg_language.dat index 2e44a2730d..a584679927 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_language.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_language.dat @@ -3,7 +3,7 @@ # pg_language.dat # Initial contents of the pg_language system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 diff --git a/contrib/libs/postgresql/src/include/catalog/pg_language.h b/contrib/libs/postgresql/src/include/catalog/pg_language.h index 937bacbf98..3e56597ece 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_language.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_language.h @@ -4,7 +4,7 @@ * definition of the "language" system catalog (pg_language) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -34,7 +34,7 @@ CATALOG(pg_language,2612,LanguageRelationId) NameData lanname; /* Language's owner */ - Oid lanowner BKI_DEFAULT(PGUID); + Oid lanowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid); /* Is a procedural language */ bool lanispl BKI_DEFAULT(f); @@ -43,13 +43,13 @@ CATALOG(pg_language,2612,LanguageRelationId) bool lanpltrusted BKI_DEFAULT(f); /* Call handler, if it's a PL */ - Oid lanplcallfoid BKI_DEFAULT(0) BKI_LOOKUP(pg_proc); + Oid lanplcallfoid BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_proc); /* Optional anonymous-block handler function */ - Oid laninline BKI_DEFAULT(0) BKI_LOOKUP(pg_proc); + Oid laninline BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_proc); /* Optional validation function */ - Oid lanvalidator BKI_DEFAULT(0) BKI_LOOKUP(pg_proc); + Oid lanvalidator BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_proc); #ifdef CATALOG_VARLEN /* variable-length fields start here */ /* Access privileges */ @@ -64,4 +64,11 @@ CATALOG(pg_language,2612,LanguageRelationId) */ 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_largeobject.h b/contrib/libs/postgresql/src/include/catalog/pg_largeobject.h index f64703ff8d..32225f4de7 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_largeobject.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_largeobject.h @@ -4,7 +4,7 @@ * definition of the "large object" system catalog (pg_largeobject) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -28,7 +28,8 @@ */ CATALOG(pg_largeobject,2613,LargeObjectRelationId) { - Oid loid; /* Identifier of large object */ + 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 */ @@ -43,6 +44,9 @@ CATALOG(pg_largeobject,2613,LargeObjectRelationId) */ 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); diff --git a/contrib/libs/postgresql/src/include/catalog/pg_largeobject_metadata.h b/contrib/libs/postgresql/src/include/catalog/pg_largeobject_metadata.h index 8f6b4720d4..9b689bab84 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_largeobject_metadata.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_largeobject_metadata.h @@ -5,7 +5,7 @@ * (pg_largeobject_metadata) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -31,7 +31,8 @@ CATALOG(pg_largeobject_metadata,2995,LargeObjectMetadataRelationId) { Oid oid; /* oid */ - Oid lomowner; /* OID of the largeobject owner */ + Oid lomowner BKI_LOOKUP(pg_authid); /* OID of the largeobject + * owner */ #ifdef CATALOG_VARLEN /* variable-length fields start here */ aclitem lomacl[1]; /* access permissions */ @@ -45,4 +46,7 @@ CATALOG(pg_largeobject_metadata,2995,LargeObjectMetadataRelationId) */ 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_namespace.dat b/contrib/libs/postgresql/src/include/catalog/pg_namespace.dat index 63a61022ce..2ed136b787 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_namespace.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_namespace.dat @@ -3,7 +3,7 @@ # pg_namespace.dat # Initial contents of the pg_namespace system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 @@ -14,12 +14,12 @@ { oid => '11', oid_symbol => 'PG_CATALOG_NAMESPACE', descr => 'system catalog schema', - nspname => 'pg_catalog', nspowner => 'PGUID', nspacl => '_null_' }, + nspname => 'pg_catalog', nspacl => '_null_' }, { oid => '99', oid_symbol => 'PG_TOAST_NAMESPACE', descr => 'reserved schema for TOAST tables', - nspname => 'pg_toast', nspowner => 'PGUID', nspacl => '_null_' }, + nspname => 'pg_toast', nspacl => '_null_' }, { oid => '2200', oid_symbol => 'PG_PUBLIC_NAMESPACE', descr => 'standard public schema', - nspname => 'public', nspowner => 'PGUID', nspacl => '_null_' }, + 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 index db93b27015..fe87a947ee 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_namespace.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_namespace.h @@ -4,7 +4,7 @@ * definition of the "namespace" system catalog (pg_namespace) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -37,7 +37,7 @@ CATALOG(pg_namespace,2615,NamespaceRelationId) Oid oid; /* oid */ NameData nspname; - Oid nspowner; + Oid nspowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid); #ifdef CATALOG_VARLEN /* variable-length fields start here */ aclitem nspacl[1]; @@ -51,6 +51,13 @@ CATALOG(pg_namespace,2615,NamespaceRelationId) */ 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 */ diff --git a/contrib/libs/postgresql/src/include/catalog/pg_opclass.dat b/contrib/libs/postgresql/src/include/catalog/pg_opclass.dat index f2342bb328..484727a2fc 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_opclass.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_opclass.dat @@ -3,7 +3,7 @@ # pg_opclass.dat # Initial contents of the pg_opclass system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # # src/include/catalog/pg_opclass.dat @@ -114,6 +114,8 @@ opcfamily => 'hash/oidvector_ops', opcintype => 'oidvector' }, { opcmethod => 'btree', opcname => 'record_ops', opcfamily => 'btree/record_ops', opcintype => 'record' }, +{ opcmethod => 'hash', opcname => 'record_ops', opcfamily => 'hash/record_ops', + opcintype => 'record' }, { opcmethod => 'btree', opcname => 'record_image_ops', opcfamily => 'btree/record_image_ops', opcintype => 'record', opcdefault => 'f' }, @@ -230,6 +232,13 @@ opcintype => 'anyrange' }, { opcmethod => 'spgist', opcname => 'range_ops', opcfamily => 'spgist/range_ops', opcintype => 'anyrange' }, +{ opcmethod => 'btree', opcname => 'multirange_ops', + opcfamily => 'btree/multirange_ops', opcintype => 'anymultirange' }, +{ opcmethod => 'hash', opcname => 'multirange_ops', + opcfamily => 'hash/multirange_ops', opcintype => 'anymultirange' }, +{ opcmethod => 'gist', opcname => 'multirange_ops', + opcfamily => 'gist/multirange_ops', opcintype => 'anymultirange', + opckeytype => 'anyrange' }, { opcmethod => 'spgist', opcname => 'box_ops', opcfamily => 'spgist/box_ops', opcintype => 'box' }, { opcmethod => 'spgist', opcname => 'quad_point_ops', @@ -257,67 +266,178 @@ { opcmethod => 'brin', opcname => 'bytea_minmax_ops', opcfamily => 'brin/bytea_minmax_ops', opcintype => 'bytea', opckeytype => 'bytea' }, +{ opcmethod => 'brin', opcname => 'bytea_bloom_ops', + opcfamily => 'brin/bytea_bloom_ops', opcintype => 'bytea', opcdefault => 'f', + opckeytype => 'bytea' }, { opcmethod => 'brin', opcname => 'char_minmax_ops', opcfamily => 'brin/char_minmax_ops', opcintype => 'char', opckeytype => 'char' }, +{ opcmethod => 'brin', opcname => 'char_bloom_ops', + opcfamily => 'brin/char_bloom_ops', opcintype => 'char', opcdefault => 'f', + opckeytype => 'char' }, { opcmethod => 'brin', opcname => 'name_minmax_ops', opcfamily => 'brin/name_minmax_ops', opcintype => 'name', opckeytype => 'name' }, +{ opcmethod => 'brin', opcname => 'name_bloom_ops', + opcfamily => 'brin/name_bloom_ops', opcintype => 'name', opcdefault => 'f', + opckeytype => 'name' }, { opcmethod => 'brin', opcname => 'int8_minmax_ops', opcfamily => 'brin/integer_minmax_ops', opcintype => 'int8', opckeytype => 'int8' }, +{ opcmethod => 'brin', opcname => 'int8_minmax_multi_ops', + opcfamily => 'brin/integer_minmax_multi_ops', opcintype => 'int8', + opcdefault => 'f', opckeytype => 'int8' }, +{ opcmethod => 'brin', opcname => 'int8_bloom_ops', + opcfamily => 'brin/integer_bloom_ops', opcintype => 'int8', opcdefault => 'f', + opckeytype => 'int8' }, { opcmethod => 'brin', opcname => 'int2_minmax_ops', opcfamily => 'brin/integer_minmax_ops', opcintype => 'int2', opckeytype => 'int2' }, +{ opcmethod => 'brin', opcname => 'int2_minmax_multi_ops', + opcfamily => 'brin/integer_minmax_multi_ops', opcintype => 'int2', + opcdefault => 'f', opckeytype => 'int2' }, +{ opcmethod => 'brin', opcname => 'int2_bloom_ops', + opcfamily => 'brin/integer_bloom_ops', opcintype => 'int2', opcdefault => 'f', + opckeytype => 'int2' }, { opcmethod => 'brin', opcname => 'int4_minmax_ops', opcfamily => 'brin/integer_minmax_ops', opcintype => 'int4', opckeytype => 'int4' }, +{ opcmethod => 'brin', opcname => 'int4_minmax_multi_ops', + opcfamily => 'brin/integer_minmax_multi_ops', opcintype => 'int4', + opcdefault => 'f', opckeytype => 'int4' }, +{ opcmethod => 'brin', opcname => 'int4_bloom_ops', + opcfamily => 'brin/integer_bloom_ops', opcintype => 'int4', opcdefault => 'f', + opckeytype => 'int4' }, { opcmethod => 'brin', opcname => 'text_minmax_ops', opcfamily => 'brin/text_minmax_ops', opcintype => 'text', opckeytype => 'text' }, +{ opcmethod => 'brin', opcname => 'text_bloom_ops', + opcfamily => 'brin/text_bloom_ops', opcintype => 'text', opcdefault => 'f', + opckeytype => 'text' }, { opcmethod => 'brin', opcname => 'oid_minmax_ops', opcfamily => 'brin/oid_minmax_ops', opcintype => 'oid', opckeytype => 'oid' }, +{ opcmethod => 'brin', opcname => 'oid_minmax_multi_ops', + opcfamily => 'brin/oid_minmax_multi_ops', opcintype => 'oid', + opcdefault => 'f', opckeytype => 'oid' }, +{ opcmethod => 'brin', opcname => 'oid_bloom_ops', + opcfamily => 'brin/oid_bloom_ops', opcintype => 'oid', opcdefault => 'f', + opckeytype => 'oid' }, { opcmethod => 'brin', opcname => 'tid_minmax_ops', opcfamily => 'brin/tid_minmax_ops', opcintype => 'tid', opckeytype => 'tid' }, +{ opcmethod => 'brin', opcname => 'tid_bloom_ops', + opcfamily => 'brin/tid_bloom_ops', opcintype => 'tid', opcdefault => 'f', + opckeytype => 'tid' }, +{ opcmethod => 'brin', opcname => 'tid_minmax_multi_ops', + opcfamily => 'brin/tid_minmax_multi_ops', opcintype => 'tid', + opcdefault => 'f', opckeytype => 'tid' }, { opcmethod => 'brin', opcname => 'float4_minmax_ops', opcfamily => 'brin/float_minmax_ops', opcintype => 'float4', opckeytype => 'float4' }, +{ opcmethod => 'brin', opcname => 'float4_minmax_multi_ops', + opcfamily => 'brin/float_minmax_multi_ops', opcintype => 'float4', + opcdefault => 'f', opckeytype => 'float4' }, +{ opcmethod => 'brin', opcname => 'float4_bloom_ops', + opcfamily => 'brin/float_bloom_ops', opcintype => 'float4', opcdefault => 'f', + opckeytype => 'float4' }, { opcmethod => 'brin', opcname => 'float8_minmax_ops', opcfamily => 'brin/float_minmax_ops', opcintype => 'float8', opckeytype => 'float8' }, +{ opcmethod => 'brin', opcname => 'float8_minmax_multi_ops', + opcfamily => 'brin/float_minmax_multi_ops', opcintype => 'float8', + opcdefault => 'f', opckeytype => 'float8' }, +{ opcmethod => 'brin', opcname => 'float8_bloom_ops', + opcfamily => 'brin/float_bloom_ops', opcintype => 'float8', opcdefault => 'f', + opckeytype => 'float8' }, { opcmethod => 'brin', opcname => 'macaddr_minmax_ops', opcfamily => 'brin/macaddr_minmax_ops', opcintype => 'macaddr', opckeytype => 'macaddr' }, +{ opcmethod => 'brin', opcname => 'macaddr_minmax_multi_ops', + opcfamily => 'brin/macaddr_minmax_multi_ops', opcintype => 'macaddr', + opcdefault => 'f', opckeytype => 'macaddr' }, +{ opcmethod => 'brin', opcname => 'macaddr_bloom_ops', + opcfamily => 'brin/macaddr_bloom_ops', opcintype => 'macaddr', + opcdefault => 'f', opckeytype => 'macaddr' }, { opcmethod => 'brin', opcname => 'macaddr8_minmax_ops', opcfamily => 'brin/macaddr8_minmax_ops', opcintype => 'macaddr8', opckeytype => 'macaddr8' }, +{ opcmethod => 'brin', opcname => 'macaddr8_minmax_multi_ops', + opcfamily => 'brin/macaddr8_minmax_multi_ops', opcintype => 'macaddr8', + opcdefault => 'f', opckeytype => 'macaddr8' }, +{ opcmethod => 'brin', opcname => 'macaddr8_bloom_ops', + opcfamily => 'brin/macaddr8_bloom_ops', opcintype => 'macaddr8', + opcdefault => 'f', opckeytype => 'macaddr8' }, { opcmethod => 'brin', opcname => 'inet_minmax_ops', opcfamily => 'brin/network_minmax_ops', opcintype => 'inet', opcdefault => 'f', opckeytype => 'inet' }, +{ opcmethod => 'brin', opcname => 'inet_minmax_multi_ops', + opcfamily => 'brin/network_minmax_multi_ops', opcintype => 'inet', + opcdefault => 'f', opckeytype => 'inet' }, +{ opcmethod => 'brin', opcname => 'inet_bloom_ops', + opcfamily => 'brin/network_bloom_ops', opcintype => 'inet', opcdefault => 'f', + opckeytype => 'inet' }, { opcmethod => 'brin', opcname => 'inet_inclusion_ops', opcfamily => 'brin/network_inclusion_ops', opcintype => 'inet', opckeytype => 'inet' }, { opcmethod => 'brin', opcname => 'bpchar_minmax_ops', opcfamily => 'brin/bpchar_minmax_ops', opcintype => 'bpchar', opckeytype => 'bpchar' }, +{ opcmethod => 'brin', opcname => 'bpchar_bloom_ops', + opcfamily => 'brin/bpchar_bloom_ops', opcintype => 'bpchar', + opcdefault => 'f', opckeytype => 'bpchar' }, { opcmethod => 'brin', opcname => 'time_minmax_ops', opcfamily => 'brin/time_minmax_ops', opcintype => 'time', opckeytype => 'time' }, +{ opcmethod => 'brin', opcname => 'time_minmax_multi_ops', + opcfamily => 'brin/time_minmax_multi_ops', opcintype => 'time', + opcdefault => 'f', opckeytype => 'time' }, +{ opcmethod => 'brin', opcname => 'time_bloom_ops', + opcfamily => 'brin/time_bloom_ops', opcintype => 'time', opcdefault => 'f', + opckeytype => 'time' }, { opcmethod => 'brin', opcname => 'date_minmax_ops', opcfamily => 'brin/datetime_minmax_ops', opcintype => 'date', opckeytype => 'date' }, +{ opcmethod => 'brin', opcname => 'date_minmax_multi_ops', + opcfamily => 'brin/datetime_minmax_multi_ops', opcintype => 'date', + opcdefault => 'f', opckeytype => 'date' }, +{ opcmethod => 'brin', opcname => 'date_bloom_ops', + opcfamily => 'brin/datetime_bloom_ops', opcintype => 'date', + opcdefault => 'f', opckeytype => 'date' }, { opcmethod => 'brin', opcname => 'timestamp_minmax_ops', opcfamily => 'brin/datetime_minmax_ops', opcintype => 'timestamp', opckeytype => 'timestamp' }, +{ opcmethod => 'brin', opcname => 'timestamp_minmax_multi_ops', + opcfamily => 'brin/datetime_minmax_multi_ops', opcintype => 'timestamp', + opcdefault => 'f', opckeytype => 'timestamp' }, +{ opcmethod => 'brin', opcname => 'timestamp_bloom_ops', + opcfamily => 'brin/datetime_bloom_ops', opcintype => 'timestamp', + opcdefault => 'f', opckeytype => 'timestamp' }, { opcmethod => 'brin', opcname => 'timestamptz_minmax_ops', opcfamily => 'brin/datetime_minmax_ops', opcintype => 'timestamptz', opckeytype => 'timestamptz' }, +{ opcmethod => 'brin', opcname => 'timestamptz_minmax_multi_ops', + opcfamily => 'brin/datetime_minmax_multi_ops', opcintype => 'timestamptz', + opcdefault => 'f', opckeytype => 'timestamptz' }, +{ opcmethod => 'brin', opcname => 'timestamptz_bloom_ops', + opcfamily => 'brin/datetime_bloom_ops', opcintype => 'timestamptz', + opcdefault => 'f', opckeytype => 'timestamptz' }, { opcmethod => 'brin', opcname => 'interval_minmax_ops', opcfamily => 'brin/interval_minmax_ops', opcintype => 'interval', opckeytype => 'interval' }, +{ opcmethod => 'brin', opcname => 'interval_minmax_multi_ops', + opcfamily => 'brin/interval_minmax_multi_ops', opcintype => 'interval', + opcdefault => 'f', opckeytype => 'interval' }, +{ opcmethod => 'brin', opcname => 'interval_bloom_ops', + opcfamily => 'brin/interval_bloom_ops', opcintype => 'interval', + opcdefault => 'f', opckeytype => 'interval' }, { opcmethod => 'brin', opcname => 'timetz_minmax_ops', opcfamily => 'brin/timetz_minmax_ops', opcintype => 'timetz', opckeytype => 'timetz' }, +{ opcmethod => 'brin', opcname => 'timetz_minmax_multi_ops', + opcfamily => 'brin/timetz_minmax_multi_ops', opcintype => 'timetz', + opcdefault => 'f', opckeytype => 'timetz' }, +{ opcmethod => 'brin', opcname => 'timetz_bloom_ops', + opcfamily => 'brin/timetz_bloom_ops', opcintype => 'timetz', + opcdefault => 'f', opckeytype => 'timetz' }, { opcmethod => 'brin', opcname => 'bit_minmax_ops', opcfamily => 'brin/bit_minmax_ops', opcintype => 'bit', opckeytype => 'bit' }, { opcmethod => 'brin', opcname => 'varbit_minmax_ops', @@ -326,18 +446,36 @@ { opcmethod => 'brin', opcname => 'numeric_minmax_ops', opcfamily => 'brin/numeric_minmax_ops', opcintype => 'numeric', opckeytype => 'numeric' }, +{ opcmethod => 'brin', opcname => 'numeric_minmax_multi_ops', + opcfamily => 'brin/numeric_minmax_multi_ops', opcintype => 'numeric', + opcdefault => 'f', opckeytype => 'numeric' }, +{ opcmethod => 'brin', opcname => 'numeric_bloom_ops', + opcfamily => 'brin/numeric_bloom_ops', opcintype => 'numeric', + opcdefault => 'f', opckeytype => 'numeric' }, # no brin opclass for record, anyarray { opcmethod => 'brin', opcname => 'uuid_minmax_ops', opcfamily => 'brin/uuid_minmax_ops', opcintype => 'uuid', opckeytype => 'uuid' }, +{ opcmethod => 'brin', opcname => 'uuid_minmax_multi_ops', + opcfamily => 'brin/uuid_minmax_multi_ops', opcintype => 'uuid', + opcdefault => 'f', opckeytype => 'uuid' }, +{ opcmethod => 'brin', opcname => 'uuid_bloom_ops', + opcfamily => 'brin/uuid_bloom_ops', opcintype => 'uuid', opcdefault => 'f', + opckeytype => 'uuid' }, { opcmethod => 'brin', opcname => 'range_inclusion_ops', opcfamily => 'brin/range_inclusion_ops', opcintype => 'anyrange', opckeytype => 'anyrange' }, { opcmethod => 'brin', opcname => 'pg_lsn_minmax_ops', opcfamily => 'brin/pg_lsn_minmax_ops', opcintype => 'pg_lsn', opckeytype => 'pg_lsn' }, +{ opcmethod => 'brin', opcname => 'pg_lsn_minmax_multi_ops', + opcfamily => 'brin/pg_lsn_minmax_multi_ops', opcintype => 'pg_lsn', + opcdefault => 'f', opckeytype => 'pg_lsn' }, +{ opcmethod => 'brin', opcname => 'pg_lsn_bloom_ops', + opcfamily => 'brin/pg_lsn_bloom_ops', opcintype => 'pg_lsn', + opcdefault => 'f', opckeytype => 'pg_lsn' }, # no brin opclass for enum, tsvector, tsquery, jsonb diff --git a/contrib/libs/postgresql/src/include/catalog/pg_opclass.h b/contrib/libs/postgresql/src/include/catalog/pg_opclass.h index 963ab3eae8..7b2cf25920 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_opclass.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_opclass.h @@ -24,7 +24,7 @@ * AMs support this. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -57,10 +57,10 @@ CATALOG(pg_opclass,2616,OperatorClassRelationId) NameData opcname; /* namespace of this opclass */ - Oid opcnamespace BKI_DEFAULT(PGNSP); + Oid opcnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace); /* opclass owner */ - Oid opcowner BKI_DEFAULT(PGUID); + Oid opcowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid); /* containing operator family */ Oid opcfamily BKI_LOOKUP(pg_opfamily); @@ -71,8 +71,8 @@ CATALOG(pg_opclass,2616,OperatorClassRelationId) /* T if opclass is default for opcintype */ bool opcdefault BKI_DEFAULT(t); - /* type of data in index, or InvalidOid */ - Oid opckeytype BKI_DEFAULT(0) BKI_LOOKUP(pg_type); + /* 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; /* ---------------- @@ -82,4 +82,9 @@ CATALOG(pg_opclass,2616,OperatorClassRelationId) */ 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_operator.dat b/contrib/libs/postgresql/src/include/catalog/pg_operator.dat index 3b3eb955d4..89c73acd68 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_operator.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_operator.dat @@ -3,7 +3,7 @@ # pg_operator.dat # Initial contents of the pg_operator system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # # src/include/catalog/pg_operator.dat @@ -168,14 +168,15 @@ oprcode => 'textnename', oprrest => 'neqsel', oprjoin => 'neqjoinsel' }, { oid => '349', descr => 'append element onto end of array', - oprname => '||', oprleft => 'anyarray', oprright => 'anyelement', - oprresult => 'anyarray', oprcode => 'array_append' }, + oprname => '||', oprleft => 'anycompatiblearray', oprright => 'anycompatible', + oprresult => 'anycompatiblearray', oprcode => 'array_append' }, { oid => '374', descr => 'prepend element onto front of array', - oprname => '||', oprleft => 'anyelement', oprright => 'anyarray', - oprresult => 'anyarray', oprcode => 'array_prepend' }, + oprname => '||', oprleft => 'anycompatible', oprright => 'anycompatiblearray', + oprresult => 'anycompatiblearray', oprcode => 'array_prepend' }, { oid => '375', descr => 'concatenate', - oprname => '||', oprleft => 'anyarray', oprright => 'anyarray', - oprresult => 'anyarray', oprcode => 'array_cat' }, + oprname => '||', oprleft => 'anycompatiblearray', + oprright => 'anycompatiblearray', oprresult => 'anycompatiblearray', + oprcode => 'array_cat' }, { oid => '352', descr => 'equal', oprname => '=', oprcanhash => 't', oprleft => 'xid', oprright => 'xid', @@ -218,12 +219,6 @@ oprname => '>=', oprleft => 'xid8', oprright => 'xid8', oprresult => 'bool', oprcom => '<=(xid8,xid8)', oprnegate => '<(xid8,xid8)', oprcode => 'xid8ge', oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' }, -{ oid => '388', descr => 'deprecated, use factorial() instead', - oprname => '!', oprkind => 'r', oprleft => 'int8', oprright => '0', - oprresult => 'numeric', oprcode => 'numeric_fac' }, -{ oid => '389', descr => 'deprecated, use factorial() instead', - oprname => '!!', oprkind => 'l', oprleft => '0', oprright => 'int8', - oprresult => 'numeric', oprcode => 'numeric_fac' }, { oid => '385', descr => 'equal', oprname => '=', oprcanhash => 't', oprleft => 'cid', oprright => 'cid', oprresult => 'bool', oprcom => '=(cid,cid)', oprcode => 'cideq', @@ -242,15 +237,17 @@ oprname => '<', oprleft => 'tid', oprright => 'tid', oprresult => 'bool', oprcom => '>(tid,tid)', oprnegate => '>=(tid,tid)', oprcode => 'tidlt', oprrest => 'scalarltsel', oprjoin => 'scalarltjoinsel' }, -{ oid => '2800', descr => 'greater than', +{ oid => '2800', oid_symbol => 'TIDGreaterOperator', descr => 'greater than', oprname => '>', oprleft => 'tid', oprright => 'tid', oprresult => 'bool', oprcom => '<(tid,tid)', oprnegate => '<=(tid,tid)', oprcode => 'tidgt', oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' }, -{ oid => '2801', descr => 'less than or equal', +{ oid => '2801', oid_symbol => 'TIDLessEqOperator', + descr => 'less than or equal', oprname => '<=', oprleft => 'tid', oprright => 'tid', oprresult => 'bool', oprcom => '>=(tid,tid)', oprnegate => '>(tid,tid)', oprcode => 'tidle', oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' }, -{ oid => '2802', descr => 'greater than or equal', +{ oid => '2802', oid_symbol => 'TIDGreaterEqOperator', + descr => 'greater than or equal', oprname => '>=', oprleft => 'tid', oprright => 'tid', oprresult => 'bool', oprcom => '<=(tid,tid)', oprnegate => '<(tid,tid)', oprcode => 'tidge', oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' }, @@ -400,7 +397,7 @@ oprname => '<=', oprleft => 'box', oprright => 'box', oprresult => 'bool', oprcom => '>=(box,box)', oprnegate => '>(box,box)', oprcode => 'box_le', oprrest => 'areasel', oprjoin => 'areajoinsel' }, -{ oid => '506', descr => 'is above', +{ oid => '506', descr => 'deprecated, use |>> instead', oprname => '>^', oprleft => 'point', oprright => 'point', oprresult => 'bool', oprcode => 'point_above', oprrest => 'positionsel', oprjoin => 'positionjoinsel' }, @@ -412,7 +409,7 @@ oprname => '>>', oprleft => 'point', oprright => 'point', oprresult => 'bool', oprcode => 'point_right', oprrest => 'positionsel', oprjoin => 'positionjoinsel' }, -{ oid => '509', descr => 'is below', +{ oid => '509', descr => 'deprecated, use <<| instead', oprname => '<^', oprleft => 'point', oprright => 'point', oprresult => 'bool', oprcode => 'point_below', oprrest => 'positionsel', oprjoin => 'positionjoinsel' }, @@ -1883,6 +1880,15 @@ oprname => '#', oprleft => 'line', oprright => 'line', oprresult => 'point', oprcom => '#(line,line)', oprcode => 'line_interpt' }, +{ oid => '4161', descr => 'is above', + oprname => '|>>', oprleft => 'point', oprright => 'point', + oprresult => 'bool', oprcode => 'point_above', oprrest => 'positionsel', + oprjoin => 'positionjoinsel' }, +{ oid => '4162', descr => 'is below', + oprname => '<<|', oprleft => 'point', oprright => 'point', + oprresult => 'bool', oprcode => 'point_below', oprrest => 'positionsel', + oprjoin => 'positionjoinsel' }, + # MACADDR type { oid => '1220', descr => 'equal', oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'macaddr', @@ -2783,71 +2789,6 @@ oprname => '||', oprleft => 'anynonarray', oprright => 'text', oprresult => 'text', oprcode => 'anytextcat' }, -# obsolete names for contains/contained-by operators; remove these someday -{ oid => '2860', descr => 'deprecated, use <@ instead', - oprname => '@', oprleft => 'polygon', oprright => 'polygon', - oprresult => 'bool', oprcom => '~(polygon,polygon)', - oprcode => 'poly_contained', oprrest => 'contsel', oprjoin => 'contjoinsel' }, -{ oid => '2861', descr => 'deprecated, use @> instead', - oprname => '~', oprleft => 'polygon', oprright => 'polygon', - oprresult => 'bool', oprcom => '@(polygon,polygon)', - oprcode => 'poly_contain', oprrest => 'contsel', oprjoin => 'contjoinsel' }, -{ oid => '2862', descr => 'deprecated, use <@ instead', - oprname => '@', oprleft => 'box', oprright => 'box', oprresult => 'bool', - oprcom => '~(box,box)', oprcode => 'box_contained', oprrest => 'contsel', - oprjoin => 'contjoinsel' }, -{ oid => '2863', descr => 'deprecated, use @> instead', - oprname => '~', oprleft => 'box', oprright => 'box', oprresult => 'bool', - oprcom => '@(box,box)', oprcode => 'box_contain', oprrest => 'contsel', - oprjoin => 'contjoinsel' }, -{ oid => '2864', descr => 'deprecated, use <@ instead', - oprname => '@', oprleft => 'circle', oprright => 'circle', - oprresult => 'bool', oprcom => '~(circle,circle)', - oprcode => 'circle_contained', oprrest => 'contsel', - oprjoin => 'contjoinsel' }, -{ oid => '2865', descr => 'deprecated, use @> instead', - oprname => '~', oprleft => 'circle', oprright => 'circle', - oprresult => 'bool', oprcom => '@(circle,circle)', - oprcode => 'circle_contain', oprrest => 'contsel', oprjoin => 'contjoinsel' }, -{ oid => '2866', descr => 'deprecated, use <@ instead', - oprname => '@', oprleft => 'point', oprright => 'box', oprresult => 'bool', - oprcode => 'on_pb' }, -{ oid => '2867', descr => 'deprecated, use <@ instead', - oprname => '@', oprleft => 'point', oprright => 'path', oprresult => 'bool', - oprcom => '~(path,point)', oprcode => 'on_ppath' }, -{ oid => '2868', descr => 'deprecated, use @> instead', - oprname => '~', oprleft => 'path', oprright => 'point', oprresult => 'bool', - oprcom => '@(point,path)', oprcode => 'path_contain_pt' }, -{ oid => '2869', descr => 'deprecated, use <@ instead', - oprname => '@', oprleft => 'point', oprright => 'polygon', - oprresult => 'bool', oprcom => '~(polygon,point)', - oprcode => 'pt_contained_poly' }, -{ oid => '2870', descr => 'deprecated, use @> instead', - oprname => '~', oprleft => 'polygon', oprright => 'point', - oprresult => 'bool', oprcom => '@(point,polygon)', - oprcode => 'poly_contain_pt' }, -{ oid => '2871', descr => 'deprecated, use <@ instead', - oprname => '@', oprleft => 'point', oprright => 'circle', oprresult => 'bool', - oprcom => '~(circle,point)', oprcode => 'pt_contained_circle' }, -{ oid => '2872', descr => 'deprecated, use @> instead', - oprname => '~', oprleft => 'circle', oprright => 'point', oprresult => 'bool', - oprcom => '@(point,circle)', oprcode => 'circle_contain_pt' }, -{ oid => '2873', descr => 'deprecated, use <@ instead', - oprname => '@', oprleft => 'point', oprright => 'line', oprresult => 'bool', - oprcode => 'on_pl' }, -{ oid => '2874', descr => 'deprecated, use <@ instead', - oprname => '@', oprleft => 'point', oprright => 'lseg', oprresult => 'bool', - oprcode => 'on_ps' }, -{ oid => '2875', descr => 'deprecated, use <@ instead', - oprname => '@', oprleft => 'lseg', oprright => 'line', oprresult => 'bool', - oprcode => 'on_sl' }, -{ oid => '2876', descr => 'deprecated, use <@ instead', - oprname => '@', oprleft => 'lseg', oprright => 'box', oprresult => 'bool', - oprcode => 'on_sb' }, -{ oid => '2877', descr => 'deprecated, use @> instead', - oprname => '~', oprleft => '_aclitem', oprright => 'aclitem', - oprresult => 'bool', oprcode => 'aclcontains' }, - # uuid operators { oid => '2972', descr => 'equal', oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'uuid', @@ -2909,6 +2850,17 @@ { oid => '3228', descr => 'minus', oprname => '-', oprleft => 'pg_lsn', oprright => 'pg_lsn', oprresult => 'numeric', oprcode => 'pg_lsn_mi' }, +{ oid => '5025', descr => 'add', + oprname => '+', oprleft => 'pg_lsn', oprright => 'numeric', + oprresult => 'pg_lsn', oprcom => '+(numeric,pg_lsn)', + oprcode => 'pg_lsn_pli' }, +{ oid => '5026', descr => 'add', + oprname => '+', oprleft => 'numeric', oprright => 'pg_lsn', + oprresult => 'pg_lsn', oprcom => '+(pg_lsn,numeric)', + oprcode => 'numeric_pl_pg_lsn' }, +{ oid => '5027', descr => 'subtract', + oprname => '-', oprleft => 'pg_lsn', oprright => 'numeric', + oprresult => 'pg_lsn', oprcode => 'pg_lsn_mii' }, # enum operators { oid => '3516', descr => 'equal', @@ -3059,8 +3011,8 @@ # generic record comparison operators { oid => '2988', oid_symbol => 'RECORD_EQ_OP', descr => 'equal', - oprname => '=', oprcanmerge => 't', oprleft => 'record', oprright => 'record', - oprresult => 'bool', oprcom => '=(record,record)', + oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'record', + oprright => 'record', oprresult => 'bool', oprcom => '=(record,record)', oprnegate => '<>(record,record)', oprcode => 'record_eq', oprrest => 'eqsel', oprjoin => 'eqjoinsel' }, { oid => '2989', descr => 'not equal', @@ -3327,5 +3279,200 @@ oprname => '@@', oprleft => 'jsonb', oprright => 'jsonpath', oprresult => 'bool', oprcode => 'jsonb_path_match_opr(jsonb,jsonpath)', oprrest => 'matchingsel', oprjoin => 'matchingjoinsel' }, +{ oid => '2860', descr => 'equal', + oprname => '=', oprcanmerge => 't', oprcanhash => 't', + oprleft => 'anymultirange', oprright => 'anymultirange', oprresult => 'bool', + oprcom => '=(anymultirange,anymultirange)', + oprnegate => '<>(anymultirange,anymultirange)', oprcode => 'multirange_eq', + oprrest => 'eqsel', oprjoin => 'eqjoinsel' }, +{ oid => '2861', descr => 'not equal', + oprname => '<>', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '<>(anymultirange,anymultirange)', + oprnegate => '=(anymultirange,anymultirange)', oprcode => 'multirange_ne', + oprrest => 'neqsel', oprjoin => 'neqjoinsel' }, +{ oid => '2862', oid_symbol => 'OID_MULTIRANGE_LESS_OP', descr => 'less than', + oprname => '<', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '>(anymultirange,anymultirange)', + oprnegate => '>=(anymultirange,anymultirange)', oprcode => 'multirange_lt', + oprrest => 'multirangesel', oprjoin => 'scalarltjoinsel' }, +{ oid => '2863', oid_symbol => 'OID_MULTIRANGE_LESS_EQUAL_OP', + descr => 'less than or equal', + oprname => '<=', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '>=(anymultirange,anymultirange)', + oprnegate => '>(anymultirange,anymultirange)', oprcode => 'multirange_le', + oprrest => 'multirangesel', oprjoin => 'scalarlejoinsel' }, +{ oid => '2864', oid_symbol => 'OID_MULTIRANGE_GREATER_EQUAL_OP', + descr => 'greater than or equal', + oprname => '>=', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '<=(anymultirange,anymultirange)', + oprnegate => '<(anymultirange,anymultirange)', oprcode => 'multirange_ge', + oprrest => 'multirangesel', oprjoin => 'scalargejoinsel' }, +{ oid => '2865', oid_symbol => 'OID_MULTIRANGE_GREATER_OP', + descr => 'greater than', + oprname => '>', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '<(anymultirange,anymultirange)', + oprnegate => '<=(anymultirange,anymultirange)', oprcode => 'multirange_gt', + oprrest => 'multirangesel', oprjoin => 'scalargtjoinsel' }, +{ oid => '2866', oid_symbol => 'OID_RANGE_OVERLAPS_MULTIRANGE_OP', + descr => 'overlaps', + oprname => '&&', oprleft => 'anyrange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '&&(anymultirange,anyrange)', + oprcode => 'range_overlaps_multirange', oprrest => 'multirangesel', + oprjoin => 'areajoinsel' }, +{ oid => '2867', oid_symbol => 'OID_MULTIRANGE_OVERLAPS_RANGE_OP', + descr => 'overlaps', + oprname => '&&', oprleft => 'anymultirange', oprright => 'anyrange', + oprresult => 'bool', oprcom => '&&(anyrange,anymultirange)', + oprcode => 'multirange_overlaps_range', oprrest => 'multirangesel', + oprjoin => 'areajoinsel' }, +{ oid => '2868', oid_symbol => 'OID_MULTIRANGE_OVERLAPS_MULTIRANGE_OP', + descr => 'overlaps', + oprname => '&&', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '&&(anymultirange,anymultirange)', + oprcode => 'multirange_overlaps_multirange', oprrest => 'multirangesel', + oprjoin => 'areajoinsel' }, +{ oid => '2869', oid_symbol => 'OID_MULTIRANGE_CONTAINS_ELEM_OP', + descr => 'contains', + oprname => '@>', oprleft => 'anymultirange', oprright => 'anyelement', + oprresult => 'bool', oprcom => '<@(anyelement,anymultirange)', + oprcode => 'multirange_contains_elem', oprrest => 'multirangesel', + oprjoin => 'contjoinsel' }, +{ oid => '2870', oid_symbol => 'OID_MULTIRANGE_CONTAINS_RANGE_OP', + descr => 'contains', + oprname => '@>', oprleft => 'anymultirange', oprright => 'anyrange', + oprresult => 'bool', oprcom => '<@(anyrange,anymultirange)', + oprcode => 'multirange_contains_range', oprrest => 'multirangesel', + oprjoin => 'contjoinsel' }, +{ oid => '2871', oid_symbol => 'OID_MULTIRANGE_CONTAINS_MULTIRANGE_OP', + descr => 'contains', + oprname => '@>', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '<@(anymultirange,anymultirange)', + oprcode => 'multirange_contains_multirange', oprrest => 'multirangesel', + oprjoin => 'contjoinsel' }, +{ oid => '2872', oid_symbol => 'OID_MULTIRANGE_ELEM_CONTAINED_OP', + descr => 'is contained by', + oprname => '<@', oprleft => 'anyelement', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '@>(anymultirange,anyelement)', + oprcode => 'elem_contained_by_multirange', oprrest => 'multirangesel', + oprjoin => 'contjoinsel' }, +{ oid => '2873', oid_symbol => 'OID_MULTIRANGE_RANGE_CONTAINED_OP', + descr => 'is contained by', + oprname => '<@', oprleft => 'anyrange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '@>(anymultirange,anyrange)', + oprcode => 'range_contained_by_multirange', oprrest => 'multirangesel', + oprjoin => 'contjoinsel' }, +{ oid => '2874', oid_symbol => 'OID_MULTIRANGE_MULTIRANGE_CONTAINED_OP', + descr => 'is contained by', + oprname => '<@', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '@>(anymultirange,anymultirange)', + oprcode => 'multirange_contained_by_multirange', oprrest => 'multirangesel', + oprjoin => 'contjoinsel' }, +{ oid => '4539', oid_symbol => 'OID_RANGE_CONTAINS_MULTIRANGE_OP', + descr => 'contains', + oprname => '@>', oprleft => 'anyrange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '<@(anymultirange,anyrange)', + oprcode => 'range_contains_multirange', oprrest => 'multirangesel', + oprjoin => 'contjoinsel' }, +{ oid => '4540', oid_symbol => 'OID_RANGE_MULTIRANGE_CONTAINED_OP', + descr => 'is contained by', + oprname => '<@', oprleft => 'anymultirange', oprright => 'anyrange', + oprresult => 'bool', oprcom => '@>(anyrange,anymultirange)', + oprcode => 'multirange_contained_by_range', oprrest => 'multirangesel', + oprjoin => 'contjoinsel' }, +{ oid => '2875', oid_symbol => 'OID_RANGE_OVERLAPS_LEFT_MULTIRANGE_OP', + descr => 'overlaps or is left of', + oprname => '&<', oprleft => 'anyrange', oprright => 'anymultirange', + oprresult => 'bool', oprcode => 'range_overleft_multirange', + oprrest => 'multirangesel', oprjoin => 'scalarltjoinsel' }, +{ oid => '2876', oid_symbol => 'OID_MULTIRANGE_OVERLAPS_LEFT_RANGE_OP', + descr => 'overlaps or is left of', + oprname => '&<', oprleft => 'anymultirange', oprright => 'anyrange', + oprresult => 'bool', oprcode => 'multirange_overleft_range', + oprrest => 'multirangesel', oprjoin => 'scalarltjoinsel' }, +{ oid => '2877', oid_symbol => 'OID_MULTIRANGE_OVERLAPS_LEFT_MULTIRANGE_OP', + descr => 'overlaps or is left of', + oprname => '&<', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'bool', oprcode => 'multirange_overleft_multirange', + oprrest => 'multirangesel', oprjoin => 'scalarltjoinsel' }, +{ oid => '3585', oid_symbol => 'OID_RANGE_OVERLAPS_RIGHT_MULTIRANGE_OP', + descr => 'overlaps or is right of', + oprname => '&>', oprleft => 'anyrange', oprright => 'anymultirange', + oprresult => 'bool', oprcode => 'range_overright_multirange', + oprrest => 'multirangesel', oprjoin => 'scalargtjoinsel' }, +{ oid => '4035', oid_symbol => 'OID_MULTIRANGE_OVERLAPS_RIGHT_RANGE_OP', + descr => 'overlaps or is right of', + oprname => '&>', oprleft => 'anymultirange', oprright => 'anyrange', + oprresult => 'bool', oprcode => 'multirange_overright_range', + oprrest => 'multirangesel', oprjoin => 'scalargtjoinsel' }, +{ oid => '4142', oid_symbol => 'OID_MULTIRANGE_OVERLAPS_RIGHT_MULTIRANGE_OP', + descr => 'overlaps or is right of', + oprname => '&>', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'bool', oprcode => 'multirange_overright_multirange', + oprrest => 'multirangesel', oprjoin => 'scalargtjoinsel' }, +{ oid => '4179', oid_symbol => 'OID_RANGE_ADJACENT_MULTIRANGE_OP', + descr => 'is adjacent to', + oprname => '-|-', oprleft => 'anyrange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '-|-(anymultirange,anyrange)', + oprcode => 'range_adjacent_multirange', oprrest => 'matchingsel', + oprjoin => 'matchingjoinsel' }, +{ oid => '4180', oid_symbol => 'OID_MULTIRANGE_ADJACENT_RANGE_OP', + descr => 'is adjacent to', + oprname => '-|-', oprleft => 'anymultirange', oprright => 'anyrange', + oprresult => 'bool', oprcom => '-|-(anyrange,anymultirange)', + oprcode => 'multirange_adjacent_range', oprrest => 'matchingsel', + oprjoin => 'matchingjoinsel' }, +{ oid => '4198', oid_symbol => 'OID_MULTIRANGE_ADJACENT_MULTIRANGE_OP', + descr => 'is adjacent to', + oprname => '-|-', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '-|-(anymultirange,anymultirange)', + oprcode => 'multirange_adjacent_multirange', oprrest => 'matchingsel', + oprjoin => 'matchingjoinsel' }, +{ oid => '4392', descr => 'multirange union', + oprname => '+', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'anymultirange', oprcom => '+(anymultirange,anymultirange)', + oprcode => 'multirange_union' }, +{ oid => '4393', descr => 'multirange minus', + oprname => '-', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'anymultirange', oprcode => 'multirange_minus' }, +{ oid => '4394', descr => 'multirange intersect', + oprname => '*', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'anymultirange', oprcom => '*(anymultirange,anymultirange)', + oprcode => 'multirange_intersect' }, +{ oid => '4395', oid_symbol => 'OID_RANGE_LEFT_MULTIRANGE_OP', + descr => 'is left of', + oprname => '<<', oprleft => 'anyrange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '>>(anymultirange,anyrange)', + oprcode => 'range_before_multirange', oprrest => 'multirangesel', + oprjoin => 'scalarltjoinsel' }, +{ oid => '4396', oid_symbol => 'OID_MULTIRANGE_LEFT_RANGE_OP', + descr => 'is left of', + oprname => '<<', oprleft => 'anymultirange', oprright => 'anyrange', + oprresult => 'bool', oprcom => '>>(anyrange,anymultirange)', + oprcode => 'multirange_before_range', oprrest => 'multirangesel', + oprjoin => 'scalarltjoinsel' }, +{ oid => '4397', oid_symbol => 'OID_MULTIRANGE_LEFT_MULTIRANGE_OP', + descr => 'is left of', + oprname => '<<', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '>>(anymultirange,anymultirange)', + oprcode => 'multirange_before_multirange', oprrest => 'multirangesel', + oprjoin => 'scalarltjoinsel' }, +{ oid => '4398', oid_symbol => 'OID_RANGE_RIGHT_MULTIRANGE_OP', + descr => 'is right of', + oprname => '>>', oprleft => 'anyrange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '<<(anymultirange,anyrange)', + oprcode => 'range_after_multirange', oprrest => 'multirangesel', + oprjoin => 'scalargtjoinsel' }, +{ oid => '4399', oid_symbol => 'OID_MULTIRANGE_RIGHT_RANGE_OP', + descr => 'is right of', + oprname => '>>', oprleft => 'anymultirange', oprright => 'anyrange', + oprresult => 'bool', oprcom => '<<(anyrange,anymultirange)', + oprcode => 'multirange_after_range', oprrest => 'multirangesel', + oprjoin => 'scalargtjoinsel' }, +{ oid => '4400', oid_symbol => 'OID_MULTIRANGE_RIGHT_MULTIRANGE_OP', + descr => 'is right of', + oprname => '>>', oprleft => 'anymultirange', oprright => 'anymultirange', + oprresult => 'bool', oprcom => '<<(anymultirange,anymultirange)', + oprcode => 'multirange_after_multirange', oprrest => 'multirangesel', + oprjoin => 'scalargtjoinsel' }, ] diff --git a/contrib/libs/postgresql/src/include/catalog/pg_operator.h b/contrib/libs/postgresql/src/include/catalog/pg_operator.h index 5aaa02e8a9..a40e38a5d8 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_operator.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_operator.h @@ -4,7 +4,7 @@ * definition of the "operator" system catalog (pg_operator) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -36,12 +36,12 @@ CATALOG(pg_operator,2617,OperatorRelationId) NameData oprname; /* OID of namespace containing this oper */ - Oid oprnamespace BKI_DEFAULT(PGNSP); + Oid oprnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace); /* operator owner */ - Oid oprowner BKI_DEFAULT(PGUID); + Oid oprowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid); - /* 'l', 'r', or 'b' */ + /* 'l' for prefix or 'b' for infix */ char oprkind BKI_DEFAULT(b); /* can be used in merge join? */ @@ -50,29 +50,29 @@ CATALOG(pg_operator,2617,OperatorRelationId) /* can be used in hash join? */ bool oprcanhash BKI_DEFAULT(f); - /* left arg type, or 0 if 'l' oprkind */ - Oid oprleft BKI_LOOKUP(pg_type); + /* left arg type, or 0 if prefix operator */ + Oid oprleft BKI_LOOKUP_OPT(pg_type); - /* right arg type, or 0 if 'r' oprkind */ + /* right arg type */ Oid oprright BKI_LOOKUP(pg_type); - /* result datatype */ - Oid oprresult 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(pg_operator); + 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(pg_operator); + Oid oprnegate BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_operator); - /* OID of underlying function */ - regproc oprcode BKI_LOOKUP(pg_proc); + /* 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(pg_proc); + regproc oprrest BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc); /* OID of join estimator, or 0 */ - regproc oprjoin BKI_DEFAULT(-) BKI_LOOKUP(pg_proc); + regproc oprjoin BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc); } FormData_pg_operator; /* ---------------- @@ -82,6 +82,11 @@ CATALOG(pg_operator,2617,OperatorRelationId) */ 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, diff --git a/contrib/libs/postgresql/src/include/catalog/pg_opfamily.dat b/contrib/libs/postgresql/src/include/catalog/pg_opfamily.dat index cf0fb325b3..8e480efd28 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_opfamily.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_opfamily.dat @@ -3,7 +3,7 @@ # pg_opfamily.dat # Initial contents of the pg_opfamily system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 @@ -76,6 +76,8 @@ 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', @@ -180,55 +182,127 @@ 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 index 503f0d2fd3..129102b576 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_opfamily.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_opfamily.h @@ -4,7 +4,7 @@ * definition of the "operator family" system catalog (pg_opfamily) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -37,10 +37,10 @@ CATALOG(pg_opfamily,2753,OperatorFamilyRelationId) NameData opfname; /* namespace of this opfamily */ - Oid opfnamespace BKI_DEFAULT(PGNSP); + Oid opfnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace); /* opfamily owner */ - Oid opfowner BKI_DEFAULT(PGUID); + Oid opfowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid); } FormData_pg_opfamily; /* ---------------- @@ -50,6 +50,11 @@ CATALOG(pg_opfamily,2753,OperatorFamilyRelationId) */ 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) \ diff --git a/contrib/libs/postgresql/src/include/catalog/pg_partitioned_table.h b/contrib/libs/postgresql/src/include/catalog/pg_partitioned_table.h index a73cd0d3a4..48cbaf30ff 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_partitioned_table.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_partitioned_table.h @@ -5,7 +5,7 @@ * (pg_partitioned_table) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -29,11 +29,11 @@ */ CATALOG(pg_partitioned_table,3350,PartitionedRelationId) { - Oid partrelid; /* partitioned table oid */ + Oid partrelid BKI_LOOKUP(pg_class); /* partitioned table oid */ char partstrat; /* partitioning strategy */ int16 partnatts; /* number of partition key columns */ - Oid partdefid; /* default partition oid; InvalidOid if there - * isn't one */ + 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 @@ -41,13 +41,17 @@ CATALOG(pg_partitioned_table,3350,PartitionedRelationId) * 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; /* each member of the array is the attribute - * number of a partition key column, or 0 if - * the column is actually an expression */ + 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; /* operator class to compare keys */ - oidvector partcollation; /* user-specified collation for keys */ + 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 @@ -60,4 +64,12 @@ CATALOG(pg_partitioned_table,3350,PartitionedRelationId) */ 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_policy.h b/contrib/libs/postgresql/src/include/catalog/pg_policy.h index 97954cdc8a..645b8fe498 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_policy.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_policy.h @@ -4,7 +4,7 @@ * definition of the "policy" system catalog (pg_policy) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -30,13 +30,14 @@ CATALOG(pg_policy,3256,PolicyRelationId) { Oid oid; /* oid */ NameData polname; /* Policy name. */ - Oid polrelid; /* Oid of the relation with policy. */ + 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 - Oid polroles[1] BKI_FORCE_NOT_NULL; /* Roles associated with - * policy */ + /* 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 @@ -49,4 +50,11 @@ CATALOG(pg_policy,3256,PolicyRelationId) */ 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_proc.dat b/contrib/libs/postgresql/src/include/catalog/pg_proc.dat index c2287273a9..79669bf5a2 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_proc.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_proc.dat @@ -3,7 +3,7 @@ # pg_proc.dat # Initial contents of the pg_proc system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # # src/include/catalog/pg_proc.dat @@ -327,10 +327,6 @@ { oid => '110', descr => 'I/O', proname => 'unknownout', prorettype => 'cstring', proargtypes => 'unknown', prosrc => 'unknownout' }, -{ oid => '111', - descr => 'implementation of deprecated ! and !! factorial operators', - proname => 'numeric_fac', prorettype => 'numeric', proargtypes => 'int8', - prosrc => 'numeric_fac' }, { oid => '115', proname => 'box_above_eq', prorettype => 'bool', proargtypes => 'box box', @@ -699,11 +695,11 @@ proname => 'dlog1', prorettype => 'float8', proargtypes => 'float8', prosrc => 'dlog1' }, { oid => '235', descr => 'convert int2 to float8', - proname => 'float8', prorettype => 'float8', proargtypes => 'int2', - prosrc => 'i2tod' }, + proname => 'float8', proleakproof => 't', prorettype => 'float8', + proargtypes => 'int2', prosrc => 'i2tod' }, { oid => '236', descr => 'convert int2 to float4', - proname => 'float4', prorettype => 'float4', proargtypes => 'int2', - prosrc => 'i2tof' }, + proname => 'float4', proleakproof => 't', prorettype => 'float4', + proargtypes => 'int2', prosrc => 'i2tof' }, { oid => '237', descr => 'convert float8 to int2', proname => 'int2', prorettype => 'int2', proargtypes => 'float8', prosrc => 'dtoi2' }, @@ -880,33 +876,32 @@ proargtypes => 'float8 float8 float8 int4', prosrc => 'width_bucket_float8' }, { oid => '311', descr => 'convert float4 to float8', - proname => 'float8', prorettype => 'float8', proargtypes => 'float4', - prosrc => 'ftod' }, + proname => 'float8', proleakproof => 't', prorettype => 'float8', + proargtypes => 'float4', prosrc => 'ftod' }, { oid => '312', descr => 'convert float8 to float4', proname => 'float4', prorettype => 'float4', proargtypes => 'float8', prosrc => 'dtof' }, { oid => '313', descr => 'convert int2 to int4', - proname => 'int4', prorettype => 'int4', proargtypes => 'int2', - prosrc => 'i2toi4' }, + proname => 'int4', proleakproof => 't', prorettype => 'int4', + proargtypes => 'int2', prosrc => 'i2toi4' }, { oid => '314', descr => 'convert int4 to int2', proname => 'int2', prorettype => 'int2', proargtypes => 'int4', prosrc => 'i4toi2' }, { oid => '316', descr => 'convert int4 to float8', - proname => 'float8', prorettype => 'float8', proargtypes => 'int4', - prosrc => 'i4tod' }, + proname => 'float8', proleakproof => 't', prorettype => 'float8', + proargtypes => 'int4', prosrc => 'i4tod' }, { oid => '317', descr => 'convert float8 to int4', proname => 'int4', prorettype => 'int4', proargtypes => 'float8', prosrc => 'dtoi4' }, { oid => '318', descr => 'convert int4 to float4', - proname => 'float4', prorettype => 'float4', proargtypes => 'int4', - prosrc => 'i4tof' }, + proname => 'float4', proleakproof => 't', prorettype => 'float4', + proargtypes => 'int4', prosrc => 'i4tof' }, { oid => '319', descr => 'convert float4 to int4', proname => 'int4', prorettype => 'int4', proargtypes => 'float4', prosrc => 'ftoi4' }, # Table access method handlers -{ oid => '3', oid_symbol => 'HEAP_TABLE_AM_HANDLER_OID', - descr => 'row-oriented heap table access method handler', +{ oid => '3', descr => 'row-oriented heap table access method handler', proname => 'heap_tableam_handler', provolatile => 'v', prorettype => 'table_am_handler', proargtypes => 'internal', prosrc => 'heap_tableam_handler' }, @@ -1151,17 +1146,17 @@ proname => 'text', prorettype => 'text', proargtypes => 'bpchar', prosrc => 'rtrim1' }, { oid => '406', descr => 'convert name to text', - proname => 'text', prorettype => 'text', proargtypes => 'name', - prosrc => 'name_text' }, + proname => 'text', proleakproof => 't', prorettype => 'text', + proargtypes => 'name', prosrc => 'name_text' }, { oid => '407', descr => 'convert text to name', - proname => 'name', prorettype => 'name', proargtypes => 'text', - prosrc => 'text_name' }, + proname => 'name', proleakproof => 't', prorettype => 'name', + proargtypes => 'text', prosrc => 'text_name' }, { oid => '408', descr => 'convert name to char(n)', proname => 'bpchar', prorettype => 'bpchar', proargtypes => 'name', prosrc => 'name_bpchar' }, { oid => '409', descr => 'convert char(n) to name', - proname => 'name', prorettype => 'name', proargtypes => 'bpchar', - prosrc => 'bpchar_name' }, + proname => 'name', proleakproof => 't', prorettype => 'name', + proargtypes => 'bpchar', prosrc => 'bpchar_name' }, { oid => '449', descr => 'hash', proname => 'hashint2', prorettype => 'int4', proargtypes => 'int2', @@ -1339,11 +1334,11 @@ proname => 'int4', prorettype => 'int4', proargtypes => 'int8', prosrc => 'int84' }, { oid => '481', descr => 'convert int4 to int8', - proname => 'int8', prorettype => 'int8', proargtypes => 'int4', - prosrc => 'int48' }, + proname => 'int8', proleakproof => 't', prorettype => 'int8', + proargtypes => 'int4', prosrc => 'int48' }, { oid => '482', descr => 'convert int8 to float8', - proname => 'float8', prorettype => 'float8', proargtypes => 'int8', - prosrc => 'i8tod' }, + proname => 'float8', proleakproof => 't', prorettype => 'float8', + proargtypes => 'int8', prosrc => 'i8tod' }, { oid => '483', descr => 'convert float8 to int8', proname => 'int8', prorettype => 'int8', proargtypes => 'float8', prosrc => 'dtoi8' }, @@ -1360,8 +1355,8 @@ proargtypes => 'anyarray int8', prosrc => 'hash_array_extended' }, { oid => '652', descr => 'convert int8 to float4', - proname => 'float4', prorettype => 'float4', proargtypes => 'int8', - prosrc => 'i8tof' }, + proname => 'float4', proleakproof => 't', prorettype => 'float4', + proargtypes => 'int8', prosrc => 'i8tof' }, { oid => '653', descr => 'convert float4 to int8', proname => 'int8', prorettype => 'int8', proargtypes => 'float4', prosrc => 'ftoi8' }, @@ -1370,8 +1365,8 @@ proname => 'int2', prorettype => 'int2', proargtypes => 'int8', prosrc => 'int82' }, { oid => '754', descr => 'convert int2 to int8', - proname => 'int8', prorettype => 'int8', proargtypes => 'int2', - prosrc => 'int28' }, + proname => 'int8', proleakproof => 't', prorettype => 'int8', + proargtypes => 'int2', prosrc => 'int28' }, { oid => '655', proname => 'namelt', proleakproof => 't', prorettype => 'bool', @@ -1451,6 +1446,9 @@ { oid => '752', descr => 'substitute portion of string', proname => 'overlay', prorettype => 'bytea', proargtypes => 'bytea bytea int4', prosrc => 'byteaoverlay_no_len' }, +{ oid => '6163', descr => 'number of set bits', + proname => 'bit_count', prorettype => 'int8', proargtypes => 'bytea', + prosrc => 'bytea_bit_count' }, { oid => '725', proname => 'dist_pl', prorettype => 'float8', proargtypes => 'point line', @@ -1553,24 +1551,37 @@ proname => 'cardinality', prorettype => 'int4', proargtypes => 'anyarray', prosrc => 'array_cardinality' }, { oid => '378', descr => 'append element onto end of array', - proname => 'array_append', proisstrict => 'f', prorettype => 'anyarray', - proargtypes => 'anyarray anyelement', prosrc => 'array_append' }, + proname => 'array_append', proisstrict => 'f', + prorettype => 'anycompatiblearray', + proargtypes => 'anycompatiblearray anycompatible', prosrc => 'array_append' }, { oid => '379', descr => 'prepend element onto front of array', - proname => 'array_prepend', proisstrict => 'f', prorettype => 'anyarray', - proargtypes => 'anyelement anyarray', prosrc => 'array_prepend' }, + proname => 'array_prepend', proisstrict => 'f', + prorettype => 'anycompatiblearray', + proargtypes => 'anycompatible anycompatiblearray', + prosrc => 'array_prepend' }, { oid => '383', - proname => 'array_cat', proisstrict => 'f', prorettype => 'anyarray', - proargtypes => 'anyarray anyarray', prosrc => 'array_cat' }, -{ oid => '394', descr => 'split delimited text into text[]', + proname => 'array_cat', proisstrict => 'f', + prorettype => 'anycompatiblearray', + proargtypes => 'anycompatiblearray anycompatiblearray', + prosrc => 'array_cat' }, +{ oid => '394', descr => 'split delimited text', proname => 'string_to_array', proisstrict => 'f', prorettype => '_text', proargtypes => 'text text', prosrc => 'text_to_array' }, +{ oid => '376', descr => 'split delimited text, with null string', + proname => 'string_to_array', proisstrict => 'f', prorettype => '_text', + proargtypes => 'text text text', prosrc => 'text_to_array_null' }, +{ oid => '6160', descr => 'split delimited text', + proname => 'string_to_table', prorows => '1000', proisstrict => 'f', + proretset => 't', prorettype => 'text', proargtypes => 'text text', + prosrc => 'text_to_table' }, +{ oid => '6161', descr => 'split delimited text, with null string', + proname => 'string_to_table', prorows => '1000', proisstrict => 'f', + proretset => 't', prorettype => 'text', proargtypes => 'text text text', + prosrc => 'text_to_table_null' }, { oid => '395', descr => 'concatenate array elements, using delimiter, into text', proname => 'array_to_string', provolatile => 's', prorettype => 'text', proargtypes => 'anyarray text', prosrc => 'array_to_text' }, -{ oid => '376', descr => 'split delimited text into text[], with null string', - proname => 'string_to_array', proisstrict => 'f', prorettype => '_text', - proargtypes => 'text text text', prosrc => 'text_to_array_null' }, { oid => '384', descr => 'concatenate array elements, using delimiter and null string, into text', proname => 'array_to_string', proisstrict => 'f', provolatile => 's', @@ -1584,15 +1595,18 @@ proargtypes => 'anyarray anyarray', prosrc => 'array_smaller' }, { oid => '3277', descr => 'returns an offset of value in array', proname => 'array_position', proisstrict => 'f', prorettype => 'int4', - proargtypes => 'anyarray anyelement', prosrc => 'array_position' }, + proargtypes => 'anycompatiblearray anycompatible', + prosrc => 'array_position' }, { oid => '3278', descr => 'returns an offset of value in array with start index', proname => 'array_position', proisstrict => 'f', prorettype => 'int4', - proargtypes => 'anyarray anyelement int4', prosrc => 'array_position_start' }, + proargtypes => 'anycompatiblearray anycompatible int4', + prosrc => 'array_position_start' }, { oid => '3279', descr => 'returns an array of offsets of some value in array', proname => 'array_positions', proisstrict => 'f', prorettype => '_int4', - proargtypes => 'anyarray anyelement', prosrc => 'array_positions' }, + proargtypes => 'anycompatiblearray anycompatible', + prosrc => 'array_positions' }, { oid => '1191', descr => 'array subscripts generator', proname => 'generate_subscripts', prorows => '1000', proretset => 't', prorettype => 'int4', proargtypes => 'anyarray int4 bool', @@ -1617,11 +1631,14 @@ proargtypes => 'internal', prosrc => 'array_unnest_support' }, { oid => '3167', descr => 'remove any occurrences of an element from an array', - proname => 'array_remove', proisstrict => 'f', prorettype => 'anyarray', - proargtypes => 'anyarray anyelement', prosrc => 'array_remove' }, + proname => 'array_remove', proisstrict => 'f', + prorettype => 'anycompatiblearray', + proargtypes => 'anycompatiblearray anycompatible', prosrc => 'array_remove' }, { oid => '3168', descr => 'replace any occurrences of an element in an array', - proname => 'array_replace', proisstrict => 'f', prorettype => 'anyarray', - proargtypes => 'anyarray anyelement anyelement', prosrc => 'array_replace' }, + proname => 'array_replace', proisstrict => 'f', + prorettype => 'anycompatiblearray', + proargtypes => 'anycompatiblearray anycompatible anycompatible', + prosrc => 'array_replace' }, { oid => '2333', descr => 'aggregate transition function', proname => 'array_agg_transfn', proisstrict => 'f', prorettype => 'internal', proargtypes => 'internal anynonarray', prosrc => 'array_agg_transfn' }, @@ -1647,7 +1664,11 @@ { oid => '3218', descr => 'bucket number of operand given a sorted array of bucket lower bounds', proname => 'width_bucket', prorettype => 'int4', - proargtypes => 'anyelement anyarray', prosrc => 'width_bucket_array' }, + proargtypes => 'anycompatible anycompatiblearray', + prosrc => 'width_bucket_array' }, +{ oid => '6172', descr => 'remove last N elements of array', + proname => 'trim_array', prorettype => 'anyarray', + proargtypes => 'anyarray int4', prosrc => 'trim_array' }, { oid => '3816', descr => 'array typanalyze', proname => 'array_typanalyze', provolatile => 's', prorettype => 'bool', proargtypes => 'internal', prosrc => 'array_typanalyze' }, @@ -2318,9 +2339,15 @@ { oid => '1171', descr => 'extract field from timestamp with time zone', proname => 'date_part', provolatile => 's', prorettype => 'float8', proargtypes => 'text timestamptz', prosrc => 'timestamptz_part' }, +{ oid => '6203', descr => 'extract field from timestamp with time zone', + proname => 'extract', provolatile => 's', prorettype => 'numeric', + proargtypes => 'text timestamptz', prosrc => 'extract_timestamptz' }, { oid => '1172', descr => 'extract field from interval', proname => 'date_part', prorettype => 'float8', proargtypes => 'text interval', prosrc => 'interval_part' }, +{ oid => '6204', descr => 'extract field from interval', + proname => 'extract', prorettype => 'numeric', proargtypes => 'text interval', + prosrc => 'extract_interval' }, { oid => '1174', descr => 'convert date to timestamp with time zone', proname => 'timestamptz', provolatile => 's', prorettype => 'timestamptz', proargtypes => 'date', prosrc => 'date_timestamptz' }, @@ -2337,7 +2364,7 @@ { oid => '1176', descr => 'convert date and time to timestamp with time zone', proname => 'timestamptz', prolang => 'sql', provolatile => 's', prorettype => 'timestamptz', proargtypes => 'date time', - prosrc => 'select cast(($1 + $2) as timestamp with time zone)' }, + prosrc => 'see system_functions.sql' }, { oid => '1178', descr => 'convert timestamp with time zone to date', proname => 'date', provolatile => 's', prorettype => 'date', proargtypes => 'timestamptz', prosrc => 'timestamptz_date' }, @@ -2390,16 +2417,16 @@ { oid => '1215', descr => 'get description for object id and catalog name', proname => 'obj_description', prolang => 'sql', procost => '100', provolatile => 's', prorettype => 'text', proargtypes => 'oid name', - prosrc => 'select description from pg_catalog.pg_description where objoid = $1 and classoid = (select oid from pg_catalog.pg_class where relname = $2 and relnamespace = PGNSP) and objsubid = 0' }, + prosrc => 'see system_functions.sql' }, { oid => '1216', descr => 'get description for table column', proname => 'col_description', prolang => 'sql', procost => '100', provolatile => 's', prorettype => 'text', proargtypes => 'oid int4', - prosrc => 'select description from pg_catalog.pg_description where objoid = $1 and classoid = \'pg_catalog.pg_class\'::pg_catalog.regclass and objsubid = $2' }, + prosrc => 'see system_functions.sql' }, { oid => '1993', descr => 'get description for object id and shared catalog name', proname => 'shobj_description', prolang => 'sql', procost => '100', provolatile => 's', prorettype => 'text', proargtypes => 'oid name', - prosrc => 'select description from pg_catalog.pg_shdescription where objoid = $1 and classoid = (select oid from pg_catalog.pg_class where relname = $2 and relnamespace = PGNSP)' }, + prosrc => 'see system_functions.sql' }, { oid => '1217', descr => 'truncate timestamp with time zone to specified units', @@ -2468,6 +2495,9 @@ { oid => '1273', descr => 'extract field from time with time zone', proname => 'date_part', prorettype => 'float8', proargtypes => 'text timetz', prosrc => 'timetz_part' }, +{ oid => '6201', descr => 'extract field from time with time zone', + proname => 'extract', prorettype => 'numeric', proargtypes => 'text timetz', + prosrc => 'extract_timetz' }, { oid => '1274', proname => 'int84pl', prorettype => 'int8', proargtypes => 'int8 int4', prosrc => 'int84pl' }, @@ -2522,8 +2552,8 @@ proname => 'oid', prorettype => 'oid', proargtypes => 'int8', prosrc => 'i8tooid' }, { oid => '1288', descr => 'convert oid to int8', - proname => 'int8', prorettype => 'int8', proargtypes => 'oid', - prosrc => 'oidtoi8' }, + proname => 'int8', proleakproof => 't', prorettype => 'int8', + proargtypes => 'oid', prosrc => 'oidtoi8' }, { oid => '1291', descr => 'trigger to suppress updates when new and old records match', @@ -2534,9 +2564,6 @@ { oid => '1292', proname => 'tideq', proleakproof => 't', prorettype => 'bool', proargtypes => 'tid tid', prosrc => 'tideq' }, -{ oid => '1293', descr => 'latest tid of a tuple', - proname => 'currtid', provolatile => 'v', proparallel => 'u', - prorettype => 'tid', proargtypes => 'oid tid', prosrc => 'currtid_byreloid' }, { oid => '1294', descr => 'latest tid of a tuple', proname => 'currtid2', provolatile => 'v', proparallel => 'u', prorettype => 'tid', proargtypes => 'text tid', @@ -2574,13 +2601,13 @@ { oid => '1296', proname => 'timedate_pl', prolang => 'sql', prorettype => 'timestamp', - proargtypes => 'time date', prosrc => 'select ($2 + $1)' }, + proargtypes => 'time date', prosrc => 'see system_functions.sql' }, { oid => '1297', proname => 'datetimetz_pl', prorettype => 'timestamptz', proargtypes => 'date timetz', prosrc => 'datetimetz_timestamptz' }, { oid => '1298', proname => 'timetzdate_pl', prolang => 'sql', prorettype => 'timestamptz', - proargtypes => 'timetz date', prosrc => 'select ($2 + $1)' }, + proargtypes => 'timetz date', prosrc => 'see system_functions.sql' }, { oid => '1299', descr => 'current transaction time', proname => 'now', provolatile => 's', prorettype => 'timestamptz', proargtypes => '', prosrc => 'now' }, @@ -2624,17 +2651,17 @@ proname => 'overlaps', prolang => 'sql', proisstrict => 'f', provolatile => 's', prorettype => 'bool', proargtypes => 'timestamptz interval timestamptz interval', - prosrc => 'select ($1, ($1 + $2)) overlaps ($3, ($3 + $4))' }, + prosrc => 'see system_functions.sql' }, { oid => '1306', descr => 'intervals overlap?', proname => 'overlaps', prolang => 'sql', proisstrict => 'f', provolatile => 's', prorettype => 'bool', proargtypes => 'timestamptz timestamptz timestamptz interval', - prosrc => 'select ($1, $2) overlaps ($3, ($3 + $4))' }, + prosrc => 'see system_functions.sql' }, { oid => '1307', descr => 'intervals overlap?', proname => 'overlaps', prolang => 'sql', proisstrict => 'f', provolatile => 's', prorettype => 'bool', proargtypes => 'timestamptz interval timestamptz timestamptz', - prosrc => 'select ($1, ($1 + $2)) overlaps ($3, $4)' }, + prosrc => 'see system_functions.sql' }, { oid => '1308', descr => 'intervals overlap?', proname => 'overlaps', proisstrict => 'f', prorettype => 'bool', @@ -2642,15 +2669,15 @@ { oid => '1309', descr => 'intervals overlap?', proname => 'overlaps', prolang => 'sql', proisstrict => 'f', prorettype => 'bool', proargtypes => 'time interval time interval', - prosrc => 'select ($1, ($1 + $2)) overlaps ($3, ($3 + $4))' }, + prosrc => 'see system_functions.sql' }, { oid => '1310', descr => 'intervals overlap?', proname => 'overlaps', prolang => 'sql', proisstrict => 'f', prorettype => 'bool', proargtypes => 'time time time interval', - prosrc => 'select ($1, $2) overlaps ($3, ($3 + $4))' }, + prosrc => 'see system_functions.sql' }, { oid => '1311', descr => 'intervals overlap?', proname => 'overlaps', prolang => 'sql', proisstrict => 'f', prorettype => 'bool', proargtypes => 'time interval time time', - prosrc => 'select ($1, ($1 + $2)) overlaps ($3, $4)' }, + prosrc => 'see system_functions.sql' }, { oid => '1312', descr => 'I/O', proname => 'timestamp_in', provolatile => 's', prorettype => 'timestamp', @@ -2731,7 +2758,7 @@ { oid => '1348', descr => 'deprecated, use two-argument form instead', proname => 'obj_description', prolang => 'sql', procost => '100', provolatile => 's', prorettype => 'text', proargtypes => 'oid', - prosrc => 'select description from pg_catalog.pg_description where objoid = $1 and objsubid = 0' }, + prosrc => 'see system_functions.sql' }, { oid => '1349', descr => 'print type names of oidvector field', proname => 'oidvectortypes', provolatile => 's', prorettype => 'text', @@ -2783,8 +2810,8 @@ prosrc => 'textlen' }, { oid => '1370', descr => 'convert time to interval', - proname => 'interval', prorettype => 'interval', proargtypes => 'time', - prosrc => 'time_interval' }, + proname => 'interval', proleakproof => 't', prorettype => 'interval', + proargtypes => 'time', prosrc => 'time_interval' }, { oid => '1372', descr => 'character length', proname => 'char_length', prorettype => 'int4', proargtypes => 'bpchar', prosrc => 'bpcharlen' }, @@ -2814,16 +2841,21 @@ { oid => '1384', descr => 'extract field from date', proname => 'date_part', prolang => 'sql', prorettype => 'float8', - proargtypes => 'text date', - prosrc => 'select pg_catalog.date_part($1, cast($2 as timestamp without time zone))' }, + proargtypes => 'text date', prosrc => 'see system_functions.sql' }, +{ oid => '6199', descr => 'extract field from date', + proname => 'extract', prorettype => 'numeric', proargtypes => 'text date', + prosrc => 'extract_date' }, { oid => '1385', descr => 'extract field from time', proname => 'date_part', prorettype => 'float8', proargtypes => 'text time', prosrc => 'time_part' }, +{ oid => '6200', descr => 'extract field from time', + proname => 'extract', prorettype => 'numeric', proargtypes => 'text time', + prosrc => 'extract_time' }, { oid => '1386', descr => 'date difference from today preserving months and years', proname => 'age', prolang => 'sql', provolatile => 's', prorettype => 'interval', proargtypes => 'timestamptz', - prosrc => 'select pg_catalog.age(cast(current_date as timestamp with time zone), $1)' }, + prosrc => 'see system_functions.sql' }, { oid => '1388', descr => 'convert timestamp with time zone to time with time zone', @@ -2862,11 +2894,11 @@ # OIDS 1400 - 1499 { oid => '1400', descr => 'convert varchar to name', - proname => 'name', prorettype => 'name', proargtypes => 'varchar', - prosrc => 'text_name' }, + proname => 'name', proleakproof => 't', prorettype => 'name', + proargtypes => 'varchar', prosrc => 'text_name' }, { oid => '1401', descr => 'convert name to varchar', - proname => 'varchar', prorettype => 'varchar', proargtypes => 'name', - prosrc => 'name_text' }, + proname => 'varchar', proleakproof => 't', prorettype => 'varchar', + proargtypes => 'name', prosrc => 'name_text' }, { oid => '1402', descr => 'current schema name', proname => 'current_schema', provolatile => 's', proparallel => 'u', @@ -2937,7 +2969,7 @@ prosrc => 'box_div' }, { oid => '1426', proname => 'path_contain_pt', prolang => 'sql', prorettype => 'bool', - proargtypes => 'path point', prosrc => 'select pg_catalog.on_ppath($2, $1)' }, + proargtypes => 'path point', prosrc => 'see system_functions.sql' }, { oid => '1428', proname => 'poly_contain_pt', prorettype => 'bool', proargtypes => 'polygon point', prosrc => 'poly_contain_pt' }, @@ -3197,7 +3229,7 @@ prosrc => 'circle_center' }, { oid => '1544', descr => 'convert circle to 12-vertex polygon', proname => 'polygon', prolang => 'sql', prorettype => 'polygon', - proargtypes => 'circle', prosrc => 'select pg_catalog.polygon(12, $1)' }, + proargtypes => 'circle', prosrc => 'see system_functions.sql' }, { oid => '1545', descr => 'number of points', proname => 'npoints', prorettype => 'int4', proargtypes => 'path', prosrc => 'path_npoints' }, @@ -3493,12 +3525,10 @@ prosrc => 'translate' }, { oid => '879', descr => 'left-pad string to length', proname => 'lpad', prolang => 'sql', prorettype => 'text', - proargtypes => 'text int4', - prosrc => 'select pg_catalog.lpad($1, $2, \' \')' }, + proargtypes => 'text int4', prosrc => 'see system_functions.sql' }, { oid => '880', descr => 'right-pad string to length', proname => 'rpad', prolang => 'sql', prorettype => 'text', - proargtypes => 'text int4', - prosrc => 'select pg_catalog.rpad($1, $2, \' \')' }, + proargtypes => 'text int4', prosrc => 'see system_functions.sql' }, { oid => '881', descr => 'trim spaces from left end of string', proname => 'ltrim', prorettype => 'text', proargtypes => 'text', prosrc => 'ltrim1' }, @@ -3547,7 +3577,7 @@ prosrc => 'regexp_matches' }, { oid => '2088', descr => 'split string by field_sep and return field_num', proname => 'split_part', prorettype => 'text', - proargtypes => 'text text int4', prosrc => 'split_text' }, + proargtypes => 'text text int4', prosrc => 'split_part' }, { oid => '2765', descr => 'split string by pattern', proname => 'regexp_split_to_table', prorows => '1000', proretset => 't', prorettype => 'text', proargtypes => 'text text', @@ -3640,6 +3670,14 @@ proname => 'pg_get_statisticsobjdef', provolatile => 's', prorettype => 'text', proargtypes => 'oid', prosrc => 'pg_get_statisticsobjdef' }, +{ oid => '6174', descr => 'extended statistics columns', + proname => 'pg_get_statisticsobjdef_columns', provolatile => 's', + prorettype => 'text', proargtypes => 'oid', + prosrc => 'pg_get_statisticsobjdef_columns' }, +{ oid => '6173', descr => 'extended statistics expressions', + proname => 'pg_get_statisticsobjdef_expressions', provolatile => 's', + prorettype => '_text', proargtypes => 'oid', + prosrc => 'pg_get_statisticsobjdef_expressions' }, { oid => '3352', descr => 'partition key description', proname => 'pg_get_partkeydef', provolatile => 's', prorettype => 'text', proargtypes => 'oid', prosrc => 'pg_get_partkeydef' }, @@ -3677,14 +3715,28 @@ proname => 'pg_get_function_arg_default', provolatile => 's', prorettype => 'text', proargtypes => 'oid int4', prosrc => 'pg_get_function_arg_default' }, +{ oid => '6197', descr => 'function SQL body', + proname => 'pg_get_function_sqlbody', provolatile => 's', + prorettype => 'text', proargtypes => 'oid', + prosrc => 'pg_get_function_sqlbody' }, { oid => '1686', descr => 'list of SQL keywords', - proname => 'pg_get_keywords', procost => '10', prorows => '400', + proname => 'pg_get_keywords', procost => '10', prorows => '500', proretset => 't', provolatile => 's', prorettype => 'record', - proargtypes => '', proallargtypes => '{text,char,text}', - proargmodes => '{o,o,o}', proargnames => '{word,catcode,catdesc}', + proargtypes => '', proallargtypes => '{text,char,bool,text,text}', + proargmodes => '{o,o,o,o,o}', + proargnames => '{word,catcode,barelabel,catdesc,baredesc}', prosrc => 'pg_get_keywords' }, +{ oid => '6159', descr => 'list of catalog foreign key relationships', + proname => 'pg_get_catalog_foreign_keys', procost => '10', prorows => '250', + proretset => 't', provolatile => 's', prorettype => 'record', + proargtypes => '', + proallargtypes => '{regclass,_text,regclass,_text,bool,bool}', + proargmodes => '{o,o,o,o,o,o}', + proargnames => '{fktable,fkcols,pktable,pkcols,is_array,is_opt}', + prosrc => 'pg_get_catalog_foreign_keys' }, + { oid => '2289', descr => 'convert generic options array to name/value table', proname => 'pg_options_to_table', prorows => '3', proretset => 't', provolatile => 's', prorettype => 'record', proargtypes => '_text', @@ -3852,6 +3904,9 @@ { oid => '3033', descr => 'set bit', proname => 'set_bit', prorettype => 'bit', proargtypes => 'bit int4 int4', prosrc => 'bitsetbit' }, +{ oid => '6162', descr => 'number of set bits', + proname => 'bit_count', prorettype => 'int8', proargtypes => 'bit', + prosrc => 'bit_bit_count' }, # for macaddr type support { oid => '436', descr => 'I/O', @@ -3942,8 +3997,8 @@ proname => 'macaddr8_or', prorettype => 'macaddr8', proargtypes => 'macaddr8 macaddr8', prosrc => 'macaddr8_or' }, { oid => '4123', descr => 'convert macaddr to macaddr8', - proname => 'macaddr8', prorettype => 'macaddr8', proargtypes => 'macaddr', - prosrc => 'macaddrtomacaddr8' }, + proname => 'macaddr8', proleakproof => 't', prorettype => 'macaddr8', + proargtypes => 'macaddr', prosrc => 'macaddrtomacaddr8' }, { oid => '4124', descr => 'convert macaddr8 to macaddr', proname => 'macaddr', prorettype => 'macaddr', proargtypes => 'macaddr8', prosrc => 'macaddr8tomacaddr' }, @@ -4069,10 +4124,12 @@ prosrc => 'inet_client_port' }, { oid => '2198', descr => 'inet address of the server', proname => 'inet_server_addr', proisstrict => 'f', provolatile => 's', - prorettype => 'inet', proargtypes => '', prosrc => 'inet_server_addr' }, + proparallel => 'r', prorettype => 'inet', proargtypes => '', + prosrc => 'inet_server_addr' }, { oid => '2199', descr => 'server\'s port number for this connection', proname => 'inet_server_port', proisstrict => 'f', provolatile => 's', - prorettype => 'int4', proargtypes => '', prosrc => 'inet_server_port' }, + proparallel => 'r', prorettype => 'int4', proargtypes => '', + prosrc => 'inet_server_port' }, { oid => '2627', proname => 'inetnot', prorettype => 'inet', proargtypes => 'inet', @@ -4088,7 +4145,7 @@ prosrc => 'inetpl' }, { oid => '2631', proname => 'int8pl_inet', prolang => 'sql', prorettype => 'inet', - proargtypes => 'int8 inet', prosrc => 'select $2 + $1' }, + proargtypes => 'int8 inet', prosrc => 'see system_functions.sql' }, { oid => '2632', proname => 'inetmi_int8', prorettype => 'inet', proargtypes => 'inet int8', prosrc => 'inetmi_int8' }, @@ -4220,13 +4277,13 @@ prosrc => 'numeric_round' }, { oid => '1708', descr => 'value rounded to \'scale\' of zero', proname => 'round', prolang => 'sql', prorettype => 'numeric', - proargtypes => 'numeric', prosrc => 'select pg_catalog.round($1,0)' }, + proargtypes => 'numeric', prosrc => 'see system_functions.sql' }, { oid => '1709', descr => 'value truncated to \'scale\'', proname => 'trunc', prorettype => 'numeric', proargtypes => 'numeric int4', prosrc => 'numeric_trunc' }, { oid => '1710', descr => 'value truncated to \'scale\' of zero', proname => 'trunc', prolang => 'sql', prorettype => 'numeric', - proargtypes => 'numeric', prosrc => 'select pg_catalog.trunc($1,0)' }, + proargtypes => 'numeric', prosrc => 'see system_functions.sql' }, { oid => '1711', descr => 'nearest integer >= value', proname => 'ceil', prorettype => 'numeric', proargtypes => 'numeric', prosrc => 'numeric_ceil' }, @@ -4322,20 +4379,20 @@ proname => 'trim_scale', prorettype => 'numeric', proargtypes => 'numeric', prosrc => 'numeric_trim_scale' }, { oid => '1740', descr => 'convert int4 to numeric', - proname => 'numeric', prorettype => 'numeric', proargtypes => 'int4', - prosrc => 'int4_numeric' }, + proname => 'numeric', proleakproof => 't', prorettype => 'numeric', + proargtypes => 'int4', prosrc => 'int4_numeric' }, { oid => '1741', descr => 'base 10 logarithm', proname => 'log', prolang => 'sql', prorettype => 'numeric', - proargtypes => 'numeric', prosrc => 'select pg_catalog.log(10, $1)' }, + proargtypes => 'numeric', prosrc => 'see system_functions.sql' }, { oid => '1481', descr => 'base 10 logarithm', proname => 'log10', prolang => 'sql', prorettype => 'numeric', - proargtypes => 'numeric', prosrc => 'select pg_catalog.log(10, $1)' }, + proargtypes => 'numeric', prosrc => 'see system_functions.sql' }, { oid => '1742', descr => 'convert float4 to numeric', - proname => 'numeric', prorettype => 'numeric', proargtypes => 'float4', - prosrc => 'float4_numeric' }, + proname => 'numeric', proleakproof => 't', prorettype => 'numeric', + proargtypes => 'float4', prosrc => 'float4_numeric' }, { oid => '1743', descr => 'convert float8 to numeric', - proname => 'numeric', prorettype => 'numeric', proargtypes => 'float8', - prosrc => 'float8_numeric' }, + proname => 'numeric', proleakproof => 't', prorettype => 'numeric', + proargtypes => 'float8', prosrc => 'float8_numeric' }, { oid => '1744', descr => 'convert numeric to int4', proname => 'int4', prorettype => 'int4', proargtypes => 'numeric', prosrc => 'numeric_int4' }, @@ -4391,14 +4448,17 @@ proname => 'int8', prorettype => 'int8', proargtypes => 'numeric', prosrc => 'numeric_int8' }, { oid => '1781', descr => 'convert int8 to numeric', - proname => 'numeric', prorettype => 'numeric', proargtypes => 'int8', - prosrc => 'int8_numeric' }, + proname => 'numeric', proleakproof => 't', prorettype => 'numeric', + proargtypes => 'int8', prosrc => 'int8_numeric' }, { oid => '1782', descr => 'convert int2 to numeric', - proname => 'numeric', prorettype => 'numeric', proargtypes => 'int2', - prosrc => 'int2_numeric' }, + proname => 'numeric', proleakproof => 't', prorettype => 'numeric', + proargtypes => 'int2', prosrc => 'int2_numeric' }, { oid => '1783', descr => 'convert numeric to int2', proname => 'int2', prorettype => 'int2', proargtypes => 'numeric', prosrc => 'numeric_int2' }, +{ oid => '6103', descr => 'convert numeric to pg_lsn', + proname => 'pg_lsn', prorettype => 'pg_lsn', proargtypes => 'numeric', + prosrc => 'numeric_pg_lsn' }, { oid => '3556', descr => 'convert jsonb to boolean', proname => 'bool', prorettype => 'bool', proargtypes => 'jsonb', @@ -4510,13 +4570,13 @@ { oid => '1810', descr => 'length in bits', proname => 'bit_length', prolang => 'sql', prorettype => 'int4', - proargtypes => 'bytea', prosrc => 'select pg_catalog.octet_length($1) * 8' }, + proargtypes => 'bytea', prosrc => 'see system_functions.sql' }, { oid => '1811', descr => 'length in bits', proname => 'bit_length', prolang => 'sql', prorettype => 'int4', - proargtypes => 'text', prosrc => 'select pg_catalog.octet_length($1) * 8' }, + proargtypes => 'text', prosrc => 'see system_functions.sql' }, { oid => '1812', descr => 'length in bits', proname => 'bit_length', prolang => 'sql', prorettype => 'int4', - proargtypes => 'bit', prosrc => 'select pg_catalog.length($1)' }, + proargtypes => 'bit', prosrc => 'see system_functions.sql' }, # Selectivity estimators for LIKE and related operators { oid => '1814', descr => 'restriction selectivity of ILIKE', @@ -4835,7 +4895,7 @@ { oid => '1848', proname => 'interval_pl_time', prolang => 'sql', prorettype => 'time', - proargtypes => 'interval time', prosrc => 'select $2 + $1' }, + proargtypes => 'interval time', prosrc => 'see system_functions.sql' }, { oid => '1850', proname => 'int28eq', proleakproof => 't', prorettype => 'bool', @@ -5220,9 +5280,9 @@ proname => 'pg_stat_get_activity', prorows => '100', proisstrict => 'f', proretset => 't', provolatile => 's', proparallel => 'r', prorettype => 'record', proargtypes => 'int4', - proallargtypes => '{int4,oid,int4,oid,text,text,text,text,text,timestamptz,timestamptz,timestamptz,timestamptz,inet,text,int4,xid,xid,text,bool,text,text,int4,bool,text,numeric,text,bool,text,bool,int4}', + proallargtypes => '{int4,oid,int4,oid,text,text,text,text,text,timestamptz,timestamptz,timestamptz,timestamptz,inet,text,int4,xid,xid,text,bool,text,text,int4,text,numeric,text,bool,text,bool,int4,int8}', proargmodes => '{i,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o}', - proargnames => '{pid,datid,pid,usesysid,application_name,state,query,wait_event_type,wait_event,xact_start,query_start,backend_start,state_change,client_addr,client_hostname,client_port,backend_xid,backend_xmin,backend_type,ssl,sslversion,sslcipher,sslbits,sslcompression,ssl_client_dn,ssl_client_serial,ssl_issuer_dn,gss_auth,gss_princ,gss_enc,leader_pid}', + proargnames => '{pid,datid,pid,usesysid,application_name,state,query,wait_event_type,wait_event,xact_start,query_start,backend_start,state_change,client_addr,client_hostname,client_port,backend_xid,backend_xmin,backend_type,ssl,sslversion,sslcipher,sslbits,ssl_client_dn,ssl_client_serial,ssl_issuer_dn,gss_auth,gss_princ,gss_enc,leader_pid,query_id}', prosrc => 'pg_stat_get_activity' }, { oid => '3318', descr => 'statistics: information about progress of backends running maintenance command', @@ -5249,9 +5309,18 @@ proargmodes => '{o,o,o,o,o,o,o,o,o,o,o,o,o,o,o}', proargnames => '{pid,status,receive_start_lsn,receive_start_tli,written_lsn,flushed_lsn,received_tli,last_msg_send_time,last_msg_receipt_time,latest_end_lsn,latest_end_time,slot_name,sender_host,sender_port,conninfo}', prosrc => 'pg_stat_get_wal_receiver' }, +{ oid => '6169', descr => 'statistics: information about replication slot', + proname => 'pg_stat_get_replication_slot', prorows => '1', proisstrict => 'f', + proretset => 't', provolatile => 's', proparallel => 'r', + prorettype => 'record', proargtypes => 'text', + proallargtypes => '{text,text,int8,int8,int8,int8,int8,int8,int8,int8,timestamptz}', + proargmodes => '{i,o,o,o,o,o,o,o,o,o,o}', + proargnames => '{slot_name,slot_name,spill_txns,spill_count,spill_bytes,stream_txns,stream_count,stream_bytes,total_txns,total_bytes,stats_reset}', + prosrc => 'pg_stat_get_replication_slot' }, { oid => '6118', descr => 'statistics: information about subscription', - proname => 'pg_stat_get_subscription', proisstrict => 'f', provolatile => 's', - proparallel => 'r', prorettype => 'record', proargtypes => 'oid', + proname => 'pg_stat_get_subscription', prorows => '10', proisstrict => 'f', + proretset => 't', provolatile => 's', proparallel => 'r', + prorettype => 'record', proargtypes => 'oid', proallargtypes => '{oid,oid,oid,int4,pg_lsn,timestamptz,timestamptz,pg_lsn,timestamptz}', proargmodes => '{i,o,o,o,o,o,o,o,o}', proargnames => '{subid,subid,relid,pid,received_lsn,last_msg_send_time,last_msg_receipt_time,latest_end_lsn,latest_end_time}', @@ -5414,6 +5483,38 @@ proname => 'pg_stat_get_db_blk_write_time', provolatile => 's', proparallel => 'r', prorettype => 'float8', proargtypes => 'oid', prosrc => 'pg_stat_get_db_blk_write_time' }, +{ oid => '6185', descr => 'statistics: session time, in milliseconds', + proname => 'pg_stat_get_db_session_time', provolatile => 's', + proparallel => 'r', prorettype => 'float8', proargtypes => 'oid', + prosrc => 'pg_stat_get_db_session_time' }, +{ oid => '6186', descr => 'statistics: session active time, in milliseconds', + proname => 'pg_stat_get_db_active_time', provolatile => 's', + proparallel => 'r', prorettype => 'float8', proargtypes => 'oid', + prosrc => 'pg_stat_get_db_active_time' }, +{ oid => '6187', + descr => 'statistics: session idle in transaction time, in milliseconds', + proname => 'pg_stat_get_db_idle_in_transaction_time', provolatile => 's', + proparallel => 'r', prorettype => 'float8', proargtypes => 'oid', + prosrc => 'pg_stat_get_db_idle_in_transaction_time' }, +{ oid => '6188', descr => 'statistics: total number of sessions', + proname => 'pg_stat_get_db_sessions', provolatile => 's', proparallel => 'r', + prorettype => 'int8', proargtypes => 'oid', + prosrc => 'pg_stat_get_db_sessions' }, +{ oid => '6189', + descr => 'statistics: number of sessions disconnected by the client closing the network connection', + proname => 'pg_stat_get_db_sessions_abandoned', provolatile => 's', + proparallel => 'r', prorettype => 'int8', proargtypes => 'oid', + prosrc => 'pg_stat_get_db_sessions_abandoned' }, +{ oid => '6190', + descr => 'statistics: number of sessions disconnected by fatal errors', + proname => 'pg_stat_get_db_sessions_fatal', provolatile => 's', + proparallel => 'r', prorettype => 'int8', proargtypes => 'oid', + prosrc => 'pg_stat_get_db_sessions_fatal' }, +{ oid => '6191', + descr => 'statistics: number of sessions killed by administrative action', + proname => 'pg_stat_get_db_sessions_killed', provolatile => 's', + proparallel => 'r', prorettype => 'int8', proargtypes => 'oid', + prosrc => 'pg_stat_get_db_sessions_killed' }, { oid => '3195', descr => 'statistics: information about WAL archiver', proname => 'pg_stat_get_archiver', proisstrict => 'f', provolatile => 's', proparallel => 'r', prorettype => 'record', proargtypes => '', @@ -5473,6 +5574,14 @@ proname => 'pg_stat_get_buf_alloc', provolatile => 's', proparallel => 'r', prorettype => 'int8', proargtypes => '', prosrc => 'pg_stat_get_buf_alloc' }, +{ oid => '1136', descr => 'statistics: information about WAL activity', + proname => 'pg_stat_get_wal', proisstrict => 'f', provolatile => 's', + proparallel => 'r', prorettype => 'record', proargtypes => '', + proallargtypes => '{int8,int8,numeric,int8,int8,int8,float8,float8,timestamptz}', + proargmodes => '{o,o,o,o,o,o,o,o,o}', + proargnames => '{wal_records,wal_fpi,wal_bytes,wal_buffers_full,wal_write,wal_sync,wal_write_time,wal_sync_time,stats_reset}', + prosrc => 'pg_stat_get_wal' }, + { oid => '2306', descr => 'statistics: information about SLRU caches', proname => 'pg_stat_get_slru', prorows => '100', proisstrict => 'f', proretset => 't', provolatile => 's', proparallel => 'r', @@ -5590,6 +5699,11 @@ descr => 'statistics: reset collected statistics for a single SLRU', proname => 'pg_stat_reset_slru', proisstrict => 'f', provolatile => 'v', prorettype => 'void', proargtypes => 'text', prosrc => 'pg_stat_reset_slru' }, +{ oid => '6170', + descr => 'statistics: reset collected statistics for a single replication slot', + proname => 'pg_stat_reset_replication_slot', proisstrict => 'f', + provolatile => 'v', prorettype => 'void', proargtypes => 'text', + prosrc => 'pg_stat_reset_replication_slot' }, { oid => '3163', descr => 'current trigger depth', proname => 'pg_trigger_depth', provolatile => 's', proparallel => 'r', @@ -5666,11 +5780,11 @@ { oid => '2003', proname => 'textanycat', prolang => 'sql', provolatile => 's', prorettype => 'text', proargtypes => 'text anynonarray', - prosrc => 'select $1 || $2::pg_catalog.text' }, + prosrc => 'select $1 operator(pg_catalog.||) $2::pg_catalog.text' }, { oid => '2004', proname => 'anytextcat', prolang => 'sql', provolatile => 's', prorettype => 'text', proargtypes => 'anynonarray text', - prosrc => 'select $1::pg_catalog.text || $2' }, + prosrc => 'select $1::pg_catalog.text operator(pg_catalog.||) $2' }, { oid => '2005', proname => 'bytealike', prosupport => 'textlike_support', @@ -5708,9 +5822,15 @@ { oid => '2014', descr => 'position of substring', proname => 'position', prorettype => 'int4', proargtypes => 'bytea bytea', prosrc => 'byteapos' }, -{ oid => '2015', descr => 'trim both ends of string', +{ oid => '2015', descr => 'trim selected bytes from both ends of string', proname => 'btrim', prorettype => 'bytea', proargtypes => 'bytea bytea', prosrc => 'byteatrim' }, +{ oid => '6195', descr => 'trim selected bytes from left end of string', + proname => 'ltrim', prorettype => 'bytea', proargtypes => 'bytea bytea', + prosrc => 'bytealtrim' }, +{ oid => '6196', descr => 'trim selected bytes from right end of string', + proname => 'rtrim', prorettype => 'bytea', proargtypes => 'bytea bytea', + prosrc => 'byteartrim' }, { oid => '2019', descr => 'convert timestamp with time zone to time', proname => 'time', provolatile => 's', prorettype => 'time', @@ -5718,9 +5838,22 @@ { oid => '2020', descr => 'truncate timestamp to specified units', proname => 'date_trunc', prorettype => 'timestamp', proargtypes => 'text timestamp', prosrc => 'timestamp_trunc' }, + +{ oid => '6177', descr => 'bin timestamp into specified interval', + proname => 'date_bin', prorettype => 'timestamp', + proargtypes => 'interval timestamp timestamp', prosrc => 'timestamp_bin' }, +{ oid => '6178', + descr => 'bin timestamp with time zone into specified interval', + proname => 'date_bin', prorettype => 'timestamptz', + proargtypes => 'interval timestamptz timestamptz', + prosrc => 'timestamptz_bin' }, + { oid => '2021', descr => 'extract field from timestamp', proname => 'date_part', prorettype => 'float8', proargtypes => 'text timestamp', prosrc => 'timestamp_part' }, +{ oid => '6202', descr => 'extract field from timestamp', + proname => 'extract', prorettype => 'numeric', + proargtypes => 'text timestamp', prosrc => 'extract_timestamp' }, { oid => '2024', descr => 'convert date to timestamp', proname => 'timestamp', prorettype => 'timestamp', proargtypes => 'date', prosrc => 'date_timestamp' }, @@ -5770,15 +5903,15 @@ { oid => '2042', descr => 'intervals overlap?', proname => 'overlaps', prolang => 'sql', proisstrict => 'f', prorettype => 'bool', proargtypes => 'timestamp interval timestamp interval', - prosrc => 'select ($1, ($1 + $2)) overlaps ($3, ($3 + $4))' }, + prosrc => 'see system_functions.sql' }, { oid => '2043', descr => 'intervals overlap?', proname => 'overlaps', prolang => 'sql', proisstrict => 'f', prorettype => 'bool', proargtypes => 'timestamp timestamp timestamp interval', - prosrc => 'select ($1, $2) overlaps ($3, ($3 + $4))' }, + prosrc => 'see system_functions.sql' }, { oid => '2044', descr => 'intervals overlap?', proname => 'overlaps', prolang => 'sql', proisstrict => 'f', prorettype => 'bool', proargtypes => 'timestamp interval timestamp timestamp', - prosrc => 'select ($1, ($1 + $2)) overlaps ($3, $4)' }, + prosrc => 'see system_functions.sql' }, { oid => '2045', descr => 'less-equal-greater', proname => 'timestamp_cmp', proleakproof => 't', prorettype => 'int4', proargtypes => 'timestamp timestamp', prosrc => 'timestamp_cmp' }, @@ -5844,7 +5977,7 @@ descr => 'date difference from today preserving months and years', proname => 'age', prolang => 'sql', provolatile => 's', prorettype => 'interval', proargtypes => 'timestamp', - prosrc => 'select pg_catalog.age(cast(current_date as timestamp without time zone), $1)' }, + prosrc => 'see system_functions.sql' }, { oid => '2069', descr => 'adjust timestamp to new time zone', proname => 'timezone', prorettype => 'timestamptz', @@ -5864,8 +5997,7 @@ prosrc => 'textregexsubstr' }, { oid => '2074', descr => 'extract text matching SQL regular expression', proname => 'substring', prolang => 'sql', prorettype => 'text', - proargtypes => 'text text text', - prosrc => 'select pg_catalog.substring($1, pg_catalog.similar_to_escape($2, $3))' }, + proargtypes => 'text text text', prosrc => 'see system_functions.sql' }, { oid => '2075', descr => 'convert int8 to bitstring', proname => 'bit', prorettype => 'bit', proargtypes => 'int8 int4', @@ -5909,9 +6041,9 @@ { oid => '1371', descr => 'view system lock information', proname => 'pg_lock_status', prorows => '1000', proretset => 't', provolatile => 'v', prorettype => 'record', proargtypes => '', - proallargtypes => '{text,oid,oid,int4,int2,text,xid,oid,oid,int2,text,int4,text,bool,bool}', - proargmodes => '{o,o,o,o,o,o,o,o,o,o,o,o,o,o,o}', - proargnames => '{locktype,database,relation,page,tuple,virtualxid,transactionid,classid,objid,objsubid,virtualtransaction,pid,mode,granted,fastpath}', + proallargtypes => '{text,oid,oid,int4,int2,text,xid,oid,oid,int2,text,int4,text,bool,bool,timestamptz}', + proargmodes => '{o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o}', + proargnames => '{locktype,database,relation,page,tuple,virtualxid,transactionid,classid,objid,objsubid,virtualtransaction,pid,mode,granted,fastpath,waitstart}', prosrc => 'pg_lock_status' }, { oid => '2561', descr => 'get array of PIDs of sessions blocking specified backend PID from acquiring a heavyweight lock', @@ -5944,12 +6076,21 @@ prorettype => 'timestamptz', proargtypes => 'xid', prosrc => 'pg_xact_commit_timestamp' }, +{ oid => '6168', + descr => 'get commit timestamp and replication origin of a transaction', + proname => 'pg_xact_commit_timestamp_origin', provolatile => 'v', + prorettype => 'record', proargtypes => 'xid', + proallargtypes => '{xid,timestamptz,oid}', proargmodes => '{i,o,o}', + proargnames => '{xid,timestamp,roident}', + prosrc => 'pg_xact_commit_timestamp_origin' }, + { oid => '3583', - descr => 'get transaction Id and commit timestamp of latest transaction commit', + descr => 'get transaction Id, commit timestamp and replication origin of latest transaction commit', proname => 'pg_last_committed_xact', provolatile => 'v', prorettype => 'record', proargtypes => '', - proallargtypes => '{xid,timestamptz}', proargmodes => '{o,o}', - proargnames => '{xid,timestamp}', prosrc => 'pg_last_committed_xact' }, + proallargtypes => '{xid,timestamptz,oid}', proargmodes => '{o,o,o}', + proargnames => '{xid,timestamp,roident}', + prosrc => 'pg_last_committed_xact' }, { oid => '3537', descr => 'get identification of SQL object', proname => 'pg_describe_object', provolatile => 's', prorettype => 'text', @@ -6047,7 +6188,8 @@ proargtypes => 'int4', prosrc => 'pg_cancel_backend' }, { oid => '2096', descr => 'terminate a server process', proname => 'pg_terminate_backend', provolatile => 'v', prorettype => 'bool', - proargtypes => 'int4', prosrc => 'pg_terminate_backend' }, + proargtypes => 'int4 int8', proargnames => '{pid,timeout}', + prosrc => 'pg_terminate_backend' }, { oid => '2172', descr => 'prepare for taking an online backup', proname => 'pg_start_backup', provolatile => 'v', proparallel => 'r', prorettype => 'pg_lsn', proargtypes => 'text bool bool', @@ -6136,6 +6278,10 @@ proname => 'pg_is_wal_replay_paused', provolatile => 'v', prorettype => 'bool', proargtypes => '', prosrc => 'pg_is_wal_replay_paused' }, +{ oid => '1137', descr => 'get wal replay pause state', + proname => 'pg_get_wal_replay_pause_state', provolatile => 'v', + prorettype => 'text', proargtypes => '', + prosrc => 'pg_get_wal_replay_pause_state' }, { oid => '2621', descr => 'reload configuration files', proname => 'pg_reload_conf', provolatile => 'v', prorettype => 'bool', @@ -6204,11 +6350,11 @@ { oid => '3935', descr => 'sleep for the specified interval', proname => 'pg_sleep_for', prolang => 'sql', provolatile => 'v', prorettype => 'void', proargtypes => 'interval', - prosrc => 'select pg_catalog.pg_sleep(extract(epoch from pg_catalog.clock_timestamp() operator(pg_catalog.+) $1) operator(pg_catalog.-) extract(epoch from pg_catalog.clock_timestamp()))' }, + prosrc => 'see system_functions.sql' }, { oid => '3936', descr => 'sleep until the specified time', proname => 'pg_sleep_until', prolang => 'sql', provolatile => 'v', prorettype => 'void', proargtypes => 'timestamptz', - prosrc => 'select pg_catalog.pg_sleep(extract(epoch from $1) operator(pg_catalog.-) extract(epoch from pg_catalog.clock_timestamp()))' }, + prosrc => 'see system_functions.sql' }, { oid => '315', descr => 'Is JIT compilation available in this session?', proname => 'pg_jit_available', provolatile => 'v', prorettype => 'bool', proargtypes => '', prosrc => 'pg_jit_available' }, @@ -7001,6 +7147,9 @@ descr => 'bytes required to store the value, perhaps with compression', proname => 'pg_column_size', provolatile => 's', prorettype => 'int4', proargtypes => 'any', prosrc => 'pg_column_size' }, +{ oid => '2121', descr => 'compression method for the compressed datum', + proname => 'pg_column_compression', provolatile => 's', prorettype => 'text', + proargtypes => 'any', prosrc => 'pg_column_compression' }, { oid => '2322', descr => 'total disk space usage for the specified tablespace', proname => 'pg_tablespace_size', provolatile => 'v', prorettype => 'int8', @@ -7019,7 +7168,7 @@ descr => 'disk space usage for the main fork of the specified table or index', proname => 'pg_relation_size', prolang => 'sql', provolatile => 'v', prorettype => 'int8', proargtypes => 'regclass', - prosrc => 'select pg_catalog.pg_relation_size($1, \'main\')' }, + prosrc => 'see system_functions.sql' }, { oid => '2332', descr => 'disk space usage for the specified fork of a table or index', proname => 'pg_relation_size', provolatile => 'v', prorettype => 'int8', @@ -7207,6 +7356,14 @@ proname => 'anycompatiblerange_out', provolatile => 's', prorettype => 'cstring', proargtypes => 'anycompatiblerange', prosrc => 'anycompatiblerange_out' }, +{ oid => '4226', descr => 'I/O', + proname => 'anycompatiblemultirange_in', provolatile => 's', + prorettype => 'anycompatiblemultirange', proargtypes => 'cstring oid int4', + prosrc => 'anycompatiblemultirange_in' }, +{ oid => '4227', descr => 'I/O', + proname => 'anycompatiblemultirange_out', provolatile => 's', + prorettype => 'cstring', proargtypes => 'anycompatiblemultirange', + prosrc => 'anycompatiblemultirange_out' }, # tablesample method handlers { oid => '3313', descr => 'BERNOULLI tablesample method handler', @@ -7744,9 +7901,10 @@ { oid => '2510', descr => 'get the prepared statements for this session', proname => 'pg_prepared_statement', prorows => '1000', proretset => 't', provolatile => 's', proparallel => 'r', prorettype => 'record', - proargtypes => '', proallargtypes => '{text,text,timestamptz,_regtype,bool}', - proargmodes => '{o,o,o,o,o}', - proargnames => '{name,statement,prepare_time,parameter_types,from_sql}', + proargtypes => '', + proallargtypes => '{text,text,timestamptz,_regtype,bool,int8,int8}', + proargmodes => '{o,o,o,o,o,o,o}', + proargnames => '{name,statement,prepare_time,parameter_types,from_sql,generic_plans,custom_plans}', prosrc => 'pg_prepared_statement' }, { oid => '2511', descr => 'get the open cursors for this session', proname => 'pg_cursor', prorows => '1000', proretset => 't', @@ -7795,6 +7953,23 @@ proargnames => '{name,off,size,allocated_size}', prosrc => 'pg_get_shmem_allocations' }, +# memory context of local backend +{ oid => '2282', + descr => 'information about all memory contexts of local backend', + proname => 'pg_get_backend_memory_contexts', prorows => '100', + proretset => 't', provolatile => 'v', proparallel => 'r', + prorettype => 'record', proargtypes => '', + proallargtypes => '{text,text,text,int4,int8,int8,int8,int8,int8}', + proargmodes => '{o,o,o,o,o,o,o,o,o}', + proargnames => '{name, ident, parent, level, total_bytes, total_nblocks, free_bytes, free_chunks, used_bytes}', + prosrc => 'pg_get_backend_memory_contexts' }, + +# logging memory contexts of the specified backend +{ oid => '4543', descr => 'log memory contexts of the specified backend', + proname => 'pg_log_backend_memory_contexts', provolatile => 'v', + prorettype => 'bool', proargtypes => 'int4', + prosrc => 'pg_log_backend_memory_contexts' }, + # non-persistent series generator { oid => '1066', descr => 'non-persistent series generator', proname => 'generate_series', prorows => '1000', @@ -7878,43 +8053,55 @@ { oid => '2237', descr => 'bitwise-or smallint aggregate', proname => 'bit_or', prokind => 'a', proisstrict => 'f', prorettype => 'int2', proargtypes => 'int2', prosrc => 'aggregate_dummy' }, +{ oid => '6164', descr => 'bitwise-xor smallint aggregate', + proname => 'bit_xor', prokind => 'a', proisstrict => 'f', + prorettype => 'int2', proargtypes => 'int2', prosrc => 'aggregate_dummy' }, { oid => '2238', descr => 'bitwise-and integer aggregate', proname => 'bit_and', prokind => 'a', proisstrict => 'f', prorettype => 'int4', proargtypes => 'int4', prosrc => 'aggregate_dummy' }, { oid => '2239', descr => 'bitwise-or integer aggregate', proname => 'bit_or', prokind => 'a', proisstrict => 'f', prorettype => 'int4', proargtypes => 'int4', prosrc => 'aggregate_dummy' }, +{ oid => '6165', descr => 'bitwise-xor integer aggregate', + proname => 'bit_xor', prokind => 'a', proisstrict => 'f', + prorettype => 'int4', proargtypes => 'int4', prosrc => 'aggregate_dummy' }, { oid => '2240', descr => 'bitwise-and bigint aggregate', proname => 'bit_and', prokind => 'a', proisstrict => 'f', prorettype => 'int8', proargtypes => 'int8', prosrc => 'aggregate_dummy' }, { oid => '2241', descr => 'bitwise-or bigint aggregate', proname => 'bit_or', prokind => 'a', proisstrict => 'f', prorettype => 'int8', proargtypes => 'int8', prosrc => 'aggregate_dummy' }, +{ oid => '6166', descr => 'bitwise-xor bigint aggregate', + proname => 'bit_xor', prokind => 'a', proisstrict => 'f', + prorettype => 'int8', proargtypes => 'int8', prosrc => 'aggregate_dummy' }, { oid => '2242', descr => 'bitwise-and bit aggregate', proname => 'bit_and', prokind => 'a', proisstrict => 'f', prorettype => 'bit', proargtypes => 'bit', prosrc => 'aggregate_dummy' }, { oid => '2243', descr => 'bitwise-or bit aggregate', proname => 'bit_or', prokind => 'a', proisstrict => 'f', prorettype => 'bit', proargtypes => 'bit', prosrc => 'aggregate_dummy' }, +{ oid => '6167', descr => 'bitwise-xor bit aggregate', + proname => 'bit_xor', prokind => 'a', proisstrict => 'f', prorettype => 'bit', + proargtypes => 'bit', prosrc => 'aggregate_dummy' }, # formerly-missing interval + datetime operators { oid => '2546', proname => 'interval_pl_date', prolang => 'sql', prorettype => 'timestamp', - proargtypes => 'interval date', prosrc => 'select $2 + $1' }, + proargtypes => 'interval date', prosrc => 'see system_functions.sql' }, { oid => '2547', proname => 'interval_pl_timetz', prolang => 'sql', prorettype => 'timetz', - proargtypes => 'interval timetz', prosrc => 'select $2 + $1' }, + proargtypes => 'interval timetz', prosrc => 'see system_functions.sql' }, { oid => '2548', proname => 'interval_pl_timestamp', prolang => 'sql', prorettype => 'timestamp', proargtypes => 'interval timestamp', - prosrc => 'select $2 + $1' }, + prosrc => 'see system_functions.sql' }, { oid => '2549', proname => 'interval_pl_timestamptz', prolang => 'sql', provolatile => 's', prorettype => 'timestamptz', proargtypes => 'interval timestamptz', - prosrc => 'select $2 + $1' }, + prosrc => 'see system_functions.sql' }, { oid => '2550', proname => 'integer_pl_date', prolang => 'sql', prorettype => 'date', - proargtypes => 'int4 date', prosrc => 'select $2 + $1' }, + proargtypes => 'int4 date', prosrc => 'see system_functions.sql' }, { oid => '2556', descr => 'get OIDs of databases in a tablespace', proname => 'pg_tablespace_databases', prorows => '1000', proretset => 't', @@ -7922,11 +8109,11 @@ prosrc => 'pg_tablespace_databases' }, { oid => '2557', descr => 'convert int4 to boolean', - proname => 'bool', prorettype => 'bool', proargtypes => 'int4', - prosrc => 'int4_bool' }, + proname => 'bool', proleakproof => 't', prorettype => 'bool', + proargtypes => 'int4', prosrc => 'int4_bool' }, { oid => '2558', descr => 'convert boolean to int4', - proname => 'int4', prorettype => 'int4', proargtypes => 'bool', - prosrc => 'bool_int4' }, + proname => 'int4', proleakproof => 't', prorettype => 'int4', + proargtypes => 'bool', prosrc => 'bool_int4' }, { oid => '2559', descr => 'current value from last used sequence', proname => 'lastval', provolatile => 'v', proparallel => 'u', prorettype => 'int8', proargtypes => '', prosrc => 'lastval' }, @@ -8032,6 +8219,9 @@ proname => 'gist_poly_distance', prorettype => 'float8', proargtypes => 'internal polygon int2 oid internal', prosrc => 'gist_poly_distance' }, +{ oid => '3435', descr => 'sort support', + proname => 'gist_point_sortsupport', prorettype => 'void', + proargtypes => 'internal', prosrc => 'gist_point_sortsupport' }, # GIN array support { oid => '2743', descr => 'GIN array support', @@ -8080,6 +8270,96 @@ proname => 'brin_minmax_union', prorettype => 'bool', proargtypes => 'internal internal internal', prosrc => 'brin_minmax_union' }, +# BRIN minmax multi +{ oid => '4616', descr => 'BRIN multi minmax support', + proname => 'brin_minmax_multi_opcinfo', prorettype => 'internal', + proargtypes => 'internal', prosrc => 'brin_minmax_multi_opcinfo' }, +{ oid => '4617', descr => 'BRIN multi minmax support', + proname => 'brin_minmax_multi_add_value', prorettype => 'bool', + proargtypes => 'internal internal internal internal', + prosrc => 'brin_minmax_multi_add_value' }, +{ oid => '4618', descr => 'BRIN multi minmax support', + proname => 'brin_minmax_multi_consistent', prorettype => 'bool', + proargtypes => 'internal internal internal int4', + prosrc => 'brin_minmax_multi_consistent' }, +{ oid => '4619', descr => 'BRIN multi minmax support', + proname => 'brin_minmax_multi_union', prorettype => 'bool', + proargtypes => 'internal internal internal', + prosrc => 'brin_minmax_multi_union' }, +{ oid => '4620', descr => 'BRIN multi minmax support', + proname => 'brin_minmax_multi_options', proisstrict => 'f', + prorettype => 'void', proargtypes => 'internal', + prosrc => 'brin_minmax_multi_options' }, + +{ oid => '4621', descr => 'BRIN multi minmax int2 distance', + proname => 'brin_minmax_multi_distance_int2', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_int2' }, +{ oid => '4622', descr => 'BRIN multi minmax int4 distance', + proname => 'brin_minmax_multi_distance_int4', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_int4' }, +{ oid => '4623', descr => 'BRIN multi minmax int8 distance', + proname => 'brin_minmax_multi_distance_int8', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_int8' }, +{ oid => '4624', descr => 'BRIN multi minmax float4 distance', + proname => 'brin_minmax_multi_distance_float4', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_float4' }, +{ oid => '4625', descr => 'BRIN multi minmax float8 distance', + proname => 'brin_minmax_multi_distance_float8', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_float8' }, +{ oid => '4626', descr => 'BRIN multi minmax numeric distance', + proname => 'brin_minmax_multi_distance_numeric', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_numeric' }, +{ oid => '4627', descr => 'BRIN multi minmax tid distance', + proname => 'brin_minmax_multi_distance_tid', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_tid' }, +{ oid => '4628', descr => 'BRIN multi minmax uuid distance', + proname => 'brin_minmax_multi_distance_uuid', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_uuid' }, +{ oid => '4629', descr => 'BRIN multi minmax date distance', + proname => 'brin_minmax_multi_distance_date', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_date' }, +{ oid => '4630', descr => 'BRIN multi minmax time distance', + proname => 'brin_minmax_multi_distance_time', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_time' }, +{ oid => '4631', descr => 'BRIN multi minmax interval distance', + proname => 'brin_minmax_multi_distance_interval', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_interval' }, +{ oid => '4632', descr => 'BRIN multi minmax timetz distance', + proname => 'brin_minmax_multi_distance_timetz', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_timetz' }, +{ oid => '4633', descr => 'BRIN multi minmax pg_lsn distance', + proname => 'brin_minmax_multi_distance_pg_lsn', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_pg_lsn' }, +{ oid => '4634', descr => 'BRIN multi minmax macaddr distance', + proname => 'brin_minmax_multi_distance_macaddr', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_macaddr' }, +{ oid => '4635', descr => 'BRIN multi minmax macaddr8 distance', + proname => 'brin_minmax_multi_distance_macaddr8', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_macaddr8' }, +{ oid => '4636', descr => 'BRIN multi minmax inet distance', + proname => 'brin_minmax_multi_distance_inet', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_inet' }, +{ oid => '4637', descr => 'BRIN multi minmax timestamp distance', + proname => 'brin_minmax_multi_distance_timestamp', prorettype => 'float8', + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_timestamp' }, + # BRIN inclusion { oid => '4105', descr => 'BRIN inclusion support', proname => 'brin_inclusion_opcinfo', prorettype => 'internal', @@ -8097,6 +8377,25 @@ proargtypes => 'internal internal internal', prosrc => 'brin_inclusion_union' }, +# BRIN bloom +{ oid => '4591', descr => 'BRIN bloom support', + proname => 'brin_bloom_opcinfo', prorettype => 'internal', + proargtypes => 'internal', prosrc => 'brin_bloom_opcinfo' }, +{ oid => '4592', descr => 'BRIN bloom support', + proname => 'brin_bloom_add_value', prorettype => 'bool', + proargtypes => 'internal internal internal internal', + prosrc => 'brin_bloom_add_value' }, +{ oid => '4593', descr => 'BRIN bloom support', + proname => 'brin_bloom_consistent', prorettype => 'bool', + proargtypes => 'internal internal internal int4', + prosrc => 'brin_bloom_consistent' }, +{ oid => '4594', descr => 'BRIN bloom support', + proname => 'brin_bloom_union', prorettype => 'bool', + proargtypes => 'internal internal internal', prosrc => 'brin_bloom_union' }, +{ oid => '4595', descr => 'BRIN bloom support', + proname => 'brin_bloom_options', proisstrict => 'f', prorettype => 'void', + proargtypes => 'internal', prosrc => 'brin_bloom_options' }, + # userlock replacements { oid => '2880', descr => 'obtain exclusive advisory lock', proname => 'pg_advisory_lock', provolatile => 'v', proparallel => 'r', @@ -8303,8 +8602,7 @@ prosrc => 'xpath' }, { oid => '2932', descr => 'evaluate XPath expression', proname => 'xpath', prolang => 'sql', prorettype => '_xml', - proargtypes => 'text xml', - prosrc => 'select pg_catalog.xpath($1, $2, \'{}\'::pg_catalog.text[])' }, + proargtypes => 'text xml', prosrc => 'see system_functions.sql' }, { oid => '2614', descr => 'test XML value against XPath expression', proname => 'xmlexists', prorettype => 'bool', proargtypes => 'text xml', @@ -8316,8 +8614,7 @@ proargtypes => 'text xml _text', prosrc => 'xpath_exists' }, { oid => '3050', descr => 'test XML value against XPath expression', proname => 'xpath_exists', prolang => 'sql', prorettype => 'bool', - proargtypes => 'text xml', - prosrc => 'select pg_catalog.xpath_exists($1, $2, \'{}\'::pg_catalog.text[])' }, + proargtypes => 'text xml', prosrc => 'see system_functions.sql' }, { oid => '3051', descr => 'determine if a string is well formed XML', proname => 'xml_is_well_formed', provolatile => 's', prorettype => 'bool', proargtypes => 'text', prosrc => 'xml_is_well_formed' }, @@ -8577,6 +8874,15 @@ { oid => '4188', descr => 'smaller of two', proname => 'pg_lsn_smaller', prorettype => 'pg_lsn', proargtypes => 'pg_lsn pg_lsn', prosrc => 'pg_lsn_smaller' }, +{ oid => '5022', + proname => 'pg_lsn_pli', prorettype => 'pg_lsn', + proargtypes => 'pg_lsn numeric', prosrc => 'pg_lsn_pli' }, +{ oid => '5023', + proname => 'numeric_pl_pg_lsn', prolang => 'sql', prorettype => 'pg_lsn', + proargtypes => 'numeric pg_lsn', prosrc => 'see system_functions.sql' }, +{ oid => '5024', + proname => 'pg_lsn_mii', prorettype => 'pg_lsn', + proargtypes => 'pg_lsn numeric', prosrc => 'pg_lsn_mii' }, # enum related procs { oid => '3504', descr => 'I/O', @@ -9012,6 +9318,23 @@ proname => 'ts_lexize', prorettype => '_text', proargtypes => 'regdictionary text', prosrc => 'ts_lexize' }, +{ oid => '6183', descr => 'debug function for text search configuration', + proname => 'ts_debug', prolang => 'sql', prorows => '1000', proretset => 't', + provolatile => 's', prorettype => 'record', proargtypes => 'regconfig text', + proallargtypes => '{regconfig,text,text,text,text,_regdictionary,regdictionary,_text}', + proargmodes => '{i,i,o,o,o,o,o,o}', + proargnames => '{config,document,alias,description,token,dictionaries,dictionary,lexemes}', + prosrc => 'see system_functions.sql' }, + +{ oid => '6184', + descr => 'debug function for current text search configuration', + proname => 'ts_debug', prolang => 'sql', prorows => '1000', proretset => 't', + provolatile => 's', prorettype => 'record', proargtypes => 'text', + proallargtypes => '{text,text,text,text,_regdictionary,regdictionary,_text}', + proargmodes => '{i,o,o,o,o,o,o}', + proargnames => '{document,alias,description,token,dictionaries,dictionary,lexemes}', + prosrc => 'see system_functions.sql' }, + { oid => '3725', descr => '(internal)', proname => 'dsimple_init', prorettype => 'internal', proargtypes => 'internal', prosrc => 'dsimple_init' }, @@ -9611,6 +9934,13 @@ proname => 'btrecordcmp', prorettype => 'int4', proargtypes => 'record record', prosrc => 'btrecordcmp' }, +{ oid => '6192', descr => 'hash', + proname => 'hash_record', prorettype => 'int4', proargtypes => 'record', + prosrc => 'hash_record' }, +{ oid => '6193', descr => 'hash', + proname => 'hash_record_extended', prorettype => 'int8', + proargtypes => 'record int8', prosrc => 'hash_record_extended' }, + # record comparison using raw byte images { oid => '3181', proname => 'record_image_eq', prorettype => 'bool', @@ -9690,8 +10020,8 @@ proname => 'lag', prokind => 'w', prorettype => 'anyelement', proargtypes => 'anyelement int4', prosrc => 'window_lag_with_offset' }, { oid => '3108', descr => 'fetch the Nth preceding row value with default', - proname => 'lag', prokind => 'w', prorettype => 'anyelement', - proargtypes => 'anyelement int4 anyelement', + proname => 'lag', prokind => 'w', prorettype => 'anycompatible', + proargtypes => 'anycompatible int4 anycompatible', prosrc => 'window_lag_with_offset_and_default' }, { oid => '3109', descr => 'fetch the following row value', proname => 'lead', prokind => 'w', prorettype => 'anyelement', @@ -9700,8 +10030,8 @@ proname => 'lead', prokind => 'w', prorettype => 'anyelement', proargtypes => 'anyelement int4', prosrc => 'window_lead_with_offset' }, { oid => '3111', descr => 'fetch the Nth following row value with default', - proname => 'lead', prokind => 'w', prorettype => 'anyelement', - proargtypes => 'anyelement int4 anyelement', + proname => 'lead', prokind => 'w', prorettype => 'anycompatible', + proargtypes => 'anycompatible int4 anycompatible', prosrc => 'window_lead_with_offset_and_default' }, { oid => '3112', descr => 'fetch the first row value', proname => 'first_value', prokind => 'w', prorettype => 'anyelement', @@ -9796,6 +10126,10 @@ descr => 'the smallest range which includes both of the given ranges', proname => 'range_merge', prorettype => 'anyrange', proargtypes => 'anyrange anyrange', prosrc => 'range_merge' }, +{ oid => '4228', + descr => 'the smallest range which includes the whole multirange', + proname => 'range_merge', prorettype => 'anyrange', + proargtypes => 'anymultirange', prosrc => 'range_merge_from_multirange' }, { oid => '3868', proname => 'range_intersect', prorettype => 'anyrange', proargtypes => 'anyrange anyrange', prosrc => 'range_intersect' }, @@ -9833,6 +10167,13 @@ { oid => '3881', descr => 'GiST support', proname => 'range_gist_same', prorettype => 'internal', proargtypes => 'anyrange anyrange internal', prosrc => 'range_gist_same' }, +{ oid => '6154', descr => 'GiST support', + proname => 'multirange_gist_consistent', prorettype => 'bool', + proargtypes => 'internal anymultirange int2 oid internal', + prosrc => 'multirange_gist_consistent' }, +{ oid => '6156', descr => 'GiST support', + proname => 'multirange_gist_compress', prorettype => 'internal', + proargtypes => 'internal', prosrc => 'multirange_gist_compress' }, { oid => '3902', descr => 'hash a range', proname => 'hash_range', prorettype => 'int4', proargtypes => 'anyrange', prosrc => 'hash_range' }, @@ -9845,6 +10186,13 @@ { oid => '3169', descr => 'restriction selectivity for range operators', proname => 'rangesel', provolatile => 's', prorettype => 'float8', proargtypes => 'internal oid internal int4', prosrc => 'rangesel' }, +{ oid => '4401', descr => 'range aggregate by intersecting', + proname => 'range_intersect_agg_transfn', prorettype => 'anyrange', + proargtypes => 'anyrange anyrange', prosrc => 'range_intersect_agg_transfn' }, +{ oid => '4450', descr => 'range aggregate by intersecting', + proname => 'range_intersect_agg', prokind => 'a', proisstrict => 'f', + prorettype => 'anyrange', proargtypes => 'anyrange', + prosrc => 'aggregate_dummy' }, { oid => '3914', descr => 'convert an int4 range to canonical form', proname => 'int4range_canonical', prorettype => 'int4range', @@ -9913,6 +10261,287 @@ proname => 'int8range', proisstrict => 'f', prorettype => 'int8range', proargtypes => 'int8 int8 text', prosrc => 'range_constructor3' }, +# functions for multiranges +{ oid => '4229', descr => 'I/O', + proname => 'anymultirange_in', provolatile => 's', + prorettype => 'anymultirange', proargtypes => 'cstring oid int4', + prosrc => 'anymultirange_in' }, +{ oid => '4230', descr => 'I/O', + proname => 'anymultirange_out', provolatile => 's', prorettype => 'cstring', + proargtypes => 'anymultirange', prosrc => 'anymultirange_out' }, +{ oid => '4231', descr => 'I/O', + proname => 'multirange_in', provolatile => 's', prorettype => 'anymultirange', + proargtypes => 'cstring oid int4', prosrc => 'multirange_in' }, +{ oid => '4232', descr => 'I/O', + proname => 'multirange_out', provolatile => 's', prorettype => 'cstring', + proargtypes => 'anymultirange', prosrc => 'multirange_out' }, +{ oid => '4233', descr => 'I/O', + proname => 'multirange_recv', provolatile => 's', + prorettype => 'anymultirange', proargtypes => 'internal oid int4', + prosrc => 'multirange_recv' }, +{ oid => '4234', descr => 'I/O', + proname => 'multirange_send', provolatile => 's', prorettype => 'bytea', + proargtypes => 'anymultirange', prosrc => 'multirange_send' }, +{ oid => '4235', descr => 'lower bound of multirange', + proname => 'lower', prorettype => 'anyelement', + proargtypes => 'anymultirange', prosrc => 'multirange_lower' }, +{ oid => '4236', descr => 'upper bound of multirange', + proname => 'upper', prorettype => 'anyelement', + proargtypes => 'anymultirange', prosrc => 'multirange_upper' }, +{ oid => '4237', descr => 'is the multirange empty?', + proname => 'isempty', prorettype => 'bool', proargtypes => 'anymultirange', + prosrc => 'multirange_empty' }, +{ oid => '4238', descr => 'is the multirange\'s lower bound inclusive?', + proname => 'lower_inc', prorettype => 'bool', proargtypes => 'anymultirange', + prosrc => 'multirange_lower_inc' }, +{ oid => '4239', descr => 'is the multirange\'s upper bound inclusive?', + proname => 'upper_inc', prorettype => 'bool', proargtypes => 'anymultirange', + prosrc => 'multirange_upper_inc' }, +{ oid => '4240', descr => 'is the multirange\'s lower bound infinite?', + proname => 'lower_inf', prorettype => 'bool', proargtypes => 'anymultirange', + prosrc => 'multirange_lower_inf' }, +{ oid => '4241', descr => 'is the multirange\'s upper bound infinite?', + proname => 'upper_inf', prorettype => 'bool', proargtypes => 'anymultirange', + prosrc => 'multirange_upper_inf' }, +{ oid => '4242', descr => 'multirange typanalyze', + proname => 'multirange_typanalyze', provolatile => 's', prorettype => 'bool', + proargtypes => 'internal', prosrc => 'multirange_typanalyze' }, +{ oid => '4243', descr => 'restriction selectivity for multirange operators', + proname => 'multirangesel', provolatile => 's', prorettype => 'float8', + proargtypes => 'internal oid internal int4', prosrc => 'multirangesel' }, +{ oid => '4244', + proname => 'multirange_eq', prorettype => 'bool', + proargtypes => 'anymultirange anymultirange', prosrc => 'multirange_eq' }, +{ oid => '4245', + proname => 'multirange_ne', prorettype => 'bool', + proargtypes => 'anymultirange anymultirange', prosrc => 'multirange_ne' }, +{ oid => '4246', + proname => 'range_overlaps_multirange', prorettype => 'bool', + proargtypes => 'anyrange anymultirange', + prosrc => 'range_overlaps_multirange' }, +{ oid => '4247', + proname => 'multirange_overlaps_range', prorettype => 'bool', + proargtypes => 'anymultirange anyrange', + prosrc => 'multirange_overlaps_range' }, +{ oid => '4248', + proname => 'multirange_overlaps_multirange', prorettype => 'bool', + proargtypes => 'anymultirange anymultirange', + prosrc => 'multirange_overlaps_multirange' }, +{ oid => '4249', + proname => 'multirange_contains_elem', prorettype => 'bool', + proargtypes => 'anymultirange anyelement', + prosrc => 'multirange_contains_elem' }, +{ oid => '4250', + proname => 'multirange_contains_range', prorettype => 'bool', + proargtypes => 'anymultirange anyrange', + prosrc => 'multirange_contains_range' }, +{ oid => '4251', + proname => 'multirange_contains_multirange', prorettype => 'bool', + proargtypes => 'anymultirange anymultirange', + prosrc => 'multirange_contains_multirange' }, +{ oid => '4252', + proname => 'elem_contained_by_multirange', prorettype => 'bool', + proargtypes => 'anyelement anymultirange', + prosrc => 'elem_contained_by_multirange' }, +{ oid => '4253', + proname => 'range_contained_by_multirange', prorettype => 'bool', + proargtypes => 'anyrange anymultirange', + prosrc => 'range_contained_by_multirange' }, +{ oid => '4541', + proname => 'range_contains_multirange', prorettype => 'bool', + proargtypes => 'anyrange anymultirange', + prosrc => 'range_contains_multirange' }, +{ oid => '4542', + proname => 'multirange_contained_by_range', prorettype => 'bool', + proargtypes => 'anymultirange anyrange', + prosrc => 'multirange_contained_by_range' }, +{ oid => '4254', + proname => 'multirange_contained_by_multirange', prorettype => 'bool', + proargtypes => 'anymultirange anymultirange', + prosrc => 'multirange_contained_by_multirange' }, +{ oid => '4255', + proname => 'range_adjacent_multirange', prorettype => 'bool', + proargtypes => 'anyrange anymultirange', + prosrc => 'range_adjacent_multirange' }, +{ oid => '4256', + proname => 'multirange_adjacent_multirange', prorettype => 'bool', + proargtypes => 'anymultirange anymultirange', + prosrc => 'multirange_adjacent_multirange' }, +{ oid => '4257', + proname => 'multirange_adjacent_range', prorettype => 'bool', + proargtypes => 'anymultirange anyrange', + prosrc => 'multirange_adjacent_range' }, +{ oid => '4258', + proname => 'range_before_multirange', prorettype => 'bool', + proargtypes => 'anyrange anymultirange', + prosrc => 'range_before_multirange' }, +{ oid => '4259', + proname => 'multirange_before_range', prorettype => 'bool', + proargtypes => 'anymultirange anyrange', + prosrc => 'multirange_before_range' }, +{ oid => '4260', + proname => 'multirange_before_multirange', prorettype => 'bool', + proargtypes => 'anymultirange anymultirange', + prosrc => 'multirange_before_multirange' }, +{ oid => '4261', + proname => 'range_after_multirange', prorettype => 'bool', + proargtypes => 'anyrange anymultirange', prosrc => 'range_after_multirange' }, +{ oid => '4262', + proname => 'multirange_after_range', prorettype => 'bool', + proargtypes => 'anymultirange anyrange', prosrc => 'multirange_after_range' }, +{ oid => '4263', + proname => 'multirange_after_multirange', prorettype => 'bool', + proargtypes => 'anymultirange anymultirange', + prosrc => 'multirange_after_multirange' }, +{ oid => '4264', + proname => 'range_overleft_multirange', prorettype => 'bool', + proargtypes => 'anyrange anymultirange', + prosrc => 'range_overleft_multirange' }, +{ oid => '4265', + proname => 'multirange_overleft_range', prorettype => 'bool', + proargtypes => 'anymultirange anyrange', + prosrc => 'multirange_overleft_range' }, +{ oid => '4266', + proname => 'multirange_overleft_multirange', prorettype => 'bool', + proargtypes => 'anymultirange anymultirange', + prosrc => 'multirange_overleft_multirange' }, +{ oid => '4267', + proname => 'range_overright_multirange', prorettype => 'bool', + proargtypes => 'anyrange anymultirange', + prosrc => 'range_overright_multirange' }, +{ oid => '4268', + proname => 'multirange_overright_range', prorettype => 'bool', + proargtypes => 'anymultirange anyrange', + prosrc => 'multirange_overright_range' }, +{ oid => '4269', + proname => 'multirange_overright_multirange', prorettype => 'bool', + proargtypes => 'anymultirange anymultirange', + prosrc => 'multirange_overright_multirange' }, +{ oid => '4270', + proname => 'multirange_union', prorettype => 'anymultirange', + proargtypes => 'anymultirange anymultirange', prosrc => 'multirange_union' }, +{ oid => '4271', + proname => 'multirange_minus', prorettype => 'anymultirange', + proargtypes => 'anymultirange anymultirange', prosrc => 'multirange_minus' }, +{ oid => '4272', + proname => 'multirange_intersect', prorettype => 'anymultirange', + proargtypes => 'anymultirange anymultirange', + prosrc => 'multirange_intersect' }, +{ oid => '4273', descr => 'less-equal-greater', + proname => 'multirange_cmp', prorettype => 'int4', + proargtypes => 'anymultirange anymultirange', prosrc => 'multirange_cmp' }, +{ oid => '4274', + proname => 'multirange_lt', prorettype => 'bool', + proargtypes => 'anymultirange anymultirange', prosrc => 'multirange_lt' }, +{ oid => '4275', + proname => 'multirange_le', prorettype => 'bool', + proargtypes => 'anymultirange anymultirange', prosrc => 'multirange_le' }, +{ oid => '4276', + proname => 'multirange_ge', prorettype => 'bool', + proargtypes => 'anymultirange anymultirange', prosrc => 'multirange_ge' }, +{ oid => '4277', + proname => 'multirange_gt', prorettype => 'bool', + proargtypes => 'anymultirange anymultirange', prosrc => 'multirange_gt' }, +{ oid => '4278', descr => 'hash a multirange', + proname => 'hash_multirange', prorettype => 'int4', + proargtypes => 'anymultirange', prosrc => 'hash_multirange' }, +{ oid => '4279', descr => 'hash a multirange', + proname => 'hash_multirange_extended', prorettype => 'int8', + proargtypes => 'anymultirange int8', prosrc => 'hash_multirange_extended' }, + +{ oid => '4280', descr => 'int4multirange constructor', + proname => 'int4multirange', prorettype => 'int4multirange', + proargtypes => '', prosrc => 'multirange_constructor0' }, +{ oid => '4281', descr => 'int4multirange constructor', + proname => 'int4multirange', prorettype => 'int4multirange', + proargtypes => 'int4range', prosrc => 'multirange_constructor1' }, +{ oid => '4282', descr => 'int4multirange constructor', + proname => 'int4multirange', provariadic => 'int4range', + prorettype => 'int4multirange', proargtypes => '_int4range', + proallargtypes => '{_int4range}', proargmodes => '{v}', + prosrc => 'multirange_constructor2' }, +{ oid => '4283', descr => 'nummultirange constructor', + proname => 'nummultirange', prorettype => 'nummultirange', proargtypes => '', + prosrc => 'multirange_constructor0' }, +{ oid => '4284', descr => 'nummultirange constructor', + proname => 'nummultirange', prorettype => 'nummultirange', + proargtypes => 'numrange', prosrc => 'multirange_constructor1' }, +{ oid => '4285', descr => 'nummultirange constructor', + proname => 'nummultirange', provariadic => 'numrange', + prorettype => 'nummultirange', proargtypes => '_numrange', + proallargtypes => '{_numrange}', proargmodes => '{v}', + prosrc => 'multirange_constructor2' }, +{ oid => '4286', descr => 'tsmultirange constructor', + proname => 'tsmultirange', prorettype => 'tsmultirange', proargtypes => '', + prosrc => 'multirange_constructor0' }, +{ oid => '4287', descr => 'tsmultirange constructor', + proname => 'tsmultirange', prorettype => 'tsmultirange', + proargtypes => 'tsrange', prosrc => 'multirange_constructor1' }, +{ oid => '4288', descr => 'tsmultirange constructor', + proname => 'tsmultirange', provariadic => 'tsrange', + prorettype => 'tsmultirange', proargtypes => '_tsrange', + proallargtypes => '{_tsrange}', proargmodes => '{v}', + prosrc => 'multirange_constructor2' }, +{ oid => '4289', descr => 'tstzmultirange constructor', + proname => 'tstzmultirange', prorettype => 'tstzmultirange', + proargtypes => '', prosrc => 'multirange_constructor0' }, +{ oid => '4290', descr => 'tstzmultirange constructor', + proname => 'tstzmultirange', prorettype => 'tstzmultirange', + proargtypes => 'tstzrange', prosrc => 'multirange_constructor1' }, +{ oid => '4291', descr => 'tstzmultirange constructor', + proname => 'tstzmultirange', provariadic => 'tstzrange', + prorettype => 'tstzmultirange', proargtypes => '_tstzrange', + proallargtypes => '{_tstzrange}', proargmodes => '{v}', + prosrc => 'multirange_constructor2' }, +{ oid => '4292', descr => 'datemultirange constructor', + proname => 'datemultirange', prorettype => 'datemultirange', + proargtypes => '', prosrc => 'multirange_constructor0' }, +{ oid => '4293', descr => 'datemultirange constructor', + proname => 'datemultirange', prorettype => 'datemultirange', + proargtypes => 'daterange', prosrc => 'multirange_constructor1' }, +{ oid => '4294', descr => 'datemultirange constructor', + proname => 'datemultirange', provariadic => 'daterange', + prorettype => 'datemultirange', proargtypes => '_daterange', + proallargtypes => '{_daterange}', proargmodes => '{v}', + prosrc => 'multirange_constructor2' }, +{ oid => '4295', descr => 'int8multirange constructor', + proname => 'int8multirange', prorettype => 'int8multirange', + proargtypes => '', prosrc => 'multirange_constructor0' }, +{ oid => '4296', descr => 'int8multirange constructor', + proname => 'int8multirange', prorettype => 'int8multirange', + proargtypes => 'int8range', prosrc => 'multirange_constructor1' }, +{ oid => '4297', descr => 'int8multirange constructor', + proname => 'int8multirange', provariadic => 'int8range', + prorettype => 'int8multirange', proargtypes => '_int8range', + proallargtypes => '{_int8range}', proargmodes => '{v}', + prosrc => 'multirange_constructor2' }, +{ oid => '4298', descr => 'anymultirange cast', + proname => 'multirange', prorettype => 'anymultirange', + proargtypes => 'anyrange', prosrc => 'multirange_constructor1' }, +{ oid => '4299', descr => 'aggregate transition function', + proname => 'range_agg_transfn', proisstrict => 'f', prorettype => 'internal', + proargtypes => 'internal anyrange', prosrc => 'range_agg_transfn' }, +{ oid => '4300', descr => 'aggregate final function', + proname => 'range_agg_finalfn', proisstrict => 'f', + prorettype => 'anymultirange', proargtypes => 'internal anyrange', + prosrc => 'range_agg_finalfn' }, +{ oid => '4301', descr => 'combine aggregate input into a multirange', + proname => 'range_agg', prokind => 'a', proisstrict => 'f', + prorettype => 'anymultirange', proargtypes => 'anyrange', + prosrc => 'aggregate_dummy' }, +{ oid => '4388', descr => 'range aggregate by intersecting', + proname => 'multirange_intersect_agg_transfn', prorettype => 'anymultirange', + proargtypes => 'anymultirange anymultirange', + prosrc => 'multirange_intersect_agg_transfn' }, +{ oid => '4389', descr => 'range aggregate by intersecting', + proname => 'range_intersect_agg', prokind => 'a', proisstrict => 'f', + prorettype => 'anymultirange', proargtypes => 'anymultirange', + prosrc => 'aggregate_dummy' }, +{ oid => '1293', descr => 'expand multirange to set of ranges', + proname => 'unnest', prorows => '100', + proretset => 't', prorettype => 'anyrange', proargtypes => 'anymultirange', + prosrc => 'multirange_unnest' }, + # date, time, timestamp constructors { oid => '3846', descr => 'construct date', proname => 'make_date', prorettype => 'date', proargtypes => 'int4 int4 int4', @@ -10064,16 +10693,17 @@ proname => 'pg_get_replication_slots', prorows => '10', proisstrict => 'f', proretset => 't', provolatile => 's', prorettype => 'record', proargtypes => '', - proallargtypes => '{name,name,text,oid,bool,bool,int4,xid,xid,pg_lsn,pg_lsn,text,int8}', - proargmodes => '{o,o,o,o,o,o,o,o,o,o,o,o,o}', - proargnames => '{slot_name,plugin,slot_type,datoid,temporary,active,active_pid,xmin,catalog_xmin,restart_lsn,confirmed_flush_lsn,wal_status,safe_wal_size}', + proallargtypes => '{name,name,text,oid,bool,bool,int4,xid,xid,pg_lsn,pg_lsn,text,int8,bool}', + proargmodes => '{o,o,o,o,o,o,o,o,o,o,o,o,o,o}', + proargnames => '{slot_name,plugin,slot_type,datoid,temporary,active,active_pid,xmin,catalog_xmin,restart_lsn,confirmed_flush_lsn,wal_status,safe_wal_size,two_phase}', prosrc => 'pg_get_replication_slots' }, { oid => '3786', descr => 'set up a logical replication slot', proname => 'pg_create_logical_replication_slot', provolatile => 'v', - proparallel => 'u', prorettype => 'record', proargtypes => 'name name bool', - proallargtypes => '{name,name,bool,name,pg_lsn}', - proargmodes => '{i,i,i,o,o}', - proargnames => '{slot_name,plugin,temporary,slot_name,lsn}', + proparallel => 'u', prorettype => 'record', + proargtypes => 'name name bool bool', + proallargtypes => '{name,name,bool,bool,name,pg_lsn}', + proargmodes => '{i,i,i,i,o,o}', + proargnames => '{slot_name,plugin,temporary,twophase,slot_name,lsn}', prosrc => 'pg_create_logical_replication_slot' }, { oid => '4222', descr => 'copy a logical replication slot, changing temporality and plugin', @@ -10295,10 +10925,16 @@ proname => 'binary_upgrade_set_next_array_pg_type_oid', provolatile => 'v', proparallel => 'r', prorettype => 'void', proargtypes => 'oid', prosrc => 'binary_upgrade_set_next_array_pg_type_oid' }, -{ oid => '3585', descr => 'for use by pg_upgrade', - proname => 'binary_upgrade_set_next_toast_pg_type_oid', provolatile => 'v', - proparallel => 'r', prorettype => 'void', proargtypes => 'oid', - prosrc => 'binary_upgrade_set_next_toast_pg_type_oid' }, +{ oid => '4390', descr => 'for use by pg_upgrade', + proname => 'binary_upgrade_set_next_multirange_pg_type_oid', + provolatile => 'v', proparallel => 'r', prorettype => 'void', + proargtypes => 'oid', + prosrc => 'binary_upgrade_set_next_multirange_pg_type_oid' }, +{ oid => '4391', descr => 'for use by pg_upgrade', + proname => 'binary_upgrade_set_next_multirange_array_pg_type_oid', + provolatile => 'v', proparallel => 'r', prorettype => 'void', + proargtypes => 'oid', + prosrc => 'binary_upgrade_set_next_multirange_array_pg_type_oid' }, { oid => '3586', descr => 'for use by pg_upgrade', proname => 'binary_upgrade_set_next_heap_pg_class_oid', provolatile => 'v', proparallel => 'r', prorettype => 'void', proargtypes => 'oid', @@ -10336,388 +10972,388 @@ # conversion functions { oid => '4302', descr => 'internal conversion function for KOI8R to MULE_INTERNAL', - proname => 'koi8r_to_mic', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'koi8r_to_mic', - probin => '$libdir/cyrillic_and_mic' }, + proname => 'koi8r_to_mic', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'koi8r_to_mic', probin => '$libdir/cyrillic_and_mic' }, { oid => '4303', descr => 'internal conversion function for MULE_INTERNAL to KOI8R', - proname => 'mic_to_koi8r', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_koi8r', - probin => '$libdir/cyrillic_and_mic' }, + proname => 'mic_to_koi8r', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_koi8r', probin => '$libdir/cyrillic_and_mic' }, { oid => '4304', descr => 'internal conversion function for ISO-8859-5 to MULE_INTERNAL', - proname => 'iso_to_mic', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'iso_to_mic', + proname => 'iso_to_mic', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'iso_to_mic', probin => '$libdir/cyrillic_and_mic' }, { oid => '4305', descr => 'internal conversion function for MULE_INTERNAL to ISO-8859-5', - proname => 'mic_to_iso', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_iso', + proname => 'mic_to_iso', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'mic_to_iso', probin => '$libdir/cyrillic_and_mic' }, { oid => '4306', descr => 'internal conversion function for WIN1251 to MULE_INTERNAL', - proname => 'win1251_to_mic', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'win1251_to_mic', - probin => '$libdir/cyrillic_and_mic' }, + proname => 'win1251_to_mic', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'win1251_to_mic', probin => '$libdir/cyrillic_and_mic' }, { oid => '4307', descr => 'internal conversion function for MULE_INTERNAL to WIN1251', - proname => 'mic_to_win1251', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_win1251', - probin => '$libdir/cyrillic_and_mic' }, + proname => 'mic_to_win1251', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_win1251', probin => '$libdir/cyrillic_and_mic' }, { oid => '4308', descr => 'internal conversion function for WIN866 to MULE_INTERNAL', - proname => 'win866_to_mic', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'win866_to_mic', - probin => '$libdir/cyrillic_and_mic' }, + proname => 'win866_to_mic', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'win866_to_mic', probin => '$libdir/cyrillic_and_mic' }, { oid => '4309', descr => 'internal conversion function for MULE_INTERNAL to WIN866', - proname => 'mic_to_win866', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_win866', - probin => '$libdir/cyrillic_and_mic' }, + proname => 'mic_to_win866', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_win866', probin => '$libdir/cyrillic_and_mic' }, { oid => '4310', descr => 'internal conversion function for KOI8R to WIN1251', - proname => 'koi8r_to_win1251', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', + proname => 'koi8r_to_win1251', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'koi8r_to_win1251', probin => '$libdir/cyrillic_and_mic' }, { oid => '4311', descr => 'internal conversion function for WIN1251 to KOI8R', - proname => 'win1251_to_koi8r', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', + proname => 'win1251_to_koi8r', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'win1251_to_koi8r', probin => '$libdir/cyrillic_and_mic' }, { oid => '4312', descr => 'internal conversion function for KOI8R to WIN866', - proname => 'koi8r_to_win866', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'koi8r_to_win866', - probin => '$libdir/cyrillic_and_mic' }, + proname => 'koi8r_to_win866', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'koi8r_to_win866', probin => '$libdir/cyrillic_and_mic' }, { oid => '4313', descr => 'internal conversion function for WIN866 to KOI8R', - proname => 'win866_to_koi8r', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'win866_to_koi8r', - probin => '$libdir/cyrillic_and_mic' }, + proname => 'win866_to_koi8r', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'win866_to_koi8r', probin => '$libdir/cyrillic_and_mic' }, { oid => '4314', descr => 'internal conversion function for WIN866 to WIN1251', - proname => 'win866_to_win1251', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', + proname => 'win866_to_win1251', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'win866_to_win1251', probin => '$libdir/cyrillic_and_mic' }, { oid => '4315', descr => 'internal conversion function for WIN1251 to WIN866', - proname => 'win1251_to_win866', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', + proname => 'win1251_to_win866', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'win1251_to_win866', probin => '$libdir/cyrillic_and_mic' }, { oid => '4316', descr => 'internal conversion function for ISO-8859-5 to KOI8R', - proname => 'iso_to_koi8r', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'iso_to_koi8r', - probin => '$libdir/cyrillic_and_mic' }, + proname => 'iso_to_koi8r', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'iso_to_koi8r', probin => '$libdir/cyrillic_and_mic' }, { oid => '4317', descr => 'internal conversion function for KOI8R to ISO-8859-5', - proname => 'koi8r_to_iso', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'koi8r_to_iso', - probin => '$libdir/cyrillic_and_mic' }, + proname => 'koi8r_to_iso', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'koi8r_to_iso', probin => '$libdir/cyrillic_and_mic' }, { oid => '4318', descr => 'internal conversion function for ISO-8859-5 to WIN1251', - proname => 'iso_to_win1251', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'iso_to_win1251', - probin => '$libdir/cyrillic_and_mic' }, + proname => 'iso_to_win1251', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'iso_to_win1251', probin => '$libdir/cyrillic_and_mic' }, { oid => '4319', descr => 'internal conversion function for WIN1251 to ISO-8859-5', - proname => 'win1251_to_iso', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'win1251_to_iso', - probin => '$libdir/cyrillic_and_mic' }, + proname => 'win1251_to_iso', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'win1251_to_iso', probin => '$libdir/cyrillic_and_mic' }, { oid => '4320', descr => 'internal conversion function for ISO-8859-5 to WIN866', - proname => 'iso_to_win866', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'iso_to_win866', - probin => '$libdir/cyrillic_and_mic' }, + proname => 'iso_to_win866', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'iso_to_win866', probin => '$libdir/cyrillic_and_mic' }, { oid => '4321', descr => 'internal conversion function for WIN866 to ISO-8859-5', - proname => 'win866_to_iso', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'win866_to_iso', - probin => '$libdir/cyrillic_and_mic' }, + proname => 'win866_to_iso', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'win866_to_iso', probin => '$libdir/cyrillic_and_mic' }, { oid => '4322', descr => 'internal conversion function for EUC_CN to MULE_INTERNAL', - proname => 'euc_cn_to_mic', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_cn_to_mic', - probin => '$libdir/euc_cn_and_mic' }, + proname => 'euc_cn_to_mic', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_cn_to_mic', probin => '$libdir/euc_cn_and_mic' }, { oid => '4323', descr => 'internal conversion function for MULE_INTERNAL to EUC_CN', - proname => 'mic_to_euc_cn', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_euc_cn', - probin => '$libdir/euc_cn_and_mic' }, + proname => 'mic_to_euc_cn', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_euc_cn', probin => '$libdir/euc_cn_and_mic' }, { oid => '4324', descr => 'internal conversion function for EUC_JP to SJIS', - proname => 'euc_jp_to_sjis', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_jp_to_sjis', - probin => '$libdir/euc_jp_and_sjis' }, + proname => 'euc_jp_to_sjis', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_jp_to_sjis', probin => '$libdir/euc_jp_and_sjis' }, { oid => '4325', descr => 'internal conversion function for SJIS to EUC_JP', - proname => 'sjis_to_euc_jp', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'sjis_to_euc_jp', - probin => '$libdir/euc_jp_and_sjis' }, + proname => 'sjis_to_euc_jp', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'sjis_to_euc_jp', probin => '$libdir/euc_jp_and_sjis' }, { oid => '4326', descr => 'internal conversion function for EUC_JP to MULE_INTERNAL', - proname => 'euc_jp_to_mic', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_jp_to_mic', - probin => '$libdir/euc_jp_and_sjis' }, + proname => 'euc_jp_to_mic', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_jp_to_mic', probin => '$libdir/euc_jp_and_sjis' }, { oid => '4327', descr => 'internal conversion function for SJIS to MULE_INTERNAL', - proname => 'sjis_to_mic', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'sjis_to_mic', - probin => '$libdir/euc_jp_and_sjis' }, + proname => 'sjis_to_mic', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'sjis_to_mic', probin => '$libdir/euc_jp_and_sjis' }, { oid => '4328', descr => 'internal conversion function for MULE_INTERNAL to EUC_JP', - proname => 'mic_to_euc_jp', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_euc_jp', - probin => '$libdir/euc_jp_and_sjis' }, + proname => 'mic_to_euc_jp', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_euc_jp', probin => '$libdir/euc_jp_and_sjis' }, { oid => '4329', descr => 'internal conversion function for MULE_INTERNAL to SJIS', - proname => 'mic_to_sjis', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_sjis', - probin => '$libdir/euc_jp_and_sjis' }, + proname => 'mic_to_sjis', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_sjis', probin => '$libdir/euc_jp_and_sjis' }, { oid => '4330', descr => 'internal conversion function for EUC_KR to MULE_INTERNAL', - proname => 'euc_kr_to_mic', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_kr_to_mic', - probin => '$libdir/euc_kr_and_mic' }, + proname => 'euc_kr_to_mic', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_kr_to_mic', probin => '$libdir/euc_kr_and_mic' }, { oid => '4331', descr => 'internal conversion function for MULE_INTERNAL to EUC_KR', - proname => 'mic_to_euc_kr', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_euc_kr', - probin => '$libdir/euc_kr_and_mic' }, + proname => 'mic_to_euc_kr', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_euc_kr', probin => '$libdir/euc_kr_and_mic' }, { oid => '4332', descr => 'internal conversion function for EUC_TW to BIG5', - proname => 'euc_tw_to_big5', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_tw_to_big5', - probin => '$libdir/euc_tw_and_big5' }, + proname => 'euc_tw_to_big5', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_tw_to_big5', probin => '$libdir/euc_tw_and_big5' }, { oid => '4333', descr => 'internal conversion function for BIG5 to EUC_TW', - proname => 'big5_to_euc_tw', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'big5_to_euc_tw', - probin => '$libdir/euc_tw_and_big5' }, + proname => 'big5_to_euc_tw', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'big5_to_euc_tw', probin => '$libdir/euc_tw_and_big5' }, { oid => '4334', descr => 'internal conversion function for EUC_TW to MULE_INTERNAL', - proname => 'euc_tw_to_mic', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_tw_to_mic', - probin => '$libdir/euc_tw_and_big5' }, + proname => 'euc_tw_to_mic', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_tw_to_mic', probin => '$libdir/euc_tw_and_big5' }, { oid => '4335', descr => 'internal conversion function for BIG5 to MULE_INTERNAL', - proname => 'big5_to_mic', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'big5_to_mic', - probin => '$libdir/euc_tw_and_big5' }, + proname => 'big5_to_mic', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'big5_to_mic', probin => '$libdir/euc_tw_and_big5' }, { oid => '4336', descr => 'internal conversion function for MULE_INTERNAL to EUC_TW', - proname => 'mic_to_euc_tw', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_euc_tw', - probin => '$libdir/euc_tw_and_big5' }, + proname => 'mic_to_euc_tw', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_euc_tw', probin => '$libdir/euc_tw_and_big5' }, { oid => '4337', descr => 'internal conversion function for MULE_INTERNAL to BIG5', - proname => 'mic_to_big5', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_big5', - probin => '$libdir/euc_tw_and_big5' }, + proname => 'mic_to_big5', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_big5', probin => '$libdir/euc_tw_and_big5' }, { oid => '4338', descr => 'internal conversion function for LATIN2 to MULE_INTERNAL', - proname => 'latin2_to_mic', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'latin2_to_mic', - probin => '$libdir/latin2_and_win1250' }, + proname => 'latin2_to_mic', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'latin2_to_mic', probin => '$libdir/latin2_and_win1250' }, { oid => '4339', descr => 'internal conversion function for MULE_INTERNAL to LATIN2', - proname => 'mic_to_latin2', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_latin2', - probin => '$libdir/latin2_and_win1250' }, + proname => 'mic_to_latin2', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_latin2', probin => '$libdir/latin2_and_win1250' }, { oid => '4340', descr => 'internal conversion function for WIN1250 to MULE_INTERNAL', - proname => 'win1250_to_mic', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'win1250_to_mic', - probin => '$libdir/latin2_and_win1250' }, + proname => 'win1250_to_mic', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'win1250_to_mic', probin => '$libdir/latin2_and_win1250' }, { oid => '4341', descr => 'internal conversion function for MULE_INTERNAL to WIN1250', - proname => 'mic_to_win1250', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_win1250', - probin => '$libdir/latin2_and_win1250' }, + proname => 'mic_to_win1250', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_win1250', probin => '$libdir/latin2_and_win1250' }, { oid => '4342', descr => 'internal conversion function for LATIN2 to WIN1250', - proname => 'latin2_to_win1250', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', + proname => 'latin2_to_win1250', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'latin2_to_win1250', probin => '$libdir/latin2_and_win1250' }, { oid => '4343', descr => 'internal conversion function for WIN1250 to LATIN2', - proname => 'win1250_to_latin2', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', + proname => 'win1250_to_latin2', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'win1250_to_latin2', probin => '$libdir/latin2_and_win1250' }, { oid => '4344', descr => 'internal conversion function for LATIN1 to MULE_INTERNAL', - proname => 'latin1_to_mic', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'latin1_to_mic', - probin => '$libdir/latin_and_mic' }, + proname => 'latin1_to_mic', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'latin1_to_mic', probin => '$libdir/latin_and_mic' }, { oid => '4345', descr => 'internal conversion function for MULE_INTERNAL to LATIN1', - proname => 'mic_to_latin1', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_latin1', - probin => '$libdir/latin_and_mic' }, + proname => 'mic_to_latin1', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_latin1', probin => '$libdir/latin_and_mic' }, { oid => '4346', descr => 'internal conversion function for LATIN3 to MULE_INTERNAL', - proname => 'latin3_to_mic', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'latin3_to_mic', - probin => '$libdir/latin_and_mic' }, + proname => 'latin3_to_mic', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'latin3_to_mic', probin => '$libdir/latin_and_mic' }, { oid => '4347', descr => 'internal conversion function for MULE_INTERNAL to LATIN3', - proname => 'mic_to_latin3', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_latin3', - probin => '$libdir/latin_and_mic' }, + proname => 'mic_to_latin3', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_latin3', probin => '$libdir/latin_and_mic' }, { oid => '4348', descr => 'internal conversion function for LATIN4 to MULE_INTERNAL', - proname => 'latin4_to_mic', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'latin4_to_mic', - probin => '$libdir/latin_and_mic' }, + proname => 'latin4_to_mic', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'latin4_to_mic', probin => '$libdir/latin_and_mic' }, { oid => '4349', descr => 'internal conversion function for MULE_INTERNAL to LATIN4', - proname => 'mic_to_latin4', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'mic_to_latin4', - probin => '$libdir/latin_and_mic' }, + proname => 'mic_to_latin4', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_latin4', probin => '$libdir/latin_and_mic' }, { oid => '4352', descr => 'internal conversion function for BIG5 to UTF8', - proname => 'big5_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'big5_to_utf8', - probin => '$libdir/utf8_and_big5' }, + proname => 'big5_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'big5_to_utf8', probin => '$libdir/utf8_and_big5' }, { oid => '4353', descr => 'internal conversion function for UTF8 to BIG5', - proname => 'utf8_to_big5', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_big5', - probin => '$libdir/utf8_and_big5' }, + proname => 'utf8_to_big5', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_big5', probin => '$libdir/utf8_and_big5' }, { oid => '4354', descr => 'internal conversion function for UTF8 to KOI8R', - proname => 'utf8_to_koi8r', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_koi8r', - probin => '$libdir/utf8_and_cyrillic' }, + proname => 'utf8_to_koi8r', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_koi8r', probin => '$libdir/utf8_and_cyrillic' }, { oid => '4355', descr => 'internal conversion function for KOI8R to UTF8', - proname => 'koi8r_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'koi8r_to_utf8', - probin => '$libdir/utf8_and_cyrillic' }, + proname => 'koi8r_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'koi8r_to_utf8', probin => '$libdir/utf8_and_cyrillic' }, { oid => '4356', descr => 'internal conversion function for UTF8 to KOI8U', - proname => 'utf8_to_koi8u', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_koi8u', - probin => '$libdir/utf8_and_cyrillic' }, + proname => 'utf8_to_koi8u', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_koi8u', probin => '$libdir/utf8_and_cyrillic' }, { oid => '4357', descr => 'internal conversion function for KOI8U to UTF8', - proname => 'koi8u_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'koi8u_to_utf8', - probin => '$libdir/utf8_and_cyrillic' }, + proname => 'koi8u_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'koi8u_to_utf8', probin => '$libdir/utf8_and_cyrillic' }, { oid => '4358', descr => 'internal conversion function for UTF8 to WIN', - proname => 'utf8_to_win', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_win', - probin => '$libdir/utf8_and_win' }, + proname => 'utf8_to_win', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_win', probin => '$libdir/utf8_and_win' }, { oid => '4359', descr => 'internal conversion function for WIN to UTF8', - proname => 'win_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'win_to_utf8', - probin => '$libdir/utf8_and_win' }, + proname => 'win_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'win_to_utf8', probin => '$libdir/utf8_and_win' }, { oid => '4360', descr => 'internal conversion function for EUC_CN to UTF8', - proname => 'euc_cn_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_cn_to_utf8', - probin => '$libdir/utf8_and_euc_cn' }, + proname => 'euc_cn_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_cn_to_utf8', probin => '$libdir/utf8_and_euc_cn' }, { oid => '4361', descr => 'internal conversion function for UTF8 to EUC_CN', - proname => 'utf8_to_euc_cn', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_euc_cn', - probin => '$libdir/utf8_and_euc_cn' }, + proname => 'utf8_to_euc_cn', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_euc_cn', probin => '$libdir/utf8_and_euc_cn' }, { oid => '4362', descr => 'internal conversion function for EUC_JP to UTF8', - proname => 'euc_jp_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_jp_to_utf8', - probin => '$libdir/utf8_and_euc_jp' }, + proname => 'euc_jp_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_jp_to_utf8', probin => '$libdir/utf8_and_euc_jp' }, { oid => '4363', descr => 'internal conversion function for UTF8 to EUC_JP', - proname => 'utf8_to_euc_jp', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_euc_jp', - probin => '$libdir/utf8_and_euc_jp' }, + proname => 'utf8_to_euc_jp', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_euc_jp', probin => '$libdir/utf8_and_euc_jp' }, { oid => '4364', descr => 'internal conversion function for EUC_KR to UTF8', - proname => 'euc_kr_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_kr_to_utf8', - probin => '$libdir/utf8_and_euc_kr' }, + proname => 'euc_kr_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_kr_to_utf8', probin => '$libdir/utf8_and_euc_kr' }, { oid => '4365', descr => 'internal conversion function for UTF8 to EUC_KR', - proname => 'utf8_to_euc_kr', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_euc_kr', - probin => '$libdir/utf8_and_euc_kr' }, + proname => 'utf8_to_euc_kr', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_euc_kr', probin => '$libdir/utf8_and_euc_kr' }, { oid => '4366', descr => 'internal conversion function for EUC_TW to UTF8', - proname => 'euc_tw_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'euc_tw_to_utf8', - probin => '$libdir/utf8_and_euc_tw' }, + proname => 'euc_tw_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_tw_to_utf8', probin => '$libdir/utf8_and_euc_tw' }, { oid => '4367', descr => 'internal conversion function for UTF8 to EUC_TW', - proname => 'utf8_to_euc_tw', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_euc_tw', - probin => '$libdir/utf8_and_euc_tw' }, + proname => 'utf8_to_euc_tw', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_euc_tw', probin => '$libdir/utf8_and_euc_tw' }, { oid => '4368', descr => 'internal conversion function for GB18030 to UTF8', - proname => 'gb18030_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'gb18030_to_utf8', - probin => '$libdir/utf8_and_gb18030' }, + proname => 'gb18030_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'gb18030_to_utf8', probin => '$libdir/utf8_and_gb18030' }, { oid => '4369', descr => 'internal conversion function for UTF8 to GB18030', - proname => 'utf8_to_gb18030', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_gb18030', - probin => '$libdir/utf8_and_gb18030' }, + proname => 'utf8_to_gb18030', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_gb18030', probin => '$libdir/utf8_and_gb18030' }, { oid => '4370', descr => 'internal conversion function for GBK to UTF8', - proname => 'gbk_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'gbk_to_utf8', - probin => '$libdir/utf8_and_gbk' }, + proname => 'gbk_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'gbk_to_utf8', probin => '$libdir/utf8_and_gbk' }, { oid => '4371', descr => 'internal conversion function for UTF8 to GBK', - proname => 'utf8_to_gbk', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_gbk', - probin => '$libdir/utf8_and_gbk' }, + proname => 'utf8_to_gbk', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_gbk', probin => '$libdir/utf8_and_gbk' }, { oid => '4372', descr => 'internal conversion function for UTF8 to ISO-8859 2-16', - proname => 'utf8_to_iso8859', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_iso8859', - probin => '$libdir/utf8_and_iso8859' }, + proname => 'utf8_to_iso8859', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_iso8859', probin => '$libdir/utf8_and_iso8859' }, { oid => '4373', descr => 'internal conversion function for ISO-8859 2-16 to UTF8', - proname => 'iso8859_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'iso8859_to_utf8', - probin => '$libdir/utf8_and_iso8859' }, + proname => 'iso8859_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'iso8859_to_utf8', probin => '$libdir/utf8_and_iso8859' }, { oid => '4374', descr => 'internal conversion function for LATIN1 to UTF8', - proname => 'iso8859_1_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', + proname => 'iso8859_1_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'iso8859_1_to_utf8', probin => '$libdir/utf8_and_iso8859_1' }, { oid => '4375', descr => 'internal conversion function for UTF8 to LATIN1', - proname => 'utf8_to_iso8859_1', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', + proname => 'utf8_to_iso8859_1', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_iso8859_1', probin => '$libdir/utf8_and_iso8859_1' }, { oid => '4376', descr => 'internal conversion function for JOHAB to UTF8', - proname => 'johab_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'johab_to_utf8', - probin => '$libdir/utf8_and_johab' }, + proname => 'johab_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'johab_to_utf8', probin => '$libdir/utf8_and_johab' }, { oid => '4377', descr => 'internal conversion function for UTF8 to JOHAB', - proname => 'utf8_to_johab', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_johab', - probin => '$libdir/utf8_and_johab' }, + proname => 'utf8_to_johab', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_johab', probin => '$libdir/utf8_and_johab' }, { oid => '4378', descr => 'internal conversion function for SJIS to UTF8', - proname => 'sjis_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'sjis_to_utf8', - probin => '$libdir/utf8_and_sjis' }, + proname => 'sjis_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'sjis_to_utf8', probin => '$libdir/utf8_and_sjis' }, { oid => '4379', descr => 'internal conversion function for UTF8 to SJIS', - proname => 'utf8_to_sjis', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_sjis', - probin => '$libdir/utf8_and_sjis' }, + proname => 'utf8_to_sjis', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_sjis', probin => '$libdir/utf8_and_sjis' }, { oid => '4380', descr => 'internal conversion function for UHC to UTF8', - proname => 'uhc_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'uhc_to_utf8', - probin => '$libdir/utf8_and_uhc' }, + proname => 'uhc_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'uhc_to_utf8', probin => '$libdir/utf8_and_uhc' }, { oid => '4381', descr => 'internal conversion function for UTF8 to UHC', - proname => 'utf8_to_uhc', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', prosrc => 'utf8_to_uhc', - probin => '$libdir/utf8_and_uhc' }, + proname => 'utf8_to_uhc', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_uhc', probin => '$libdir/utf8_and_uhc' }, { oid => '4382', descr => 'internal conversion function for EUC_JIS_2004 to UTF8', - proname => 'euc_jis_2004_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', + proname => 'euc_jis_2004_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'euc_jis_2004_to_utf8', probin => '$libdir/utf8_and_euc2004' }, { oid => '4383', descr => 'internal conversion function for UTF8 to EUC_JIS_2004', - proname => 'utf8_to_euc_jis_2004', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', + proname => 'utf8_to_euc_jis_2004', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_euc_jis_2004', probin => '$libdir/utf8_and_euc2004' }, { oid => '4384', descr => 'internal conversion function for SHIFT_JIS_2004 to UTF8', - proname => 'shift_jis_2004_to_utf8', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', + proname => 'shift_jis_2004_to_utf8', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'shift_jis_2004_to_utf8', probin => '$libdir/utf8_and_sjis2004' }, { oid => '4385', descr => 'internal conversion function for UTF8 to SHIFT_JIS_2004', - proname => 'utf8_to_shift_jis_2004', prolang => 'c', prorettype => 'void', - proargtypes => 'int4 int4 cstring internal int4', + proname => 'utf8_to_shift_jis_2004', prolang => 'c', prorettype => 'int4', + proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_shift_jis_2004', probin => '$libdir/utf8_and_sjis2004' }, { oid => '4386', descr => 'internal conversion function for EUC_JIS_2004 to SHIFT_JIS_2004', proname => 'euc_jis_2004_to_shift_jis_2004', prolang => 'c', - prorettype => 'void', proargtypes => 'int4 int4 cstring internal int4', + prorettype => 'int4', proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'euc_jis_2004_to_shift_jis_2004', probin => '$libdir/euc2004_sjis2004' }, { oid => '4387', descr => 'internal conversion function for SHIFT_JIS_2004 to EUC_JIS_2004', proname => 'shift_jis_2004_to_euc_jis_2004', prolang => 'c', - prorettype => 'void', proargtypes => 'int4 int4 cstring internal int4', + prorettype => 'int4', proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'shift_jis_2004_to_euc_jis_2004', probin => '$libdir/euc2004_sjis2004' }, @@ -10863,6 +11499,18 @@ proargnames => '{max_data_alignment,database_block_size,blocks_per_segment,wal_block_size,bytes_per_wal_segment,max_identifier_length,max_index_columns,max_toast_chunk_size,large_object_chunk_size,float8_pass_by_value,data_page_checksum_version}', prosrc => 'pg_control_init' }, +# subscripting support for built-in types +{ oid => '6179', descr => 'standard array subscripting support', + proname => 'array_subscript_handler', prorettype => 'internal', + proargtypes => 'internal', prosrc => 'array_subscript_handler' }, +{ oid => '6180', descr => 'raw array subscripting support', + proname => 'raw_array_subscript_handler', prorettype => 'internal', + proargtypes => 'internal', prosrc => 'raw_array_subscript_handler' }, +# type subscripting support +{ oid => '6098', descr => 'jsonb subscripting logic', + proname => 'jsonb_subscript_handler', prorettype => 'internal', + proargtypes => 'internal', prosrc => 'jsonb_subscript_handler' }, + # collation management functions { oid => '3445', descr => 'import collations from operating system', proname => 'pg_import_system_collations', procost => '100', @@ -10937,4 +11585,40 @@ proname => 'is_normalized', prorettype => 'bool', proargtypes => 'text text', prosrc => 'unicode_is_normalized' }, +{ oid => '6198', descr => 'unescape Unicode characters', + proname => 'unistr', prorettype => 'text', proargtypes => 'text', + prosrc => 'unistr' }, + +{ oid => '4596', descr => 'I/O', + proname => 'brin_bloom_summary_in', prorettype => 'pg_brin_bloom_summary', + proargtypes => 'cstring', prosrc => 'brin_bloom_summary_in' }, +{ oid => '4597', descr => 'I/O', + proname => 'brin_bloom_summary_out', prorettype => 'cstring', + proargtypes => 'pg_brin_bloom_summary', prosrc => 'brin_bloom_summary_out' }, +{ oid => '4598', descr => 'I/O', + proname => 'brin_bloom_summary_recv', provolatile => 's', + prorettype => 'pg_brin_bloom_summary', proargtypes => 'internal', + prosrc => 'brin_bloom_summary_recv' }, +{ oid => '4599', descr => 'I/O', + proname => 'brin_bloom_summary_send', provolatile => 's', + prorettype => 'bytea', proargtypes => 'pg_brin_bloom_summary', + prosrc => 'brin_bloom_summary_send' }, + +{ oid => '4638', descr => 'I/O', + proname => 'brin_minmax_multi_summary_in', + prorettype => 'pg_brin_minmax_multi_summary', proargtypes => 'cstring', + prosrc => 'brin_minmax_multi_summary_in' }, +{ oid => '4639', descr => 'I/O', + proname => 'brin_minmax_multi_summary_out', prorettype => 'cstring', + proargtypes => 'pg_brin_minmax_multi_summary', + prosrc => 'brin_minmax_multi_summary_out' }, +{ oid => '4640', descr => 'I/O', + proname => 'brin_minmax_multi_summary_recv', provolatile => 's', + prorettype => 'pg_brin_minmax_multi_summary', proargtypes => 'internal', + prosrc => 'brin_minmax_multi_summary_recv' }, +{ oid => '4641', descr => 'I/O', + proname => 'brin_minmax_multi_summary_send', provolatile => 's', + prorettype => 'bytea', proargtypes => 'pg_brin_minmax_multi_summary', + prosrc => 'brin_minmax_multi_summary_send' }, + ] diff --git a/contrib/libs/postgresql/src/include/catalog/pg_proc.h b/contrib/libs/postgresql/src/include/catalog/pg_proc.h index ee3959da09..a65afe7bc4 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_proc.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_proc.h @@ -3,7 +3,7 @@ * pg_proc.h * definition of the "procedure" system catalog (pg_proc) * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -35,10 +35,10 @@ CATALOG(pg_proc,1255,ProcedureRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81,Proce NameData proname; /* OID of namespace containing this proc */ - Oid pronamespace BKI_DEFAULT(PGNSP); + Oid pronamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace); /* procedure owner */ - Oid proowner BKI_DEFAULT(PGUID); + Oid proowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid); /* OID of pg_language entry */ Oid prolang BKI_DEFAULT(internal) BKI_LOOKUP(pg_language); @@ -49,11 +49,11 @@ CATALOG(pg_proc,1255,ProcedureRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81,Proce /* estimated # of rows out (if proretset) */ float4 prorows BKI_DEFAULT(0); - /* element type of variadic array, or 0 */ - Oid provariadic BKI_DEFAULT(0) BKI_LOOKUP(pg_type); + /* 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(pg_proc); + regproc prosupport BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_proc); /* see PROKIND_ categories below */ char prokind BKI_DEFAULT(f); @@ -92,7 +92,7 @@ CATALOG(pg_proc,1255,ProcedureRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81,Proce */ /* parameter types (excludes OUT params) */ - oidvector proargtypes BKI_LOOKUP(pg_type); + oidvector proargtypes BKI_LOOKUP(pg_type) BKI_FORCE_NOT_NULL; #ifdef CATALOG_VARLEN @@ -109,7 +109,7 @@ CATALOG(pg_proc,1255,ProcedureRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81,Proce pg_node_tree proargdefaults BKI_DEFAULT(_null_); /* types for which to apply transforms */ - Oid protrftypes[1] BKI_DEFAULT(_null_); + Oid protrftypes[1] BKI_DEFAULT(_null_) BKI_LOOKUP(pg_type); /* procedure source text */ text prosrc BKI_FORCE_NOT_NULL; @@ -117,6 +117,9 @@ CATALOG(pg_proc,1255,ProcedureRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81,Proce /* 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_); @@ -132,6 +135,13 @@ CATALOG(pg_proc,1255,ProcedureRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81,Proce */ 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 /* @@ -157,10 +167,10 @@ typedef FormData_pg_proc *Form_pg_proc; /* * 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 master, or only in non-parallel mode. + * necessarily in the leader, or only in non-parallel mode. */ -#define PROPARALLEL_SAFE 's' /* can run in worker or master */ -#define PROPARALLEL_RESTRICTED 'r' /* can run in parallel master only */ +#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 */ /* @@ -187,6 +197,7 @@ extern ObjectAddress ProcedureCreate(const char *procedureName, Oid languageValidator, const char *prosrc, const char *probin, + Node *prosqlbody, char prokind, bool security_definer, bool isLeakProof, diff --git a/contrib/libs/postgresql/src/include/catalog/pg_publication.h b/contrib/libs/postgresql/src/include/catalog/pg_publication.h index c876085a49..84552ab5b3 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_publication.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_publication.h @@ -3,7 +3,7 @@ * pg_publication.h * definition of the "publication" system catalog (pg_publication) * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -32,7 +32,7 @@ CATALOG(pg_publication,6104,PublicationRelationId) NameData pubname; /* name of the publication */ - Oid pubowner; /* publication owner */ + Oid pubowner BKI_LOOKUP(pg_authid); /* publication owner */ /* * indicates that this is special publication which should encompass all @@ -63,6 +63,11 @@ CATALOG(pg_publication,6104,PublicationRelationId) */ 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; diff --git a/contrib/libs/postgresql/src/include/catalog/pg_publication_rel.h b/contrib/libs/postgresql/src/include/catalog/pg_publication_rel.h index 8ab226e4c0..aecf53b3b3 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_publication_rel.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_publication_rel.h @@ -4,7 +4,7 @@ * definition of the system catalog for mappings between relations and * publications (pg_publication_rel) * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -29,8 +29,8 @@ CATALOG(pg_publication_rel,6106,PublicationRelRelationId) { Oid oid; /* oid */ - Oid prpubid; /* Oid of the publication */ - Oid prrelid; /* Oid of the relation */ + Oid prpubid BKI_LOOKUP(pg_publication); /* Oid of the publication */ + Oid prrelid BKI_LOOKUP(pg_class); /* Oid of the relation */ } FormData_pg_publication_rel; /* ---------------- @@ -40,4 +40,9 @@ CATALOG(pg_publication_rel,6106,PublicationRelRelationId) */ 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_range.dat b/contrib/libs/postgresql/src/include/catalog/pg_range.dat index 479754c245..3bd2d83b38 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_range.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_range.dat @@ -3,7 +3,7 @@ # pg_range.dat # Initial contents of the pg_range system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 @@ -12,20 +12,23 @@ [ -{ rngtypid => 'int4range', rngsubtype => 'int4', rngsubopc => 'btree/int4_ops', +{ rngtypid => 'int4range', rngsubtype => 'int4', + rngmultitypid => 'int4multirange', rngsubopc => 'btree/int4_ops', rngcanonical => 'int4range_canonical', rngsubdiff => 'int4range_subdiff' }, { rngtypid => 'numrange', rngsubtype => 'numeric', - rngsubopc => 'btree/numeric_ops', rngcanonical => '-', - rngsubdiff => 'numrange_subdiff' }, + rngmultitypid => 'nummultirange', rngsubopc => 'btree/numeric_ops', + rngcanonical => '-', rngsubdiff => 'numrange_subdiff' }, { rngtypid => 'tsrange', rngsubtype => 'timestamp', - rngsubopc => 'btree/timestamp_ops', rngcanonical => '-', - rngsubdiff => 'tsrange_subdiff' }, + rngmultitypid => 'tsmultirange', rngsubopc => 'btree/timestamp_ops', + rngcanonical => '-', rngsubdiff => 'tsrange_subdiff' }, { rngtypid => 'tstzrange', rngsubtype => 'timestamptz', - rngsubopc => 'btree/timestamptz_ops', rngcanonical => '-', - rngsubdiff => 'tstzrange_subdiff' }, -{ rngtypid => 'daterange', rngsubtype => 'date', rngsubopc => 'btree/date_ops', + 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', rngsubopc => 'btree/int8_ops', +{ 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 index 98172bb1b6..5dfa4eef8b 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_range.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_range.h @@ -4,7 +4,7 @@ * definition of the "range type" system catalog (pg_range) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -34,17 +34,20 @@ CATALOG(pg_range,3541,RangeRelationId) /* 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); + 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(pg_proc); + regproc rngcanonical BKI_LOOKUP_OPT(pg_proc); /* subtype difference as a float8, or 0 */ - regproc rngsubdiff BKI_LOOKUP(pg_proc); + regproc rngsubdiff BKI_LOOKUP_OPT(pg_proc); } FormData_pg_range; /* ---------------- @@ -54,13 +57,20 @@ CATALOG(pg_range,3541,RangeRelationId) */ 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); + RegProcedure rangeSubDiff, Oid multirangeTypeOid); extern void RangeDelete(Oid rangeTypeOid); #endif /* PG_RANGE_H */ diff --git a/contrib/libs/postgresql/src/include/catalog/pg_replication_origin.h b/contrib/libs/postgresql/src/include/catalog/pg_replication_origin.h index 7477ce49cc..184f2403ce 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_replication_origin.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_replication_origin.h @@ -4,7 +4,7 @@ * definition of the "replication origin" system catalog * (pg_replication_origin) * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -54,4 +54,13 @@ CATALOG(pg_replication_origin,6000,ReplicationOriginRelationId) BKI_SHARED_RELAT 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_rewrite.h b/contrib/libs/postgresql/src/include/catalog/pg_rewrite.h index 4369fc87c6..89c72545d0 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_rewrite.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_rewrite.h @@ -7,7 +7,7 @@ * --- ie, rule names are only unique among the rules of a given table. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -33,7 +33,7 @@ CATALOG(pg_rewrite,2618,RewriteRelationId) { Oid oid; /* oid */ NameData rulename; - Oid ev_class; + Oid ev_class BKI_LOOKUP(pg_class); char ev_type; char ev_enabled; bool is_instead; @@ -51,4 +51,11 @@ CATALOG(pg_rewrite,2618,RewriteRelationId) */ 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_seclabel.h b/contrib/libs/postgresql/src/include/catalog/pg_seclabel.h index 07d4bff119..0a12225eb7 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_seclabel.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_seclabel.h @@ -3,7 +3,7 @@ * pg_seclabel.h * definition of the "security label" system catalog (pg_seclabel) * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -28,7 +28,8 @@ CATALOG(pg_seclabel,3596,SecLabelRelationId) { Oid objoid; /* OID of the object itself */ - Oid classoid; /* OID of table containing the object */ + 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 */ @@ -37,4 +38,9 @@ CATALOG(pg_seclabel,3596,SecLabelRelationId) #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_sequence.h b/contrib/libs/postgresql/src/include/catalog/pg_sequence.h index 9459edd95b..8d0a00baf6 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_sequence.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_sequence.h @@ -3,7 +3,7 @@ * pg_sequence.h * definition of the "sequence" system catalog (pg_sequence) * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -22,8 +22,8 @@ CATALOG(pg_sequence,2224,SequenceRelationId) { - Oid seqrelid; - Oid seqtypid; + Oid seqrelid BKI_LOOKUP(pg_class); + Oid seqtypid BKI_LOOKUP(pg_type); int64 seqstart; int64 seqincrement; int64 seqmax; @@ -39,4 +39,7 @@ CATALOG(pg_sequence,2224,SequenceRelationId) */ 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_shdepend.h b/contrib/libs/postgresql/src/include/catalog/pg_shdepend.h index 7c3fd5b08e..4faa95794d 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_shdepend.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_shdepend.h @@ -12,7 +12,7 @@ * from a relation to its database. Currently, only dependencies on roles * are explicitly stored in pg_shdepend. * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -42,8 +42,10 @@ CATALOG(pg_shdepend,1214,SharedDependRelationId) BKI_SHARED_RELATION * These fields are all zeroes for a DEPENDENCY_PIN entry. Also, dbid can * be zero to denote a shared object. */ - Oid dbid; /* OID of database containing object */ - Oid classid; /* OID of table containing 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 */ @@ -52,7 +54,8 @@ CATALOG(pg_shdepend,1214,SharedDependRelationId) BKI_SHARED_RELATION * a shared object, so we need no database ID field. We don't bother with * a sub-object ID either. */ - Oid refclassid; /* OID of table containing object */ + Oid refclassid BKI_LOOKUP(pg_class); /* OID of table containing + * object */ Oid refobjid; /* OID of object itself */ /* @@ -69,4 +72,9 @@ CATALOG(pg_shdepend,1214,SharedDependRelationId) BKI_SHARED_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_shdescription.h b/contrib/libs/postgresql/src/include/catalog/pg_shdescription.h index a8238aa793..543e216710 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_shdescription.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_shdescription.h @@ -16,7 +16,7 @@ * across tables. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -55,4 +55,14 @@ CATALOG(pg_shdescription,2396,SharedDescriptionRelationId) BKI_SHARED_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_shseclabel.h b/contrib/libs/postgresql/src/include/catalog/pg_shseclabel.h index 331e066448..5d6864cf8c 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_shseclabel.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_shseclabel.h @@ -3,7 +3,7 @@ * pg_shseclabel.h * definition of the "shared security label" system catalog (pg_shseclabel) * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -28,7 +28,8 @@ 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; /* OID of table containing the shared object */ + 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 */ @@ -38,4 +39,11 @@ CATALOG(pg_shseclabel,3592,SharedSecLabelRelationId) BKI_SHARED_RELATION BKI_ROW 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_statistic.h b/contrib/libs/postgresql/src/include/catalog/pg_statistic.h index 40a7260165..d1827858e2 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_statistic.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_statistic.h @@ -4,7 +4,7 @@ * definition of the "statistics" system catalog (pg_statistic) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -29,7 +29,8 @@ CATALOG(pg_statistic,2619,StatisticRelationId) { /* These fields form the unique key for the entry: */ - Oid starelid; /* relation containing attribute */ + Oid starelid BKI_LOOKUP(pg_class); /* relation containing + * attribute */ int16 staattnum; /* attribute (column) stats are for */ bool stainherit; /* true if inheritance children are included */ @@ -90,17 +91,17 @@ CATALOG(pg_statistic,2619,StatisticRelationId) int16 stakind4; int16 stakind5; - Oid staop1; - Oid staop2; - Oid staop3; - Oid staop4; - Oid staop5; + 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; - Oid stacoll2; - Oid stacoll3; - Oid stacoll4; - Oid stacoll5; + 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]; @@ -133,6 +134,13 @@ CATALOG(pg_statistic,2619,StatisticRelationId) */ 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 /* diff --git a/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext.h b/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext.h index a8cb16997a..36912ce528 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext.h @@ -8,7 +8,7 @@ * objects, created by CREATE STATISTICS, but not the actual statistical data, * created by running ANALYZE. * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -34,24 +34,29 @@ CATALOG(pg_statistic_ext,3381,StatisticExtRelationId) { Oid oid; /* oid */ - Oid stxrelid; /* relation containing attributes */ + 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; /* OID of statistics object's namespace */ + Oid stxnamespace BKI_LOOKUP(pg_namespace); /* OID of statistics + * object's namespace */ - Oid stxowner; /* statistics object's owner */ + 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; /* array of column keys */ + 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; @@ -63,11 +68,23 @@ CATALOG(pg_statistic_ext,3381,StatisticExtRelationId) */ 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 */ 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 index 0ef4ecb64a..5729154383 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext_data.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_statistic_ext_data.h @@ -6,7 +6,7 @@ * * This catalog stores the statistical data for extended statistics objects. * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -30,13 +30,15 @@ */ CATALOG(pg_statistic_ext_data,3429,StatisticExtDataRelationId) { - Oid stxoid; /* statistics object this data is for */ + 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 @@ -49,4 +51,9 @@ CATALOG(pg_statistic_ext_data,3429,StatisticExtDataRelationId) */ 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_subscription.h b/contrib/libs/postgresql/src/include/catalog/pg_subscription.h index e3288ad76e..0060ebfb40 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_subscription.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_subscription.h @@ -3,7 +3,7 @@ * pg_subscription.h * definition of the "subscription" system catalog (pg_subscription) * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -34,20 +34,29 @@ * them to be able to start the workers, so we have to put them in a shared, * nailed catalog. * - * NOTE: When adding a column, also update system_views.sql. + * 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; /* Database the subscription is in. */ + Oid subdbid BKI_LOOKUP(pg_database); /* Database the + * subscription is in. */ NameData subname; /* Name of the subscription */ - Oid subowner; /* Owner 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; @@ -65,6 +74,15 @@ CATALOG(pg_subscription,6100,SubscriptionRelationId) BKI_SHARED_RELATION BKI_ROW 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 */ @@ -73,6 +91,9 @@ typedef struct Subscription 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 */ diff --git a/contrib/libs/postgresql/src/include/catalog/pg_subscription_rel.h b/contrib/libs/postgresql/src/include/catalog/pg_subscription_rel.h index f384f4e7fa..ed94f57baa 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_subscription_rel.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_subscription_rel.h @@ -4,7 +4,7 @@ * definition of the system catalog containing the state for each * replicated table in each subscription (pg_subscription_rel) * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -30,8 +30,8 @@ */ CATALOG(pg_subscription_rel,6102,SubscriptionRelRelationId) { - Oid srsubid; /* Oid of subscription */ - Oid srrelid; /* Oid of relation */ + 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 */ /* @@ -49,6 +49,9 @@ CATALOG(pg_subscription_rel,6102,SubscriptionRelRelationId) 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 /* ---------------- @@ -58,6 +61,8 @@ typedef FormData_pg_subscription_rel *Form_pg_subscription_rel; #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) */ @@ -80,8 +85,7 @@ 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, bool missing_ok); +extern char GetSubscriptionRelState(Oid subid, Oid relid, XLogRecPtr *sublsn); extern void RemoveSubscriptionRel(Oid subid, Oid relid); extern List *GetSubscriptionRelations(Oid subid); diff --git a/contrib/libs/postgresql/src/include/catalog/pg_tablespace.dat b/contrib/libs/postgresql/src/include/catalog/pg_tablespace.dat index bb0dec08ef..bf0d81d306 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_tablespace.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_tablespace.dat @@ -3,7 +3,7 @@ # pg_tablespace.dat # Initial contents of the pg_tablespace system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 @@ -13,10 +13,8 @@ [ { oid => '1663', oid_symbol => 'DEFAULTTABLESPACE_OID', - spcname => 'pg_default', spcowner => 'PGUID', spcacl => '_null_', - spcoptions => '_null_' }, + spcname => 'pg_default', spcacl => '_null_', spcoptions => '_null_' }, { oid => '1664', oid_symbol => 'GLOBALTABLESPACE_OID', - spcname => 'pg_global', spcowner => 'PGUID', spcacl => '_null_', - spcoptions => '_null_' }, + 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 index 1daf2dd9c2..58bb1087a3 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_tablespace.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_tablespace.h @@ -4,7 +4,7 @@ * definition of the "tablespace" system catalog (pg_tablespace) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -30,7 +30,9 @@ CATALOG(pg_tablespace,1213,TableSpaceRelationId) BKI_SHARED_RELATION { Oid oid; /* oid */ NameData spcname; /* tablespace name */ - Oid spcowner; /* owner of tablespace */ + + /* 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 */ @@ -45,4 +47,13 @@ CATALOG(pg_tablespace,1213,TableSpaceRelationId) BKI_SHARED_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_transform.h b/contrib/libs/postgresql/src/include/catalog/pg_transform.h index 05f3e276fc..d603246138 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_transform.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_transform.h @@ -4,7 +4,7 @@ * definition of the "transform" system catalog (pg_transform) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -29,10 +29,10 @@ CATALOG(pg_transform,3576,TransformRelationId) { Oid oid; /* oid */ - Oid trftype; - Oid trflang; - regproc trffromsql; - regproc trftosql; + 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; /* ---------------- @@ -42,4 +42,9 @@ CATALOG(pg_transform,3576,TransformRelationId) */ 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_trigger.h b/contrib/libs/postgresql/src/include/catalog/pg_trigger.h index 9612b9bdd6..2e3d233876 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_trigger.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_trigger.h @@ -4,7 +4,7 @@ * definition of the "trigger" system catalog (pg_trigger) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -34,18 +34,25 @@ CATALOG(pg_trigger,2620,TriggerRelationId) { Oid oid; /* oid */ - Oid tgrelid; /* relation trigger is attached to */ - Oid tgparentid; /* OID of parent trigger, if any */ + 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; /* OID of function to be called */ + 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; /* constraint's FROM table, if any */ - Oid tgconstrindid; /* constraint's supporting index, if any */ - Oid tgconstraint; /* associated pg_constraint entry, if any */ + 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 */ @@ -54,7 +61,8 @@ CATALOG(pg_trigger,2620,TriggerRelationId) * Variable-length fields start here, but we allow direct access to * tgattr. Note: tgattr and tgargs must not be null. */ - int2vector tgattr; /* column numbers, if trigger is on columns */ + 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 */ @@ -71,6 +79,17 @@ CATALOG(pg_trigger,2620,TriggerRelationId) */ 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 */ diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_config.dat b/contrib/libs/postgresql/src/include/catalog/pg_ts_config.dat index 44281675db..f88d899199 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_ts_config.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_ts_config.dat @@ -3,7 +3,7 @@ # pg_ts_config.dat # Initial contents of the pg_ts_config system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_config.h b/contrib/libs/postgresql/src/include/catalog/pg_ts_config.h index 0d9c5e3590..2e0263962d 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_ts_config.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_ts_config.h @@ -5,7 +5,7 @@ * (pg_ts_config) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -36,10 +36,10 @@ CATALOG(pg_ts_config,3602,TSConfigRelationId) NameData cfgname; /* name space */ - Oid cfgnamespace BKI_DEFAULT(PGNSP); + Oid cfgnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace); /* owner */ - Oid cfgowner BKI_DEFAULT(PGUID); + Oid cfgowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid); /* OID of parser */ Oid cfgparser BKI_LOOKUP(pg_ts_parser); @@ -47,4 +47,9 @@ CATALOG(pg_ts_config,3602,TSConfigRelationId) 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_map.dat b/contrib/libs/postgresql/src/include/catalog/pg_ts_config_map.dat index f3a593326e..cacfd125cf 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_ts_config_map.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_ts_config_map.dat @@ -3,7 +3,7 @@ # pg_ts_config_map.dat # Initial contents of the pg_ts_config_map system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 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 index 46aef63faa..f39d14fd79 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_ts_config_map.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_ts_config_map.h @@ -5,7 +5,7 @@ * (pg_ts_config_map) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -44,4 +44,7 @@ CATALOG(pg_ts_config_map,3603,TSConfigMapRelationId) 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_dict.dat b/contrib/libs/postgresql/src/include/catalog/pg_ts_dict.dat index abeec0ccae..4d39bb8c36 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_ts_dict.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_ts_dict.dat @@ -3,7 +3,7 @@ # pg_ts_dict.dat # Initial contents of the pg_ts_dict system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_dict.h b/contrib/libs/postgresql/src/include/catalog/pg_ts_dict.h index 38128a313f..e53eead829 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_ts_dict.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_ts_dict.h @@ -4,7 +4,7 @@ * definition of the "text search dictionary" system catalog (pg_ts_dict) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -35,10 +35,10 @@ CATALOG(pg_ts_dict,3600,TSDictionaryRelationId) NameData dictname; /* name space */ - Oid dictnamespace BKI_DEFAULT(PGNSP); + Oid dictnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace); /* owner */ - Oid dictowner BKI_DEFAULT(PGUID); + Oid dictowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid); /* dictionary's template */ Oid dicttemplate BKI_LOOKUP(pg_ts_template); @@ -51,4 +51,11 @@ CATALOG(pg_ts_dict,3600,TSDictionaryRelationId) 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_parser.dat b/contrib/libs/postgresql/src/include/catalog/pg_ts_parser.dat index f23aa8c541..a2b7cf10a6 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_ts_parser.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_ts_parser.dat @@ -3,7 +3,7 @@ # pg_ts_parser.dat # Initial contents of the pg_ts_parser system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_parser.h b/contrib/libs/postgresql/src/include/catalog/pg_ts_parser.h index 641c6b6cb1..0231051cee 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_ts_parser.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_ts_parser.h @@ -4,7 +4,7 @@ * definition of the "text search parser" system catalog (pg_ts_parser) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -34,7 +34,7 @@ CATALOG(pg_ts_parser,3601,TSParserRelationId) NameData prsname; /* name space */ - Oid prsnamespace BKI_DEFAULT(PGNSP); + Oid prsnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace); /* init parsing session */ regproc prsstart BKI_LOOKUP(pg_proc); @@ -46,7 +46,7 @@ CATALOG(pg_ts_parser,3601,TSParserRelationId) regproc prsend BKI_LOOKUP(pg_proc); /* return data for headline creation */ - regproc prsheadline BKI_LOOKUP(pg_proc); + regproc prsheadline BKI_LOOKUP_OPT(pg_proc); /* return descriptions of lexeme's types */ regproc prslextype BKI_LOOKUP(pg_proc); @@ -54,4 +54,9 @@ CATALOG(pg_ts_parser,3601,TSParserRelationId) 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_template.dat b/contrib/libs/postgresql/src/include/catalog/pg_ts_template.dat index 297a8b38fc..0bdbcac7b2 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_ts_template.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_ts_template.dat @@ -3,7 +3,7 @@ # pg_ts_template.dat # Initial contents of the pg_ts_template system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# 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 diff --git a/contrib/libs/postgresql/src/include/catalog/pg_ts_template.h b/contrib/libs/postgresql/src/include/catalog/pg_ts_template.h index f610225ba2..194b921136 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_ts_template.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_ts_template.h @@ -4,7 +4,7 @@ * definition of the "text search template" system catalog (pg_ts_template) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -34,10 +34,10 @@ CATALOG(pg_ts_template,3764,TSTemplateRelationId) NameData tmplname; /* name space */ - Oid tmplnamespace BKI_DEFAULT(PGNSP); + Oid tmplnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace); /* initialization method of dict (may be 0) */ - regproc tmplinit BKI_LOOKUP(pg_proc); + regproc tmplinit BKI_LOOKUP_OPT(pg_proc); /* base method of dictionary */ regproc tmpllexize BKI_LOOKUP(pg_proc); @@ -45,4 +45,9 @@ CATALOG(pg_ts_template,3764,TSTemplateRelationId) 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_type.dat b/contrib/libs/postgresql/src/include/catalog/pg_type.dat index e8be000835..41074c994b 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_type.dat +++ b/contrib/libs/postgresql/src/include/catalog/pg_type.dat @@ -3,7 +3,7 @@ # pg_type.dat # Initial contents of the pg_type system catalog. # -# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group +# Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # # src/include/catalog/pg_type.dat @@ -15,14 +15,10 @@ # For types used in the system catalogs, make sure the values here match # TypInfo[] in bootstrap.c. -# OID symbol macro names for pg_type OIDs are generated by genbki.pl -# according to the following rule, so you don't need to specify them -# here: +# OID symbol macro names for pg_type OIDs are not specified here because +# they are generated by genbki.pl according to the following rule: # foo_bar -> FOO_BAROID # _foo_bar -> FOO_BARARRAYOID -# -# The only oid_symbol entries in this file are for names that don't match -# this rule, and are grandfathered in. # To autogenerate an array type, add 'array_type_oid => 'nnnn' to the element # type, which will instruct genbki.pl to generate a BKI entry for it. @@ -52,9 +48,10 @@ { oid => '19', array_type_oid => '1003', descr => '63-byte type for storing system identifiers', typname => 'name', typlen => 'NAMEDATALEN', typbyval => 'f', - typcategory => 'S', typelem => 'char', typinput => 'namein', - typoutput => 'nameout', typreceive => 'namerecv', typsend => 'namesend', - typalign => 'c', typcollation => 'C' }, + typcategory => 'S', typsubscript => 'raw_array_subscript_handler', + typelem => 'char', typinput => 'namein', typoutput => 'nameout', + typreceive => 'namerecv', typsend => 'namesend', typalign => 'c', + typcollation => 'C' }, { oid => '20', array_type_oid => '1016', descr => '~18 digit integer, 8-byte storage', typname => 'int8', typlen => '8', typbyval => 'FLOAT8PASSBYVAL', @@ -68,7 +65,8 @@ { oid => '22', array_type_oid => '1006', descr => 'array of int2, used in system tables', typname => 'int2vector', typlen => '-1', typbyval => 'f', typcategory => 'A', - typelem => 'int2', typinput => 'int2vectorin', typoutput => 'int2vectorout', + typsubscript => 'array_subscript_handler', typelem => 'int2', + typinput => 'int2vectorin', typoutput => 'int2vectorout', typreceive => 'int2vectorrecv', typsend => 'int2vectorsend', typalign => 'i' }, { oid => '23', array_type_oid => '1007', @@ -108,27 +106,28 @@ { oid => '30', array_type_oid => '1013', descr => 'array of oids, used in system tables', typname => 'oidvector', typlen => '-1', typbyval => 'f', typcategory => 'A', - typelem => 'oid', typinput => 'oidvectorin', typoutput => 'oidvectorout', + typsubscript => 'array_subscript_handler', typelem => 'oid', + typinput => 'oidvectorin', typoutput => 'oidvectorout', typreceive => 'oidvectorrecv', typsend => 'oidvectorsend', typalign => 'i' }, # hand-built rowtype entries for bootstrapped catalogs # NB: OIDs assigned here must match the BKI_ROWTYPE_OID declarations -{ oid => '71', +{ oid => '71', array_type_oid => '210', typname => 'pg_type', typlen => '-1', typbyval => 'f', typtype => 'c', typcategory => 'C', typrelid => 'pg_type', typinput => 'record_in', typoutput => 'record_out', typreceive => 'record_recv', typsend => 'record_send', typalign => 'd', typstorage => 'x' }, -{ oid => '75', +{ oid => '75', array_type_oid => '270', typname => 'pg_attribute', typlen => '-1', typbyval => 'f', typtype => 'c', typcategory => 'C', typrelid => 'pg_attribute', typinput => 'record_in', typoutput => 'record_out', typreceive => 'record_recv', typsend => 'record_send', typalign => 'd', typstorage => 'x' }, -{ oid => '81', +{ oid => '81', array_type_oid => '272', typname => 'pg_proc', typlen => '-1', typbyval => 'f', typtype => 'c', typcategory => 'C', typrelid => 'pg_proc', typinput => 'record_in', typoutput => 'record_out', typreceive => 'record_recv', typsend => 'record_send', typalign => 'd', typstorage => 'x' }, -{ oid => '83', +{ oid => '83', array_type_oid => '273', typname => 'pg_class', typlen => '-1', typbyval => 'f', typtype => 'c', typcategory => 'C', typrelid => 'pg_class', typinput => 'record_in', typoutput => 'record_out', typreceive => 'record_recv', @@ -144,35 +143,30 @@ typname => 'xml', typlen => '-1', typbyval => 'f', typcategory => 'U', typinput => 'xml_in', typoutput => 'xml_out', typreceive => 'xml_recv', typsend => 'xml_send', typalign => 'i', typstorage => 'x' }, -{ oid => '194', oid_symbol => 'PGNODETREEOID', - descr => 'string representing an internal node tree', +{ oid => '194', descr => 'string representing an internal node tree', typname => 'pg_node_tree', typlen => '-1', typbyval => 'f', typcategory => 'S', typinput => 'pg_node_tree_in', typoutput => 'pg_node_tree_out', typreceive => 'pg_node_tree_recv', typsend => 'pg_node_tree_send', typalign => 'i', typstorage => 'x', typcollation => 'default' }, -{ oid => '3361', oid_symbol => 'PGNDISTINCTOID', - descr => 'multivariate ndistinct coefficients', +{ oid => '3361', descr => 'multivariate ndistinct coefficients', typname => 'pg_ndistinct', typlen => '-1', typbyval => 'f', typcategory => 'S', typinput => 'pg_ndistinct_in', typoutput => 'pg_ndistinct_out', typreceive => 'pg_ndistinct_recv', typsend => 'pg_ndistinct_send', typalign => 'i', typstorage => 'x', typcollation => 'default' }, -{ oid => '3402', oid_symbol => 'PGDEPENDENCIESOID', - descr => 'multivariate dependencies', +{ oid => '3402', descr => 'multivariate dependencies', typname => 'pg_dependencies', typlen => '-1', typbyval => 'f', typcategory => 'S', typinput => 'pg_dependencies_in', typoutput => 'pg_dependencies_out', typreceive => 'pg_dependencies_recv', typsend => 'pg_dependencies_send', typalign => 'i', typstorage => 'x', typcollation => 'default' }, -{ oid => '5017', oid_symbol => 'PGMCVLISTOID', - descr => 'multivariate MCV list', +{ oid => '5017', descr => 'multivariate MCV list', typname => 'pg_mcv_list', typlen => '-1', typbyval => 'f', typcategory => 'S', typinput => 'pg_mcv_list_in', typoutput => 'pg_mcv_list_out', typreceive => 'pg_mcv_list_recv', typsend => 'pg_mcv_list_send', typalign => 'i', typstorage => 'x', typcollation => 'default' }, -{ oid => '32', oid_symbol => 'PGDDLCOMMANDOID', - descr => 'internal type for passing CollectedCommand', +{ oid => '32', descr => 'internal type for passing CollectedCommand', typname => 'pg_ddl_command', typlen => 'SIZEOF_POINTER', typbyval => 't', typtype => 'p', typcategory => 'P', typinput => 'pg_ddl_command_in', typoutput => 'pg_ddl_command_out', typreceive => 'pg_ddl_command_recv', @@ -187,13 +181,15 @@ { oid => '600', array_type_oid => '1017', descr => 'geometric point \'(x, y)\'', typname => 'point', typlen => '16', typbyval => 'f', typcategory => 'G', - typelem => 'float8', typinput => 'point_in', typoutput => 'point_out', - typreceive => 'point_recv', typsend => 'point_send', typalign => 'd' }, + typsubscript => 'raw_array_subscript_handler', typelem => 'float8', + typinput => 'point_in', typoutput => 'point_out', typreceive => 'point_recv', + typsend => 'point_send', typalign => 'd' }, { oid => '601', array_type_oid => '1018', descr => 'geometric line segment \'(pt1,pt2)\'', typname => 'lseg', typlen => '32', typbyval => 'f', typcategory => 'G', - typelem => 'point', typinput => 'lseg_in', typoutput => 'lseg_out', - typreceive => 'lseg_recv', typsend => 'lseg_send', typalign => 'd' }, + typsubscript => 'raw_array_subscript_handler', typelem => 'point', + typinput => 'lseg_in', typoutput => 'lseg_out', typreceive => 'lseg_recv', + typsend => 'lseg_send', typalign => 'd' }, { oid => '602', array_type_oid => '1019', descr => 'geometric path \'(pt1,...)\'', typname => 'path', typlen => '-1', typbyval => 'f', typcategory => 'G', @@ -202,9 +198,9 @@ { oid => '603', array_type_oid => '1020', descr => 'geometric box \'(lower left,upper right)\'', typname => 'box', typlen => '32', typbyval => 'f', typcategory => 'G', - typdelim => ';', typelem => 'point', typinput => 'box_in', - typoutput => 'box_out', typreceive => 'box_recv', typsend => 'box_send', - typalign => 'd' }, + typdelim => ';', typsubscript => 'raw_array_subscript_handler', + typelem => 'point', typinput => 'box_in', typoutput => 'box_out', + typreceive => 'box_recv', typsend => 'box_send', typalign => 'd' }, { oid => '604', array_type_oid => '1027', descr => 'geometric polygon \'(pt1,...)\'', typname => 'polygon', typlen => '-1', typbyval => 'f', typcategory => 'G', @@ -212,8 +208,9 @@ typsend => 'poly_send', typalign => 'd', typstorage => 'x' }, { oid => '628', array_type_oid => '629', descr => 'geometric line', typname => 'line', typlen => '24', typbyval => 'f', typcategory => 'G', - typelem => 'float8', typinput => 'line_in', typoutput => 'line_out', - typreceive => 'line_recv', typsend => 'line_send', typalign => 'd' }, + typsubscript => 'raw_array_subscript_handler', typelem => 'float8', + typinput => 'line_in', typoutput => 'line_out', typreceive => 'line_recv', + typsend => 'line_send', typalign => 'd' }, # OIDS 700 - 799 @@ -237,7 +234,7 @@ typname => 'circle', typlen => '24', typbyval => 'f', typcategory => 'G', typinput => 'circle_in', typoutput => 'circle_out', typreceive => 'circle_recv', typsend => 'circle_send', typalign => 'd' }, -{ oid => '790', oid_symbol => 'CASHOID', array_type_oid => '791', +{ oid => '790', array_type_oid => '791', descr => 'monetary amounts, $d,ddd.cc', typname => 'money', typlen => '8', typbyval => 'FLOAT8PASSBYVAL', typcategory => 'N', typinput => 'cash_in', typoutput => 'cash_out', @@ -409,8 +406,7 @@ typsend => 'uuid_send', typalign => 'c' }, # pg_lsn -{ oid => '3220', oid_symbol => 'LSNOID', array_type_oid => '3221', - descr => 'PostgreSQL LSN datatype', +{ oid => '3220', array_type_oid => '3221', descr => 'PostgreSQL LSN datatype', typname => 'pg_lsn', typlen => '8', typbyval => 'FLOAT8PASSBYVAL', typcategory => 'U', typinput => 'pg_lsn_in', typoutput => 'pg_lsn_out', typreceive => 'pg_lsn_recv', typsend => 'pg_lsn_send', typalign => 'd' }, @@ -447,8 +443,9 @@ # jsonb { oid => '3802', array_type_oid => '3807', descr => 'Binary JSON', typname => 'jsonb', typlen => '-1', typbyval => 'f', typcategory => 'U', - typinput => 'jsonb_in', typoutput => 'jsonb_out', typreceive => 'jsonb_recv', - typsend => 'jsonb_send', typalign => 'i', typstorage => 'x' }, + typsubscript => 'jsonb_subscript_handler', typinput => 'jsonb_in', + typoutput => 'jsonb_out', typreceive => 'jsonb_recv', typsend => 'jsonb_send', + typalign => 'i', typstorage => 'x' }, { oid => '4072', array_type_oid => '4073', descr => 'JSON path', typname => 'jsonpath', typlen => '-1', typbyval => 'f', typcategory => 'U', typinput => 'jsonpath_in', typoutput => 'jsonpath_out', @@ -500,6 +497,46 @@ typreceive => 'range_recv', typsend => 'range_send', typanalyze => 'range_typanalyze', typalign => 'd', typstorage => 'x' }, +# multirange types +{ oid => '4451', array_type_oid => '6150', descr => 'multirange of integers', + typname => 'int4multirange', typlen => '-1', typbyval => 'f', typtype => 'm', + typcategory => 'R', typinput => 'multirange_in', + typoutput => 'multirange_out', typreceive => 'multirange_recv', + typsend => 'multirange_send', typanalyze => 'multirange_typanalyze', + typalign => 'i', typstorage => 'x' }, +{ oid => '4532', array_type_oid => '6151', descr => 'multirange of numerics', + typname => 'nummultirange', typlen => '-1', typbyval => 'f', typtype => 'm', + typcategory => 'R', typinput => 'multirange_in', + typoutput => 'multirange_out', typreceive => 'multirange_recv', + typsend => 'multirange_send', typanalyze => 'multirange_typanalyze', + typalign => 'i', typstorage => 'x' }, +{ oid => '4533', array_type_oid => '6152', + descr => 'multirange of timestamps without time zone', + typname => 'tsmultirange', typlen => '-1', typbyval => 'f', typtype => 'm', + typcategory => 'R', typinput => 'multirange_in', + typoutput => 'multirange_out', typreceive => 'multirange_recv', + typsend => 'multirange_send', typanalyze => 'multirange_typanalyze', + typalign => 'd', typstorage => 'x' }, +{ oid => '4534', array_type_oid => '6153', + descr => 'multirange of timestamps with time zone', + typname => 'tstzmultirange', typlen => '-1', typbyval => 'f', typtype => 'm', + typcategory => 'R', typinput => 'multirange_in', + typoutput => 'multirange_out', typreceive => 'multirange_recv', + typsend => 'multirange_send', typanalyze => 'multirange_typanalyze', + typalign => 'd', typstorage => 'x' }, +{ oid => '4535', array_type_oid => '6155', descr => 'multirange of dates', + typname => 'datemultirange', typlen => '-1', typbyval => 'f', typtype => 'm', + typcategory => 'R', typinput => 'multirange_in', + typoutput => 'multirange_out', typreceive => 'multirange_recv', + typsend => 'multirange_send', typanalyze => 'multirange_typanalyze', + typalign => 'i', typstorage => 'x' }, +{ oid => '4536', array_type_oid => '6157', descr => 'multirange of bigints', + typname => 'int8multirange', typlen => '-1', typbyval => 'f', typtype => 'm', + typcategory => 'R', typinput => 'multirange_in', + typoutput => 'multirange_out', typreceive => 'multirange_recv', + typsend => 'multirange_send', typanalyze => 'multirange_typanalyze', + typalign => 'd', typstorage => 'x' }, + # pseudo-types # types with typtype='p' represent various special cases in the type system. # These cannot be used to define table columns, but are valid as function @@ -517,8 +554,9 @@ # Arrays of records have typcategory P, so they can't be autogenerated. { oid => '2287', typname => '_record', typlen => '-1', typbyval => 'f', typtype => 'p', - typcategory => 'P', typelem => 'record', typinput => 'array_in', - typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send', + typcategory => 'P', typsubscript => 'array_subscript_handler', + typelem => 'record', typinput => 'array_in', typoutput => 'array_out', + typreceive => 'array_recv', typsend => 'array_send', typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' }, { oid => '2275', array_type_oid => '1263', descr => 'C-style string', typname => 'cstring', typlen => '-2', typbyval => 'f', typtype => 'p', @@ -542,7 +580,7 @@ typname => 'trigger', typlen => '4', typbyval => 't', typtype => 'p', typcategory => 'P', typinput => 'trigger_in', typoutput => 'trigger_out', typreceive => '-', typsend => '-', typalign => 'i' }, -{ oid => '3838', oid_symbol => 'EVTTRIGGEROID', +{ oid => '3838', descr => 'pseudo-type for the result of an event trigger function', typname => 'event_trigger', typlen => '4', typbyval => 't', typtype => 'p', typcategory => 'P', typinput => 'event_trigger_in', @@ -629,5 +667,29 @@ typtype => 'p', typcategory => 'P', typinput => 'anycompatiblerange_in', typoutput => 'anycompatiblerange_out', typreceive => '-', typsend => '-', typalign => 'd', typstorage => 'x' }, - +{ oid => '4537', + descr => 'pseudo-type representing a polymorphic base type that is a multirange', + typname => 'anymultirange', typlen => '-1', typbyval => 'f', typtype => 'p', + typcategory => 'P', typinput => 'anymultirange_in', + typoutput => 'anymultirange_out', typreceive => '-', typsend => '-', + typalign => 'd', typstorage => 'x' }, +{ oid => '4538', + descr => 'pseudo-type representing a multirange over a polymorphic common type', + typname => 'anycompatiblemultirange', typlen => '-1', typbyval => 'f', + typtype => 'p', typcategory => 'P', typinput => 'anycompatiblemultirange_in', + typoutput => 'anycompatiblemultirange_out', typreceive => '-', typsend => '-', + typalign => 'd', typstorage => 'x' }, +{ oid => '4600', descr => 'BRIN bloom summary', + typname => 'pg_brin_bloom_summary', typlen => '-1', typbyval => 'f', + typcategory => 'S', typinput => 'brin_bloom_summary_in', + typoutput => 'brin_bloom_summary_out', + typreceive => 'brin_bloom_summary_recv', typsend => 'brin_bloom_summary_send', + typalign => 'i', typstorage => 'x', typcollation => 'default' }, +{ oid => '4601', descr => 'BRIN minmax-multi summary', + typname => 'pg_brin_minmax_multi_summary', typlen => '-1', typbyval => 'f', + typcategory => 'S', typinput => 'brin_minmax_multi_summary_in', + typoutput => 'brin_minmax_multi_summary_out', + typreceive => 'brin_minmax_multi_summary_recv', + typsend => 'brin_minmax_multi_summary_send', typalign => 'i', + typstorage => 'x', typcollation => 'default' }, ] diff --git a/contrib/libs/postgresql/src/include/catalog/pg_type.h b/contrib/libs/postgresql/src/include/catalog/pg_type.h index ebde49dafb..0ece1e03d7 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_type.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_type.h @@ -4,7 +4,7 @@ * definition of the "type" system catalog (pg_type) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -41,10 +41,10 @@ CATALOG(pg_type,1247,TypeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71,TypeRelati NameData typname; /* OID of namespace containing this type */ - Oid typnamespace BKI_DEFAULT(PGNSP); + Oid typnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace); /* type owner */ - Oid typowner BKI_DEFAULT(PGUID); + Oid typowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid); /* * For a fixed-size type, typlen is the number of bytes we use to @@ -98,26 +98,32 @@ CATALOG(pg_type,1247,TypeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71,TypeRelati 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(pg_class); + Oid typrelid BKI_DEFAULT(0) BKI_ARRAY_DEFAULT(0) BKI_LOOKUP_OPT(pg_class); /* - * If typelem is not 0 then it identifies another row in pg_type. The - * current type can then be subscripted like an array yielding values of - * type typelem. A non-zero typelem does not guarantee this type to be a - * "real" array type; some ordinary fixed-length types can also be - * subscripted (e.g., name, point). Variable-length types can *not* be - * turned into pseudo-arrays like that. Hence, the way to determine - * whether a type is a "true" array type is if: - * - * typelem != 0 and typlen == -1. + * 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(pg_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(pg_type); + Oid typarray BKI_DEFAULT(0) BKI_ARRAY_DEFAULT(0) BKI_LOOKUP_OPT(pg_type); /* * I/O conversion procedures for the datatype. @@ -128,19 +134,19 @@ CATALOG(pg_type,1247,TypeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71,TypeRelati regproc typoutput BKI_ARRAY_DEFAULT(array_out) BKI_LOOKUP(pg_proc); /* binary format (optional) */ - regproc typreceive BKI_ARRAY_DEFAULT(array_recv) BKI_LOOKUP(pg_proc); - regproc typsend BKI_ARRAY_DEFAULT(array_send) BKI_LOOKUP(pg_proc); + 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(pg_proc); - regproc typmodout BKI_DEFAULT(-) BKI_LOOKUP(pg_proc); + 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(pg_proc); + 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 @@ -199,7 +205,7 @@ CATALOG(pg_type,1247,TypeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71,TypeRelati * 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); + Oid typbasetype BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_type); /* * Domains use typtypmod to record the typmod to be applied to their base @@ -219,7 +225,7 @@ CATALOG(pg_type,1247,TypeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71,TypeRelati * DEFAULT_COLLATION_OID) for collatable base types, possibly some other * OID for domains over collatable types */ - Oid typcollation BKI_DEFAULT(0) BKI_LOOKUP(pg_collation); + Oid typcollation BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_collation); #ifdef CATALOG_VARLEN /* variable-length fields start here */ @@ -254,6 +260,13 @@ CATALOG(pg_type,1247,TypeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71,TypeRelati */ 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 /* @@ -263,6 +276,7 @@ typedef FormData_pg_type *Form_pg_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 */ @@ -304,13 +318,27 @@ typedef FormData_pg_type *Form_pg_type; (typid) == ANYARRAYOID || \ (typid) == ANYNONARRAYOID || \ (typid) == ANYENUMOID || \ - (typid) == ANYRANGEOID) + (typid) == ANYRANGEOID || \ + (typid) == ANYMULTIRANGEOID) #define IsPolymorphicTypeFamily2(typid) \ ((typid) == ANYCOMPATIBLEOID || \ (typid) == ANYCOMPATIBLEARRAYOID || \ (typid) == ANYCOMPATIBLENONARRAYOID || \ - (typid) == ANYCOMPATIBLERANGEOID) + (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 */ @@ -337,6 +365,7 @@ extern ObjectAddress TypeCreate(Oid newTypeOid, Oid typmodinProcedure, Oid typmodoutProcedure, Oid analyzeProcedure, + Oid subscriptProcedure, Oid elementType, bool isImplicitArray, Oid arrayType, @@ -370,4 +399,7 @@ 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_user_mapping.h b/contrib/libs/postgresql/src/include/catalog/pg_user_mapping.h index f5ccdb857a..d440c67da1 100644 --- a/contrib/libs/postgresql/src/include/catalog/pg_user_mapping.h +++ b/contrib/libs/postgresql/src/include/catalog/pg_user_mapping.h @@ -3,7 +3,7 @@ * pg_user_mapping.h * definition of the "user mapping" system catalog (pg_user_mapping) * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -29,9 +29,11 @@ CATALOG(pg_user_mapping,1418,UserMappingRelationId) { Oid oid; /* oid */ - Oid umuser; /* Id of the user, InvalidOid if PUBLIC is - * wanted */ - Oid umserver; /* server of this mapping */ + 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 */ @@ -45,4 +47,11 @@ CATALOG(pg_user_mapping,1418,UserMappingRelationId) */ 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/storage.h b/contrib/libs/postgresql/src/include/catalog/storage.h index 30c38e0ca6..0ab32b44e9 100644 --- a/contrib/libs/postgresql/src/include/catalog/storage.h +++ b/contrib/libs/postgresql/src/include/catalog/storage.h @@ -4,7 +4,7 @@ * prototypes for functions in backend/catalog/storage.c * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/catalog/storage.h diff --git a/contrib/libs/postgresql/src/include/catalog/storage_xlog.h b/contrib/libs/postgresql/src/include/catalog/storage_xlog.h index 7b21cab2e0..f0814f1458 100644 --- a/contrib/libs/postgresql/src/include/catalog/storage_xlog.h +++ b/contrib/libs/postgresql/src/include/catalog/storage_xlog.h @@ -4,7 +4,7 @@ * prototypes for XLog support for backend/catalog/storage.c * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 diff --git a/contrib/libs/postgresql/src/include/catalog/system_fk_info.h b/contrib/libs/postgresql/src/include/catalog/system_fk_info.h new file mode 100644 index 0000000000..1ad4a0fb72 --- /dev/null +++ b/contrib/libs/postgresql/src/include/catalog/system_fk_info.h @@ -0,0 +1 @@ +#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 index bde14263a1..7067c4c61b 100644 --- a/contrib/libs/postgresql/src/include/catalog/toasting.h +++ b/contrib/libs/postgresql/src/include/catalog/toasting.h @@ -3,11 +3,8 @@ * toasting.h * This file provides some definitions to support creation of toast tables * - * Caution: all #define's with numeric values in this file had better be - * object OIDs, else renumber_oids.pl might change them inappropriately. * - * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/catalog/toasting.h @@ -30,76 +27,4 @@ extern void AlterTableCreateToastTable(Oid relOid, Datum reloptions, extern void BootstrapToastTable(char *relName, Oid toastOid, Oid toastIndexOid); - -/* - * This macro is just to keep the C compiler from spitting up on the - * upcoming commands for Catalog.pm. - */ -#define DECLARE_TOAST(name,toastoid,indexoid) extern int no_such_variable - - -/* - * What follows are lines 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. - */ - -/* normal catalogs */ -DECLARE_TOAST(pg_aggregate, 4159, 4160); -DECLARE_TOAST(pg_attrdef, 2830, 2831); -DECLARE_TOAST(pg_collation, 4161, 4162); -DECLARE_TOAST(pg_constraint, 2832, 2833); -DECLARE_TOAST(pg_default_acl, 4143, 4144); -DECLARE_TOAST(pg_description, 2834, 2835); -DECLARE_TOAST(pg_event_trigger, 4145, 4146); -DECLARE_TOAST(pg_extension, 4147, 4148); -DECLARE_TOAST(pg_foreign_data_wrapper, 4149, 4150); -DECLARE_TOAST(pg_foreign_server, 4151, 4152); -DECLARE_TOAST(pg_foreign_table, 4153, 4154); -DECLARE_TOAST(pg_init_privs, 4155, 4156); -DECLARE_TOAST(pg_language, 4157, 4158); -DECLARE_TOAST(pg_namespace, 4163, 4164); -DECLARE_TOAST(pg_partitioned_table, 4165, 4166); -DECLARE_TOAST(pg_policy, 4167, 4168); -DECLARE_TOAST(pg_proc, 2836, 2837); -DECLARE_TOAST(pg_rewrite, 2838, 2839); -DECLARE_TOAST(pg_seclabel, 3598, 3599); -DECLARE_TOAST(pg_statistic, 2840, 2841); -DECLARE_TOAST(pg_statistic_ext, 3439, 3440); -DECLARE_TOAST(pg_statistic_ext_data, 3430, 3431); -DECLARE_TOAST(pg_trigger, 2336, 2337); -DECLARE_TOAST(pg_ts_dict, 4169, 4170); -DECLARE_TOAST(pg_type, 4171, 4172); -DECLARE_TOAST(pg_user_mapping, 4173, 4174); - -/* shared catalogs */ -DECLARE_TOAST(pg_authid, 4175, 4176); -#define PgAuthidToastTable 4175 -#define PgAuthidToastIndex 4176 -DECLARE_TOAST(pg_database, 4177, 4178); -#define PgDatabaseToastTable 4177 -#define PgDatabaseToastIndex 4178 -DECLARE_TOAST(pg_db_role_setting, 2966, 2967); -#define PgDbRoleSettingToastTable 2966 -#define PgDbRoleSettingToastIndex 2967 -DECLARE_TOAST(pg_replication_origin, 4181, 4182); -#define PgReplicationOriginToastTable 4181 -#define PgReplicationOriginToastIndex 4182 -DECLARE_TOAST(pg_shdescription, 2846, 2847); -#define PgShdescriptionToastTable 2846 -#define PgShdescriptionToastIndex 2847 -DECLARE_TOAST(pg_shseclabel, 4060, 4061); -#define PgShseclabelToastTable 4060 -#define PgShseclabelToastIndex 4061 -DECLARE_TOAST(pg_subscription, 4183, 4184); -#define PgSubscriptionToastTable 4183 -#define PgSubscriptionToastIndex 4184 -DECLARE_TOAST(pg_tablespace, 4185, 4186); -#define PgTablespaceToastTable 4185 -#define PgTablespaceToastIndex 4186 - #endif /* TOASTING_H */ diff --git a/contrib/libs/postgresql/src/include/fmgr.h b/contrib/libs/postgresql/src/include/fmgr.h index d349510b7c..ab7b85c86e 100644 --- a/contrib/libs/postgresql/src/include/fmgr.h +++ b/contrib/libs/postgresql/src/include/fmgr.h @@ -8,7 +8,7 @@ * or call fmgr-callable functions. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/fmgr.h @@ -276,6 +276,7 @@ extern struct varlena *pg_detoast_datum_packed(struct varlena *datum); #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)) @@ -360,6 +361,7 @@ extern struct varlena *pg_detoast_datum_packed(struct varlena *datum); #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) @@ -716,9 +718,9 @@ extern bool CheckFunctionValidatorAccess(Oid validatorOid, Oid functionOid); */ extern char *Dynamic_library_path; -extern PGFunction load_external_function(const char *filename, const char *funcname, - bool signalNotFound, void **filehandle); -extern PGFunction lookup_external_function(void *filehandle, const char *funcname); +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); diff --git a/contrib/libs/postgresql/src/include/funcapi.h b/contrib/libs/postgresql/src/include/funcapi.h index b047acdc1a..f1304d47e3 100644 --- a/contrib/libs/postgresql/src/include/funcapi.h +++ b/contrib/libs/postgresql/src/include/funcapi.h @@ -8,7 +8,7 @@ * or call FUNCAPI-callable functions or macros. * * - * Copyright (c) 2002-2020, PostgreSQL Global Development Group + * Copyright (c) 2002-2021, PostgreSQL Global Development Group * * src/include/funcapi.h * diff --git a/contrib/libs/postgresql/src/include/getaddrinfo.h b/contrib/libs/postgresql/src/include/getaddrinfo.h index 38fa3b84e7..4cf4c4d405 100644 --- a/contrib/libs/postgresql/src/include/getaddrinfo.h +++ b/contrib/libs/postgresql/src/include/getaddrinfo.h @@ -13,7 +13,7 @@ * 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-2020, PostgreSQL Global Development Group + * Copyright (c) 2003-2021, PostgreSQL Global Development Group * * src/include/getaddrinfo.h * diff --git a/contrib/libs/postgresql/src/include/miscadmin.h b/contrib/libs/postgresql/src/include/miscadmin.h index 6b2b4343a0..3f155ce4f8 100644 --- a/contrib/libs/postgresql/src/include/miscadmin.h +++ b/contrib/libs/postgresql/src/include/miscadmin.h @@ -10,7 +10,7 @@ * 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-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/miscadmin.h @@ -91,8 +91,11 @@ 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: */ @@ -272,8 +275,6 @@ extern int64 VacuumPageDirty; extern int VacuumCostBalance; extern bool VacuumCostActive; -extern double vacuum_cleanup_index_scale_factor; - /* in tcop/postgres.c */ @@ -430,6 +431,7 @@ typedef enum BootstrapProcess, StartupProcess, BgWriterProcess, + ArchiverProcess, CheckpointerProcess, WalWriterProcess, WalReceiverProcess, @@ -442,6 +444,7 @@ 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) diff --git a/contrib/libs/postgresql/src/include/pg_config-linux.h b/contrib/libs/postgresql/src/include/pg_config-linux.h index 30c8422e97..a1079a8308 100644 --- a/contrib/libs/postgresql/src/include/pg_config-linux.h +++ b/contrib/libs/postgresql/src/include/pg_config-linux.h @@ -1,5 +1,5 @@ /* src/include/pg_config.h. Generated from pg_config.h.in by configure. */ -/* src/include/pg_config.h.in. Generated from configure.in by autoheader. */ +/* 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 @@ -44,7 +44,7 @@ #define BLCKSZ 8192 /* Saved arguments from configure */ -#define CONFIGURE_ARGS " '--prefix=/var/empty/postgresql-13.5' '--with-openssl' '--with-libxml' '--sysconfdir=/etc' '--libdir=$(lib)/lib' '--with-system-tzdata=/var/empty/tzdata-2021c/share/zoneinfo' '--enable-debug' '--with-systemd' '--with-ossp-uuid' '--with-icu' '--with-gssapi' '--without-gssapi' '--without-systemd' 'CC=cc' 'CXX=g++' 'PKG_CONFIG=pkg-config' 'PKG_CONFIG_PATH=/var/empty/zlib-1.2.11-dev/lib/pkgconfig:/var/empty/ncurses-6.2-dev/lib/pkgconfig:/var/empty/openssl-1.1.1l-dev/lib/pkgconfig:/var/empty/libxml2-2.9.12-dev/lib/pkgconfig:/var/empty/icu4c-70.1-dev/lib/pkgconfig:/var/empty/systemd-249.5-dev/lib/pkgconfig:/var/empty/systemd-249.5-dev/share/pkgconfig:/var/empty/libkrb5-1.18-dev/lib/pkgconfig:/var/empty/libossp-uuid-1.6.2/lib/pkgconfig'" +#define CONFIGURE_ARGS " '--prefix=/var/empty/postgresql-14.2' '--with-openssl' '--with-libxml' '--sysconfdir=/etc' '--libdir=$(lib)/lib' '--with-system-tzdata=/var/empty/tzdata-2021c/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.11-dev/lib/pkgconfig:/var/empty/ncurses-6.2-dev/lib/pkgconfig:/var/empty/openssl-1.1.1l-dev/lib/pkgconfig:/var/empty/libxml2-2.9.12-dev/lib/pkgconfig:/var/empty/icu4c-70.1-dev/lib/pkgconfig:/var/empty/lz4-1.9.3-dev/lib/pkgconfig:/var/empty/systemd-249.5-dev/lib/pkgconfig:/var/empty/systemd-249.5-dev/share/pkgconfig:/var/empty/libkrb5-1.18-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 @@ -143,6 +143,14 @@ 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 @@ -269,6 +277,12 @@ /* 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 @@ -317,6 +331,9 @@ /* 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 @@ -356,6 +373,9 @@ /* 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 */ @@ -419,6 +439,9 @@ /* 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 */ @@ -443,6 +466,9 @@ /* 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 @@ -576,6 +602,9 @@ /* 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 @@ -627,6 +656,9 @@ /* 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 @@ -681,6 +713,9 @@ /* 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 @@ -750,6 +785,10 @@ /* 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" @@ -757,7 +796,7 @@ #define PACKAGE_NAME "PostgreSQL" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "PostgreSQL 13.5" +#define PACKAGE_STRING "PostgreSQL 14.2" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "postgresql" @@ -766,7 +805,7 @@ #define PACKAGE_URL "https://www.postgresql.org/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "13.5" +#define PACKAGE_VERSION "14.2" /* Define to the name of a signed 128-bit integer type. */ #define PG_INT128_TYPE __int128 @@ -779,13 +818,13 @@ #define PG_KRB_SRVNAM "postgres" /* PostgreSQL major version as a string */ -#define PG_MAJORVERSION "13" +#define PG_MAJORVERSION "14" /* PostgreSQL major version number */ -#define PG_MAJORVERSION_NUM 13 +#define PG_MAJORVERSION_NUM 14 /* PostgreSQL minor version number */ -#define PG_MINORVERSION_NUM 5 +#define PG_MINORVERSION_NUM 2 /* Define to best printf format archetype, usually gnu_printf if available. */ #define PG_PRINTF_ATTRIBUTE gnu_printf @@ -794,13 +833,13 @@ #define PG_USE_STDBOOL 1 /* PostgreSQL version as a string */ -#define PG_VERSION "13.5" +#define PG_VERSION "14.2" /* PostgreSQL version as a number */ -#define PG_VERSION_NUM 130005 +#define PG_VERSION_NUM 140002 /* A string containing the version number, platform, and C compiler */ -#define PG_VERSION_STR "PostgreSQL 13.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 10.3.0, 64-bit" +#define PG_VERSION_STR "PostgreSQL 14.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 10.3.0, 64-bit" /* Define to 1 to allow profiling output to be saved separately for each process. */ @@ -859,9 +898,6 @@ /* Define to 1 to build with BSD Authentication support. (--with-bsd-auth) */ /* #undef USE_BSD_AUTH */ -/* Define to use /dev/urandom for random number generation */ -/* #undef USE_DEV_URANDOM */ - /* Define to build with ICU support. (--with-icu) */ #define USE_ICU 1 @@ -878,15 +914,15 @@ /* 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 build with OpenSSL support. (--with-openssl) */ +/* Define to 1 to build with OpenSSL support. (--with-ssl=openssl) */ #define USE_OPENSSL 1 -/* Define to use OpenSSL for random number generation */ -#define USE_OPENSSL_RANDOM 1 - /* Define to 1 to build with PAM support. (--with-pam) */ /* #undef USE_PAM */ @@ -911,9 +947,6 @@ /* Define to select unnamed POSIX semaphores. */ #define USE_UNNAMED_POSIX_SEMAPHORES 1 -/* Define to use native Windows API for random number generation */ -/* #undef USE_WIN32_RANDOM */ - /* Define to select Win32-style semaphores. */ /* #undef USE_WIN32_SEMAPHORES */ diff --git a/contrib/libs/postgresql/src/include/pg_config-osx.h b/contrib/libs/postgresql/src/include/pg_config-osx.h index 7ffb92c467..f2b6e1dfcc 100644 --- a/contrib/libs/postgresql/src/include/pg_config-osx.h +++ b/contrib/libs/postgresql/src/include/pg_config-osx.h @@ -28,4 +28,7 @@ #undef HAVE_SYS_EPOLL_H /* Define to 1 if you have the `strchrnul' function. */ -#undef HAVE_STRCHRNUL
\ No newline at end of file +#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 index ed526bebfd..bbace3fbc2 100644 --- a/contrib/libs/postgresql/src/include/pg_config-win.h +++ b/contrib/libs/postgresql/src/include/pg_config-win.h @@ -160,6 +160,8 @@ /* 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. */ diff --git a/contrib/libs/postgresql/src/include/pg_config_manual.h b/contrib/libs/postgresql/src/include/pg_config_manual.h index 91818326a4..071f36d2db 100644 --- a/contrib/libs/postgresql/src/include/pg_config_manual.h +++ b/contrib/libs/postgresql/src/include/pg_config_manual.h @@ -6,7 +6,7 @@ * for developers. If you edit any of these, be sure to do a *full* * rebuild (and an initdb if noted). * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 @@ -21,7 +21,7 @@ /* * Maximum length for identifiers (e.g. table names, column names, - * function names). Names actually are limited to one less byte than this, + * 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. @@ -183,8 +183,7 @@ /* * USE_SSL code should be compiled only when compiling with an SSL - * implementation. (Currently, only OpenSSL is supported, but we might add - * more implementations in the future.) + * implementation. */ #ifdef USE_OPENSSL #define USE_SSL @@ -276,12 +275,21 @@ /* * 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. See also - * src/tools/valgrind.supp. "make installcheck" runs 20-30x longer under - * Valgrind. Note that USE_VALGRIND slowed older versions of Valgrind by an - * additional order of magnitude; Valgrind 3.8.1 does not have this problem. - * The client requests fall in hot code paths, so USE_VALGRIND also slows - * native execution by a few percentage points. + * 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. @@ -314,6 +322,45 @@ /* #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(). diff --git a/contrib/libs/postgresql/src/include/pg_getopt.h b/contrib/libs/postgresql/src/include/pg_getopt.h index e646fc3419..66f1b75060 100644 --- a/contrib/libs/postgresql/src/include/pg_getopt.h +++ b/contrib/libs/postgresql/src/include/pg_getopt.h @@ -11,7 +11,7 @@ * Portions Copyright (c) 1987, 1993, 1994 * The Regents of the University of California. All rights reserved. * - * Portions Copyright (c) 2003-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 2003-2021, PostgreSQL Global Development Group * * src/include/pg_getopt.h */ diff --git a/contrib/libs/postgresql/src/include/pg_trace.h b/contrib/libs/postgresql/src/include/pg_trace.h index cf212aeabd..a1ecedb7dd 100644 --- a/contrib/libs/postgresql/src/include/pg_trace.h +++ b/contrib/libs/postgresql/src/include/pg_trace.h @@ -3,7 +3,7 @@ * * Definitions for the PostgreSQL tracing framework * - * Copyright (c) 2006-2020, PostgreSQL Global Development Group + * Copyright (c) 2006-2021, PostgreSQL Global Development Group * * src/include/pg_trace.h * ---------- diff --git a/contrib/libs/postgresql/src/include/pgstat.h b/contrib/libs/postgresql/src/include/pgstat.h index c55dc1481c..9a90bd8113 100644 --- a/contrib/libs/postgresql/src/include/pgstat.h +++ b/contrib/libs/postgresql/src/include/pgstat.h @@ -3,7 +3,7 @@ * * Definitions for the PostgreSQL statistics collector daemon. * - * Copyright (c) 2001-2020, PostgreSQL Global Development Group + * Copyright (c) 2001-2021, PostgreSQL Global Development Group * * src/include/pgstat.h * ---------- @@ -12,14 +12,13 @@ #define PGSTAT_H #include "datatype/timestamp.h" -#include "libpq/pqcomm.h" -#include "miscadmin.h" -#include "port/atomics.h" #include "portability/instr_time.h" -#include "postmaster/pgarch.h" -#include "storage/proc.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 */ /* ---------- @@ -41,6 +40,16 @@ typedef enum TrackFunctionsLevel 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 * ---------- @@ -56,18 +65,23 @@ typedef enum StatMsgType 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_CHECKSUMFAILURE, + PGSTAT_MTYPE_REPLSLOT, + PGSTAT_MTYPE_CONNECT, + PGSTAT_MTYPE_DISCONNECT, } StatMsgType; /* ---------- @@ -122,7 +136,8 @@ typedef struct PgStat_TableCounts typedef enum PgStat_Shared_Reset_Target { RESET_ARCHIVER, - RESET_BGWRITER + RESET_BGWRITER, + RESET_WAL } PgStat_Shared_Reset_Target; /* Possible object types for resetting single counters */ @@ -264,7 +279,7 @@ typedef struct PgStat_TableEntry * ---------- */ #define PGSTAT_NUM_TABENTRIES \ - ((PGSTAT_MSG_PAYLOAD - sizeof(Oid) - 3 * sizeof(int) - 2 * sizeof(PgStat_Counter)) \ + ((PGSTAT_MSG_PAYLOAD - sizeof(Oid) - 3 * sizeof(int) - 5 * sizeof(PgStat_Counter)) \ / sizeof(PgStat_TableEntry)) typedef struct PgStat_MsgTabstat @@ -276,6 +291,9 @@ typedef struct PgStat_MsgTabstat 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; @@ -357,6 +375,18 @@ typedef struct PgStat_MsgResetslrucounter } 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 * ---------- @@ -437,6 +467,25 @@ typedef struct PgStat_MsgBgWriter } 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. * ---------- */ @@ -454,6 +503,28 @@ typedef struct PgStat_MsgSLRU } 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 * ---------- */ @@ -574,6 +645,27 @@ typedef struct PgStat_MsgChecksumFailure 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. @@ -591,11 +683,13 @@ typedef union PgStat_Msg 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; @@ -603,6 +697,9 @@ typedef union PgStat_Msg 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; @@ -614,7 +711,7 @@ typedef union PgStat_Msg * ------------------------------------------------------------ */ -#define PGSTAT_FILE_FORMAT_ID 0x01A5BC9D +#define PGSTAT_FILE_FORMAT_ID 0x01A5BCA2 /* ---------- * PgStat_StatDBEntry The collector's data per database @@ -645,6 +742,13 @@ typedef struct PgStat_StatDBEntry 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 */ @@ -679,6 +783,7 @@ typedef struct PgStat_StatTabEntry 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; @@ -746,6 +851,22 @@ typedef struct PgStat_GlobalStats } 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 @@ -760,470 +881,23 @@ typedef struct PgStat_SLRUStats TimestampTz stat_reset_timestamp; } PgStat_SLRUStats; - -/* ---------- - * Backend states - * ---------- - */ -typedef enum BackendState -{ - STATE_UNDEFINED, - STATE_IDLE, - STATE_RUNNING, - STATE_IDLEINTRANSACTION, - STATE_FASTPATH, - STATE_IDLEINTRANSACTION_ABORTED, - STATE_DISABLED -} BackendState; - - -/* ---------- - * Wait Classes - * ---------- - */ -#define PG_WAIT_LWLOCK 0x01000000U -#define PG_WAIT_LOCK 0x03000000U -#define PG_WAIT_BUFFER_PIN 0x04000000U -#define PG_WAIT_ACTIVITY 0x05000000U -#define PG_WAIT_CLIENT 0x06000000U -#define PG_WAIT_EXTENSION 0x07000000U -#define PG_WAIT_IPC 0x08000000U -#define PG_WAIT_TIMEOUT 0x09000000U -#define PG_WAIT_IO 0x0A000000U - -/* ---------- - * Wait Events - Activity - * - * Use this category when a process is waiting because it has no work to do, - * unless the "Client" or "Timeout" category describes the situation better. - * Typically, this should only be used for background processes. - * ---------- - */ -typedef enum -{ - WAIT_EVENT_ARCHIVER_MAIN = PG_WAIT_ACTIVITY, - WAIT_EVENT_AUTOVACUUM_MAIN, - WAIT_EVENT_BGWRITER_HIBERNATE, - WAIT_EVENT_BGWRITER_MAIN, - WAIT_EVENT_CHECKPOINTER_MAIN, - WAIT_EVENT_LOGICAL_APPLY_MAIN, - WAIT_EVENT_LOGICAL_LAUNCHER_MAIN, - WAIT_EVENT_PGSTAT_MAIN, - WAIT_EVENT_RECOVERY_WAL_STREAM, - WAIT_EVENT_SYSLOGGER_MAIN, - WAIT_EVENT_WAL_RECEIVER_MAIN, - WAIT_EVENT_WAL_SENDER_MAIN, - WAIT_EVENT_WAL_WRITER_MAIN -} WaitEventActivity; - -/* ---------- - * Wait Events - Client - * - * Use this category when a process is waiting to send data to or receive data - * from the frontend process to which it is connected. This is never used for - * a background process, which has no client connection. - * ---------- - */ -typedef enum -{ - WAIT_EVENT_CLIENT_READ = PG_WAIT_CLIENT, - WAIT_EVENT_CLIENT_WRITE, - WAIT_EVENT_GSS_OPEN_SERVER, - WAIT_EVENT_LIBPQWALRECEIVER_CONNECT, - WAIT_EVENT_LIBPQWALRECEIVER_RECEIVE, - WAIT_EVENT_SSL_OPEN_SERVER, - WAIT_EVENT_WAL_RECEIVER_WAIT_START, - WAIT_EVENT_WAL_SENDER_WAIT_WAL, - WAIT_EVENT_WAL_SENDER_WRITE_DATA, -} WaitEventClient; - -/* ---------- - * Wait Events - IPC - * - * Use this category when a process cannot complete the work it is doing because - * it is waiting for a notification from another process. - * ---------- - */ -typedef enum -{ - WAIT_EVENT_BACKUP_WAIT_WAL_ARCHIVE = PG_WAIT_IPC, - WAIT_EVENT_BGWORKER_SHUTDOWN, - WAIT_EVENT_BGWORKER_STARTUP, - WAIT_EVENT_BTREE_PAGE, - WAIT_EVENT_CHECKPOINT_DONE, - WAIT_EVENT_CHECKPOINT_START, - WAIT_EVENT_EXECUTE_GATHER, - WAIT_EVENT_HASH_BATCH_ALLOCATE, - WAIT_EVENT_HASH_BATCH_ELECT, - WAIT_EVENT_HASH_BATCH_LOAD, - WAIT_EVENT_HASH_BUILD_ALLOCATE, - WAIT_EVENT_HASH_BUILD_ELECT, - WAIT_EVENT_HASH_BUILD_HASH_INNER, - WAIT_EVENT_HASH_BUILD_HASH_OUTER, - WAIT_EVENT_HASH_GROW_BATCHES_ALLOCATE, - WAIT_EVENT_HASH_GROW_BATCHES_DECIDE, - WAIT_EVENT_HASH_GROW_BATCHES_ELECT, - WAIT_EVENT_HASH_GROW_BATCHES_FINISH, - WAIT_EVENT_HASH_GROW_BATCHES_REPARTITION, - WAIT_EVENT_HASH_GROW_BUCKETS_ALLOCATE, - WAIT_EVENT_HASH_GROW_BUCKETS_ELECT, - WAIT_EVENT_HASH_GROW_BUCKETS_REINSERT, - WAIT_EVENT_LOGICAL_SYNC_DATA, - WAIT_EVENT_LOGICAL_SYNC_STATE_CHANGE, - WAIT_EVENT_MQ_INTERNAL, - WAIT_EVENT_MQ_PUT_MESSAGE, - WAIT_EVENT_MQ_RECEIVE, - WAIT_EVENT_MQ_SEND, - WAIT_EVENT_PARALLEL_BITMAP_SCAN, - WAIT_EVENT_PARALLEL_CREATE_INDEX_SCAN, - WAIT_EVENT_PARALLEL_FINISH, - WAIT_EVENT_PROCARRAY_GROUP_UPDATE, - WAIT_EVENT_PROC_SIGNAL_BARRIER, - WAIT_EVENT_PROMOTE, - WAIT_EVENT_RECOVERY_CONFLICT_SNAPSHOT, - WAIT_EVENT_RECOVERY_CONFLICT_TABLESPACE, - WAIT_EVENT_RECOVERY_PAUSE, - WAIT_EVENT_REPLICATION_ORIGIN_DROP, - WAIT_EVENT_REPLICATION_SLOT_DROP, - WAIT_EVENT_SAFE_SNAPSHOT, - WAIT_EVENT_SYNC_REP, - WAIT_EVENT_XACT_GROUP_UPDATE -} WaitEventIPC; - -/* ---------- - * Wait Events - Timeout - * - * Use this category when a process is waiting for a timeout to expire. - * ---------- - */ -typedef enum -{ - WAIT_EVENT_BASE_BACKUP_THROTTLE = PG_WAIT_TIMEOUT, - WAIT_EVENT_PG_SLEEP, - WAIT_EVENT_RECOVERY_APPLY_DELAY, - WAIT_EVENT_RECOVERY_RETRIEVE_RETRY_INTERVAL, - WAIT_EVENT_VACUUM_DELAY -} WaitEventTimeout; - -/* ---------- - * Wait Events - IO - * - * Use this category when a process is waiting for a IO. - * ---------- - */ -typedef enum -{ - WAIT_EVENT_BUFFILE_READ = PG_WAIT_IO, - WAIT_EVENT_BUFFILE_WRITE, - WAIT_EVENT_CONTROL_FILE_READ, - WAIT_EVENT_CONTROL_FILE_SYNC, - WAIT_EVENT_CONTROL_FILE_SYNC_UPDATE, - WAIT_EVENT_CONTROL_FILE_WRITE, - WAIT_EVENT_CONTROL_FILE_WRITE_UPDATE, - WAIT_EVENT_COPY_FILE_READ, - WAIT_EVENT_COPY_FILE_WRITE, - WAIT_EVENT_DATA_FILE_EXTEND, - WAIT_EVENT_DATA_FILE_FLUSH, - WAIT_EVENT_DATA_FILE_IMMEDIATE_SYNC, - WAIT_EVENT_DATA_FILE_PREFETCH, - WAIT_EVENT_DATA_FILE_READ, - WAIT_EVENT_DATA_FILE_SYNC, - WAIT_EVENT_DATA_FILE_TRUNCATE, - WAIT_EVENT_DATA_FILE_WRITE, - WAIT_EVENT_DSM_FILL_ZERO_WRITE, - WAIT_EVENT_LOCK_FILE_ADDTODATADIR_READ, - WAIT_EVENT_LOCK_FILE_ADDTODATADIR_SYNC, - WAIT_EVENT_LOCK_FILE_ADDTODATADIR_WRITE, - WAIT_EVENT_LOCK_FILE_CREATE_READ, - WAIT_EVENT_LOCK_FILE_CREATE_SYNC, - WAIT_EVENT_LOCK_FILE_CREATE_WRITE, - WAIT_EVENT_LOCK_FILE_RECHECKDATADIR_READ, - WAIT_EVENT_LOGICAL_REWRITE_CHECKPOINT_SYNC, - WAIT_EVENT_LOGICAL_REWRITE_MAPPING_SYNC, - WAIT_EVENT_LOGICAL_REWRITE_MAPPING_WRITE, - WAIT_EVENT_LOGICAL_REWRITE_SYNC, - WAIT_EVENT_LOGICAL_REWRITE_TRUNCATE, - WAIT_EVENT_LOGICAL_REWRITE_WRITE, - WAIT_EVENT_RELATION_MAP_READ, - WAIT_EVENT_RELATION_MAP_SYNC, - WAIT_EVENT_RELATION_MAP_WRITE, - WAIT_EVENT_REORDER_BUFFER_READ, - WAIT_EVENT_REORDER_BUFFER_WRITE, - WAIT_EVENT_REORDER_LOGICAL_MAPPING_READ, - WAIT_EVENT_REPLICATION_SLOT_READ, - WAIT_EVENT_REPLICATION_SLOT_RESTORE_SYNC, - WAIT_EVENT_REPLICATION_SLOT_SYNC, - WAIT_EVENT_REPLICATION_SLOT_WRITE, - WAIT_EVENT_SLRU_FLUSH_SYNC, - WAIT_EVENT_SLRU_READ, - WAIT_EVENT_SLRU_SYNC, - WAIT_EVENT_SLRU_WRITE, - WAIT_EVENT_SNAPBUILD_READ, - WAIT_EVENT_SNAPBUILD_SYNC, - WAIT_EVENT_SNAPBUILD_WRITE, - WAIT_EVENT_TIMELINE_HISTORY_FILE_SYNC, - WAIT_EVENT_TIMELINE_HISTORY_FILE_WRITE, - WAIT_EVENT_TIMELINE_HISTORY_READ, - WAIT_EVENT_TIMELINE_HISTORY_SYNC, - WAIT_EVENT_TIMELINE_HISTORY_WRITE, - WAIT_EVENT_TWOPHASE_FILE_READ, - WAIT_EVENT_TWOPHASE_FILE_SYNC, - WAIT_EVENT_TWOPHASE_FILE_WRITE, - WAIT_EVENT_WALSENDER_TIMELINE_HISTORY_READ, - WAIT_EVENT_WAL_BOOTSTRAP_SYNC, - WAIT_EVENT_WAL_BOOTSTRAP_WRITE, - WAIT_EVENT_WAL_COPY_READ, - WAIT_EVENT_WAL_COPY_SYNC, - WAIT_EVENT_WAL_COPY_WRITE, - WAIT_EVENT_WAL_INIT_SYNC, - WAIT_EVENT_WAL_INIT_WRITE, - WAIT_EVENT_WAL_READ, - WAIT_EVENT_WAL_SYNC, - WAIT_EVENT_WAL_SYNC_METHOD_ASSIGN, - WAIT_EVENT_WAL_WRITE -} WaitEventIO; - -/* ---------- - * Command type for progress reporting purposes - * ---------- - */ -typedef enum ProgressCommandType -{ - PROGRESS_COMMAND_INVALID, - PROGRESS_COMMAND_VACUUM, - PROGRESS_COMMAND_ANALYZE, - PROGRESS_COMMAND_CLUSTER, - PROGRESS_COMMAND_CREATE_INDEX, - PROGRESS_COMMAND_BASEBACKUP -} ProgressCommandType; - -#define PGSTAT_NUM_PROGRESS_PARAM 20 - -/* ---------- - * Shared-memory data structures - * ---------- - */ - - -/* - * PgBackendSSLStatus - * - * For each backend, we keep the SSL status in a separate struct, that - * is only filled in if SSL is enabled. - * - * All char arrays must be null-terminated. - */ -typedef struct PgBackendSSLStatus -{ - /* Information about SSL connection */ - int ssl_bits; - bool ssl_compression; - char ssl_version[NAMEDATALEN]; - char ssl_cipher[NAMEDATALEN]; - char ssl_client_dn[NAMEDATALEN]; - - /* - * serial number is max "20 octets" per RFC 5280, so this size should be - * fine - */ - char ssl_client_serial[NAMEDATALEN]; - - char ssl_issuer_dn[NAMEDATALEN]; -} PgBackendSSLStatus; - /* - * PgBackendGSSStatus - * - * For each backend, we keep the GSS status in a separate struct, that - * is only filled in if GSS is enabled. - * - * All char arrays must be null-terminated. + * Replication slot statistics kept in the stats collector */ -typedef struct PgBackendGSSStatus +typedef struct PgStat_StatReplSlotEntry { - /* Information about GSSAPI connection */ - char gss_princ[NAMEDATALEN]; /* GSSAPI Principal used to auth */ - bool gss_auth; /* If GSSAPI authentication was used */ - bool gss_enc; /* If encryption is being used */ - -} PgBackendGSSStatus; - - -/* ---------- - * PgBackendStatus - * - * Each live backend maintains a PgBackendStatus struct in shared memory - * showing its current activity. (The structs are allocated according to - * BackendId, but that is not critical.) Note that the collector process - * has no involvement in, or even access to, these structs. - * - * Each auxiliary process also maintains a PgBackendStatus struct in shared - * memory. - * ---------- - */ -typedef struct PgBackendStatus -{ - /* - * To avoid locking overhead, we use the following protocol: a backend - * increments st_changecount before modifying its entry, and again after - * finishing a modification. A would-be reader should note the value of - * st_changecount, copy the entry into private memory, then check - * st_changecount again. If the value hasn't changed, and if it's even, - * the copy is valid; otherwise start over. This makes updates cheap - * while reads are potentially expensive, but that's the tradeoff we want. - * - * The above protocol needs memory barriers to ensure that the apparent - * order of execution is as it desires. Otherwise, for example, the CPU - * might rearrange the code so that st_changecount is incremented twice - * before the modification on a machine with weak memory ordering. Hence, - * use the macros defined below for manipulating st_changecount, rather - * than touching it directly. - */ - int st_changecount; - - /* The entry is valid iff st_procpid > 0, unused if st_procpid == 0 */ - int st_procpid; - - /* Type of backends */ - BackendType st_backendType; - - /* Times when current backend, transaction, and activity started */ - TimestampTz st_proc_start_timestamp; - TimestampTz st_xact_start_timestamp; - TimestampTz st_activity_start_timestamp; - TimestampTz st_state_start_timestamp; - - /* Database OID, owning user's OID, connection client address */ - Oid st_databaseid; - Oid st_userid; - SockAddr st_clientaddr; - char *st_clienthostname; /* MUST be null-terminated */ - - /* Information about SSL connection */ - bool st_ssl; - PgBackendSSLStatus *st_sslstatus; - - /* Information about GSSAPI connection */ - bool st_gss; - PgBackendGSSStatus *st_gssstatus; - - /* current state */ - BackendState st_state; - - /* application name; MUST be null-terminated */ - char *st_appname; - - /* - * Current command string; MUST be null-terminated. Note that this string - * possibly is truncated in the middle of a multi-byte character. As - * activity strings are stored more frequently than read, that allows to - * move the cost of correct truncation to the display side. Use - * pgstat_clip_activity() to truncate correctly. - */ - char *st_activity_raw; - - /* - * Command progress reporting. Any command which wishes can advertise - * that it is running by setting st_progress_command, - * st_progress_command_target, and st_progress_param[]. - * st_progress_command_target should be the OID of the relation which the - * command targets (we assume there's just one, as this is meant for - * utility commands), but the meaning of each element in the - * st_progress_param array is command-specific. - */ - ProgressCommandType st_progress_command; - Oid st_progress_command_target; - int64 st_progress_param[PGSTAT_NUM_PROGRESS_PARAM]; -} PgBackendStatus; - -/* - * Macros to load and store st_changecount with appropriate memory barriers. - * - * Use PGSTAT_BEGIN_WRITE_ACTIVITY() before, and PGSTAT_END_WRITE_ACTIVITY() - * after, modifying the current process's PgBackendStatus data. Note that, - * since there is no mechanism for cleaning up st_changecount after an error, - * THESE MACROS FORM A CRITICAL SECTION. Any error between them will be - * promoted to PANIC, causing a database restart to clean up shared memory! - * Hence, keep the critical section as short and straight-line as possible. - * Aside from being safer, that minimizes the window in which readers will - * have to loop. - * - * Reader logic should follow this sketch: - * - * for (;;) - * { - * int before_ct, after_ct; - * - * pgstat_begin_read_activity(beentry, before_ct); - * ... copy beentry data to local memory ... - * pgstat_end_read_activity(beentry, after_ct); - * if (pgstat_read_activity_complete(before_ct, after_ct)) - * break; - * CHECK_FOR_INTERRUPTS(); - * } - * - * For extra safety, we generally use volatile beentry pointers, although - * the memory barriers should theoretically be sufficient. - */ -#define PGSTAT_BEGIN_WRITE_ACTIVITY(beentry) \ - do { \ - START_CRIT_SECTION(); \ - (beentry)->st_changecount++; \ - pg_write_barrier(); \ - } while (0) - -#define PGSTAT_END_WRITE_ACTIVITY(beentry) \ - do { \ - pg_write_barrier(); \ - (beentry)->st_changecount++; \ - Assert(((beentry)->st_changecount & 1) == 0); \ - END_CRIT_SECTION(); \ - } while (0) - -#define pgstat_begin_read_activity(beentry, before_changecount) \ - do { \ - (before_changecount) = (beentry)->st_changecount; \ - pg_read_barrier(); \ - } while (0) - -#define pgstat_end_read_activity(beentry, after_changecount) \ - do { \ - pg_read_barrier(); \ - (after_changecount) = (beentry)->st_changecount; \ - } while (0) - -#define pgstat_read_activity_complete(before_changecount, after_changecount) \ - ((before_changecount) == (after_changecount) && \ - ((before_changecount) & 1) == 0) - - -/* ---------- - * LocalPgBackendStatus - * - * When we build the backend status array, we use LocalPgBackendStatus to be - * able to add new values to the struct when needed without adding new fields - * to the shared memory. It contains the backend status as a first member. - * ---------- - */ -typedef struct LocalPgBackendStatus -{ - /* - * Local version of the backend status entry. - */ - PgBackendStatus backendStatus; - - /* - * The xid of the current transaction if available, InvalidTransactionId - * if not. - */ - TransactionId backend_xid; + 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; - /* - * The xmin of the current session if available, InvalidTransactionId if - * not. - */ - TransactionId backend_xmin; -} LocalPgBackendStatus; /* * Working state needed to accumulate per-function-call timing statistics. @@ -1246,10 +920,8 @@ typedef struct PgStat_FunctionCallUsage * GUC parameters * ---------- */ -extern PGDLLIMPORT bool pgstat_track_activities; extern PGDLLIMPORT bool pgstat_track_counts; extern PGDLLIMPORT int pgstat_track_functions; -extern PGDLLIMPORT int pgstat_track_activity_query_size; extern char *pgstat_stat_directory; extern char *pgstat_stat_tmpname; extern char *pgstat_stat_filename; @@ -1260,18 +932,33 @@ extern char *pgstat_stat_filename; 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 Size BackendStatusShmemSize(void); -extern void CreateSharedBackendStatus(void); - extern void pgstat_init(void); extern int pgstat_start(void); extern void pgstat_reset_all(void); @@ -1297,7 +984,9 @@ 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); @@ -1309,88 +998,18 @@ 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 void pgstat_bestart(void); - -extern void pgstat_report_activity(BackendState state, const char *cmd_str); -extern void pgstat_report_tempfile(size_t filesize); -extern void pgstat_report_appname(const char *appname); -extern void pgstat_report_xact_timestamp(TimestampTz tstamp); -extern const char *pgstat_get_wait_event(uint32 wait_event_info); -extern const char *pgstat_get_wait_event_type(uint32 wait_event_info); -extern const char *pgstat_get_backend_current_activity(int pid, bool checkUser); -extern const char *pgstat_get_crashed_backend_activity(int pid, char *buffer, - int buflen); - -extern void pgstat_progress_start_command(ProgressCommandType cmdtype, - Oid relid); -extern void pgstat_progress_update_param(int index, int64 val); -extern void pgstat_progress_update_multi_param(int nparam, const int *index, - const int64 *val); -extern void pgstat_progress_end_command(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); -extern char *pgstat_clip_activity(const char *raw_activity); - -/* ---------- - * pgstat_report_wait_start() - - * - * Called from places where server process needs to wait. This is called - * to report wait event information. The wait information is stored - * as 4-bytes where first byte represents the wait event class (type of - * wait, for different types of wait, refer WaitClass) and the next - * 3-bytes represent the actual wait event. Currently 2-bytes are used - * for wait event which is sufficient for current usage, 1-byte is - * reserved for future usage. - * - * NB: this *must* be able to survive being called before MyProc has been - * initialized. - * ---------- - */ -static inline void -pgstat_report_wait_start(uint32 wait_event_info) -{ - volatile PGPROC *proc = MyProc; - - if (!pgstat_track_activities || !proc) - return; - - /* - * Since this is a four-byte field which is always read and written as - * four-bytes, updates are atomic. - */ - proc->wait_event_info = wait_event_info; -} - -/* ---------- - * pgstat_report_wait_end() - - * - * Called to report end of a wait. - * - * NB: this *must* be able to survive being called before MyProc has been - * initialized. - * ---------- - */ -static inline void -pgstat_report_wait_end(void) -{ - volatile PGPROC *proc = MyProc; - - if (!pgstat_track_activities || !proc) - return; - - /* - * Since this is a four-byte field which is always read and written as - * four-bytes, updates are atomic. - */ - proc->wait_event_info = 0; -} - /* nontransactional event counts are simple enough to inline */ #define pgstat_count_heap_scan(rel) \ @@ -1432,6 +1051,10 @@ pgstat_report_wait_end(void) (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); @@ -1458,6 +1081,7 @@ extern void pgstat_twophase_postabort(TransactionId xid, uint16 info, 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 @@ -1466,13 +1090,12 @@ extern void pgstat_send_bgwriter(void); */ extern PgStat_StatDBEntry *pgstat_fetch_stat_dbentry(Oid dbid); extern PgStat_StatTabEntry *pgstat_fetch_stat_tabentry(Oid relid); -extern PgBackendStatus *pgstat_fetch_stat_beentry(int beid); -extern LocalPgBackendStatus *pgstat_fetch_stat_local_beentry(int beid); extern PgStat_StatFuncEntry *pgstat_fetch_stat_funcentry(Oid funcid); -extern int pgstat_fetch_stat_numbackends(void); 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); diff --git a/contrib/libs/postgresql/src/include/pgtar.h b/contrib/libs/postgresql/src/include/pgtar.h index 0a875903a7..6d47ece652 100644 --- a/contrib/libs/postgresql/src/include/pgtar.h +++ b/contrib/libs/postgresql/src/include/pgtar.h @@ -4,13 +4,17 @@ * Functions for manipulating tarfile datastructures (src/port/tar.c) * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * 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 { @@ -19,8 +23,23 @@ enum tarError 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 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 index 0fc76d0e60..28bd27e7f7 100644 --- a/contrib/libs/postgresql/src/include/pgtime.h +++ b/contrib/libs/postgresql/src/include/pgtime.h @@ -3,7 +3,7 @@ * pgtime.h * PostgreSQL internal timezone library * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * * IDENTIFICATION * src/include/pgtime.h diff --git a/contrib/libs/postgresql/src/include/port.h b/contrib/libs/postgresql/src/include/port.h index d4c94a4411..82f63de325 100644 --- a/contrib/libs/postgresql/src/include/port.h +++ b/contrib/libs/postgresql/src/include/port.h @@ -3,7 +3,7 @@ * port.h * Header for src/port/ compatibility functions. * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/port.h @@ -99,10 +99,33 @@ extern void pgfnames_cleanup(char **filenames); ) #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); @@ -213,10 +236,6 @@ extern char *pg_strerror_r(int errnum, char *buf, size_t buflen); /* Wrap strsignal(), or provide our own version if necessary */ extern const char *pg_strsignal(int signum); -/* Portable prompt handling */ -extern void simple_prompt(const char *prompt, char *destination, size_t destlen, - bool echo); - extern int pclose_check(FILE *stream); /* Global variable holding time zone information. */ @@ -413,6 +432,8 @@ extern ssize_t pg_pread(int fd, void *buf, size_t nbyte, off_t offset); 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 @@ -430,11 +451,11 @@ extern long random(void); #endif #ifndef HAVE_SETENV -extern int setenv(const char *name, const char *value, int overwrite); +extern int setenv(const char *name, const char *value, int overwrite); #endif #ifndef HAVE_UNSETENV -extern void unsetenv(const char *name); +extern int unsetenv(const char *name); #endif #ifndef HAVE_SRANDOM @@ -487,6 +508,11 @@ 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); @@ -499,6 +525,7 @@ 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); /* diff --git a/contrib/libs/postgresql/src/include/postgres.h b/contrib/libs/postgresql/src/include/postgres.h index c48f47e930..0446daa0e6 100644 --- a/contrib/libs/postgresql/src/include/postgres.h +++ b/contrib/libs/postgresql/src/include/postgres.h @@ -7,7 +7,7 @@ * Client-side code should include postgres_fe.h instead. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1995, Regents of the University of California * * src/include/postgres.h @@ -55,7 +55,9 @@ /* * 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 va_extsize < va_rawsize - VARHDRSZ. + * 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. * @@ -67,12 +69,20 @@ typedef struct varatt_external { int32 va_rawsize; /* Original data size (includes header) */ - int32 va_extsize; /* External saved size (doesn't) */ + 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 @@ -145,7 +155,8 @@ typedef union struct /* Compressed-in-line format */ { uint32 va_header; - uint32 va_rawsize; /* Original data size (excludes 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; @@ -231,6 +242,7 @@ typedef struct #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) \ @@ -263,9 +275,22 @@ typedef struct #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) && \ @@ -273,18 +298,6 @@ typedef struct #define VARATT_CONVERTED_SHORT_SIZE(PTR) \ (VARSIZE(PTR) - VARHDRSZ + VARHDRSZ_SHORT) -#define VARHDRSZ_EXTERNAL offsetof(varattrib_1b_e, va_data) - -#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) - -#define VARRAWSIZE_4B_C(PTR) \ - (((varattrib_4b *) (PTR))->va_compressed.va_rawsize) - -/* Externally visible macros */ - /* * In consumers oblivious to data alignment, call PG_DETOAST_DATUM_PACKED(), * VARDATA_ANY(), VARSIZE_ANY() and VARSIZE_ANY_EXHDR(). Elsewhere, call @@ -348,6 +361,37 @@ typedef struct #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 diff --git a/contrib/libs/postgresql/src/include/postgres_fe.h b/contrib/libs/postgresql/src/include/postgres_fe.h index e99258f2d6..3cdb911faa 100644 --- a/contrib/libs/postgresql/src/include/postgres_fe.h +++ b/contrib/libs/postgresql/src/include/postgres_fe.h @@ -8,7 +8,7 @@ * postgres.h. * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1995, Regents of the University of California * * src/include/postgres_fe.h diff --git a/contrib/libs/postgresql/src/include/rusagestub.h b/contrib/libs/postgresql/src/include/rusagestub.h index 3a812a29bc..211750380b 100644 --- a/contrib/libs/postgresql/src/include/rusagestub.h +++ b/contrib/libs/postgresql/src/include/rusagestub.h @@ -4,7 +4,7 @@ * Stubs for getrusage(3). * * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/rusagestub.h diff --git a/contrib/libs/postgresql/src/include/windowapi.h b/contrib/libs/postgresql/src/include/windowapi.h index e8c9fc54d8..c5324aa8f1 100644 --- a/contrib/libs/postgresql/src/include/windowapi.h +++ b/contrib/libs/postgresql/src/include/windowapi.h @@ -19,7 +19,7 @@ * function in nodeWindowAgg.c for details. * * - * Portions Copyright (c) 2000-2020, PostgreSQL Global Development Group + * Portions Copyright (c) 2000-2021, PostgreSQL Global Development Group * * src/include/windowapi.h * diff --git a/contrib/libs/postgresql/ya.make b/contrib/libs/postgresql/ya.make index a20c9de825..b012143591 100644 --- a/contrib/libs/postgresql/ya.make +++ b/contrib/libs/postgresql/ya.make @@ -4,9 +4,9 @@ LIBRARY(postgres) OWNER(g:cpp-contrib) -VERSION(13.6) +VERSION(14.2) -ORIGINAL_SOURCE(mirror://postgresql/source/v13.6/postgresql-13.6.tar.bz2) +ORIGINAL_SOURCE(mirror://postgresql/source/v14.2/postgresql-14.2.tar.bz2) LICENSE( Apache-2.0 AND @@ -35,11 +35,13 @@ PEERDIR( contrib/libs/libc_compat contrib/libs/libiconv contrib/libs/libxml + contrib/libs/lz4 contrib/libs/openssl ) ADDINCL( contrib/libs/libiconv/include + contrib/libs/lz4 contrib/libs/postgresql/src/backend/bootstrap contrib/libs/postgresql/src/backend/parser contrib/libs/postgresql/src/backend/replication @@ -62,8 +64,10 @@ CFLAGS( SRCS( src/backend/access/brin/brin.c + src/backend/access/brin/brin_bloom.c src/backend/access/brin/brin_inclusion.c src/backend/access/brin/brin_minmax.c + src/backend/access/brin/brin_minmax_multi.c src/backend/access/brin/brin_pageops.c src/backend/access/brin/brin_revmap.c src/backend/access/brin/brin_tuple.c @@ -80,6 +84,8 @@ SRCS( src/backend/access/common/reloptions.c src/backend/access/common/scankey.c src/backend/access/common/session.c + src/backend/access/common/syncscan.c + src/backend/access/common/toast_compression.c src/backend/access/common/toast_internals.c src/backend/access/common/tupconvert.c src/backend/access/common/tupdesc.c @@ -126,7 +132,6 @@ SRCS( src/backend/access/heap/hio.c src/backend/access/heap/pruneheap.c src/backend/access/heap/rewriteheap.c - src/backend/access/heap/syncscan.c src/backend/access/heap/vacuumlazy.c src/backend/access/heap/visibilitymap.c src/backend/access/index/amapi.c @@ -246,6 +251,9 @@ SRCS( src/backend/commands/constraint.c src/backend/commands/conversioncmds.c src/backend/commands/copy.c + src/backend/commands/copyfrom.c + src/backend/commands/copyfromparse.c + src/backend/commands/copyto.c src/backend/commands/createas.c src/backend/commands/dbcommands.c src/backend/commands/define.c @@ -281,6 +289,7 @@ SRCS( src/backend/commands/variable.c src/backend/commands/view.c src/backend/executor/execAmi.c + src/backend/executor/execAsync.c src/backend/executor/execCurrent.c src/backend/executor/execExpr.c src/backend/executor/execExprInterp.c @@ -319,6 +328,7 @@ SRCS( src/backend/executor/nodeLimit.c src/backend/executor/nodeLockRows.c src/backend/executor/nodeMaterial.c + src/backend/executor/nodeMemoize.c src/backend/executor/nodeMergeAppend.c src/backend/executor/nodeMergejoin.c src/backend/executor/nodeModifyTable.c @@ -334,6 +344,7 @@ SRCS( src/backend/executor/nodeSubplan.c src/backend/executor/nodeSubqueryscan.c src/backend/executor/nodeTableFuncscan.c + src/backend/executor/nodeTidrangescan.c src/backend/executor/nodeTidscan.c src/backend/executor/nodeUnique.c src/backend/executor/nodeValuesscan.c @@ -414,6 +425,7 @@ SRCS( src/backend/optimizer/plan/planner.c src/backend/optimizer/plan/setrefs.c src/backend/optimizer/plan/subselect.c + src/backend/optimizer/prep/prepagg.c src/backend/optimizer/prep/prepjointree.c src/backend/optimizer/prep/prepqual.c src/backend/optimizer/prep/preptlist.c @@ -500,6 +512,7 @@ SRCS( src/backend/rewrite/rewriteHandler.c src/backend/rewrite/rewriteManip.c src/backend/rewrite/rewriteRemove.c + src/backend/rewrite/rewriteSearchCycle.c src/backend/rewrite/rewriteSupport.c src/backend/rewrite/rowsecurity.c src/backend/statistics/dependencies.c @@ -574,6 +587,9 @@ SRCS( src/backend/tsearch/ts_utils.c src/backend/tsearch/wparser.c src/backend/tsearch/wparser_def.c + src/backend/utils/activity/backend_progress.c + src/backend/utils/activity/backend_status.c + src/backend/utils/activity/wait_event.c src/backend/utils/adt/acl.c src/backend/utils/adt/amutils.c src/backend/utils/adt/array_expanded.c @@ -581,12 +597,13 @@ SRCS( src/backend/utils/adt/array_typanalyze.c src/backend/utils/adt/array_userfuncs.c src/backend/utils/adt/arrayfuncs.c + src/backend/utils/adt/arraysubs.c src/backend/utils/adt/arrayutils.c src/backend/utils/adt/ascii.c src/backend/utils/adt/bool.c src/backend/utils/adt/cash.c src/backend/utils/adt/char.c - src/backend/utils/adt/cryptohashes.c + src/backend/utils/adt/cryptohashfuncs.c src/backend/utils/adt/date.c src/backend/utils/adt/datetime.c src/backend/utils/adt/datum.c @@ -612,6 +629,7 @@ SRCS( src/backend/utils/adt/jsonb_gin.c src/backend/utils/adt/jsonb_op.c src/backend/utils/adt/jsonb_util.c + src/backend/utils/adt/jsonbsubs.c src/backend/utils/adt/jsonfuncs.c src/backend/utils/adt/jsonpath.c src/backend/utils/adt/jsonpath_exec.c @@ -621,7 +639,10 @@ SRCS( src/backend/utils/adt/lockfuncs.c src/backend/utils/adt/mac.c src/backend/utils/adt/mac8.c + src/backend/utils/adt/mcxtfuncs.c src/backend/utils/adt/misc.c + src/backend/utils/adt/multirangetypes.c + src/backend/utils/adt/multirangetypes_selfuncs.c src/backend/utils/adt/name.c src/backend/utils/adt/network.c src/backend/utils/adt/network_gist.c @@ -711,6 +732,7 @@ SRCS( src/backend/utils/misc/pg_rusage.c src/backend/utils/misc/ps_status.c src/backend/utils/misc/queryenvironment.c + src/backend/utils/misc/queryjumble.c src/backend/utils/misc/rls.c src/backend/utils/misc/sampling.c src/backend/utils/misc/superuser.c @@ -737,18 +759,22 @@ SRCS( src/common/checksum_helper.c src/common/config_info.c src/common/controldata_utils.c + src/common/cryptohash_openssl.c src/common/d2s.c src/common/encnames.c src/common/exec.c src/common/f2s.c src/common/file_perm.c + src/common/file_utils.c src/common/hashfn.c + src/common/hmac_openssl.c src/common/ip.c src/common/jsonapi.c src/common/keywords.c src/common/kwlookup.c src/common/link-canary.c - src/common/md5.c + src/common/md5_common.c + src/common/pg_get_line.c src/common/pg_lzcompress.c src/common/pgfnames.c src/common/protocol_openssl.c @@ -757,13 +783,13 @@ SRCS( src/common/rmtree.c src/common/saslprep.c src/common/scram-common.c - src/common/sha2_openssl.c src/common/string.c src/common/stringinfo.c src/common/unicode_norm.c src/common/username.c src/common/wait_error.c src/common/wchar.c + src/port/bsearch_arg.c src/port/chklocale.c src/port/erand48.c src/port/fls.c @@ -786,7 +812,6 @@ SRCS( src/port/qsort_arg.c src/port/quotes.c src/port/snprintf.c - src/port/sprompt.c src/port/strerror.c src/port/tar.c src/port/thread.c @@ -824,11 +849,13 @@ ELSEIF (OS_WINDOWS) src/port/open.c src/port/pread.c src/port/pwrite.c + src/port/pwritev.c src/port/system.c src/port/win32env.c src/port/win32error.c src/port/win32security.c src/port/win32setlocale.c + src/port/win32stat.c ) ENDIF() |