"Roman Kononov" writes:
> Description:too few pathkeys for mergeclauses
I've applied a patch for this. Thanks for the report.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.post
I wrote:
> I think what this case may show is simply that the consistency
> checking I added to create_mergejoin_plan in 8.3 is too strict.
> Not quite convinced yet though.
After further review I think that is the correct approach to take.
The proximate cause of the problem is that
find_mergecla
Heikki Linnakangas writes:
> Version 8.3 has the same bug, apparently introduced along with the
> equivalence classes. In 8.2, the merge condition is reduced into (i=x
> AND i=y), IOW the planner eliminates the duplicate condition. I believe
> 8.2 would otherwise have the same problem as well.
Th
Heikki Linnakangas wrote:
> 2. make_inner_pathkeys_for_merge() should have created sort order (x, y,
> x) for the inner side.
On further thought, that would make no sense. Sort order (x, y) is
always equivalent to (x, y, x).
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
-
Greg Stark wrote:
> On Thu, Jul 16, 2009 at 9:07 PM, Roman Kononov wrote:
>> test=# create table junk(i int);
>> CREATE TABLE
>> test=# select * from junk left outer join (select coalesce(i,1) as x,
>> coalesce(i,2) as y from junk) t on coalesce(i,3)=x and coalesce(i,4)=y and
>> coalesce(i,5)=x;
>>
On Thu, Jul 16, 2009 at 9:07 PM, Roman Kononov wrote:
>
> test=# create table junk(i int);
> CREATE TABLE
> test=# select * from junk left outer join (select coalesce(i,1) as x,
> coalesce(i,2) as y from junk) t on coalesce(i,3)=x and coalesce(i,4)=y and
> coalesce(i,5)=x;
> ERROR: too few pathkey