Re: Does anybody use ORDER BY x USING y?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hannu Krosing <hannu(at)skype(dot)net>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, John Hansen <john(at)geeknet(dot)com(dot)au>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Does anybody use ORDER BY x USING y?
Date: 2005-09-18 23:04:05
Message-ID: 432DF265.2070109@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

>Hannu Krosing <hannu(at)skype(dot)net> writes:
>
>
>>I think that placement of NULL's should be a property of ORDER BY and
>>separated from opclass.
>>
>>
>
>That would be an extremely bad idea, because it would immediately remove
>index scans as one way to meet an ORDER BY. I'm thinking in terms of
>NULL high/low as becoming a property of btree opclasses so that indexes
>know what to do with nulls, and so that the planner can tell whether a
>given index meets the required sort ordering or not.
>
>Alternatively we could define an index's ordering as being specified by
>both an opclass and a NULL direction, but that doesn't seem better to
>me; especially since the null-direction concept doesn't seem meaningful
>for non-btree indexes at all, but a structure like that would require us
>to associate a null-direction with all indexes.
>
>
>
>

Not sure I understand ... in fact I am sure I don't :-)

Are you envisioning that the null direction will be able to be selected
at the time of the select statement?

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2005-09-19 00:02:38 Re: Does anybody use ORDER BY x USING y?
Previous Message Tom Lane 2005-09-18 22:45:39 Re: Does anybody use ORDER BY x USING y?