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:36:56
Message-ID: 25622.1167262616@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:
> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2006-12-27 23:40:58 Re: (SETOF) RECORD AS complex_type
Previous Message Tom Lane 2006-12-27 23:29:47 Re: TupleDescs and refcounts and such, again