Re: Proposal: TABLE functions

From: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
To: pgsql(at)jdrake(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: TABLE functions
Date: 2007-02-07 08:45:08
Message-ID: BAY20-F31D3C6D1D71BCBAE99A17F99E0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message ohp 2007-02-07 10:29:39 Re: misread release notes
Previous Message Jeremy Drake 2007-02-07 08:26:00 Re: [PATCHES] writing new regexp functions