Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita19e5ce

Browse files
committed
Rename SetSingleFuncCall() to InitMaterializedSRF()
Per discussion, the existing routine name able to initialize a SRFfunction with materialize mode is unpopular, so rename it. Equally, theflags of this function are renamed, as of:- SRF_SINGLE_USE_EXPECTED -> MAT_SRF_USE_EXPECTED_DESC- SRF_SINGLE_BLESS -> MAT_SRF_BLESSThe previous function and flags introduced in9e98583 are kept aroundfor compatibility purposes, so as any extension code already compiledwith v15 continues to work as-is. The declarations introduced here forcompatibility will be removed from HEAD in a follow-up commit.The new names have been suggested by Andres Freund and MelaniePlageman.Discussion:https://postgr.es/m/20221013194820.ciktb2sbbpw7cljm@awork3.anarazel.deBackpatch-through: 15
1 parent77dd153 commita19e5ce

File tree

36 files changed

+72
-58
lines changed

36 files changed

+72
-58
lines changed

‎contrib/amcheck/verify_heapam.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ verify_heapam(PG_FUNCTION_ARGS)
278278
ctx.attnum=-1;
279279

280280
/* Construct the tuplestore and tuple descriptor */
281-
SetSingleFuncCall(fcinfo,0);
281+
InitMaterializedSRF(fcinfo,0);
282282
ctx.tupdesc=rsinfo->setDesc;
283283
ctx.tupstore=rsinfo->setResult;
284284

‎contrib/dblink/dblink.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1933,7 +1933,7 @@ dblink_get_notify(PG_FUNCTION_ARGS)
19331933
else
19341934
conn=pconn->conn;
19351935

1936-
SetSingleFuncCall(fcinfo,0);
1936+
InitMaterializedSRF(fcinfo,0);
19371937

19381938
PQconsumeInput(conn);
19391939
while ((notify=PQnotifies(conn))!=NULL)

‎contrib/pageinspect/brinfuncs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ brin_page_items(PG_FUNCTION_ARGS)
147147
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
148148
errmsg("must be superuser to use raw page functions")));
149149

150-
SetSingleFuncCall(fcinfo,0);
150+
InitMaterializedSRF(fcinfo,0);
151151

152152
indexRel=index_open(indexRelid,AccessShareLock);
153153

‎contrib/pageinspect/gistfuncs.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ gist_page_items_bytea(PG_FUNCTION_ARGS)
127127
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
128128
errmsg("must be superuser to use raw page functions")));
129129

130-
SetSingleFuncCall(fcinfo,0);
130+
InitMaterializedSRF(fcinfo,0);
131131

132132
page=get_page_from_raw(raw_page);
133133

@@ -211,7 +211,7 @@ gist_page_items(PG_FUNCTION_ARGS)
211211
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
212212
errmsg("must be superuser to use raw page functions")));
213213

214-
SetSingleFuncCall(fcinfo,0);
214+
InitMaterializedSRF(fcinfo,0);
215215

216216
/* Open the relation */
217217
indexRel=index_open(indexRelid,AccessShareLock);

‎contrib/pg_stat_statements/pg_stat_statements.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1552,7 +1552,7 @@ pg_stat_statements_internal(FunctionCallInfo fcinfo,
15521552
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
15531553
errmsg("pg_stat_statements must be loaded via shared_preload_libraries")));
15541554

1555-
SetSingleFuncCall(fcinfo,0);
1555+
InitMaterializedSRF(fcinfo,0);
15561556

15571557
/*
15581558
* Check we have the expected number of output arguments. Aside from

‎contrib/pg_walinspect/pg_walinspect.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ GetWALRecordsInfo(FunctionCallInfo fcinfo, XLogRecPtr start_lsn,
330330
Datumvalues[PG_GET_WAL_RECORDS_INFO_COLS]= {0};
331331
boolnulls[PG_GET_WAL_RECORDS_INFO_COLS]= {0};
332332

333-
SetSingleFuncCall(fcinfo,0);
333+
InitMaterializedSRF(fcinfo,0);
334334

335335
xlogreader=InitXLogReaderState(start_lsn);
336336

@@ -548,7 +548,7 @@ GetWalStats(FunctionCallInfo fcinfo, XLogRecPtr start_lsn,
548548
Datumvalues[PG_GET_WAL_STATS_COLS]= {0};
549549
boolnulls[PG_GET_WAL_STATS_COLS]= {0};
550550

551-
SetSingleFuncCall(fcinfo,0);
551+
InitMaterializedSRF(fcinfo,0);
552552

553553
xlogreader=InitXLogReaderState(start_lsn);
554554

‎contrib/pgrowlocks/pgrowlocks.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pgrowlocks(PG_FUNCTION_ARGS)
7575
AclResultaclresult;
7676
char**values;
7777

78-
SetSingleFuncCall(fcinfo,0);
78+
InitMaterializedSRF(fcinfo,0);
7979

8080
/* Access the table */
8181
relrv=makeRangeVarFromNameList(textToQualifiedNameList(relname));

‎contrib/postgres_fdw/connection.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ postgres_fdw_get_connections(PG_FUNCTION_ARGS)
16681668
HASH_SEQ_STATUSscan;
16691669
ConnCacheEntry*entry;
16701670

1671-
SetSingleFuncCall(fcinfo,0);
1671+
InitMaterializedSRF(fcinfo,0);
16721672

16731673
/* If cache doesn't exist, we return no records */
16741674
if (!ConnectionHash)

‎contrib/xml2/xpath.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ xpath_table(PG_FUNCTION_ARGS)
511511
PgXmlErrorContext*xmlerrcxt;
512512
volatilexmlDocPtrdoctree=NULL;
513513

514-
SetSingleFuncCall(fcinfo,SRF_SINGLE_USE_EXPECTED);
514+
InitMaterializedSRF(fcinfo,MAT_SRF_USE_EXPECTED_DESC);
515515

516516
/* must have at least one output column (for the pkey) */
517517
if (rsinfo->setDesc->natts<1)

‎src/backend/access/transam/rmgr.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ pg_get_wal_resource_managers(PG_FUNCTION_ARGS)
145145
Datumvalues[PG_GET_RESOURCE_MANAGERS_COLS];
146146
boolnulls[PG_GET_RESOURCE_MANAGERS_COLS]= {0};
147147

148-
SetSingleFuncCall(fcinfo,0);
148+
InitMaterializedSRF(fcinfo,0);
149149

150150
for (intrmid=0;rmid <=RM_MAX_ID;rmid++)
151151
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp