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

Commit772a074

Browse files
committed
Somebody seems to have thought they could get away without checking for
rsinfo->expectedDesc == NULL in deflist_to_tuplestore(), but that doesn'tlook very safe to me. Noted in passing while studying problem reportfrom Greg Davidson.
1 parentd747140 commit772a074

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/foreign/foreign.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $PostgreSQL: pgsql/src/backend/foreign/foreign.c,v 1.4 2009/06/11 14:48:57 momjian Exp $
9+
* $PostgreSQL: pgsql/src/backend/foreign/foreign.c,v 1.5 2009/06/1116:14:18 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -279,7 +279,8 @@ deflist_to_tuplestore(ReturnSetInfo *rsinfo, List *options)
279279
ereport(ERROR,
280280
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
281281
errmsg("set-valued function called in context that cannot accept a set")));
282-
if (!(rsinfo->allowedModes&SFRM_Materialize))
282+
if (!(rsinfo->allowedModes&SFRM_Materialize)||
283+
rsinfo->expectedDesc==NULL)
283284
ereport(ERROR,
284285
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
285286
errmsg("materialize mode required, but it is not allowed in this context")));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp