RE: [SQL] Is this BUG or FEATURE?
От | Taral |
---|---|
Тема | RE: [SQL] Is this BUG or FEATURE? |
Дата | |
Msg-id | 000001bdf9f5$cccafa00$3b291f0a@taral обсуждение исходный текст |
Ответ на | Is this BUG or FEATURE? (Vladimir Litovka <pgsqll@barnet.kharkov.ua>) |
Ответы |
RE: [SQL] Is this BUG or FEATURE?
|
Список | 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
В списке pgsql-sql по дате отправления: