Re: pgsql: Generalize hash and ordering support in amapi - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Generalize hash and ordering support in amapi
Date
Msg-id 1113684.1741373446@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Generalize hash and ordering support in amapi  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-committers
Peter Eisentraut <peter@eisentraut.org> writes:
> I have committed fixes for these issues along the lines you suggested.

Thanks.  There is a typo in hashhandler:

-   amroutine->amcancrosscompare = true;
+   amroutine->amconsistentequality = true;
+   amroutine->amconsistentequality = false;

The second line should be setting amconsistentordering = false.

Also, may I suggest one more thing?  I think the test in
comparison_ops_are_compatible should be just

-           if (amroutine->amcanorder && amroutine->amconsistentordering)
+           if (amroutine->amconsistentordering)

(and the comment for it needs adjustment too).  To my mind,
amconsistentordering is a static declaration that operators
within one of the AM's opfamilies are expected to have this
property.  That could be true whether or not the AM is capable
of returning tuples in order.  So although these flags might
commonly be set together, I think they are independent
properties.

            regards, tom lane



pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Include column name in build_attrmap_by_position's error reports
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Make postgres_fdw's query_cancel test less flaky.