Re: (SETOF) RECORD AS complex_type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Fetter <david(at)fetter(dot)org>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: (SETOF) RECORD AS complex_type
Date: 2006-12-27 23:22:17
Message-ID: 25473.1167261737@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Fetter <david(at)fetter(dot)org> writes:
> What would be involved in fixing the casting operation so that the
> following would work?

> CREATE TYPE foo AS (
> a INT4,
> b INT8,
> c POINT,
> d TEXT
> );

> CREATE FUNCTION bar(output_type TEXT)
> RETURNS SETOF RECORD
> ...

> SELECT * FROM bar('foo') AS foo;

The problem with that is that "AS foo" already has a meaning, and it's
not this one.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2006-12-27 23:26:06 Re: (SETOF) RECORD AS complex_type
Previous Message Tom Lane 2006-12-27 23:19:31 Re: [BUGS] BUG #2846: inconsistent and confusing handling of underflows,