Re: Rethinking representation of sort/hash semantics in queries and plans

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Rethinking representation of sort/hash semantics in queries and plans
Date: 2010-11-28 14:45:54
Message-ID: 20101128144554.GA3796@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Nov 27, 2010 at 10:02:33PM -0500, Tom Lane wrote:
> In recent discussions of the plan-tree representation for KNNGIST index
> scans, there seemed to be agreement that it'd be a good idea to explicitly
> represent the expected sort ordering of the output. While thinking about
> how best to do that, it struck me that there's some pretty horrendous
> impedance mismatches in the way we do things now. Different parts of the
> system use two different representations of sort ordering:
>
> * A sort operator (which can have < or > semantics) plus nulls-first flag
>
> * A btree opfamily plus direction and nulls-first flags

Sounds like a good idea to me. Quite aside from the performance issues,
having one way to represent things will make it clearer what's going on
and easier to extend in the future.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patriotism is when love of your own people comes first; nationalism,
> when hate for people other than your own comes first.
> - Charles de Gaulle

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marti Raudsepp 2010-11-28 15:14:53 [PATCH] Return command tag 'REPLACE X' for CREATE OR REPLACE statements.
Previous Message Jan Urbański 2010-11-28 14:01:44 Re: PLy_malloc and plperl mallocs