On Tue, 19 Oct 2004, federico wrote:
> i saw in bug 1201 that some got my problem > [ you can't do "SELECT * FROM func_returning_void();" ] This patch seems to fix it, although I have no idea what the actual implications are, I just changed any place that produced an error. Kris Jurka
Index: src/backend/executor/nodeFunctionscan.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/executor/nodeFunctionscan.c,v retrieving revision 1.27 diff -c -r1.27 nodeFunctionscan.c *** src/backend/executor/nodeFunctionscan.c 22 Sep 2004 17:41:51 -0000 1.27 --- src/backend/executor/nodeFunctionscan.c 19 Oct 2004 23:18:56 -0000 *************** *** 191,197 **** /* Composite data type, e.g. a table's row type */ tupdesc = CreateTupleDescCopy(lookup_rowtype_tupdesc(funcrettype, -1)); } ! else if (functyptype == 'b' || functyptype == 'd') { /* Must be a base data type, i.e. scalar */ char *attname = strVal(linitial(rte->eref->colnames)); --- 191,197 ---- /* Composite data type, e.g. a table's row type */ tupdesc = CreateTupleDescCopy(lookup_rowtype_tupdesc(funcrettype, -1)); } ! else if (functyptype == 'b' || functyptype == 'd' || (functyptype == 'p' && funcrettype == VOIDOID)) { /* Must be a base data type, i.e. scalar */ char *attname = strVal(linitial(rte->eref->colnames)); Index: src/backend/parser/parse_relation.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/parser/parse_relation.c,v retrieving revision 1.100 diff -c -r1.100 parse_relation.c *** src/backend/parser/parse_relation.c 29 Aug 2004 05:06:44 -0000 1.100 --- src/backend/parser/parse_relation.c 19 Oct 2004 23:18:57 -0000 *************** *** 1038,1044 **** */ relation_close(rel, NoLock); } ! else if (functyptype == 'b' || functyptype == 'd') { /* * Must be a base data type, i.e. scalar. Just add one alias --- 1038,1044 ---- */ relation_close(rel, NoLock); } ! else if (functyptype == 'b' || functyptype == 'd' || (functyptype == 'p' && funcrettype == VOIDOID)) { /* * Must be a base data type, i.e. scalar. Just add one alias *************** *** 1332,1338 **** expandRelation(funcrelid, rte->eref, rtindex, sublevels_up, include_dropped, colnames, colvars); } ! else if (functyptype == 'b' || functyptype == 'd') { /* * Must be a base data type, i.e. scalar --- 1332,1338 ---- expandRelation(funcrelid, rte->eref, rtindex, sublevels_up, include_dropped, colnames, colvars); } ! else if (functyptype == 'b' || functyptype == 'd' || (functyptype == 'p' && funcrettype == VOIDOID)) { /* * Must be a base data type, i.e. scalar
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org