pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Markus Schaber <schabi@logix-tt.com>
Cc: PostgreSQL SQL List <pgsql-sql@postgresql.org>
Subject: Re: Set generating functions and subqueries
Date: Mon, 13 Mar 2006 09:57:39 -0500
Message-ID: <7169.1142261859@sss.pgh.pa.us> (raw)
In-Reply-To: <441566CF.2040105@logix-tt.com>
References: <44116ED2.9060901@logix-tt.com>
	<5142.1142002128@sss.pgh.pa.us>
	<441566CF.2040105@logix-tt.com>

Markus Schaber <schabi@logix-tt.com> writes:
> Tom Lane wrote:
>> The fact that the other form is even allowed is more of a holdover from
>> PostQUEL than something we have consciously decided is a good idea.
>> (IMHO it's actually a fairly *bad* idea, because it does not work nicely
>> when there's more than one SRF in the same targetlist.)  It'll probably
>> get phased out someday, if we can find a way to replace the
>> functionality.  I seem to recall speculating that SQL2003's LATERAL
>> tables might do the job.

> AFAICS, it can be replaced with JOINs:

Not really; the case where joins don't help is where you want to
generate the SRF's output for each of the values appearing in a table.
There's an example in "SQL Functions Returning Sets" in the manual:
http://www.postgresql.org/docs/8.1/static/xfunc-sql.html#AEN31646

			regards, tom lane



view thread (4+ messages)

Message-ID: <7169.1142261859@sss.pgh.pa.us>
Permalink:  ../7169.1142261859@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7169.1142261859@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, schabi@logix-tt.com
  Subject: Re: Set generating functions and subqueries
  In-Reply-To: <7169.1142261859@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox