|
6 | 6 | * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
7 | 7 | *
|
8 | 8 | * 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 $ |
10 | 10 | *
|
11 | 11 | *-------------------------------------------------------------------------
|
12 | 12 | */
|
@@ -279,7 +279,8 @@ deflist_to_tuplestore(ReturnSetInfo *rsinfo, List *options)
|
279 | 279 | ereport(ERROR,
|
280 | 280 | (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
281 | 281 | 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) |
283 | 284 | ereport(ERROR,
|
284 | 285 | (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
285 | 286 | errmsg("materialize mode required, but it is not allowed in this context")));
|
|