git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d747140)
Somebody seems to have thought they could get away without checking for
2009年6月11日 16:14:18 +0000 (16:14 +0000)
2009年6月11日 16:14:18 +0000 (16:14 +0000)
rsinfo->expectedDesc == NULL in deflist_to_tuplestore(), but that doesn't
look very safe to me. Noted in passing while studying problem report
from Greg Davidson.


diff --git a/src/backend/foreign/foreign.c b/src/backend/foreign/foreign.c
index 4fb00328ca1711f882065ac86d9c272de8b17170..04f0d348fb44712cb39af2d2e3c1f8b790e30f47 100644 (file)
--- a/src/backend/foreign/foreign.c
+++ b/src/backend/foreign/foreign.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/foreign/foreign.c,v 1.4 2009年06月11日 14:48:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/foreign/foreign.c,v 1.5 2009年06月11日 16:14:18 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -279,7 +279,8 @@ deflist_to_tuplestore(ReturnSetInfo *rsinfo, List *options)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("set-valued function called in context that cannot accept a set")));
- if (!(rsinfo->allowedModes & SFRM_Materialize))
+ if (!(rsinfo->allowedModes & SFRM_Materialize) ||
+ rsinfo->expectedDesc == NULL)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("materialize mode required, but it is not allowed in this context")));
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /