summaryrefslogtreecommitdiff
path: root/contrib/hstore/hstore.sql.in
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-09-10 17:36:52 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-09-10 17:36:52 +0000
commit684ad6a92fcc33adebdab65c4e7d72a68ba05408 (patch)
tree4cd0fc427b2100214e18452cc528e1b2e2d150fb /contrib/hstore/hstore.sql.in
parentba920e1c9182eac55d5f1327ab0d29b721154277 (diff)
downloadpostgresql-684ad6a92fcc33adebdab65c4e7d72a68ba05408.tar.gz
Rename contrib contains/contained-by operators to @> and <@, per discussion.
Diffstat (limited to 'contrib/hstore/hstore.sql.in')
-rw-r--r--contrib/hstore/hstore.sql.in35
1 files changed, 28 insertions, 7 deletions
diff --git a/contrib/hstore/hstore.sql.in b/contrib/hstore/hstore.sql.in
index 98ca9cfbda..c77fc7d4fb 100644
--- a/contrib/hstore/hstore.sql.in
+++ b/contrib/hstore/hstore.sql.in
@@ -61,6 +61,30 @@ RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE 'C' with (isstrict,iscachable);
+CREATE FUNCTION hs_contained(hstore,hstore)
+RETURNS bool
+AS 'MODULE_PATHNAME'
+LANGUAGE 'C' with (isstrict,iscachable);
+
+CREATE OPERATOR @> (
+ LEFTARG = hstore,
+ RIGHTARG = hstore,
+ PROCEDURE = hs_contains,
+ COMMUTATOR = '<@',
+ RESTRICT = contsel,
+ JOIN = contjoinsel
+);
+
+CREATE OPERATOR <@ (
+ LEFTARG = hstore,
+ RIGHTARG = hstore,
+ PROCEDURE = hs_contained,
+ COMMUTATOR = '@>',
+ RESTRICT = contsel,
+ JOIN = contjoinsel
+);
+
+-- obsolete:
CREATE OPERATOR @ (
LEFTARG = hstore,
RIGHTARG = hstore,
@@ -70,11 +94,6 @@ CREATE OPERATOR @ (
JOIN = contjoinsel
);
-CREATE FUNCTION hs_contained(hstore,hstore)
-RETURNS bool
-AS 'MODULE_PATHNAME'
-LANGUAGE 'C' with (isstrict,iscachable);
-
CREATE OPERATOR ~ (
LEFTARG = hstore,
RIGHTARG = hstore,
@@ -181,8 +200,10 @@ LANGUAGE 'C';
CREATE OPERATOR CLASS gist_hstore_ops
DEFAULT FOR TYPE hstore USING gist
AS
- OPERATOR 7 @ RECHECK,
- --OPERATOR 8 ~ RECHECK,
+ OPERATOR 7 @> RECHECK,
+ --OPERATOR 8 <@ RECHECK,
+ OPERATOR 13 @ RECHECK,
+ --OPERATOR 14 ~ RECHECK,
FUNCTION 1 ghstore_consistent (internal, internal, int4),
FUNCTION 2 ghstore_union (internal, internal),
FUNCTION 3 ghstore_compress (internal),