Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vsQ1L-000BdG-2M for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Feb 2026 18:42:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vsQ1I-00BQxT-2Q for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Feb 2026 18:42:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vsQ1I-00BQxI-13 for pgsql-hackers@lists.postgresql.org; Tue, 17 Feb 2026 18:42:00 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vsQ1C-00000001EvD-211C for pgsql-hackers@postgresql.org; Tue, 17 Feb 2026 18:42:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 61HIfnjf1881129; Tue, 17 Feb 2026 13:41:49 -0500 From: Tom Lane To: Andres Freund cc: Andrew Dunstan , PostgreSQL-development Subject: Re: generating function default settings from pg_proc.dat In-reply-to: <1392601.1771341882@sss.pgh.pa.us> References: <183292bb-4891-4c96-a3ca-e78b5e0e1358@dunslane.net> <1166845.1771269225@sss.pgh.pa.us> <1172935.1771272123@sss.pgh.pa.us> <4bb703bc-833f-4b53-a313-ae0b72afe2a5@dunslane.net> <1185287.1771278396@sss.pgh.pa.us> <1288023.1771292185@sss.pgh.pa.us> <1392601.1771341882@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 17 Feb 2026 10:24:42 -0500" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <1881096.1771353687.0@sss.pgh.pa.us> Date: Tue, 17 Feb 2026 13:41:49 -0500 Message-ID: <1881128.1771353709@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1881096.1771353687.1@sss.pgh.pa.us> Here's the promised v2, which addresses all your review comments. With respect to the list of supported types in bki.sgml: I wonder if we should just drop that, because it evidently hasn't been maintained well. It wasn't at all in sync with the actual contents of TypInfo[]. I made it be so, but ... Poking further at that, I found that there were a lot of TypInfo[] entries that were not actually used and seem to have just been cargo-culted in. So this patch removes all the ones that aren't demonstrably necessary to get through initdb. Maybe that's too aggressive, but in view of the potential for maintenance errors (cf 7cdb633c8) I don't think we should be carrying unused entries there. regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name*0="v2-0001-Simplify-creation-of-built-in-functions-with-defa.p"; name*1="atch"; charset="us-ascii" Content-ID: <1881096.1771353687.2@sss.pgh.pa.us> Content-Description: v2-0001-Simplify-creation-of-built-in-functions-with-defa.patch Content-Transfer-Encoding: quoted-printable =46rom fa818e3fa7c74019c2b6ffc3a0050db719581852 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 17 Feb 2026 13:31:56 -0500 Subject: [PATCH v2] Simplify creation of built-in functions with default arguments. Up to now, to create such a function, one had to make a pg_proc.dat entry and then overwrite it with a CREATE OR REPLACE command in system_functions.sql. That's error-prone (cf. bug #19409) and results in leaving dead rows in the initial contents of pg_proc. Manual maintenance of pg_node_tree strings seems entirely impractical, and parsing expressions during bootstrap would be extremely difficult as well. But Andres Freund observed that all the current use-cases are simple constants, and building a Const node is well within the capabilities of bootstrap mode. So this patch invents a special case: if bootstrap mode is asked to ingest a non-null value for pg_proc.proargdefaults (which would otherwise fail in pg_node_tree_in), it parses the value as an array literal and then feeds the element strings to the input functions for the corresponding parameter types. Then we can build a suitable pg_node_tree string with just a few more lines of code. This allows removing all the system_functions.sql entries that are just there to set up default arguments, replacing them with proargdefaults fields in pg_proc.dat entries. The old technique remains available in case someone needs a non-constant default. The initial contents of pg_proc are demonstrably the same after this patch, except that (1) json_strip_nulls and jsonb_strip_nulls now have the correct provolatile setting, as per bug #19409; (2) pg_terminate_backend, make_interval, and drandom_normal now have defaults that don't include a type coercion, which is how they should have been all along. Author: Tom Lane Author: Andrew Dunstan Reviewed-by: Andres Freund Discussion: https://postgr.es/m/183292bb-4891-4c96-a3ca-e78b5e0e1358@dunsl= ane.net --- doc/src/sgml/bki.sgml | 34 ++- src/backend/bootstrap/bootstrap.c | 177 ++++++++++++-- src/backend/catalog/system_functions.sql | 285 +---------------------- src/backend/utils/cache/lsyscache.c | 4 +- src/include/bootstrap/bootstrap.h | 3 +- src/include/catalog/pg_proc.dat | 86 ++++++- 6 files changed, 262 insertions(+), 327 deletions(-) diff --git a/doc/src/sgml/bki.sgml b/doc/src/sgml/bki.sgml index 53a982bf60d..087a6827b00 100644 --- a/doc/src/sgml/bki.sgml +++ b/doc/src/sgml/bki.sgml @@ -271,6 +271,21 @@ = + + + There is a special case for values of the + pg_proc.proargdefaults + field, which is of type pg_node_tree. The real + contents of that type are too complex for hand-written entries, + but what we need for proargdefaults is + typically just a list of Const nodes. Therefore, the bootstrap + backend will interpret a value given for that field according to + text array syntax, and then feed the array element values to the + datatype input routines for the corresponding input parameters' dat= a + types, and finally build Const nodes from the datums. + + + Since hashes are unordered data structures, field order and line @@ -817,11 +832,11 @@ $ perl rewrite_dat_with_prokind.pl pg_proc.dat The following column types are supported directly by bootstrap.c: bool, bytea, char (1 byte), - name, int2, - int4, regproc, regclass, - regtype, text, - oid, tid, xid, - cid, int2vector, oidvector, + int2, int4, int8, + float4, float8, + name, regproc, text, + jsonb, oid, pg_node_tree, + int2vector, oidvector, _int4 (array), _text (array), _oid (array), _char (array), _aclitem (array). Although it is possible to create @@ -884,7 +899,7 @@ $ perl rewrite_dat_with_prokind.pl pg_proc.dat = - insert ( oid_value value1 valu= e2 ... ) + insert ( value1 value2 ... ) = @@ -902,6 +917,13 @@ $ perl rewrite_dat_with_prokind.pl pg_proc.dat (To include a single quote in a value, write it twice. Escape-string-style backslash escapes are allowed in the string, to= o.) + + + In most cases a value + string is simply fed to the datatype input routine for the column's + data type, after de-quoting if needed. However there are exception= s + for certain fields, as detailed previously. + = diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/boo= tstrap.c index 7d32cd0e159..8d601c363b4 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -26,6 +26,7 @@ #include "bootstrap/bootstrap.h" #include "catalog/index.h" #include "catalog/pg_collation.h" +#include "catalog/pg_proc.h" #include "catalog/pg_type.h" #include "common/link-canary.h" #include "miscadmin.h" @@ -46,6 +47,7 @@ static void CheckerModeMain(void); static void bootstrap_signals(void); static Form_pg_attribute AllocateAttribute(void); +static void InsertOneProargdefaultsValue(char *value); static void populate_typ_list(void); static Oid gettype(char *type); static void cleanup(void); @@ -91,38 +93,28 @@ static const struct typinfo TypInfo[] =3D { F_BYTEAIN, F_BYTEAOUT}, {"char", CHAROID, 0, 1, true, TYPALIGN_CHAR, TYPSTORAGE_PLAIN, InvalidOi= d, F_CHARIN, F_CHAROUT}, + {"cstring", CSTRINGOID, 0, -2, false, TYPALIGN_CHAR, TYPSTORAGE_PLAIN, I= nvalidOid, + F_CSTRING_IN, F_CSTRING_OUT}, {"int2", INT2OID, 0, 2, true, TYPALIGN_SHORT, TYPSTORAGE_PLAIN, InvalidO= id, F_INT2IN, F_INT2OUT}, {"int4", INT4OID, 0, 4, true, TYPALIGN_INT, TYPSTORAGE_PLAIN, InvalidOid= , F_INT4IN, F_INT4OUT}, + {"int8", INT8OID, 0, 8, true, TYPALIGN_DOUBLE, TYPSTORAGE_PLAIN, Invalid= Oid, + F_INT8IN, F_INT8OUT}, {"float4", FLOAT4OID, 0, 4, true, TYPALIGN_INT, TYPSTORAGE_PLAIN, Invali= dOid, F_FLOAT4IN, F_FLOAT4OUT}, + {"float8", FLOAT8OID, 0, 8, true, TYPALIGN_DOUBLE, TYPSTORAGE_PLAIN, Inv= alidOid, + F_FLOAT8IN, F_FLOAT8OUT}, {"name", NAMEOID, CHAROID, NAMEDATALEN, false, TYPALIGN_CHAR, TYPSTORAGE= _PLAIN, C_COLLATION_OID, F_NAMEIN, F_NAMEOUT}, - {"regclass", REGCLASSOID, 0, 4, true, TYPALIGN_INT, TYPSTORAGE_PLAIN, In= validOid, - F_REGCLASSIN, F_REGCLASSOUT}, {"regproc", REGPROCOID, 0, 4, true, TYPALIGN_INT, TYPSTORAGE_PLAIN, Inva= lidOid, F_REGPROCIN, F_REGPROCOUT}, - {"regtype", REGTYPEOID, 0, 4, true, TYPALIGN_INT, TYPSTORAGE_PLAIN, Inva= lidOid, - F_REGTYPEIN, F_REGTYPEOUT}, - {"regrole", REGROLEOID, 0, 4, true, TYPALIGN_INT, TYPSTORAGE_PLAIN, Inva= lidOid, - F_REGROLEIN, F_REGROLEOUT}, - {"regnamespace", REGNAMESPACEOID, 0, 4, true, TYPALIGN_INT, TYPSTORAGE_P= LAIN, InvalidOid, - F_REGNAMESPACEIN, F_REGNAMESPACEOUT}, - {"regdatabase", REGDATABASEOID, 0, 4, true, TYPALIGN_INT, TYPSTORAGE_PLA= IN, InvalidOid, - F_REGDATABASEIN, F_REGDATABASEOUT}, {"text", TEXTOID, 0, -1, false, TYPALIGN_INT, TYPSTORAGE_EXTENDED, DEFAU= LT_COLLATION_OID, F_TEXTIN, F_TEXTOUT}, + {"jsonb", JSONBOID, 0, -1, false, TYPALIGN_INT, TYPSTORAGE_EXTENDED, Inv= alidOid, + F_JSONB_IN, F_JSONB_OUT}, {"oid", OIDOID, 0, 4, true, TYPALIGN_INT, TYPSTORAGE_PLAIN, InvalidOid, F_OIDIN, F_OIDOUT}, - {"oid8", OID8OID, 0, 8, true, TYPALIGN_DOUBLE, TYPSTORAGE_PLAIN, Invalid= Oid, - F_OID8IN, F_OID8OUT}, - {"tid", TIDOID, 0, 6, false, TYPALIGN_SHORT, TYPSTORAGE_PLAIN, InvalidOi= d, - F_TIDIN, F_TIDOUT}, - {"xid", XIDOID, 0, 4, true, TYPALIGN_INT, TYPSTORAGE_PLAIN, InvalidOid, - F_XIDIN, F_XIDOUT}, - {"cid", CIDOID, 0, 4, true, TYPALIGN_INT, TYPSTORAGE_PLAIN, InvalidOid, - F_CIDIN, F_CIDOUT}, {"pg_node_tree", PG_NODE_TREEOID, 0, -1, false, TYPALIGN_INT, TYPSTORAGE= _EXTENDED, DEFAULT_COLLATION_OID, F_PG_NODE_TREE_IN, F_PG_NODE_TREE_OUT}, {"int2vector", INT2VECTOROID, INT2OID, -1, false, TYPALIGN_INT, TYPSTORA= GE_PLAIN, InvalidOid, @@ -660,6 +652,7 @@ InsertOneTuple(void) void InsertOneValue(char *value, int i) { + Form_pg_attribute attr; Oid typoid; int16 typlen; bool typbyval; @@ -668,19 +661,42 @@ InsertOneValue(char *value, int i) Oid typioparam; Oid typinput; Oid typoutput; + Oid typcollation; = Assert(i >=3D 0 && i < MAXATTR); = elog(DEBUG4, "inserting column %d value \"%s\"", i, value); = - typoid =3D TupleDescAttr(boot_reldesc->rd_att, i)->atttypid; + attr =3D TupleDescAttr(RelationGetDescr(boot_reldesc), i); + typoid =3D attr->atttypid; = boot_get_type_io_data(typoid, &typlen, &typbyval, &typalign, &typdelim, &typioparam, - &typinput, &typoutput); + &typinput, &typoutput, + &typcollation); = - values[i] =3D OidInputFunctionCall(typinput, value, typioparam, -1); + /* + * pg_node_tree values can't be inserted normally (pg_node_tree_in would + * just error out), so provide special cases for such columns that we + * would like to fill during bootstrap. + */ + if (typoid =3D=3D PG_NODE_TREEOID) + { + /* pg_proc.proargdefaults */ + if (RelationGetRelid(boot_reldesc) =3D=3D ProcedureRelationId && + i =3D=3D Anum_pg_proc_proargdefaults - 1) + InsertOneProargdefaultsValue(value); + else /* maybe other cases later */ + elog(ERROR, "can't handle pg_node_tree input for %s.%s", + RelationGetRelationName(boot_reldesc), + NameStr(attr->attname)); + } + else + { + /* Normal case */ + values[i] =3D OidInputFunctionCall(typinput, value, typioparam, -1); + } = /* * We use ereport not elog here so that parameters aren't evaluated unle= ss @@ -691,6 +707,111 @@ InsertOneValue(char *value, int i) OidOutputFunctionCall(typoutput, values[i])))); } = +/* ---------------- + * InsertOneProargdefaultsValue + * + * In general, proargdefaults can be a list of any expressions, but + * for bootstrap we only support a list of Const nodes. The input + * has the form of a text array, and we feed non-null elements to the + * typinput functions for the appropriate parameters. + * ---------------- + */ +static void +InsertOneProargdefaultsValue(char *value) +{ + int pronargs; + oidvector *proargtypes; + Datum arrayval; + Datum *array_datums; + bool *array_nulls; + int array_count; + List *proargdefaults; + char *nodestring; + + /* The pg_proc columns we need to use must have been filled already */ + StaticAssertDecl(Anum_pg_proc_pronargs < Anum_pg_proc_proargdefaults, + "pronargs must come before proargdefaults"); + StaticAssertDecl(Anum_pg_proc_pronargdefaults < Anum_pg_proc_proargdefau= lts, + "pronargdefaults must come before proargdefaults"); + StaticAssertDecl(Anum_pg_proc_proargtypes < Anum_pg_proc_proargdefaults, + "proargtypes must come before proargdefaults"); + if (Nulls[Anum_pg_proc_pronargs - 1]) + elog(ERROR, "pronargs must not be null"); + if (Nulls[Anum_pg_proc_proargtypes - 1]) + elog(ERROR, "proargtypes must not be null"); + pronargs =3D DatumGetInt16(values[Anum_pg_proc_pronargs - 1]); + proargtypes =3D DatumGetPointer(values[Anum_pg_proc_proargtypes - 1]); + Assert(pronargs =3D=3D proargtypes->dim1); + + /* Parse the input string as an array value, then deconstruct to Datums = */ + arrayval =3D OidFunctionCall3(F_ARRAY_IN, + CStringGetDatum(value), + ObjectIdGetDatum(CSTRINGOID), + Int32GetDatum(-1)); + deconstruct_array_builtin(DatumGetArrayTypeP(arrayval), CSTRINGOID, + &array_datums, &array_nulls, &array_count); + + /* The values should correspond to the last N argtypes */ + if (array_count > pronargs) + elog(ERROR, "too many proargdefaults entries"); + + /* Build the List of Const nodes */ + proargdefaults =3D NIL; + for (int i =3D 0; i < array_count; i++) + { + Oid argtype =3D proargtypes->values[pronargs - array_count + i]; + int16 typlen; + bool typbyval; + char typalign; + char typdelim; + Oid typioparam; + Oid typinput; + Oid typoutput; + Oid typcollation; + Datum defval; + bool defnull; + Const *defConst; + + boot_get_type_io_data(argtype, + &typlen, &typbyval, &typalign, + &typdelim, &typioparam, + &typinput, &typoutput, + &typcollation); + + defnull =3D array_nulls[i]; + if (defnull) + defval =3D (Datum) 0; + else + defval =3D OidInputFunctionCall(typinput, + DatumGetCString(array_datums[i]), + typioparam, -1); + + defConst =3D makeConst(argtype, + -1, /* never any typmod */ + typcollation, + typlen, + defval, + defnull, + typbyval); + proargdefaults =3D lappend(proargdefaults, defConst); + } + + /* + * Flatten the List to a node-tree string, then convert to a text datum, + * which is the storage representation of pg_node_tree. + */ + nodestring =3D nodeToString(proargdefaults); + values[Anum_pg_proc_proargdefaults - 1] =3D CStringGetTextDatum(nodestri= ng); + Nulls[Anum_pg_proc_proargdefaults - 1] =3D false; + + /* + * Hack: fill in pronargdefaults with the right value. This is surely + * ugly, but it beats making the programmer do it. + */ + values[Anum_pg_proc_pronargdefaults - 1] =3D Int16GetDatum(array_count); + Nulls[Anum_pg_proc_pronargdefaults - 1] =3D false; +} + /* ---------------- * InsertOneNull * ---------------- @@ -831,10 +952,11 @@ gettype(char *type) * boot_get_type_io_data * * Obtain type I/O information at bootstrap time. This intentionally has - * almost the same API as lsyscache.c's get_type_io_data, except that + * an API very close to that of lsyscache.c's get_type_io_data, except th= at * we only support obtaining the typinput and typoutput routines, not - * the binary I/O routines. It is exported so that array_in and array_ou= t - * can be made to work during early bootstrap. + * the binary I/O routines, and we also return the type's collation. + * This is exported so that array_in and array_out can be made to work + * during early bootstrap. * ---------------- */ void @@ -845,7 +967,8 @@ boot_get_type_io_data(Oid typid, char *typdelim, Oid *typioparam, Oid *typinput, - Oid *typoutput) + Oid *typoutput, + Oid *typcollation) { if (Typ !=3D NIL) { @@ -876,6 +999,8 @@ boot_get_type_io_data(Oid typid, = *typinput =3D ap->am_typ.typinput; *typoutput =3D ap->am_typ.typoutput; + + *typcollation =3D ap->am_typ.typcollation; } else { @@ -904,6 +1029,8 @@ boot_get_type_io_data(Oid typid, = *typinput =3D TypInfo[typeindex].inproc; *typoutput =3D TypInfo[typeindex].outproc; + + *typcollation =3D TypInfo[typeindex].collation; } } = diff --git a/src/backend/catalog/system_functions.sql b/src/backend/catalo= g/system_functions.sql index eb9e31ae1bf..4e24d6b55fa 100644 --- a/src/backend/catalog/system_functions.sql +++ b/src/backend/catalog/system_functions.sql @@ -7,7 +7,8 @@ * * This file redefines certain built-in functions that are impractical * to fully define in pg_proc.dat. In most cases that's because they use - * SQL-standard function bodies and/or default expressions. The node + * SQL-standard function bodies and/or default expressions. (But default= s + * that are just constants can be entered in pg_proc.dat.) The node * tree representations of those are too unreadable, platform-dependent, * and changeable to want to deal with them manually. Hence, we put stub * definitions of such functions into pg_proc.dat and then replace them @@ -66,13 +67,6 @@ CREATE OR REPLACE FUNCTION bit_length(text) IMMUTABLE PARALLEL SAFE STRICT COST 1 RETURN octet_length($1) * 8; = -CREATE OR REPLACE FUNCTION - random_normal(mean float8 DEFAULT 0, stddev float8 DEFAULT 1) - RETURNS float8 - LANGUAGE internal - VOLATILE PARALLEL RESTRICTED STRICT COST 1 -AS 'drandom_normal'; - CREATE OR REPLACE FUNCTION log(numeric) RETURNS numeric LANGUAGE sql @@ -382,281 +376,6 @@ CREATE OR REPLACE FUNCTION ts_debug(document text, BEGIN ATOMIC SELECT * FROM ts_debug(get_current_ts_config(), $1); END; - -CREATE OR REPLACE FUNCTION - pg_backup_start(label text, fast boolean DEFAULT false) - RETURNS pg_lsn STRICT VOLATILE LANGUAGE internal AS 'pg_backup_start' - PARALLEL RESTRICTED; - -CREATE OR REPLACE FUNCTION pg_backup_stop ( - wait_for_archive boolean DEFAULT true, OUT lsn pg_lsn, - OUT labelfile text, OUT spcmapfile text) - RETURNS record STRICT VOLATILE LANGUAGE internal as 'pg_backup_stop' - PARALLEL RESTRICTED; - -CREATE OR REPLACE FUNCTION - pg_promote(wait boolean DEFAULT true, wait_seconds integer DEFAULT 60) - RETURNS boolean STRICT VOLATILE LANGUAGE INTERNAL AS 'pg_promote' - PARALLEL SAFE; - -CREATE OR REPLACE FUNCTION - pg_terminate_backend(pid integer, timeout int8 DEFAULT 0) - RETURNS boolean STRICT VOLATILE LANGUAGE INTERNAL AS 'pg_terminate_back= end' - PARALLEL SAFE; - --- legacy definition for compatibility with 9.3 -CREATE OR REPLACE FUNCTION - json_populate_record(base anyelement, from_json json, use_json_as_text = boolean DEFAULT false) - RETURNS anyelement LANGUAGE internal STABLE AS 'json_populate_record' P= ARALLEL SAFE; - --- legacy definition for compatibility with 9.3 -CREATE OR REPLACE FUNCTION - json_populate_recordset(base anyelement, from_json json, use_json_as_te= xt boolean DEFAULT false) - RETURNS SETOF anyelement LANGUAGE internal STABLE ROWS 100 AS 'json_po= pulate_recordset' PARALLEL SAFE; - -CREATE OR REPLACE FUNCTION pg_logical_slot_get_changes( - IN slot_name name, IN upto_lsn pg_lsn, IN upto_nchanges int, VARIADIC= options text[] DEFAULT '{}', - OUT lsn pg_lsn, OUT xid xid, OUT data text) -RETURNS SETOF RECORD -LANGUAGE INTERNAL -VOLATILE ROWS 1000 COST 1000 -AS 'pg_logical_slot_get_changes'; - -CREATE OR REPLACE FUNCTION pg_logical_slot_peek_changes( - IN slot_name name, IN upto_lsn pg_lsn, IN upto_nchanges int, VARIADIC= options text[] DEFAULT '{}', - OUT lsn pg_lsn, OUT xid xid, OUT data text) -RETURNS SETOF RECORD -LANGUAGE INTERNAL -VOLATILE ROWS 1000 COST 1000 -AS 'pg_logical_slot_peek_changes'; - -CREATE OR REPLACE FUNCTION pg_logical_slot_get_binary_changes( - IN slot_name name, IN upto_lsn pg_lsn, IN upto_nchanges int, VARIADIC= options text[] DEFAULT '{}', - OUT lsn pg_lsn, OUT xid xid, OUT data bytea) -RETURNS SETOF RECORD -LANGUAGE INTERNAL -VOLATILE ROWS 1000 COST 1000 -AS 'pg_logical_slot_get_binary_changes'; - -CREATE OR REPLACE FUNCTION pg_logical_slot_peek_binary_changes( - IN slot_name name, IN upto_lsn pg_lsn, IN upto_nchanges int, VARIADIC= options text[] DEFAULT '{}', - OUT lsn pg_lsn, OUT xid xid, OUT data bytea) -RETURNS SETOF RECORD -LANGUAGE INTERNAL -VOLATILE ROWS 1000 COST 1000 -AS 'pg_logical_slot_peek_binary_changes'; - -CREATE OR REPLACE FUNCTION pg_logical_emit_message( - transactional boolean, - prefix text, - message text, - flush boolean DEFAULT false) -RETURNS pg_lsn -LANGUAGE INTERNAL -STRICT VOLATILE -AS 'pg_logical_emit_message_text'; - -CREATE OR REPLACE FUNCTION pg_logical_emit_message( - transactional boolean, - prefix text, - message bytea, - flush boolean DEFAULT false) -RETURNS pg_lsn -LANGUAGE INTERNAL -STRICT VOLATILE -AS 'pg_logical_emit_message_bytea'; - -CREATE OR REPLACE FUNCTION pg_create_physical_replication_slot( - IN slot_name name, IN immediately_reserve boolean DEFAULT false, - IN temporary boolean DEFAULT false, - OUT slot_name name, OUT lsn pg_lsn) -RETURNS RECORD -LANGUAGE INTERNAL -STRICT VOLATILE -AS 'pg_create_physical_replication_slot'; - -CREATE OR REPLACE FUNCTION pg_create_logical_replication_slot( - IN slot_name name, IN plugin name, - IN temporary boolean DEFAULT false, - IN twophase boolean DEFAULT false, - IN failover boolean DEFAULT false, - OUT slot_name name, OUT lsn pg_lsn) -RETURNS RECORD -LANGUAGE INTERNAL -STRICT VOLATILE -AS 'pg_create_logical_replication_slot'; - -CREATE OR REPLACE FUNCTION - make_interval(years int4 DEFAULT 0, months int4 DEFAULT 0, weeks int4 D= EFAULT 0, - days int4 DEFAULT 0, hours int4 DEFAULT 0, mins int4 DEFA= ULT 0, - secs double precision DEFAULT 0.0) -RETURNS interval -LANGUAGE INTERNAL -STRICT IMMUTABLE PARALLEL SAFE -AS 'make_interval'; - -CREATE OR REPLACE FUNCTION - jsonb_set(jsonb_in jsonb, path text[] , replacement jsonb, - create_if_missing boolean DEFAULT true) -RETURNS jsonb -LANGUAGE INTERNAL -STRICT IMMUTABLE PARALLEL SAFE -AS 'jsonb_set'; - -CREATE OR REPLACE FUNCTION - jsonb_set_lax(jsonb_in jsonb, path text[] , replacement jsonb, - create_if_missing boolean DEFAULT true, - null_value_treatment text DEFAULT 'use_json_null') -RETURNS jsonb -LANGUAGE INTERNAL -CALLED ON NULL INPUT IMMUTABLE PARALLEL SAFE -AS 'jsonb_set_lax'; - -CREATE OR REPLACE FUNCTION - parse_ident(str text, strict boolean DEFAULT true) -RETURNS text[] -LANGUAGE INTERNAL -STRICT IMMUTABLE PARALLEL SAFE -AS 'parse_ident'; - -CREATE OR REPLACE FUNCTION - jsonb_insert(jsonb_in jsonb, path text[] , replacement jsonb, - insert_after boolean DEFAULT false) -RETURNS jsonb -LANGUAGE INTERNAL -STRICT IMMUTABLE PARALLEL SAFE -AS 'jsonb_insert'; - -CREATE OR REPLACE FUNCTION - jsonb_path_exists(target jsonb, path jsonpath, vars jsonb DEFAULT '{}', - silent boolean DEFAULT false) -RETURNS boolean -LANGUAGE INTERNAL -STRICT IMMUTABLE PARALLEL SAFE -AS 'jsonb_path_exists'; - -CREATE OR REPLACE FUNCTION - jsonb_path_match(target jsonb, path jsonpath, vars jsonb DEFAULT '{}', - silent boolean DEFAULT false) -RETURNS boolean -LANGUAGE INTERNAL -STRICT IMMUTABLE PARALLEL SAFE -AS 'jsonb_path_match'; - -CREATE OR REPLACE FUNCTION - jsonb_path_query(target jsonb, path jsonpath, vars jsonb DEFAULT '{}', - silent boolean DEFAULT false) -RETURNS SETOF jsonb -LANGUAGE INTERNAL -STRICT IMMUTABLE PARALLEL SAFE -AS 'jsonb_path_query'; - -CREATE OR REPLACE FUNCTION - jsonb_path_query_array(target jsonb, path jsonpath, vars jsonb DEFAULT = '{}', - silent boolean DEFAULT false) -RETURNS jsonb -LANGUAGE INTERNAL -STRICT IMMUTABLE PARALLEL SAFE -AS 'jsonb_path_query_array'; - -CREATE OR REPLACE FUNCTION - jsonb_path_query_first(target jsonb, path jsonpath, vars jsonb DEFAULT = '{}', - silent boolean DEFAULT false) -RETURNS jsonb -LANGUAGE INTERNAL -STRICT IMMUTABLE PARALLEL SAFE -AS 'jsonb_path_query_first'; - -CREATE OR REPLACE FUNCTION - jsonb_path_exists_tz(target jsonb, path jsonpath, vars jsonb DEFAULT '{= }', - silent boolean DEFAULT false) -RETURNS boolean -LANGUAGE INTERNAL -STRICT STABLE PARALLEL SAFE -AS 'jsonb_path_exists_tz'; - -CREATE OR REPLACE FUNCTION - jsonb_path_match_tz(target jsonb, path jsonpath, vars jsonb DEFAULT '{}= ', - silent boolean DEFAULT false) -RETURNS boolean -LANGUAGE INTERNAL -STRICT STABLE PARALLEL SAFE -AS 'jsonb_path_match_tz'; - -CREATE OR REPLACE FUNCTION - jsonb_path_query_tz(target jsonb, path jsonpath, vars jsonb DEFAULT '{}= ', - silent boolean DEFAULT false) -RETURNS SETOF jsonb -LANGUAGE INTERNAL -STRICT STABLE PARALLEL SAFE -AS 'jsonb_path_query_tz'; - -CREATE OR REPLACE FUNCTION - jsonb_path_query_array_tz(target jsonb, path jsonpath, vars jsonb DEFAU= LT '{}', - silent boolean DEFAULT false) -RETURNS jsonb -LANGUAGE INTERNAL -STRICT STABLE PARALLEL SAFE -AS 'jsonb_path_query_array_tz'; - -CREATE OR REPLACE FUNCTION - jsonb_path_query_first_tz(target jsonb, path jsonpath, vars jsonb DEFAU= LT '{}', - silent boolean DEFAULT false) -RETURNS jsonb -LANGUAGE INTERNAL -STRICT STABLE PARALLEL SAFE -AS 'jsonb_path_query_first_tz'; - -CREATE OR REPLACE FUNCTION - jsonb_strip_nulls(target jsonb, strip_in_arrays boolean DEFAULT false) -RETURNS jsonb -LANGUAGE INTERNAL -STRICT STABLE PARALLEL SAFE -AS 'jsonb_strip_nulls'; - -CREATE OR REPLACE FUNCTION - json_strip_nulls(target json, strip_in_arrays boolean DEFAULT false) -RETURNS json -LANGUAGE INTERNAL -STRICT STABLE PARALLEL SAFE -AS 'json_strip_nulls'; - --- default normalization form is NFC, per SQL standard -CREATE OR REPLACE FUNCTION - "normalize"(text, text DEFAULT 'NFC') -RETURNS text -LANGUAGE internal -STRICT IMMUTABLE PARALLEL SAFE -AS 'unicode_normalize_func'; - -CREATE OR REPLACE FUNCTION - is_normalized(text, text DEFAULT 'NFC') -RETURNS boolean -LANGUAGE internal -STRICT IMMUTABLE PARALLEL SAFE -AS 'unicode_is_normalized'; - -CREATE OR REPLACE FUNCTION - pg_stat_reset_shared(target text DEFAULT NULL) -RETURNS void -LANGUAGE INTERNAL -CALLED ON NULL INPUT VOLATILE PARALLEL SAFE -AS 'pg_stat_reset_shared'; - -CREATE OR REPLACE FUNCTION - pg_stat_reset_slru(target text DEFAULT NULL) -RETURNS void -LANGUAGE INTERNAL -CALLED ON NULL INPUT VOLATILE PARALLEL SAFE -AS 'pg_stat_reset_slru'; - -CREATE OR REPLACE FUNCTION - pg_replication_origin_session_setup(node_name text, pid integer DEFAULT= 0) -RETURNS void -LANGUAGE INTERNAL -STRICT VOLATILE PARALLEL UNSAFE -AS 'pg_replication_origin_session_setup'; - -- -- The default permissions for functions mean that anyone can execute the= m. -- A number of functions shouldn't be executable by just anyone, but rath= er diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache= /lsyscache.c index b924a2d900b..1913b009d40 100644 --- a/src/backend/utils/cache/lsyscache.c +++ b/src/backend/utils/cache/lsyscache.c @@ -2492,6 +2492,7 @@ get_type_io_data(Oid typid, { Oid typinput; Oid typoutput; + Oid typcollation; = boot_get_type_io_data(typid, typlen, @@ -2500,7 +2501,8 @@ get_type_io_data(Oid typid, typdelim, typioparam, &typinput, - &typoutput); + &typoutput, + &typcollation); switch (which_func) { case IOFunc_input: diff --git a/src/include/bootstrap/bootstrap.h b/src/include/bootstrap/boo= tstrap.h index 51680522afc..21447a3d661 100644 --- a/src/include/bootstrap/bootstrap.h +++ b/src/include/bootstrap/bootstrap.h @@ -53,7 +53,8 @@ extern void boot_get_type_io_data(Oid typid, char *typdelim, Oid *typioparam, Oid *typinput, - Oid *typoutput); + Oid *typoutput, + Oid *typcollation); = union YYSTYPE; typedef void *yyscan_t; diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc= .dat index 83f6501df38..dac40992cbc 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -3499,6 +3499,7 @@ { oid =3D> '6212', descr =3D> 'random value from normal distribution', proname =3D> 'random_normal', provolatile =3D> 'v', proparallel =3D> 'r= ', prorettype =3D> 'float8', proargtypes =3D> 'float8 float8', + proargnames =3D> '{mean,stddev}', proargdefaults =3D> '{0,1}', prosrc =3D> 'drandom_normal' }, { oid =3D> '6339', descr =3D> 'random integer in range', proname =3D> 'random', provolatile =3D> 'v', proparallel =3D> 'r', @@ -6174,6 +6175,7 @@ descr =3D> 'statistics: reset collected statistics shared across the cl= uster', proname =3D> 'pg_stat_reset_shared', proisstrict =3D> 'f', provolatile = =3D> 'v', prorettype =3D> 'void', proargtypes =3D> 'text', + proargnames =3D> '{target}', proargdefaults =3D> '{NULL}', prosrc =3D> 'pg_stat_reset_shared' }, { oid =3D> '3776', descr =3D> 'statistics: reset collected statistics for a single table o= r index in the current database or shared across all databases in the clus= ter', @@ -6193,6 +6195,7 @@ descr =3D> 'statistics: reset collected statistics for a single SLRU', proname =3D> 'pg_stat_reset_slru', proisstrict =3D> 'f', provolatile =3D= > 'v', prorettype =3D> 'void', proargtypes =3D> 'text', proargnames =3D> '{tar= get}', + proargdefaults =3D> '{NULL}', prosrc =3D> 'pg_stat_reset_slru' }, { oid =3D> '6170', descr =3D> 'statistics: reset collected statistics for a single replica= tion slot', @@ -6728,20 +6731,24 @@ { oid =3D> '2096', descr =3D> 'terminate a server process', proname =3D> 'pg_terminate_backend', provolatile =3D> 'v', prorettype =3D= > 'bool', proargtypes =3D> 'int4 int8', proargnames =3D> '{pid,timeout}', + proargdefaults =3D> '{0}', prosrc =3D> 'pg_terminate_backend' }, { oid =3D> '2172', descr =3D> 'prepare for taking an online backup', proname =3D> 'pg_backup_start', provolatile =3D> 'v', proparallel =3D> = 'r', prorettype =3D> 'pg_lsn', proargtypes =3D> 'text bool', + proargnames =3D> '{label,fast}', proargdefaults =3D> '{false}', prosrc =3D> 'pg_backup_start' }, { oid =3D> '2739', descr =3D> 'finish taking an online backup', proname =3D> 'pg_backup_stop', provolatile =3D> 'v', proparallel =3D> '= r', prorettype =3D> 'record', proargtypes =3D> 'bool', proallargtypes =3D> '{bool,pg_lsn,text,text}', proargmodes =3D> '{i,o,o= ,o}', proargnames =3D> '{wait_for_archive,lsn,labelfile,spcmapfile}', + proargdefaults =3D> '{true}', prosrc =3D> 'pg_backup_stop' }, { oid =3D> '3436', descr =3D> 'promote standby server', proname =3D> 'pg_promote', provolatile =3D> 'v', prorettype =3D> 'bool'= , proargtypes =3D> 'bool int4', proargnames =3D> '{wait,wait_seconds}', + proargdefaults =3D> '{true,60}', prosrc =3D> 'pg_promote' }, { oid =3D> '2848', descr =3D> 'switch to new wal file', proname =3D> 'pg_switch_wal', provolatile =3D> 'v', prorettype =3D> 'pg= _lsn', @@ -7517,7 +7524,8 @@ { oid =3D> '1268', descr =3D> 'parse qualified identifier to array of identifiers', proname =3D> 'parse_ident', prorettype =3D> '_text', proargtypes =3D> '= text bool', - proargnames =3D> '{str,strict}', prosrc =3D> 'parse_ident' }, + proargnames =3D> '{str,strict}', proargdefaults =3D> '{true}', + prosrc =3D> 'parse_ident' }, = { oid =3D> '2246', descr =3D> '(internal)', proname =3D> 'fmgr_internal_validator', provolatile =3D> 's', @@ -9423,7 +9431,9 @@ proargtypes =3D> 'anyelement', prosrc =3D> 'to_json' }, { oid =3D> '3261', descr =3D> 'remove object fields with null values from= json', proname =3D> 'json_strip_nulls', prorettype =3D> 'json', - proargtypes =3D> 'json bool', prosrc =3D> 'json_strip_nulls' }, + proargtypes =3D> 'json bool', + proargnames =3D> '{target,strip_in_arrays}', proargdefaults =3D> '{fals= e}', + prosrc =3D> 'json_strip_nulls' }, = { oid =3D> '3947', proname =3D> 'json_object_field', prorettype =3D> 'json', @@ -9480,12 +9490,17 @@ { oid =3D> '3960', descr =3D> 'get record fields from a json object', proname =3D> 'json_populate_record', proisstrict =3D> 'f', provolatile = =3D> 's', prorettype =3D> 'anyelement', proargtypes =3D> 'anyelement json bool', + proargnames =3D> '{base,from_json,use_json_as_text}', + proargdefaults =3D> '{false}', prosrc =3D> 'json_populate_record' }, { oid =3D> '3961', descr =3D> 'get set of records with fields from a json array of objects= ', proname =3D> 'json_populate_recordset', prorows =3D> '100', proisstrict= =3D> 'f', proretset =3D> 't', provolatile =3D> 's', prorettype =3D> 'anyelement', - proargtypes =3D> 'anyelement json bool', prosrc =3D> 'json_populate_rec= ordset' }, + proargtypes =3D> 'anyelement json bool', + proargnames =3D> '{base,from_json,use_json_as_text}', + proargdefaults =3D> '{false}', + prosrc =3D> 'json_populate_recordset' }, { oid =3D> '3204', descr =3D> 'get record fields from a json object', proname =3D> 'json_to_record', provolatile =3D> 's', prorettype =3D> 'r= ecord', proargtypes =3D> 'json', prosrc =3D> 'json_to_record' }, @@ -10364,7 +10379,9 @@ prosrc =3D> 'jsonb_build_object_noargs' }, { oid =3D> '3262', descr =3D> 'remove object fields with null values from= jsonb', proname =3D> 'jsonb_strip_nulls', prorettype =3D> 'jsonb', - proargtypes =3D> 'jsonb bool', prosrc =3D> 'jsonb_strip_nulls' }, + proargtypes =3D> 'jsonb bool', + proargnames =3D> '{target,strip_in_arrays}', proargdefaults =3D> '{fals= e}', + prosrc =3D> 'jsonb_strip_nulls' }, = { oid =3D> '3478', proname =3D> 'jsonb_object_field', prorettype =3D> 'jsonb', @@ -10538,16 +10555,25 @@ proargtypes =3D> 'jsonb _text', prosrc =3D> 'jsonb_delete_path' }, { oid =3D> '5054', descr =3D> 'Set part of a jsonb, handle NULL value', proname =3D> 'jsonb_set_lax', proisstrict =3D> 'f', prorettype =3D> 'js= onb', - proargtypes =3D> 'jsonb _text jsonb bool text', prosrc =3D> 'jsonb_set_= lax' }, + proargtypes =3D> 'jsonb _text jsonb bool text', + proargnames =3D> '{jsonb_in,path,replacement,create_if_missing,null_val= ue_treatment}', + proargdefaults =3D> '{true,use_json_null}', + prosrc =3D> 'jsonb_set_lax' }, { oid =3D> '3305', descr =3D> 'Set part of a jsonb', proname =3D> 'jsonb_set', prorettype =3D> 'jsonb', - proargtypes =3D> 'jsonb _text jsonb bool', prosrc =3D> 'jsonb_set' }, + proargtypes =3D> 'jsonb _text jsonb bool', + proargnames =3D> '{jsonb_in,path,replacement,create_if_missing}', + proargdefaults =3D> '{true}', + prosrc =3D> 'jsonb_set' }, { oid =3D> '3306', descr =3D> 'Indented text from jsonb', proname =3D> 'jsonb_pretty', prorettype =3D> 'text', proargtypes =3D> '= jsonb', prosrc =3D> 'jsonb_pretty' }, { oid =3D> '3579', descr =3D> 'Insert value into a jsonb', proname =3D> 'jsonb_insert', prorettype =3D> 'jsonb', - proargtypes =3D> 'jsonb _text jsonb bool', prosrc =3D> 'jsonb_insert' }= , + proargtypes =3D> 'jsonb _text jsonb bool', + proargnames =3D> '{jsonb_in,path,replacement,insert_after}', + proargdefaults =3D> '{false}', + prosrc =3D> 'jsonb_insert' }, = # jsonpath { oid =3D> '4001', descr =3D> 'I/O', @@ -10565,42 +10591,66 @@ = { oid =3D> '4005', descr =3D> 'jsonpath exists test', proname =3D> 'jsonb_path_exists', prorettype =3D> 'bool', - proargtypes =3D> 'jsonb jsonpath jsonb bool', prosrc =3D> 'jsonb_path_e= xists' }, + proargtypes =3D> 'jsonb jsonpath jsonb bool', + proargnames =3D> '{target,path,vars,silent}', + proargdefaults =3D> '{"{}",false}', + prosrc =3D> 'jsonb_path_exists' }, { oid =3D> '4006', descr =3D> 'jsonpath query', proname =3D> 'jsonb_path_query', prorows =3D> '1000', proretset =3D> 't= ', prorettype =3D> 'jsonb', proargtypes =3D> 'jsonb jsonpath jsonb bool', + proargnames =3D> '{target,path,vars,silent}', + proargdefaults =3D> '{"{}",false}', prosrc =3D> 'jsonb_path_query' }, { oid =3D> '4007', descr =3D> 'jsonpath query wrapped into array', proname =3D> 'jsonb_path_query_array', prorettype =3D> 'jsonb', proargtypes =3D> 'jsonb jsonpath jsonb bool', + proargnames =3D> '{target,path,vars,silent}', + proargdefaults =3D> '{"{}",false}', prosrc =3D> 'jsonb_path_query_array' }, { oid =3D> '4008', descr =3D> 'jsonpath query first item', proname =3D> 'jsonb_path_query_first', prorettype =3D> 'jsonb', proargtypes =3D> 'jsonb jsonpath jsonb bool', + proargnames =3D> '{target,path,vars,silent}', + proargdefaults =3D> '{"{}",false}', prosrc =3D> 'jsonb_path_query_first' }, { oid =3D> '4009', descr =3D> 'jsonpath match', proname =3D> 'jsonb_path_match', prorettype =3D> 'bool', - proargtypes =3D> 'jsonb jsonpath jsonb bool', prosrc =3D> 'jsonb_path_m= atch' }, + proargtypes =3D> 'jsonb jsonpath jsonb bool', + proargnames =3D> '{target,path,vars,silent}', + proargdefaults =3D> '{"{}",false}', + prosrc =3D> 'jsonb_path_match' }, = { oid =3D> '1177', descr =3D> 'jsonpath exists test with timezone', proname =3D> 'jsonb_path_exists_tz', provolatile =3D> 's', prorettype =3D= > 'bool', proargtypes =3D> 'jsonb jsonpath jsonb bool', + proargnames =3D> '{target,path,vars,silent}', + proargdefaults =3D> '{"{}",false}', prosrc =3D> 'jsonb_path_exists_tz' }, { oid =3D> '1179', descr =3D> 'jsonpath query with timezone', proname =3D> 'jsonb_path_query_tz', prorows =3D> '1000', proretset =3D>= 't', provolatile =3D> 's', prorettype =3D> 'jsonb', - proargtypes =3D> 'jsonb jsonpath jsonb bool', prosrc =3D> 'jsonb_path_q= uery_tz' }, + proargtypes =3D> 'jsonb jsonpath jsonb bool', + proargnames =3D> '{target,path,vars,silent}', + proargdefaults =3D> '{"{}",false}', + prosrc =3D> 'jsonb_path_query_tz' }, { oid =3D> '1180', descr =3D> 'jsonpath query wrapped into array with tim= ezone', proname =3D> 'jsonb_path_query_array_tz', provolatile =3D> 's', prorettype =3D> 'jsonb', proargtypes =3D> 'jsonb jsonpath jsonb bool', + proargnames =3D> '{target,path,vars,silent}', + proargdefaults =3D> '{"{}",false}', prosrc =3D> 'jsonb_path_query_array_tz' }, { oid =3D> '2023', descr =3D> 'jsonpath query first item with timezone', proname =3D> 'jsonb_path_query_first_tz', provolatile =3D> 's', prorettype =3D> 'jsonb', proargtypes =3D> 'jsonb jsonpath jsonb bool', + proargnames =3D> '{target,path,vars,silent}', + proargdefaults =3D> '{"{}",false}', prosrc =3D> 'jsonb_path_query_first_tz' }, { oid =3D> '2030', descr =3D> 'jsonpath match with timezone', proname =3D> 'jsonb_path_match_tz', provolatile =3D> 's', prorettype =3D= > 'bool', - proargtypes =3D> 'jsonb jsonpath jsonb bool', prosrc =3D> 'jsonb_path_m= atch_tz' }, + proargtypes =3D> 'jsonb jsonpath jsonb bool', + proargnames =3D> '{target,path,vars,silent}', + proargdefaults =3D> '{"{}",false}', + prosrc =3D> 'jsonb_path_match_tz' }, = { oid =3D> '4010', descr =3D> 'implementation of @? operator', proname =3D> 'jsonb_path_exists_opr', prorettype =3D> 'bool', @@ -11411,6 +11461,7 @@ proname =3D> 'make_interval', prorettype =3D> 'interval', proargtypes =3D> 'int4 int4 int4 int4 int4 int4 float8', proargnames =3D> '{years,months,weeks,days,hours,mins,secs}', + proargdefaults =3D> '{0,0,0,0,0,0,0.0}', prosrc =3D> 'make_interval' }, = # spgist opclasses @@ -11511,6 +11562,7 @@ proallargtypes =3D> '{name,bool,bool,name,pg_lsn}', proargmodes =3D> '{i,i,i,o,o}', proargnames =3D> '{slot_name,immediately_reserve,temporary,slot_name,ls= n}', + proargdefaults =3D> '{false,false}', prosrc =3D> 'pg_create_physical_replication_slot' }, { oid =3D> '4220', descr =3D> 'copy a physical replication slot, changing temporality', @@ -11546,6 +11598,7 @@ proallargtypes =3D> '{name,name,bool,bool,bool,name,pg_lsn}', proargmodes =3D> '{i,i,i,i,i,o,o}', proargnames =3D> '{slot_name,plugin,temporary,twophase,failover,slot_na= me,lsn}', + proargdefaults =3D> '{false,false,false}', prosrc =3D> 'pg_create_logical_replication_slot' }, { oid =3D> '4222', descr =3D> 'copy a logical replication slot, changing temporality and p= lugin', @@ -11578,6 +11631,7 @@ proallargtypes =3D> '{name,pg_lsn,int4,_text,pg_lsn,xid,text}', proargmodes =3D> '{i,i,i,v,o,o,o}', proargnames =3D> '{slot_name,upto_lsn,upto_nchanges,options,lsn,xid,dat= a}', + proargdefaults =3D> '{"{}"}', prosrc =3D> 'pg_logical_slot_get_changes' }, { oid =3D> '3783', descr =3D> 'get binary changes from replication slot', proname =3D> 'pg_logical_slot_get_binary_changes', procost =3D> '1000', @@ -11587,6 +11641,7 @@ proallargtypes =3D> '{name,pg_lsn,int4,_text,pg_lsn,xid,bytea}', proargmodes =3D> '{i,i,i,v,o,o,o}', proargnames =3D> '{slot_name,upto_lsn,upto_nchanges,options,lsn,xid,dat= a}', + proargdefaults =3D> '{"{}"}', prosrc =3D> 'pg_logical_slot_get_binary_changes' }, { oid =3D> '3784', descr =3D> 'peek at changes from replication slot', proname =3D> 'pg_logical_slot_peek_changes', procost =3D> '1000', @@ -11596,6 +11651,7 @@ proallargtypes =3D> '{name,pg_lsn,int4,_text,pg_lsn,xid,text}', proargmodes =3D> '{i,i,i,v,o,o,o}', proargnames =3D> '{slot_name,upto_lsn,upto_nchanges,options,lsn,xid,dat= a}', + proargdefaults =3D> '{"{}"}', prosrc =3D> 'pg_logical_slot_peek_changes' }, { oid =3D> '3785', descr =3D> 'peek at binary changes from replication sl= ot', proname =3D> 'pg_logical_slot_peek_binary_changes', procost =3D> '1000'= , @@ -11605,6 +11661,7 @@ proallargtypes =3D> '{name,pg_lsn,int4,_text,pg_lsn,xid,bytea}', proargmodes =3D> '{i,i,i,v,o,o,o}', proargnames =3D> '{slot_name,upto_lsn,upto_nchanges,options,lsn,xid,dat= a}', + proargdefaults =3D> '{"{}"}', prosrc =3D> 'pg_logical_slot_peek_binary_changes' }, { oid =3D> '3878', descr =3D> 'advance logical replication slot', proname =3D> 'pg_replication_slot_advance', provolatile =3D> 'v', @@ -11615,10 +11672,14 @@ { oid =3D> '3577', descr =3D> 'emit a textual logical decoding message', proname =3D> 'pg_logical_emit_message', provolatile =3D> 'v', proparall= el =3D> 'u', prorettype =3D> 'pg_lsn', proargtypes =3D> 'bool text text bool', + proargnames =3D> '{transactional,prefix,message,flush}', + proargdefaults =3D> '{false}', prosrc =3D> 'pg_logical_emit_message_text' }, { oid =3D> '3578', descr =3D> 'emit a binary logical decoding message', proname =3D> 'pg_logical_emit_message', provolatile =3D> 'v', proparall= el =3D> 'u', prorettype =3D> 'pg_lsn', proargtypes =3D> 'bool text bytea bool', + proargnames =3D> '{transactional,prefix,message,flush}', + proargdefaults =3D> '{false}', prosrc =3D> 'pg_logical_emit_message_bytea' }, { oid =3D> '6344', descr =3D> 'sync replication slots from the primary to the standby', @@ -12268,6 +12329,7 @@ descr =3D> 'configure session to maintain replication progress tracking= for the passed in origin', proname =3D> 'pg_replication_origin_session_setup', provolatile =3D> 'v= ', proparallel =3D> 'u', prorettype =3D> 'void', proargtypes =3D> 'text in= t4', + proargnames =3D> '{node_name,pid}', proargdefaults =3D> '{0}', prosrc =3D> 'pg_replication_origin_session_setup' }, = { oid =3D> '6007', descr =3D> 'teardown configured replication progress t= racking', @@ -12518,10 +12580,12 @@ = { oid =3D> '4350', descr =3D> 'Unicode normalization', proname =3D> 'normalize', prorettype =3D> 'text', proargtypes =3D> 'tex= t text', + proargdefaults =3D> '{NFC}', prosrc =3D> 'unicode_normalize_func' }, = { oid =3D> '4351', descr =3D> 'check Unicode normalization', proname =3D> 'is_normalized', prorettype =3D> 'bool', proargtypes =3D> = 'text text', + proargdefaults =3D> '{NFC}', prosrc =3D> 'unicode_is_normalized' }, = { oid =3D> '6198', descr =3D> 'unescape Unicode characters', -- = 2.43.7 ------- =_aaaaaaaaaa0--