Re: Set-returning function syntax

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: joel(at)joelburton(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Set-returning function syntax
Date: 2002-05-19 00:56:14
Message-ID: 3CE6F82E.4070509@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tatsuo Ishii wrote:
> Does your SRF function allow to return a setof composite data type
> using C function? If so, how can I write such that C function? I

Just to follow-up, here's a quick look at what works and what doesn't,
at least using my test script.

SELECT * FROM myfunc();
Language
RetSet
RetType
Status
--------------- ------- ------- ---------------------
C
t b OK
C
t c Not tested
C
f b OK
C
f c Not tested
SQL
t b OK
SQL
t c OK
SQL
f b OK
SQL
f c OK
PL/pgSQL
t
b
No retset support
PL/pgSQL
t
c
No retset support
PL/pgSQL
f
b
OK
PL/pgSQL
f
c
OK
-----------------------------------------------------
RetSet: t = function declared to return setof something
RetType: b = base type; c = composite type

Same cases work when a view is defined as SELECT * FROM myfunc().

Joe

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2002-05-19 02:33:22 Re: Set-returning function syntax
Previous Message C. Maj 2002-05-19 00:37:11 Re: [HACKERS] libpgtcl - backend version information