Re: anonymous composite types for Table Functions (aka SRFs)
В списке pgsql-patches по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: anonymous composite types for Table Functions (aka SRFs) |
| Дата | |
| Msg-id | 20322.1028554630@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:
>> 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.
In the cold light of morning I started to wonder what should happen if
you write "from foo() as z" when foo returns a tuple. It would probably
be peculiar for the z to overwrite the column name of just the first
column --- there is no such column renaming for an ordinary table alias.
My current thought: z becomes the table alias, and it also becomes the
column alias *if* the function returns scalar. For a function returning
tuple, this syntax doesn't affect the column names. (In any case this
syntax is disallowed for functions returning RECORD.)
regards, tom lane
В списке pgsql-patches по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера