Re: anonymous composite types for Table Functions (aka
От | Joe Conway |
---|---|
Тема | Re: anonymous composite types for Table Functions (aka |
Дата | |
Msg-id | 3D4E13C6.6050700@joeconway.com обсуждение исходный текст |
Ответ на | Re: anonymous composite types for Table Functions (aka SRFs) (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: anonymous composite types for Table Functions (aka
Re: anonymous composite types for Table Functions (aka |
Список | pgsql-patches |
Joe Conway wrote: > Tom Lane wrote: >> Hm. I'd sort of expect the "z" to become both the table and column >> alias in this case. What do you think? > > I guess that would make sense. I'll make a separate patch just for that > change if that's OK. > Simple change -- patch attached. test=# select * from myfoo1() as z; z ---- 1 2 3 (3 rows) test=# select * from myfoo1(); myfoo1 -------- 1 2 3 (3 rows) test=# select * from myfoo1() as z(a); a ---- 1 2 3 (3 rows) Joe Index: src/backend/parser/parse_relation.c =================================================================== RCS file: /opt/src/cvs/pgsql-server/src/backend/parser/parse_relation.c,v retrieving revision 1.73 diff -c -r1.73 parse_relation.c *** src/backend/parser/parse_relation.c 5 Aug 2002 02:30:50 -0000 1.73 --- src/backend/parser/parse_relation.c 5 Aug 2002 05:22:02 -0000 *************** *** 807,813 **** elog(ERROR, "Too many column aliases specified for function %s", funcname); if (numaliases == 0) ! eref->colnames = makeList1(makeString(funcname)); } else if (functyptype == 'p' && funcrettype == RECORDOID) { --- 807,813 ---- elog(ERROR, "Too many column aliases specified for function %s", funcname); if (numaliases == 0) ! eref->colnames = makeList1(makeString(eref->aliasname)); } else if (functyptype == 'p' && funcrettype == RECORDOID) {
В списке pgsql-patches по дате отправления: