Index: contrib/tablefunc/tablefunc.c =================================================================== RCS file: /opt/src/cvs/pgsql-server/contrib/tablefunc/tablefunc.c,v retrieving revision 1.16 diff -c -r1.16 tablefunc.c *** contrib/tablefunc/tablefunc.c 14 May 2003 03:27:22 -0000 1.16 --- contrib/tablefunc/tablefunc.c 16 May 2003 04:48:35 -0000 *************** *** 1048,1053 **** --- 1048,1058 ---- MemoryContext per_query_ctx; MemoryContext oldcontext; + /* check to see if caller supports us returning a tuplestore */ + if (!rsinfo || !(rsinfo->allowedModes & SFRM_Materialize)) + elog(ERROR, "connectby: materialize mode required, but it is not " + "allowed in this context"); + if (fcinfo->nargs == 6) { branch_delim = GET_STR(PG_GETARG_TEXT_P(5));