Nabil Sayegh wrote:
> validateConnectbyTupleDesc
>
> When the fourth column (tupdesc->attrs[3]) fails the type check, the
> errormessage should be "fourth column must be..." and not "third column
> must be ..."
>
> line 1372
> http://www.joeconway.com/tablefunc.tar.gz
Attached is a patch for the issue reported above by Nabil. Please apply.
Thanks,
Joe
Index: contrib/tablefunc/tablefunc.c
===================================================================
RCS file: /opt/src/cvs/pgsql-server/contrib/tablefunc/tablefunc.c,v
retrieving revision 1.18
diff -c -r1.18 tablefunc.c
*** contrib/tablefunc/tablefunc.c 15 Jun 2003 17:59:09 -0000 1.18
--- contrib/tablefunc/tablefunc.c 25 Jun 2003 02:46:11 -0000
***************
*** 1369,1375 ****
/* check that the type of the forth column is TEXT if applicable */
if (show_branch && tupdesc->attrs[3]->atttypid != TEXTOID)
elog(ERROR, "Query-specified return tuple not valid for Connectby: "
! "third column must be type %s", format_type_be(TEXTOID));
/* OK, the tupdesc is valid for our purposes */
}
--- 1369,1375 ----
/* check that the type of the forth column is TEXT if applicable */
if (show_branch && tupdesc->attrs[3]->atttypid != TEXTOID)
elog(ERROR, "Query-specified return tuple not valid for Connectby: "
! "forth column must be type %s", format_type_be(TEXTOID));
/* OK, the tupdesc is valid for our purposes */
}