Re: Wrong rows selected with view

Поиск
Список
Период
Сортировка
От Andreas Seltenreich
Тема Re: Wrong rows selected with view
Дата
Msg-id 87irushcxg.fsf@gate450.dyndns.org
обсуждение исходный текст
Ответ на Wrong rows selected with view  (Bill Moseley <moseley@hank.org>)
Ответы Re: Wrong rows selected with view  (Bill Moseley <moseley@hank.org>)
Список pgsql-general
Bill Moseley writes:

> PostgreSQL 7.4.8 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.0.2 20050816 (prerelease) (Debian 4.0.1-5)
>
> Hopefully this is something simple -- I assume it's a problem with my
> SQL.  But it looks really weird to me at this late hour.
>
> I have some tables for managing workshops, and I have a view (below).
> I noticed for a given select it was returning the wrong number of
> rows.  I expected seven rows back, but only got six.
>
> I rewrote the view with just the joins and it returned the correct number
> of rows.  So I started the brute force method of removing one thing at
> a time in the view to see what would make it start returning the
> correct number of rows.  That just confused me more.

How does the query plan change when you make those changes? If it only
occurs if a certain index is used, it might be corrupt (=> REINDEX).

regards,
Andreas

В списке pgsql-general по дате отправления:

Предыдущее
От: "Thies C. Arntzen"
Дата:
Сообщение: Re: shouldn't postgres know the numer of rows in a (sorted) result-set before returning the first row?
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: shouldn't postgres know the numer of rows in a (sorted) result-set before returning the first row?