From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Joe Conway <mail(at)joeconway(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: anonymous composite types for Table Functions (aka |
Date: | 2002-08-05 16:25:18 |
Message-ID: | 200208051625.g75GPIY29999@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Your patch has been added to the PostgreSQL unapplied patches list at:
http://candle.pha.pa.us/cgi-bin/pgpatches
I will try to apply it within the next 48 hours.
---------------------------------------------------------------------------
Joe Conway wrote:
> 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)
> {
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-08-05 16:25:35 | Re: anonymous composite types for Table Functions (aka |
Previous Message | Bruce Momjian | 2002-08-05 16:23:02 | Re: anonymous composite types for Table Functions (aka SRFs) |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-08-05 16:25:35 | Re: anonymous composite types for Table Functions (aka |
Previous Message | Bruce Momjian | 2002-08-05 16:23:02 | Re: anonymous composite types for Table Functions (aka SRFs) |