Re: Set returning functions in select column list - Mailing list pgsql-general

From Marti Raudsepp
Subject Re: Set returning functions in select column list
Date
Msg-id CABRT9RAMwmvNruvqe4HrvUZUMCMDLhDofjHh50O-w98kjcub7A@mail.gmail.com
Whole thread Raw
In response to Re: Set returning functions in select column list  (David W Noon <dwnoon@ntlworld.com>)
List pgsql-general
On Fri, Feb 17, 2012 at 17:31, David W Noon <dwnoon@ntlworld.com> wrote:
> The words to search for are "Cartesian product".  This is the way
> RDBMSes have handled unconstrained implicit joins since the days of
> SQL/DS.

Yeah, that's what Jack was confused about -- it's actually *not* a
cartesian product. It simply stops enumerating when all the SRFs reach
the end at the same time.

Both of these queries generate 6 rows, although a cartesian product
would mean 12 in the second query:
select generate_series(1,2), generate_series(1,3);
select generate_series(1,2), generate_series(1,6);

Regards,
Marti

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: MySQL search query is not executing in Postgres DB
Next
From: Marti Raudsepp
Date:
Subject: Re: MySQL search query is not executing in Postgres DB