*** pgsql/src/backend/parser/parse_relation.c Tue May 7 21:54:14 2002 --- pgsql.1/src/backend/parser/parse_relation.c Tue May 7 21:44:13 2002 *************** *** 738,750 **** */ Relation rel; int maxattrs; - int numaliases; rel = heap_open(funcrelid, AccessShareLock); - eref = (Alias *) copyObject(alias); - numaliases = length(eref->colnames); - /* * Since the rel is open anyway, let's check that the number of column * aliases is reasonable. --- 738,746 ---- *************** *** 777,791 **** * Must be a base data type, i.e. scalar. * Just add one alias column named for the function. */ ! char *attrname; ! Func *func; ! Oid funcid; ! ! func = (Func *) (expr->oper); ! funcid = func->funcid; ! attrname = get_func_name(funcid); ! ! eref->colnames = lappend(eref->colnames, makeString(attrname)); rte->eref = eref; } --- 773,779 ---- * Must be a base data type, i.e. scalar. * Just add one alias column named for the function. */ ! eref->colnames = lappend(eref->colnames, makeString(funcname)); rte->eref = eref; }