plproxy - plproxy: Support dynamic record as return type.

From: mkz(at)pgfoundry(dot)org (User Mkz)
To: pgsql-committers(at)postgresql(dot)org
Subject: plproxy - plproxy: Support dynamic record as return type.
Date: 2008-06-26 08:57:46
Message-ID: 20080626085746.3824D17AE70E@pgfoundry.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Support dynamic record as return type.

Now PL/Proxy allows function defined as RETURNS RECORD without
OUT parameters. Such functions need actual result column
types specified with AS clause:

SELECT * FROM func() AS (col1 type1, col2 type2);

PL/Proxy needs to detect the actual type on each call and pass
it to remote database. Current implementation caches last
record type, drops it if type changes.

Original patch by Lei Yonghua, applied with some modifications.

Modified Files:
--------------
plproxy:
Makefile (r1.22 -> r1.23)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/plproxy/plproxy/Makefile.diff?r1=1.22&r2=1.23)
plproxy/src:
function.c (r1.5 -> r1.6)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/plproxy/plproxy/src/function.c.diff?r1=1.5&r2=1.6)
plproxy.h (r1.12 -> r1.13)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/plproxy/plproxy/src/plproxy.h.diff?r1=1.12&r2=1.13)
query.c (r1.5 -> r1.6)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/plproxy/plproxy/src/query.c.diff?r1=1.5&r2=1.6)
type.c (r1.5 -> r1.6)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/plproxy/plproxy/src/type.c.diff?r1=1.5&r2=1.6)

Added Files:
-----------
plproxy/expected:
plproxy_dynamic_record.out (r1.1)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/plproxy/plproxy/expected/plproxy_dynamic_record.out?rev=1.1&content-type=text/x-cvsweb-markup)
plproxy/sql:
plproxy_dynamic_record.sql (r1.1)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/plproxy/plproxy/sql/plproxy_dynamic_record.sql?rev=1.1&content-type=text/x-cvsweb-markup)

Browse pgsql-committers by date

  From Date Subject
Next Message User Fxjr 2008-06-26 14:31:52 npgsql - Npgsql2: Added support to not add casts to null values.
Previous Message Michael Meskes 2008-06-26 08:04:06 pgsql: Synced parser