Re: Proposal: TABLE functions - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Proposal: TABLE functions
Date
Msg-id BAY20-F31D3C6D1D71BCBAE99A17F99E0@phx.gbl
Whole thread Raw
In response to Re: Proposal: TABLE functions  (Jeremy Drake <pgsql@jdrake.com>)
List pgsql-hackers
> > 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?
>

This feature doesn't change current behaviour. And using TABLE function 
means using SETOF.

Regards
Pavel Stehule

_________________________________________________________________
Najdete si svou lasku a nove pratele na Match.com. http://www.msn.cz/



pgsql-hackers by date:

Previous
From: Jeremy Drake
Date:
Subject: Re: [PATCHES] writing new regexp functions
Next
From: ohp@pyrenet.fr
Date:
Subject: Re: misread release notes