From 30c05261ae842e2475fb06c7746de8623bcca731 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 16 Aug 2014 12:53:57 -0400 Subject: [PATCH] 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. --- src/include/catalog/catversion.h | 2 +- src/include/catalog/pg_operator.h | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) 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 -- 2.40.0