Re: anonymous composite types for Table Functions (aka SRFs)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: anonymous composite types for Table Functions (aka SRFs)
Дата
Msg-id 14391.1028520513@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: anonymous composite types for Table Functions (aka  (Joe Conway <mail@joeconway.com>)
Список 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 по дате отправления:

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: anonymous composite types for Table Functions (aka
Следующее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: anonymous composite types for Table Functions (aka