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

Commit27e082b

Browse files
committed
Clean up in the wake of TupleDescGetSlot() removal /1076335.
The previous commit wasn't careful enough to remove all traces ofTupleDescGetSlot().Besides fixing the oversight of not removing TupleDescGetSlot()'sdeclaration, this also removes FuncCallContext->slot. That wasdocumented to be for use in combination with TupleDescGetSlot(), acursory search over extensions finds no users, and there doesn't seemto be convincing reasons to keep it around. If we later in the v12release cycle find users, we can re-consider this part of the commit.Reported-By: Michael PaquierDiscussion:https://postgr.es/m/20180926000413.GC1659@paquier.xyz
1 parentea53100 commit27e082b

File tree

3 files changed

+0
-35
lines changed

3 files changed

+0
-35
lines changed

‎doc/src/sgml/xfunc.sgml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2870,14 +2870,6 @@ typedef struct FuncCallContext
28702870
*/
28712871
uint64 max_calls;
28722872

2873-
/*
2874-
* OPTIONAL pointer to result slot
2875-
*
2876-
* This is obsolete and only present for backward compatibility, viz,
2877-
* user-defined SRFs that use the deprecated TupleDescGetSlot().
2878-
*/
2879-
TupleTableSlot *slot;
2880-
28812873
/*
28822874
* OPTIONAL pointer to miscellaneous user-provided context information
28832875
*

‎src/backend/utils/fmgr/funcapi.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ init_MultiFuncCall(PG_FUNCTION_ARGS)
8888
*/
8989
retval->call_cntr=0;
9090
retval->max_calls=0;
91-
retval->slot=NULL;
9291
retval->user_fctx=NULL;
9392
retval->attinmeta=NULL;
9493
retval->tuple_desc=NULL;
@@ -129,21 +128,6 @@ per_MultiFuncCall(PG_FUNCTION_ARGS)
129128
{
130129
FuncCallContext*retval= (FuncCallContext*)fcinfo->flinfo->fn_extra;
131130

132-
/*
133-
* Clear the TupleTableSlot, if present. This is for safety's sake: the
134-
* Slot will be in a long-lived context (it better be, if the
135-
* FuncCallContext is pointing to it), but in most usage patterns the
136-
* tuples stored in it will be in the function's per-tuple context. So at
137-
* the beginning of each call, the Slot will hold a dangling pointer to an
138-
* already-recycled tuple. We clear it out here.
139-
*
140-
* Note: use of retval->slot is obsolete as of 8.0, and we expect that it
141-
* will always be NULL. This is just here for backwards compatibility in
142-
* case someone creates a slot anyway.
143-
*/
144-
if (retval->slot!=NULL)
145-
ExecClearTuple(retval->slot);
146-
147131
returnretval;
148132
}
149133

‎src/include/funcapi.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,6 @@ typedef struct FuncCallContext
7474
*/
7575
uint64max_calls;
7676

77-
/*
78-
* OPTIONAL pointer to result slot
79-
*
80-
* This is obsolete and only present for backwards compatibility, viz,
81-
* user-defined SRFs that use the deprecated TupleDescGetSlot().
82-
*/
83-
TupleTableSlot*slot;
84-
8577
/*
8678
* OPTIONAL pointer to miscellaneous user-provided context information
8779
*
@@ -221,8 +213,6 @@ extern TupleDesc build_function_result_tupdesc_t(HeapTuple procTuple);
221213
*TupleDesc based on a named relation.
222214
* TupleDesc TypeGetTupleDesc(Oid typeoid, List *colaliases) - Use to get a
223215
*TupleDesc based on a type OID.
224-
* TupleTableSlot *TupleDescGetSlot(TupleDesc tupdesc) - Builds a
225-
*TupleTableSlot, which is not needed anymore.
226216
* TupleGetDatum(TupleTableSlot *slot, HeapTuple tuple) - get a Datum
227217
*given a tuple and a slot.
228218
*----------
@@ -240,7 +230,6 @@ extern TupleDesc BlessTupleDesc(TupleDesc tupdesc);
240230
externAttInMetadata*TupleDescGetAttInMetadata(TupleDesctupdesc);
241231
externHeapTupleBuildTupleFromCStrings(AttInMetadata*attinmeta,char**values);
242232
externDatumHeapTupleHeaderGetDatum(HeapTupleHeadertuple);
243-
externTupleTableSlot*TupleDescGetSlot(TupleDesctupdesc);
244233

245234

246235
/*----------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp