Re: anonymous composite types for Table Functions (aka SRFs) - Mailing list pgsql-patches

From nconway@klamath.dyndns.org (Neil Conway)
Subject Re: anonymous composite types for Table Functions (aka SRFs)
Date
Msg-id 20020729152406.GA7080@klamath.dyndns.org
Whole thread Raw
In response to Re: anonymous composite types for Table Functions (aka SRFs)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
On Mon, Jul 29, 2002 at 11:03:40AM -0400, Tom Lane wrote:
> nconway@klamath.dyndns.org (Neil Conway) writes:
> > Is there a reason why you can't specify the return type in the function
> > declaration? ISTM that for most functions, the 'AS' clause will be the
> > same for every usage of the function.
>
> The particular functions Joe is worried about (dblink and such) do not
> have a fixed return type.

Right -- so when you declare the SRF, you could be allowed to define
a composite type that will be used if the caller doesn't specify one
(i.e. the default return type). This wouldn't get us a whole lot over
the existing 'CREATE VIEW' hack, except it would be cleaner.

> In any case that would be a separate
> mechanism with its own issues, because we'd have to store the anonymous
> type in the system catalogs.

Ok -- it still seems worthwhile to me.

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: anonymous composite types for Table Functions (aka SRFs)
Next
From: Joe Conway
Date:
Subject: Re: anonymous composite types for Table Functions (aka