]> granicus.if.org Git - postgresql/commitdiff
Remove bogus entries in gist point_ops operator class.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 17 Dec 2011 23:51:00 +0000 (18:51 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 17 Dec 2011 23:51:00 +0000 (18:51 -0500)
These entries could never be matched to an index clause because they don't
have the index datatype on the left-hand side of the operator.  (Their
commutators are in the opclass, which is sensible, but that doesn't mean
these operators should be.)  Spotted by a test that I recently added to
opr_sanity to catch exactly this type of thinko.  AFAICT there is no code
in gistproc.c that is specifically meant to cover these cases, so nothing
to remove at that level.

src/include/catalog/catversion.h
src/include/catalog/pg_amop.h
src/test/regress/expected/opr_sanity.out

index eb343545915c831ce52a0a79ee32cf784f608f62..fd424fa8d0c27ac9de417c3c5c0d06ed8e37d1cf 100644 (file)
@@ -53,6 +53,6 @@
  */
 
 /*                                                     yyyymmddN */
-#define CATALOG_VERSION_NO     201112171
+#define CATALOG_VERSION_NO     201112172
 
 #endif
index cb394e03e403548f2dbdba309ff5ecd6fc3f958e..63cf43322f8f425f05ff5d8fc2d8fe8c9a07db16 100644 (file)
@@ -605,11 +605,8 @@ DATA(insert (      1029   600 600 5 s      508 783 0 ));
 DATA(insert (  1029   600 600 10 s 509 783 0 ));
 DATA(insert (  1029   600 600 6 s      510 783 0 ));
 DATA(insert (  1029   600 600 15 o 517 783 1970 ));
-DATA(insert (  1029   603 600 27 s 433 783 0 ));
 DATA(insert (  1029   600 603 28 s 511 783 0 ));
-DATA(insert (  1029   604 600 47 s 757 783 0 ));
 DATA(insert (  1029   600 604 48 s 756 783 0 ));
-DATA(insert (  1029   718 600 67 s 759 783 0 ));
 DATA(insert (  1029   600 718 68 s 758 783 0 ));
 
 
index 8e4004ed311e11af3d28ffd57d1d23d49791b8d2..51ab6e5e36bf9f91e082b7c054a408e79b6a51e2 100644 (file)
@@ -1041,11 +1041,8 @@ ORDER BY 1, 2, 3;
         783 |           15 | <->
         783 |           16 | @>
         783 |           18 | =
-        783 |           27 | @>
         783 |           28 | <@
-        783 |           47 | @>
         783 |           48 | <@
-        783 |           67 | @>
         783 |           68 | <@
        2742 |            1 | &&
        2742 |            1 | @@
@@ -1068,7 +1065,7 @@ ORDER BY 1, 2, 3;
        4000 |           12 | <=
        4000 |           14 | >=
        4000 |           15 | >
-(58 rows)
+(55 rows)
 
 -- Check that all opclass search operators have selectivity estimators.
 -- This is not absolutely required, but it seems a reasonable thing
@@ -1105,10 +1102,7 @@ WHERE NOT EXISTS(SELECT 1 FROM pg_opclass AS p2
                    AND binary_coercible(p2.opcintype, p1.amoplefttype));
  amopfamily | amopstrategy | amopopr 
 ------------+--------------+---------
-       1029 |           27 |     433
-       1029 |           47 |     757
-       1029 |           67 |     759
-(3 rows)
+(0 rows)
 
 -- Operators that are primary members of opclasses must be immutable (else
 -- it suggests that the index ordering isn't fixed).  Operators that are