Casting 'record' to a composite type.
| От | Mark Gibson |
|---|---|
| Тема | Casting 'record' to a composite type. |
| Дата | |
| Msg-id | 40239ED4.4010000@cromwell.co.uk обсуждение |
| Ответы |
Re: Casting 'record' to a composite type.
|
| Список | pgsql-general |
Hello,
When using functions that return the datatype 'record', rather than
doing this:
SELECT *
FROM fn_returning_setof_record( ... )
AS t (id integer, title text);
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;
Obviously the last two statements don't work, but you can see what I'm
getting at,
casting the 'record' datatype to a composite datatype.
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?
Cheers
--
Mark Gibson <gibsonm |AT| cromwell |DOT| co |DOT| uk>
Web Developer & Database Admin
Cromwell Tools Ltd.
Leicester, England.
В списке pgsql-general по дате отправления: