| От | Bradley Kieser |
|---|---|
| Тема | PG 7.1: VIEW returns fewer rows than equivalent select |
| Дата | |
| Msg-id | 3D399676.5080905@kieser.net обсуждение исходный текст |
| Ответы |
Re: PG 7.1: VIEW returns fewer rows than equivalent select
|
| Список | pgsql-bugs |
Hi,
I created a view with this SQL:
create view category_type
as
select l1.id as cat_id, l1.description as cat_desc,l2.id as cat_typ_id,
l2.description as cat_type_desc,p.id as link_id
from levels l1
join product_category p on p.category = l1.id
and p.category_type=9
join product_category p2 on p2.product = p.product
and p2.category_type=17
join levels l2 on p2.category = l2.id
;
When I run it, it returns 36 rows.
Now, if I cut and paste simply the SELECT part and run it, I get the
correct number of rows, 170.
The last column (link_id) ensures that these rows are not duplicate so
this is not a duplicate thing and I can see rows that should be there
but are not.
I am running PG7.1 on Mandrake 8.1 (Linux).
Brad
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера