mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-30 19:00:29 +08:00
Check calling context for connectby_text(), per Joe Conway.
This commit is contained in:
parent
c42581eba3
commit
bcfeca5856
@ -1048,6 +1048,11 @@ connectby_text(PG_FUNCTION_ARGS)
|
||||
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));
|
||||
|
Loading…
Reference in New Issue
Block a user