diff options
author | Michael Paquier | 2022-10-18 01:22:35 +0000 |
---|---|---|
committer | Michael Paquier | 2022-10-18 01:22:35 +0000 |
commit | a19e5cee635dc94c9c6e44c8863b4b770920a04b (patch) | |
tree | 68204df4e9f1175b5c03ad2fd7bc77772b25fba7 /contrib | |
parent | 77dd153d39663461b32f3d5efce397af678ba083 (diff) |
Rename SetSingleFuncCall() to InitMaterializedSRF()
Per discussion, the existing routine name able to initialize a SRF
function with materialize mode is unpopular, so rename it. Equally, the
flags of this function are renamed, as of:
- SRF_SINGLE_USE_EXPECTED -> MAT_SRF_USE_EXPECTED_DESC
- SRF_SINGLE_BLESS -> MAT_SRF_BLESS
The previous function and flags introduced in 9e98583 are kept around
for compatibility purposes, so as any extension code already compiled
with v15 continues to work as-is. The declarations introduced here for
compatibility will be removed from HEAD in a follow-up commit.
The new names have been suggested by Andres Freund and Melanie
Plageman.
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 15
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/amcheck/verify_heapam.c | 2 | ||||
-rw-r--r-- | contrib/dblink/dblink.c | 2 | ||||
-rw-r--r-- | contrib/pageinspect/brinfuncs.c | 2 | ||||
-rw-r--r-- | contrib/pageinspect/gistfuncs.c | 4 | ||||
-rw-r--r-- | contrib/pg_stat_statements/pg_stat_statements.c | 2 | ||||
-rw-r--r-- | contrib/pg_walinspect/pg_walinspect.c | 4 | ||||
-rw-r--r-- | contrib/pgrowlocks/pgrowlocks.c | 2 | ||||
-rw-r--r-- | contrib/postgres_fdw/connection.c | 2 | ||||
-rw-r--r-- | contrib/xml2/xpath.c | 2 |
9 files changed, 11 insertions, 11 deletions
diff --git a/contrib/amcheck/verify_heapam.c b/contrib/amcheck/verify_heapam.c index 83dc7280115..b72a5c96d12 100644 --- a/contrib/amcheck/verify_heapam.c +++ b/contrib/amcheck/verify_heapam.c @@ -278,7 +278,7 @@ verify_heapam(PG_FUNCTION_ARGS) ctx.attnum = -1; /* Construct the tuplestore and tuple descriptor */ - SetSingleFuncCall(fcinfo, 0); + InitMaterializedSRF(fcinfo, 0); ctx.tupdesc = rsinfo->setDesc; ctx.tupstore = rsinfo->setResult; diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c index 9eef417c47b..9202c358475 100644 --- a/contrib/dblink/dblink.c +++ b/contrib/dblink/dblink.c @@ -1933,7 +1933,7 @@ dblink_get_notify(PG_FUNCTION_ARGS) else conn = pconn->conn; - SetSingleFuncCall(fcinfo, 0); + InitMaterializedSRF(fcinfo, 0); PQconsumeInput(conn); while ((notify = PQnotifies(conn)) != NULL) diff --git a/contrib/pageinspect/brinfuncs.c b/contrib/pageinspect/brinfuncs.c index f4c959ecab9..12a72170385 100644 --- a/contrib/pageinspect/brinfuncs.c +++ b/contrib/pageinspect/brinfuncs.c @@ -147,7 +147,7 @@ brin_page_items(PG_FUNCTION_ARGS) (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), errmsg("must be superuser to use raw page functions"))); - SetSingleFuncCall(fcinfo, 0); + InitMaterializedSRF(fcinfo, 0); indexRel = index_open(indexRelid, AccessShareLock); diff --git a/contrib/pageinspect/gistfuncs.c b/contrib/pageinspect/gistfuncs.c index d0a34a33756..f15714842a6 100644 --- a/contrib/pageinspect/gistfuncs.c +++ b/contrib/pageinspect/gistfuncs.c @@ -127,7 +127,7 @@ gist_page_items_bytea(PG_FUNCTION_ARGS) (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), errmsg("must be superuser to use raw page functions"))); - SetSingleFuncCall(fcinfo, 0); + InitMaterializedSRF(fcinfo, 0); page = get_page_from_raw(raw_page); @@ -211,7 +211,7 @@ gist_page_items(PG_FUNCTION_ARGS) (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), errmsg("must be superuser to use raw page functions"))); - SetSingleFuncCall(fcinfo, 0); + InitMaterializedSRF(fcinfo, 0); /* Open the relation */ indexRel = index_open(indexRelid, AccessShareLock); diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c index 73439c01991..e5aa429995c 100644 --- a/contrib/pg_stat_statements/pg_stat_statements.c +++ b/contrib/pg_stat_statements/pg_stat_statements.c @@ -1552,7 +1552,7 @@ pg_stat_statements_internal(FunctionCallInfo fcinfo, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("pg_stat_statements must be loaded via shared_preload_libraries"))); - SetSingleFuncCall(fcinfo, 0); + InitMaterializedSRF(fcinfo, 0); /* * Check we have the expected number of output arguments. Aside from diff --git a/contrib/pg_walinspect/pg_walinspect.c b/contrib/pg_walinspect/pg_walinspect.c index 38fb4106da4..beba4788c73 100644 --- a/contrib/pg_walinspect/pg_walinspect.c +++ b/contrib/pg_walinspect/pg_walinspect.c @@ -330,7 +330,7 @@ GetWALRecordsInfo(FunctionCallInfo fcinfo, XLogRecPtr start_lsn, Datum values[PG_GET_WAL_RECORDS_INFO_COLS] = {0}; bool nulls[PG_GET_WAL_RECORDS_INFO_COLS] = {0}; - SetSingleFuncCall(fcinfo, 0); + InitMaterializedSRF(fcinfo, 0); xlogreader = InitXLogReaderState(start_lsn); @@ -548,7 +548,7 @@ GetWalStats(FunctionCallInfo fcinfo, XLogRecPtr start_lsn, Datum values[PG_GET_WAL_STATS_COLS] = {0}; bool nulls[PG_GET_WAL_STATS_COLS] = {0}; - SetSingleFuncCall(fcinfo, 0); + InitMaterializedSRF(fcinfo, 0); xlogreader = InitXLogReaderState(start_lsn); diff --git a/contrib/pgrowlocks/pgrowlocks.c b/contrib/pgrowlocks/pgrowlocks.c index 1d4d4965ac9..c543277b7c5 100644 --- a/contrib/pgrowlocks/pgrowlocks.c +++ b/contrib/pgrowlocks/pgrowlocks.c @@ -75,7 +75,7 @@ pgrowlocks(PG_FUNCTION_ARGS) AclResult aclresult; char **values; - SetSingleFuncCall(fcinfo, 0); + InitMaterializedSRF(fcinfo, 0); /* Access the table */ relrv = makeRangeVarFromNameList(textToQualifiedNameList(relname)); diff --git a/contrib/postgres_fdw/connection.c b/contrib/postgres_fdw/connection.c index 939d114f02e..f0c45b00db8 100644 --- a/contrib/postgres_fdw/connection.c +++ b/contrib/postgres_fdw/connection.c @@ -1668,7 +1668,7 @@ postgres_fdw_get_connections(PG_FUNCTION_ARGS) HASH_SEQ_STATUS scan; ConnCacheEntry *entry; - SetSingleFuncCall(fcinfo, 0); + InitMaterializedSRF(fcinfo, 0); /* If cache doesn't exist, we return no records */ if (!ConnectionHash) diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c index b8ee757674d..a692dc6be86 100644 --- a/contrib/xml2/xpath.c +++ b/contrib/xml2/xpath.c @@ -511,7 +511,7 @@ xpath_table(PG_FUNCTION_ARGS) PgXmlErrorContext *xmlerrcxt; volatile xmlDocPtr doctree = NULL; - SetSingleFuncCall(fcinfo, SRF_SINGLE_USE_EXPECTED); + InitMaterializedSRF(fcinfo, MAT_SRF_USE_EXPECTED_DESC); /* must have at least one output column (for the pkey) */ if (rsinfo->setDesc->natts < 1) |