Re: BUG #4748: hash join and sort-merge join make different results

From: "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Roman Kononov <kononov(at)ftml(dot)net>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4748: hash join and sort-merge join make different results
Date: 2009-04-03 19:46:51
Message-ID: 1238788011.11994.14.camel@analise3.cresoltec.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Em Sex, 2009-04-03 às 15:10 -0400, Alvaro Herrera escreveu:
> Roman Kononov wrote:
>
> > Description: hash join and sort-merge join make different results
> > Details:
> >
> > test-std=# create table t(s int,i interval);
> > CREATE TABLE
> > test-std=# insert into t values (0,'30 days'), (1,'1 month');
> > INSERT 0 2
> > test-std=# select * from t as a, t as b where a.i=b.i;
>
> Reproducible in 8.2.13 as well ..

I could reproduce this once in a database that already have a table
named "t", then after i did dropped it i couldn't anymore.

I'm using 8.3.7.

# create table tt_01(s int,i interval);
CREATE TABLE

# insert into tt_01 values (0,'30 days'), (1,'1 month');
INSERT 0 2

# select * from tt_01 as a, tt_01 as b where a.i=b.i;
s | i | s | i
---+---------+---+---------
0 | 30 days | 0 | 30 days
0 | 30 days | 1 | 1 mon
1 | 1 mon | 0 | 30 days
1 | 1 mon | 1 | 1 mon
(4 registros)

# ANALYZE ;
ANALYZE

# select * from tt_01 as a, tt_01 as b where a.i=b.i;
s | i | s | i
---+---------+---+---------
0 | 30 days | 0 | 30 days
0 | 30 days | 1 | 1 mon
1 | 1 mon | 0 | 30 days
1 | 1 mon | 1 | 1 mon
(4 registros)

--
Dickson S. Guedes
mail/xmpp: guedes(at)guedesoft(dot)net - skype: guediz
http://guedesoft.net - http://planeta.postgresql.org.br

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-04-03 19:57:48 Re: BUG #4748: hash join and sort-merge join make different results
Previous Message Jaime Casanova 2009-04-03 19:38:18 Re: BUG #4748: hash join and sort-merge join make different results