Re: select DISTINCT not ordering the returned rows

From: Ioana Danes <ioanasoftware(at)yahoo(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: select DISTINCT not ordering the returned rows
Date: 2011-03-02 21:02:39
Message-ID: 538025.93750.qm@web120106.mail.ne1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I totally agree with you and the problem is gonna be fixed. I just needed a temporary solution until the patch goes out.

Thank you,
Ioana

--- On Wed, 3/2/11, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> Subject: Re: [GENERAL] select DISTINCT not ordering the returned rows
> To: "Ioana Danes" <ioanasoftware(at)yahoo(dot)ca>
> Cc: "PostgreSQL General" <pgsql-general(at)postgresql(dot)org>
> Received: Wednesday, March 2, 2011, 3:44 PM
> Ioana Danes <ioanasoftware(at)yahoo(dot)ca>
> writes:
> > I upgraded postgres from 8.3 to 9.0.3 and I have an
> issue with the order of the returned rows.
>
> Your application is simply broken if it assumes that
> DISTINCT results in
> ordering the rows.  The only thing that guarantees
> that is an ORDER BY.
>
> You could probably work around it for the short term by
> unsetting
> enable_hashagg, but you really ought to fix the query
> instead.
>
>            
> regards, tom lane
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hannes Erven 2011-03-02 22:24:04 Re: Per-session memory footprint (9.0/windows)
Previous Message Thomas Kellerer 2011-03-02 20:46:50 Re: select DISTINCT not ordering the returned rows