Re: [GENERAL] is (not) distinct from

Поиск
Список
Период
Сортировка
От Johann Spies
Тема Re: [GENERAL] is (not) distinct from
Дата
Msg-id CAGZ55DRDyRehXwx827pmsa7992Uqmx1=oKG4vpNdW5-9N6B3QA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] is (not) distinct from  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: [GENERAL] is (not) distinct from  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
On 28 February 2017 at 17:06, Adrian Klaver <adrian.klaver@aklaver.com> wrote:

I have not worked through all this but at first glance I suspect:

select distinct b.* from b ...

is distinct from ...

constitutes a double negative.

What happens if you eliminate the first distinct?



Thanks Adrian,

The dynamics of the data has changed because of data updates so an exact comparison is not possible.

Other tests now confirm that the 28 records are identical in both tables.
The results then become more confusing:

If I remove the first distinct
and use "is distinct from" 

I get 756 rows

and when I use "is not distinct from"

I get 28.

In the first (756) case when I use "group by" the result of the first query is exactly the same as the second one.

Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [GENERAL] Understanding pg_last_xlog_receive_location
Следующее
От: "Sven R. Kunze"
Дата:
Сообщение: Re: [GENERAL] ERROR: functions in index expression must be markedIMMUTABLE