From: | Jeremy Drake <pgsql(at)jdrake(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)hotmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Proposal: TABLE functions |
Date: | 2007-02-07 00:39:58 |
Message-ID: | Pine.BSO.4.64.0702061636390.28908@resin.csoft.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 6 Feb 2007, Pavel Stehule wrote:
> Hello,
>
> Currently PostgreSQL support set returning functions.
>
> ANSI SQL 2003 goes with new type of functions - table functions. With this
> syntax
>
> CREATE FUNCTION foo() RETURNS TABLE (c1 t1, ... )
>
> PostgreSQL equal statements are:
>
> CREATE TYPE tmptype AS (c1 t1, ...)
> CREATE FUNCTION ... RETURNS SETOF tmptype AS ...
or you can do
CREATE FUNCTION foo(OUT c1 t1, OUT ...) RETURNS SETOF record AS ...
But I think this would be nice, I think the OUT parameters make less sense
than saying RETURNS TABLE(...). But what about functions not returning
SETOF?
--
The Schwine-Kitzenger Institute study of 47 men over the age of 100
showed that all had these things in common:
(1) They all had moderate appetites.
(2) They all came from middle class homes
(3) All but two of them were dead.
From | Date | Subject | |
---|---|---|---|
Next Message | Marc Munro | 2007-02-07 00:43:54 | Re: referential Integrity and SHARE locks |
Previous Message | Jan Wieck | 2007-02-07 00:29:11 | Re: Proposal: Commit timestamp |