[postgis-tickets] r15691 - #3841, handle empty == empty when types are same too
Paul Ramsey
pramsey at cleverelephant.ca
Mon Sep 11 10:55:38 PDT 2017
Author: pramsey
Date: 2017-09-11 10:55:38 -0700 (Mon, 11 Sep 2017)
New Revision: 15691
Modified:
trunk/postgis/geography_btree.c
Log:
#3841, handle empty == empty when types are same too
Modified: trunk/postgis/geography_btree.c
===================================================================
--- trunk/postgis/geography_btree.c 2017-09-11 17:52:50 UTC (rev 15690)
+++ trunk/postgis/geography_btree.c 2017-09-11 17:55:38 UTC (rev 15691)
@@ -73,8 +73,11 @@
/* Empty == Empty */
if (g1_is_empty && g2_is_empty)
{
- /* Actually make it so that POINT EMPTY < LINESTRING EMPTY */
- return gserialized_get_type(g1) < gserialized_get_type(g2) ? -1 : 1;
+ /* POINT EMPTY == POINT EMPTY */
+ /* POINT EMPTY < LINESTRING EMPTY */
+ uint32_t t1 = gserialized_get_type(g1);
+ uint32_t t2 = gserialized_get_type(g2);
+ return t1 == t2 ? 0 : (t1 < t2 ? -1 : 1);
}
/* Empty < Non-empty */
More information about the postgis-tickets
mailing list