plpsm - plpgpsm: table expression this patch allows table expression in

From: okbob(at)pgfoundry(dot)org (User Okbob)
To: pgsql-committers(at)postgresql(dot)org
Subject: plpsm - plpgpsm: table expression this patch allows table expression in
Date: 2007-02-05 17:57:52
Message-ID: 20070205175752.8AF17217280@pgfoundry.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
table expression

this patch allows table expression in SRF functions. Allow SELECT statement
as argument of RETURN statement or SELECT (everything which returns table)
as one statement's body.

See:
CREATE OR REPLACE FUNCTION fx(a int)
RETURNS SETOF RECORD AS
$$
RETURN SELECT *
FROM Foo
WHERE fx.a = Foo.a;
$$ LANGUAGE plpgpsm;

CREATE OR REPLACE fx2(a int)
RETURNS SETOF RECORD AS
$$
SELECT *
FROM Foo
WHERE fx.a = Foo.a;
$$ LANGUAGE plpgpsm;

Modified Files:
--------------
plpgpsm/src:
gram.y (r1.33 -> r1.34)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/plpsm/plpgpsm/src/gram.y.diff?r1=1.33&r2=1.34)
pl_comp.c (r1.11 -> r1.12)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/plpsm/plpgpsm/src/pl_comp.c.diff?r1=1.11&r2=1.12)
pl_exec.c (r1.35 -> r1.36)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/plpsm/plpgpsm/src/pl_exec.c.diff?r1=1.35&r2=1.36)
plpgpsm.h (r1.24 -> r1.25)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/plpsm/plpgpsm/src/plpgpsm.h.diff?r1=1.24&r2=1.25)
scan.l (r1.9 -> r1.10)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/plpsm/plpgpsm/src/scan.l.diff?r1=1.9&r2=1.10)
plpgpsm/src/expected:
plpgpsm.out (r1.9 -> r1.10)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/plpsm/plpgpsm/src/expected/plpgpsm.out.diff?r1=1.9&r2=1.10)
plpgpsm/src/sql:
plpgpsm.sql (r1.8 -> r1.9)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/plpsm/plpgpsm/src/sql/plpgpsm.sql.diff?r1=1.8&r2=1.9)

Browse pgsql-committers by date

  From Date Subject
Next Message User Okbob 2007-02-05 21:54:10 plpsm - plpgpsm: add check which protect combination of return table
Previous Message Bruce Momjian 2007-02-05 17:17:13 pgsql: Updated TODO item: > o Add a \set variable to control whether