From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sat, 16 Aug 2014 16:53:57 +0000 (-0400)
Subject: Fix bogus commutator/negator links for JSONB containment operators.
X-Git-Tag: REL9_4_BETA3~105
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=30c05261ae842e2475fb06c7746de8623bcca731;p=postgresql

Fix bogus commutator/negator links for JSONB containment operators.

<@ and @> are each other's commutators, but they were incorrectly marked
as being each other's negators instead.  (This was actually questioned
in a comment in the original commit, but nobody followed through :-(.)
Per bug #11178 from Christian Pronovost.

In passing, fix some JSONB operator descriptions that were randomly
different from the phrasing of every other similar description.

catversion bump for pg_catalog contents change.
---

diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index 754407e971..cb82c9334c 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -53,6 +53,6 @@
  */
 
 /*							yyyymmddN */
-#define CATALOG_VERSION_NO	201407151
+#define CATALOG_VERSION_NO	201408161
 
 #endif
diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h
index f8b4a65b99..d7dcd1c23a 100644
--- a/src/include/catalog/pg_operator.h
+++ b/src/include/catalog/pg_operator.h
@@ -1792,11 +1792,10 @@ DESCR("less than");
 DATA(insert OID = 3243 (  ">"		PGNSP PGUID b f f 3802 3802 16 3242 3244 jsonb_gt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
 DATA(insert OID = 3244 (  "<="	PGNSP PGUID b f f 3802 3802 16 3245 3243 jsonb_le scalarltsel scalarltjoinsel ));
-DESCR("less than or equal to");
+DESCR("less than or equal");
 DATA(insert OID = 3245 (  ">="	PGNSP PGUID b f f 3802 3802 16 3244 3242 jsonb_ge scalargtsel scalargtjoinsel ));
-DESCR("greater than or equal to");
-/* No commutator? */
-DATA(insert OID = 3246 (  "@>"	   PGNSP PGUID b f f 3802 3802 16 0 3250 jsonb_contains contsel contjoinsel ));
+DESCR("greater than or equal");
+DATA(insert OID = 3246 (  "@>"	   PGNSP PGUID b f f 3802 3802 16 3250 0 jsonb_contains contsel contjoinsel ));
 DESCR("contains");
 DATA(insert OID = 3247 (  "?"	   PGNSP PGUID b f f 3802 25 16 0 0 jsonb_exists contsel contjoinsel ));
 DESCR("exists");
@@ -1804,8 +1803,8 @@ DATA(insert OID = 3248 (  "?|"	   PGNSP PGUID b f f 3802 1009 16 0 0 jsonb_exist
 DESCR("exists any");
 DATA(insert OID = 3249 (  "?&"	   PGNSP PGUID b f f 3802 1009 16 0 0 jsonb_exists_all contsel contjoinsel ));
 DESCR("exists all");
-DATA(insert OID = 3250 (  "<@"	   PGNSP PGUID b f f 3802 3802 16 0 3246 jsonb_contained contsel contjoinsel ));
-DESCR("contained");
+DATA(insert OID = 3250 (  "<@"	   PGNSP PGUID b f f 3802 3802 16 3246 0 jsonb_contained contsel contjoinsel ));
+DESCR("is contained by");
 
 /*
  * function prototypes