Re: Rethinking representation of sort/hash semantics in queries and plans - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Rethinking representation of sort/hash semantics in queries and plans
Date
Msg-id 20101128144554.GA3796@svana.org
Whole thread Raw
In response to Rethinking representation of sort/hash semantics in queries and plans  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@svana.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

pgsql-hackers by date:

Previous
From: Jan Urbański
Date:
Subject: Re: PLy_malloc and plperl mallocs
Next
From: Marti Raudsepp
Date:
Subject: [PATCH] Return command tag 'REPLACE X' for CREATE OR REPLACE statements.