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