tablefunc bugfix (was Re: [HACKERS] Heads up: 7.3.3 this Wednesday) - Mailing list pgsql-patches

From Joe Conway
Subject tablefunc bugfix (was Re: [HACKERS] Heads up: 7.3.3 this Wednesday)
Date
Msg-id 3EC47BEB.200@joeconway.com
Whole thread Raw
Responses Re: tablefunc bugfix (was Re: [HACKERS] Heads up: 7.3.3 this Wednesday)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> pgsql-core have agreed to put out a 7.3.3 release on Wednesday (5/21),
> God willin' an' the creek don't rise.  If anyone's got anything you've
> been planning to fix in the 7.3 branch, now is a real good time to get
> it done.
>

Funny you should ask :-)

Here's a fix for a bug in connectby (crashes when called as a targetlist
function instead of as a table function). The patch is against cvs HEAD,
but should also be applied to the 7.3 branch, I think.

Thanks,

Joe
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));

pgsql-patches by date:

Previous
From: Joe Conway
Date:
Subject: fix for krb5 breakage
Next
From: Tom Lane
Date:
Subject: Re: tablefunc bugfix (was Re: [HACKERS] Heads up: 7.3.3 this Wednesday)