Re: calling a function that takes a row type and returns a set of rows

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: "Robert Haas" <robertmhaas(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: calling a function that takes a row type and returns a set of rows
Date: 2008-10-11 20:05:58
Message-ID: 32E4DC09-9EDE-4A63-8D2F-BF8FD136D5C5@hi-media.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Le 11 oct. 08 à 08:18, Pavel Stehule a écrit :
>> I'm not sure about the syntax, but LATERAL is a standard JOIN type
>> wherein
>> upper "nodes" are visible.

> no, this strange syntax is far to any standard. Solution is using
> dynamic cursor ala DB2 (that isn't supported in postgres) - select *
> from fce(cursor(select .... from tab))

Yes it's standard notation. SQL2008 has it in Foundation document, see
its grammar reference at page 343 of my PDF reader, labelled page 321
(Query Expressions):

7.6 <table reference>
<table primary> ::=
...
| <lateral derived table> [ AS ] <correlation name>
[ <left paren><derived column list><right paren> ]
...

<lateral derived table> ::=
LATERAL<table subquery>

You'll find out more from http://wiscorp.com/SQLStandards.html

Regards,
- --
dim

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAkjxByYACgkQlBXRlnbh1blh8wCeNpirQ5902oVgH8Xh8rhYr3qF
rOMAn1opkDflbRn9PPuD1fmMGblLvzgQ
=7wSp
-----END PGP SIGNATURE-----

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Artacus 2008-10-11 20:13:33 Re: Need schema design advice
Previous Message Devrim GÜNDÜZ 2008-10-11 20:04:00 Re: 8.4 RPMs