pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Markus Schaber <schabi@logix-tt.com>
Cc: John DeSoi <desoi@pgedit.com>
Cc: PostGIS Users Discussion <postgis-users@postgis.refractions.net>
Cc: PostgreSQL SQL List <pgsql-sql@postgresql.org>
Subject: Re: Problem using set-returning functions
Date: Mon, 27 Mar 2006 07:06:09 -0800 (PST)
Message-ID: <20060327070103.U96317@megazone.bigpanda.com> (raw)
In-Reply-To: <4427F003.2070705@logix-tt.com>
References: <20060324200036.ED8E52C1503@netnation.refractions.net>
	<1143278826.44250cea7eccc@web-mail1.uibk.ac.at>
	<4427BFE4.8050500@logix-tt.com>
	<4427C15C.5070905@logix-tt.com>
	<7DB6EE64-AB49-4DA6-B690-21A53FD6045E@pgedit.com>
	<4427F003.2070705@logix-tt.com>

On Mon, 27 Mar 2006, Markus Schaber wrote:

> Hi, John,
>
> John DeSoi wrote:
>
> > With SRFs, you need to specify what you want to select. In other  words
> > if you are calling generate_x(bar) you need "select * from
> > generate_x(bar)" -- "select generate_x(bar)" will not work.
>
> So, then, why does it work with generate_series() and dump()?

It's an implementation detail. Some languages handle SRFs in a way that
can be handled in the select list (SQL and C I think) and others do not
(plpgsql). The latter will likely change at some point, although there are
some confusing issues with SRFs in the select list as well, see the
difference in behavior between:

select generate_series(1,10), generate_series(1,5);
 vs
select * from generate_series(1,10) g1, generate_series(1,5) g2;



view thread (9+ messages)  latest in thread

Message-ID: <20060327070103.U96317@megazone.bigpanda.com>
Permalink:  ../20060327070103.U96317@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20060327070103.U96317@megazone.bigpanda.com

 · 

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: sszabo@megazone.bigpanda.com, schabi@logix-tt.com, desoi@pgedit.com, postgis-users@postgis.refractions.net
  Subject: Re: Problem using set-returning functions
  In-Reply-To: <20060327070103.U96317@megazone.bigpanda.com>

* 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