Re: LATERAL - Mailing list pgsql-hackers

From Robert Haas
Subject Re: LATERAL
Date
Msg-id 603c8f070909071912m4696b9d2hfbd5e76eedac1834@mail.gmail.com
Whole thread Raw
In response to Re: LATERAL  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
On Mon, Sep 7, 2009 at 10:08 PM, Stephen Frost<sfrost@snowman.net> wrote:
> * Robert Haas (robertmhaas@gmail.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


pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: LATERAL
Next
From: Tom Lane
Date:
Subject: More Snow Leopard fun: multiarch problems while building plperl