From ba920e1c9182eac55d5f1327ab0d29b721154277 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 10 Sep 2006 00:29:35 +0000 Subject: Rename contains/contained-by operators to @> and <@, per discussion that agreed these symbols are less easily confused. I made new pg_operator entries (with new OIDs) for the old names, so as to provide backward compatibility while making it pretty easy to remove the old names in some future release cycle. This commit only touches the core datatypes, contrib will be fixed separately. --- doc/src/sgml/func.sgml | 38 +++++++++++++++++++++++++++++--------- doc/src/sgml/indices.sgml | 6 +++--- 2 files changed, 32 insertions(+), 12 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 13209c87a29..f1de523a224 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,4 +1,4 @@ - + Functions and Operators @@ -6498,14 +6498,14 @@ SELECT pg_sleep(1.5); lseg '((-1,0),(1,0))' ?|| lseg '((-1,2),(1,2))' - ~ + @> Contains? - circle '((0,0),2)' ~ point '(1,1)' + circle '((0,0),2)' @> point '(1,1)' - @ + <@ Contained in or on? - point '(1,1)' @ circle '((0,0),2)' + point '(1,1)' <@ circle '((0,0),2)' ~= @@ -6516,6 +6516,15 @@ SELECT pg_sleep(1.5); + + + Before PostgreSQL 8.2, the containment + operators @> and <@ were respectively + called ~ and @. These names are still + available, but are deprecated and will eventually be retired. + + + area @@ -7051,10 +7060,7 @@ SELECT pg_sleep(1.5); available for use with the macaddr type. The function trunc(macaddr) returns a MAC address with the last 3 bytes set to zero. This can be used to - associate the remaining prefix with a manufacturer. The directory - contrib/mac in the source distribution - contains some utilities to create and maintain such an association - table. + associate the remaining prefix with a manufacturer. @@ -7613,6 +7619,20 @@ SELECT NULLIF(value, '(none)') ... t + + @> + contains + ARRAY[1,4,3] @> ARRAY[3,1] + t + + + + <@ + is contained by + ARRAY[2,7] <@ ARRAY[1,7,4,2,6] + t + + || array-to-array concatenation diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml index 5d4ecb6a2a1..17630c586d6 100644 --- a/doc/src/sgml/indices.sgml +++ b/doc/src/sgml/indices.sgml @@ -1,4 +1,4 @@ - + Indexes @@ -225,8 +225,8 @@ CREATE INDEX name ON table &<| |&> |>> - ~ - @ + @> + <@ ~= && -- cgit v1.2.3