Re: BUG #5358: Throwing unexpected ERROR - Mailing list pgsql-bugs

From Robert Haas
Subject Re: BUG #5358: Throwing unexpected ERROR
Date
Msg-id 603c8f071003030537i212f5483m5dd24da4ac331aaf@mail.gmail.com
Whole thread Raw
In response to Re: BUG #5358: Throwing unexpected ERROR  (Gurjeet Singh <singh.gurjeet@gmail.com>)
Responses Re: BUG #5358: Throwing unexpected ERROR  (Gurjeet Singh <singh.gurjeet@gmail.com>)
List pgsql-bugs
On Wed, Mar 3, 2010 at 7:29 AM, Gurjeet Singh <singh.gurjeet@gmail.com> wrote:
> I just realized that it is the subquery pull-up that is leading to this
> problem, not predicate push-down. Sleeping over it does really help I guess
> :)
>
> So instead of the LIMIT 1000, OFFSET 0 clause is the right choice for
> preventing subquery pull-up without affecting the results.
>
> I don't think the optimizer has the push-down capabiity; I may be wrong.

Maybe I'm just dense, but I don't understand what you're complaining
about here.  The SELECT DISTINCT already acts as an optimization
fence, so why would you need another one?  And what problem would you
expect it to solve?

...Robert

pgsql-bugs by date:

Previous
From: Gurjeet Singh
Date:
Subject: Re: BUG #5358: Throwing unexpected ERROR
Next
From: Gurjeet Singh
Date:
Subject: Re: BUG #5358: Throwing unexpected ERROR