Skip to content

Commit bcfeca5

Browse files
committed
Check calling context for connectby_text(), per Joe Conway.
1 parent c42581e commit bcfeca5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contrib/tablefunc/tablefunc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,11 @@ connectby_text(PG_FUNCTION_ARGS)
10481048
MemoryContext per_query_ctx;
10491049
MemoryContext oldcontext;
10501050

1051+
/* check to see if caller supports us returning a tuplestore */
1052+
if (!rsinfo || !(rsinfo->allowedModes & SFRM_Materialize))
1053+
elog(ERROR, "connectby: materialize mode required, but it is not "
1054+
"allowed in this context");
1055+
10511056
if (fcinfo->nargs == 6)
10521057
{
10531058
branch_delim = GET_STR(PG_GETARG_TEXT_P(5));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy