Re: [GENERAL] problem with distinct not distincting...

2012-10-17 Thread John Beynon
to read / answer. It stumped me for a while! John. On Wed, Oct 17, 2012 at 4:01 PM, David Johnston wrote: >> -Original Message- >> From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- >> ow...@postgresql.org] On Behalf Of John Beynon >> Sent: Wednesday, O

[GENERAL] problem with distinct not distincting...

2012-10-17 Thread John Beynon
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 U