projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c42581e
)
Check calling context for connectby_text(), per Joe Conway.
author
Tom Lane
Fri, 16 May 2003 06:07:51 +0000
(06:07 +0000)
committer
Tom Lane
Fri, 16 May 2003 06:07:51 +0000
(06:07 +0000)
contrib/tablefunc/tablefunc.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/tablefunc/tablefunc.c
b/contrib/tablefunc/tablefunc.c
index 70df31d557f0ae7ec70d369b6ef1223dc955da06..984f31dc2831d826607dc04e48a0ffbf33f63384 100644
(file)
--- a/
contrib/tablefunc/tablefunc.c
+++ b/
contrib/tablefunc/tablefunc.c
@@
-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));