Re: Fixing the representation of ORDER BY/GROUP BY/DISTINCT

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Fixing the representation of ORDER BY/GROUP BY/DISTINCT
Date: 2008-08-01 12:10:18
Message-ID: 87protgclx.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> This is important for making the world safe for hashed DISTINCT, since
> AFAICS we probably can't ever use hashing for DISTINCT ON --- its definition
> is too dependent on the assumption of sorting.

I don't think that's true. We could store the sort key in the hash along with
the resulting tuple and replace the resulting tuple iff the new sort key is
less than the old sort key.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's Slony Replication support!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2008-08-01 12:13:44 Re: Fixing the representation of ORDER BY/GROUP BY/DISTINCT
Previous Message Magnus Hagander 2008-08-01 11:59:27 Re: pg crashing