Re: (SETOF) RECORD AS complex_type

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: (SETOF) RECORD AS complex_type
Дата
Msg-id 25622.1167262616@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: (SETOF) RECORD AS complex_type  (David Fetter <david@fetter.org>)
Ответы Re: (SETOF) RECORD AS complex_type  (David Fetter <david@fetter.org>)
Re: (SETOF) RECORD AS complex_type  ("Andrew Dunstan" <andrew@dunslane.net>)
Список pgsql-hackers
David Fetter <david@fetter.org> writes:
> On Wed, Dec 27, 2006 at 06:22:17PM -0500, Tom Lane wrote:
>> The problem with that is that "AS foo" already has a meaning, and it's
>> not this one.

> How about "AS (foo)" ?

What if you want to specify an alias?  This doesn't work:
FROM myverylongfunctionname(...) AS alias(typename)

because, again, that syntax already has a meaning.

You could possibly do something with a cast:
FROM CAST(myfunc(...) AS typename) [ AS alias ]

This is at least syntactically OK.  Not sure what the implementation
issues might be.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: TupleDescs and refcounts and such, again
Следующее
От: David Fetter
Дата:
Сообщение: Re: (SETOF) RECORD AS complex_type