Re: LATERAL

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: LATERAL
Date: 2009-09-08 02:12:49
Message-ID: 603c8f070909071912m4696b9d2hfbd5e76eedac1834@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 7, 2009 at 10:08 PM, Stephen Frost<sfrost(at)snowman(dot)net> wrote:
> * Robert Haas (robertmhaas(at)gmail(dot)com) wrote:
>> Fair enough.  I think I started to drift off in the direction of
>> making that argument, but it wasn't really my point.
>
> To be honest, I'm not sure I agree with Tom here on the value of
> requiring a keyword to tell the system that you really mean what you
> wrote.  On the other hand, it sounds like the spec is pretty clear on
> this, and I don't feel we should violate it just because we think it's
> being silly on this point.

That's pretty much where I am, too, modulo needing to better
understand the aforesaid spec.

>> The original
>> point I was trying to make is that we may not need to invent any kind
>> of new name-resolution or scoping in order to make LATERAL() work.
>> Instead, LATERAL() can just do everything normally with the exception
>> of not throwing the following errors when they would otherwise be
>> thrown:
>
> I don't know for sure, but I do hope you're right.  I'd certainly love
> to be able to do this in general..  There's a number of cases where I've
> had to do the hokey-pokey to get around our lack of ability to do this
> when using set-returning functions.

Me too.

>> I'm not sure if I'm right about this, but if I am, it seems likely to
>> be a pretty straightforward change.
>
> Please continue to explore it and propose a patch. :)

Yeah, that's the not-so-easy part. Gotta grok this executor stuff
first before I can even think about implementing this.

...Robert

In response to

  • Re: LATERAL at 2009-09-08 02:08:51 from Stephen Frost

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-09-08 03:13:49 More Snow Leopard fun: multiarch problems while building plperl
Previous Message Stephen Frost 2009-09-08 02:08:51 Re: LATERAL