Merlin Moncure writes:
> This is just awesome. Anyways, I was looking around the docs for
> references to the old methodology of select list SRF function calls.
> This paragraph:
> http://www.postgresql.org/docs/devel/static/xfunc-sql.html#XFUNC-SQL-FUNCTIONS-RETURNING-SET
> could probably use s
On Tue, Aug 7, 2012 at 6:08 PM, Tom Lane wrote:
> I wrote:
>> What I'd like to do next, barring objections, is to band-aid the places
>> where the planner could crash on a LATERAL query (probably just make it
>> throw FEATURE_NOT_SUPPORTED errors), write some documentation, and
>> then commit what
I wrote:
> What I'd like to do next, barring objections, is to band-aid the places
> where the planner could crash on a LATERAL query (probably just make it
> throw FEATURE_NOT_SUPPORTED errors), write some documentation, and
> then commit what I've got. After that I can go back to improve the
> p
Here's an updated version of my LATERAL patch.
* Accepts "LATERAL func_name(args)".
* Handles LATERAL in JOIN nests now. I rewrote the way
transformFromClause manages visibility of previously-parsed FROM items.
Rather than my previous idea of adding more namespace lists to a
ParseState, I change
From: Robert Haas [mailto:robertmh...@gmail.com]
Sent: Monday, August 06, 2012 8:07 PM
On Mon, Aug 6, 2012 at 10:07 AM, Amit Kapila wrote:
> I think you can always simulate CROSS APPLY using LATERAL. The syntax
> is different but the functionality is the same. However, OUTER APPLY
> allows you
Robert Haas writes:
> On Mon, Aug 6, 2012 at 11:09 AM, Tom Lane wrote:
>> Uh, what exactly? AFAICT from that blog entry, "x OUTER APPLY y" is
>> exactly the same as "x LEFT JOIN LATERAL y ON true". Okay, so you
>> saved three words, but is that a good enough reason to invent a
>> nonstandard sy
On Mon, Aug 6, 2012 at 11:09 AM, Tom Lane wrote:
> Robert Haas writes:
>> I think you can always simulate CROSS APPLY using LATERAL. The syntax
>> is different but the functionality is the same. However, OUTER APPLY
>> allows you to do something that I don't think is possible using
>> LATERAL.
Robert Haas writes:
> I think you can always simulate CROSS APPLY using LATERAL. The syntax
> is different but the functionality is the same. However, OUTER APPLY
> allows you to do something that I don't think is possible using
> LATERAL.
Uh, what exactly? AFAICT from that blog entry, "x OUTE
Robert Haas writes:
> Apparently Sybase and Microsoft SQL server use a slightly different
> syntax, CROSS APPLY, for this.
> http://iablog.sybase.com/paulley/2008/07/cross-and-outer-apply/
Well, this is only a blog entry and not their manual, but AFAICT that is
just a useless deviation from SQL-
On Mon, Aug 6, 2012 at 10:07 AM, Amit Kapila wrote:
>>> Currently the patch only implements the syntax called out in the
> standard,
>>> namely that you can put LATERAL in front of a , which is
>>> to say a parenthesized sub-SELECT in FROM. It strikes me that it might
> be
>>> worth allowing LATE
From: pgsql-hackers-ow...@postgresql.org
[mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Tom Lane
Sent: Monday, August 06, 2012 3:28 AM
To: pgsql-hackers@postgreSQL.org
Subject: [HACKERS] WIP patch for LATERAL subqueries
> I've been idly amusing myself by trying to hack up sup
From: pgsql-hackers-ow...@postgresql.org
[mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Robert Haas
Sent: Monday, August 06, 2012 6:16 PM
On Sun, Aug 5, 2012 at 5:58 PM, Tom Lane wrote:
>> Currently the patch only implements the syntax called out in the
standard,
>> namely that you can
On Sun, Aug 5, 2012 at 5:58 PM, Tom Lane wrote:
> I've been idly amusing myself by trying to hack up support for
> SQL-standard LATERAL subqueries.
Cool!
> Currently the patch only implements the syntax called out in the standard,
> namely that you can put LATERAL in front of a , which is
> to s
2012/8/6 Tom Lane :
> Andrew Dunstan writes:
>> On 08/05/2012 05:58 PM, Tom Lane wrote:
>>> Currently the patch only implements the syntax called out in the standard,
>>> namely that you can put LATERAL in front of a , which is
>>> to say a parenthesized sub-SELECT in FROM. It strikes me that it
Andrew Dunstan writes:
> On 08/05/2012 05:58 PM, Tom Lane wrote:
>> Currently the patch only implements the syntax called out in the standard,
>> namely that you can put LATERAL in front of a , which is
>> to say a parenthesized sub-SELECT in FROM. It strikes me that it might be
>> worth allowing
I wrote:
> While fooling around in the planner I realized that I have no idea what
> outer-level aggregates mean in a LATERAL subquery, and neither does
> Postgres:
> regression=# select 1 from tenk1 a, lateral (select * from int4_tbl b where
> f1 = max(a.unique1)) x;
> ERROR: plan should not ref
On 08/05/2012 05:58 PM, Tom Lane wrote:
I've been idly amusing myself by trying to hack up support for
SQL-standard LATERAL subqueries. I've got something that turns over,
more or less:
Awesome!!
Currently the patch only implements the syntax called out in the standard,
namely that you ca
I've been idly amusing myself by trying to hack up support for
SQL-standard LATERAL subqueries. I've got something that turns over,
more or less:
regression=# select * from int4_tbl a, lateral (select unique1,unique2 from
tenk1 b where a.f1 = unique1) x;
f1 | unique1 | unique2
+-+-
18 matches
Mail list logo