From: Peter Geoghegan Date: Thu, 6 Mar 2014 00:43:04 +0000 (-0800) Subject: Add contains operator X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=a4ae3d7fbd3f30aabe77661a5be164e206ce088c;p=users%2Fandresfreund%2Fpostgres.git Add contains operator --- diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h index c522e0fdd6..3b290c97ab 100644 --- a/src/include/catalog/pg_operator.h +++ b/src/include/catalog/pg_operator.h @@ -1793,7 +1793,9 @@ DATA(insert OID = 3244 ( "<=" PGNSP PGUID b f f 3802 3802 16 3245 3243 jsonb_le DESCR("less than or equal to"); 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 0 jsonb_contains contsel contjoinsel )); +DESCR("contains"); /* diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index a079376362..df7f343c98 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -4554,6 +4554,8 @@ DATA(insert OID = 4044 ( jsonb_cmp PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 DESCR("less-equal-greater"); DATA(insert OID = 4045 ( jsonb_hash PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 23 "3802" _null_ _null_ _null_ _null_ jsonb_hash _null_ _null_ _null_ )); DESCR("hash"); +DATA(insert OID = 4046 ( jsonb_contains PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 16 "3802 3802" _null_ _null_ _null_ _null_ jsonb_contains _null_ _null_ _null_ )); +DESCR("implementation of @> operator"); DATA(insert OID = 3479 ( gjsonb_in PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 3801 "2275" _null_ _null_ _null_ _null_ gjsonb_in _null_ _null_ _null_ )); DESCR("GiST support"); DATA(insert OID = 3480 ( gjsonb_out PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 2275 "3801" _null_ _null_ _null_ _null_ gjsonb_out _null_ _null_ _null_ ));