From: | "Taral" <taral(at)mail(dot)utexas(dot)edu> |
---|---|
To: | <doka(at)root(dot)webest(dot)com>, "PgSQL-sql" <pgsql-sql(at)postgreSQL(dot)org> |
Cc: | <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | RE: [SQL] Is this BUG or FEATURE? |
Date: | 1998-10-17 17:44:33 |
Message-ID: | 000001bdf9f5$cccafa00$3b291f0a@taral |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-sql |
> create table AAA (anum int2, aname char(16), ata int4 default 0);
> insert into AAA values (0, '0');
> insert into AAA values (1, '1');
> -- Note: ata hasn't initialized!
Yes it has. ata = 0 in both because you set a default.
> test=> select * from aaa, bbb where bnum = ata;
> NOTICE: ExecInitMergeJoin: left and right sortop's are unequal!
> anum| aname|ata|bnum| bname
> ----+----------------+---+----+----------------
> 0|0 | 0| 0|0
> 1|1 | 0| 0|0
> (2 rows)
You asked for all cases where bnum = ata. I assume select * from aaa,bbb;
would have returned:
anum| aname|ata|bnum| bname
----+----------------+---+----+----------------
0|0 | 0| 0|0
0|0 | 0| 1|1
1|1 | 0| 0|0
1|1 | 0| 1|1
Now filter for bnum=ata and you get two rows.
Am I wrong here?
Taral
From | Date | Subject | |
---|---|---|---|
Next Message | Vladimir Litovka | 1998-10-17 17:48:31 | RE: [SQL] Is this BUG or FEATURE? |
Previous Message | Tom Lane | 1998-10-17 17:21:54 | Re: [HACKERS] SELECT ... LIMIT (trial implementation) |
From | Date | Subject | |
---|---|---|---|
Next Message | Vladimir Litovka | 1998-10-17 17:48:31 | RE: [SQL] Is this BUG or FEATURE? |
Previous Message | Vladimir Litovka | 1998-10-17 13:19:15 | Is this BUG or FEATURE? |