Table function support - Mailing list pgsql-patches

From Pavel Stehule
Subject Table function support
Date
Msg-id BAY114-F3E354FADBEE8FA63E7FA2F9920@phx.gbl
Whole thread Raw
Responses Re: Table function support
Re: Table function support
List pgsql-patches
Hello

this patch allows using SQL2003 syntax for set returning functions. It is
based on using new type of argmode - PROARGMODE_TABLE.

Proposal: http://archives.postgresql.org/pgsql-hackers/2007-02/msg00318.php

Sample:

CREATE FUNCTION foof(a int)
RETURNS TABLE(a int, b int) AS
$$ SELECT x, y FROM Foo WHERE x < a $$ LANGUAGE sql;

CREATE FUNCTION fooff(a int)
RETURNS TABLE(a int, b int) AS $$
BEGIN
  RETURN TABLE(SELECT * FRON Foo WHERE x < a);
END; $$ LANGUAGE plpgsql;

This patch enhance plpgsql stmt return too (table expression support).

Conformance with SQL2003:
T326     Table functions

Description: SIGMOD Record, Vol. 33, No. 1, March 2004

Regards
Pavel Stehule

_________________________________________________________________
Emotikony a pozadi programu MSN Messenger ozivi vasi konverzaci.
http://messenger.msn.cz/

Attachment

pgsql-patches by date:

Previous
From: Michael Meskes
Date:
Subject: Re: patch for ECPG (BUG #2956: ECPG does not treat multibyte characters correctly.)
Next
From: Greg Smith
Date:
Subject: New features for pgbench