Re: anonymous composite types for Table Functions (aka SRFs) - Mailing list pgsql-patches

From Tom Lane
Subject Re: anonymous composite types for Table Functions (aka SRFs)
Date
Msg-id 14391.1028520513@sss.pgh.pa.us
Whole thread Raw
In response to Re: anonymous composite types for Table Functions (aka  (Joe Conway <mail@joeconway.com>)
List pgsql-patches
Joe Conway <mail@joeconway.com> writes:
> Tom Lane wrote:
>> regression=# select  * from foo() as z;
>> foo
>> ------
>> 8800
>> ...
>>
>> (hm, what happened to the alias?)

> Actually nothing wrong with this one. The z is the relation alias, not
> the column alias. The column alias defaults to the function name for
> SRFs returning scalar.

Hm.  I'd sort of expect the "z" to become both the table and column
alias in this case.  What do you think?

Other examples look good.  Code style comment:

> +         if (functyptype != 'p' || (functyptype == 'p' && funcrettype != RECORDOID))

This test seems redundant, why not

        if (functyptype != 'p' || funcrettype != RECORDOID)

            regards, tom lane

pgsql-patches by date:

Previous
From: Joe Conway
Date:
Subject: Re: anonymous composite types for Table Functions (aka
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: anonymous composite types for Table Functions (aka