Re: Casting 'record' to a composite type.

From: Joe Conway <mail(at)joeconway(dot)com>
To: Mark Gibson <gibsonm(at)cromwell(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Casting 'record' to a composite type.
Date: 2004-02-06 17:17:04
Message-ID: 4023CC10.2010102@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Atkins 2004-02-06 17:18:11 Re: Getting table attributes
Previous Message Joe Conway 2004-02-06 17:14:36 Re: how can I select into an array?