Re: Casting 'record' to a composite type.

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: Casting 'record' to a composite type.
Дата
Msg-id 4023CC10.2010102@joeconway.com
обсуждение исходный текст
Ответ на Casting 'record' to a composite type.  (Mark Gibson <gibsonm@cromwell.co.uk>)
Список pgsql-general
Mark Gibson wrote:
> I'd like to do something like this:
>
>    CREATE TYPE my_type AS (id integer, title text);
>
>    SELECT *
>    FROM fn_returning_setof_record( ... )
>    AS t my_type;
> or
>    SELECT *
>    FROM fn_returning_setof_record( ... )::my_type AS t;

> I've not been able to find anything like this in the docs.
> Is there currently any way of doing this? are there any plans for it?

There is no way to do this now, and no plans that I know of, but it does
look useful. I'm not sure how painful it would be to make it happen
though...

Joe



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: how can I select into an array?
Следующее
От: Franco Bruno Borghesi
Дата:
Сообщение: Re: Getting table attributes