Re: Bug in row_number() optimization - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bug in row_number() optimization
Date
Msg-id 4059995.1669393149@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug in row_number() optimization  (Sergey Shinderuk <s.shinderuk@postgrespro.ru>)
Responses Re: Bug in row_number() optimization
List pgsql-hackers
Sergey Shinderuk <s.shinderuk@postgrespro.ru> writes:
> What about user-defined operators? I created my own <= operator for int8 
> which returns true on null input, and put it in a btree operator class. 
> Admittedly, it's weird that (null <= 1) evaluates to true. But does it 
> violate  the contract of the btree operator class or something? Didn't 
> find a clear answer in the docs.

It's pretty unlikely that this would work during an actual index scan.
I'm fairly sure that btree (and other index AMs) have hard-wired
assumptions that index operators are strict.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: checking rd_rules in RelationBuildDesc
Next
From: Ted Yu
Date:
Subject: Re: checking rd_rules in RelationBuildDesc