Re: question about alternate ordering of results

From: hamann(dot)w(at)t-online(dot)de
To: pgsql-general(at)postgresql(dot)org
Subject: Re: question about alternate ordering of results
Date: 2012-04-10 16:50:54
Message-ID: wolfgang-1120410185054.A0115484@amadeus3.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi Tom,

declaring another operator class helped. At first, however,
results were sorted deifferent than expected. A little gdb session revealed that
if fact only the FUNCTION 1 entry in the operator class is used

Regards
Wolfgang Hamann

>>
>> hamann(dot)w(at)t-online(dot)de writes:
>> > Now, in versions 8 and later the "using <&-" is rejected,
>> > the ordering op "needs to be < or > member of a btree operator class".
>> > What is needed to create the old behaviour again
>> > - create a complete operator class, including new names for the unchanged equals/not equals function?
>>
>> Yes. It sounds like you have pretty much all the spare parts you need,
>> you just have to collect them together into an opclass for each
>> ordering you want.
>>
>> > Is this relevant to performance?
>>
>> Somewhat, in that it helps the planner optimize ordering considerations.
>> But IIRC the main argument for tightening it up was to catch mistakes
>> wherein somebody says "ORDER BY x USING &&", or some other operator that
>> doesn't produce a consistent sort order.
>>
>> regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2012-04-10 17:55:13 PgNext CFP still open
Previous Message Fujii Masao 2012-04-10 15:07:41 Re: [streaming replication] 9.1.3 streaming replication bug ?