1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-21 12:05:57 +03:00

Check calling context for connectby_text(), per Joe Conway.

This commit is contained in:
Tom Lane 2003-05-16 06:07:58 +00:00
parent 3ffaf20461
commit ab90b49f6b

View File

@ -646,6 +646,11 @@ connectby_text(PG_FUNCTION_ARGS)
MemoryContext per_query_ctx; MemoryContext per_query_ctx;
MemoryContext oldcontext; 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) if (fcinfo->nargs == 6)
{ {
branch_delim = GET_STR(PG_GETARG_TEXT_P(5)); branch_delim = GET_STR(PG_GETARG_TEXT_P(5));