Re: problem with distinct not distincting...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: problem with distinct not distincting...
Дата
Msg-id 15100.1350489616@sss.pgh.pa.us
обсуждение исходный текст
Ответ на problem with distinct not distincting...  (John Beynon <john@kyan.com>)
Список pgsql-general
John Beynon <john@kyan.com> writes:
> I have a pretty basic query;
> select distinct on (name) name, length(name) from
> drugs
> where customer_id IS NOT NULL
> order by name;

> which I'd expect to only return me a single drug name if there are
> duplicates, yet I get

> name | length
> ==========
> Roaccutane | 10
> Roaccutane | 10

> table encoding is UTF8...

> I'm scratching my head!

Yeah, me too.  What PG version is this exactly?  What does EXPLAIN
show for the query?  Can you extract a self-contained test case?

            regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_stats in 9.2
Следующее
От: Mathew Thomas
Дата:
Сообщение: Re: transaction log file "000000010000097600000051" could not be archived: too many failures