Re: incorrect query result using complex structures (views?)
От | Kovacs Zoltan |
---|---|
Тема | Re: incorrect query result using complex structures (views?) |
Дата | |
Msg-id | Pine.LNX.4.21.0105081923240.13657-100000@pc10.radnoti-szeged.sulinet.hu обсуждение исходный текст |
Ответ на | Re: incorrect query result using complex structures (views?) (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: incorrect query result using complex structures (views?)
|
Список | pgsql-hackers |
On Tue, 8 May 2001, Tom Lane wrote: > Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu> writes: > > I cannot decide if this is a serious bug or not --- some queries from > > complex views may give strange results. The next few days I will try to > > find the point where the problem is but now I can only include the data > > structure and the SELECT statements which don't give the correct result. > > So ... um ... what do you consider incorrect about the results? > > regards, tom lane The SELECTs give something like this: tir=> select az, (select cikk from szallitolevel_tetele_ervenyes where cikk = c.az) from cikk c limit 20; az|?column? ------+-------- 100191| 100202| 100203| 100006| 100016| 100027| 100028| 100039| 100080| 100099| 100100| 100102| 100105| 100106| 100107| 100108| 100109| 100110| 100111| 100112| (20 rows) But cikk.az and szallitolevel_tetele_ervenyes.cikk should be the same, so the correct output for this query would be like this: tir=> select c.az, cikk from cikk c, szallitolevel_tetele_ervenyes s where c.az=s.cikk limit 20; az| cikk ------+------ 100743|100743 100742|100742 101080|101080 101075|101075 101084|101084 100124|100124 100467|100467 101080|101080 101163|101163 100517|100517 101080|101080 101163|101163 100719|100719 100406|100406 101080|101080 100286|100286 100367|100367 100406|100406 101080|101080 100546|100546 (20 rows) Thanks in advance. Zoltan
В списке pgsql-hackers по дате отправления: