Remove deprecated containment operators for contrib types.
authorTom Lane
Fri, 5 Mar 2021 15:45:41 +0000 (10:45 -0500)
committerTom Lane
Fri, 5 Mar 2021 15:45:41 +0000 (10:45 -0500)
Since PG 8.2, @ and ~ have been deprecated aliases for the containment
operators @> and <@.  It seems like enough time has passed to actually
remove them, so do so.

This completes the project begun in commit 2f70fdb06.  Note that in
the core types, the relation to the preferred operator names was
reversed from what it is in these contrib modules.  The confusion
that induced was a large part of the reason for deprecation.

Justin Pryzby

Discussion: https://postgr.es/m/20201027032511[email protected]

14 files changed:
contrib/cube/Makefile
contrib/cube/cube--1.4--1.5.sql [new file with mode: 0644]
contrib/cube/cube.control
contrib/hstore/hstore--1.7--1.8.sql
contrib/intarray/Makefile
contrib/intarray/intarray--1.4--1.5.sql [new file with mode: 0644]
contrib/intarray/intarray.control
contrib/seg/Makefile
contrib/seg/seg--1.3--1.4.sql [new file with mode: 0644]
contrib/seg/seg.control
doc/src/sgml/cube.sgml
doc/src/sgml/hstore.sgml
doc/src/sgml/intarray.sgml
doc/src/sgml/seg.sgml

index 54f609db17156fdaf9f0b9b447038a42053990fd..cf195506c717c55c680a0210bb154a8ea8a064a4 100644 (file)
@@ -7,7 +7,7 @@ OBJS = \
    cubeparse.o
 
 EXTENSION = cube
-DATA = cube--1.2.sql cube--1.2--1.3.sql cube--1.3--1.4.sql \
+DATA = cube--1.2.sql cube--1.2--1.3.sql cube--1.3--1.4.sql cube--1.4--1.5.sql \
    cube--1.1--1.2.sql cube--1.0--1.1.sql
 PGFILEDESC = "cube - multidimensional cube data type"
 
diff --git a/contrib/cube/cube--1.4--1.5.sql b/contrib/cube/cube--1.4--1.5.sql
new file mode 100644 (file)
index 0000000..54492e5
--- /dev/null
@@ -0,0 +1,8 @@
+/* contrib/cube/cube--1.4--1.5.sql */
+
+-- complain if script is sourced in psql, rather than via ALTER EXTENSION
+\echo Use "ALTER EXTENSION cube UPDATE TO '1.5'" to load this file. \quit
+
+-- Remove @ and ~
+DROP OPERATOR @ (cube, cube);
+DROP OPERATOR ~ (cube, cube);
index 3e238fc9374acb6d0367c3bafb309e0f4f530432..50427ec1170fd45bc20ff76205aff5b8aab99ebc 100644 (file)
@@ -1,6 +1,6 @@
 # cube extension
 comment = 'data type for multidimensional cubes'
-default_version = '1.4'
+default_version = '1.5'
 module_pathname = '$libdir/cube'
 relocatable = true
 trusted = true
index d80a1384658ad8cd50da71a3e0efcbf65a697886..fb450a9d6ab1f715d39d8c8dec0e1f252e9ddca0 100644 (file)
@@ -11,3 +11,7 @@ LANGUAGE C STRICT IMMUTABLE PARALLEL SAFE;
 ALTER TYPE hstore SET (
   SUBSCRIPT = hstore_subscript_handler
 );
+
+-- Remove @ and ~
+DROP OPERATOR @ (hstore, hstore);
+DROP OPERATOR ~ (hstore, hstore);
index 01faa36b10732dc12b070b3e35d307c674dc6dcc..3817c1669ab95380335a45977797d63e18a79551 100644 (file)
@@ -12,7 +12,7 @@ OBJS = \
    _intbig_gist.o
 
 EXTENSION = intarray
-DATA = intarray--1.3--1.4.sql intarray--1.2--1.3.sql \
+DATA = intarray--1.4--1.5.sql intarray--1.3--1.4.sql intarray--1.2--1.3.sql \
    intarray--1.2.sql intarray--1.1--1.2.sql \
    intarray--1.0--1.1.sql
 PGFILEDESC = "intarray - functions and operators for arrays of integers"
diff --git a/contrib/intarray/intarray--1.4--1.5.sql b/contrib/intarray/intarray--1.4--1.5.sql
new file mode 100644 (file)
index 0000000..2454ebc
--- /dev/null
@@ -0,0 +1,8 @@
+/* contrib/intarray/intarray--1.4--1.5.sql */
+
+-- complain if script is sourced in psql, rather than via ALTER EXTENSION
+\echo Use "ALTER EXTENSION intarray UPDATE TO '1.5'" to load this file. \quit
+
+-- Remove @ and ~
+DROP OPERATOR @ (_int4, _int4);
+DROP OPERATOR ~ (_int4, _int4);
index bbc837c5732ec8d843e3d949dda4ac41cdc7fa89..c3ff753e2cfd99ab92dd25894db20256a6fbf183 100644 (file)
@@ -1,6 +1,6 @@
 # intarray extension
 comment = 'functions, operators, and index support for 1-D arrays of integers'
-default_version = '1.4'
+default_version = '1.5'
 module_pathname = '$libdir/_int'
 relocatable = true
 trusted = true
index f3578a86340ddaee1cfdf721d061ac53b08e129b..bb63e835067f42e25404a0618f2c33ca04ee9091 100644 (file)
@@ -7,7 +7,7 @@ OBJS = \
    segparse.o
 
 EXTENSION = seg
-DATA = seg--1.1.sql seg--1.1--1.2.sql seg--1.2--1.3.sql \
+DATA = seg--1.1.sql seg--1.1--1.2.sql seg--1.2--1.3.sql seg--1.3--1.4.sql \
    seg--1.0--1.1.sql
 PGFILEDESC = "seg - line segment data type"
 
diff --git a/contrib/seg/seg--1.3--1.4.sql b/contrib/seg/seg--1.3--1.4.sql
new file mode 100644 (file)
index 0000000..13babdd
--- /dev/null
@@ -0,0 +1,8 @@
+/* contrib/seg/seg--1.3--1.4.sql */
+
+-- complain if script is sourced in psql, rather than via ALTER EXTENSION
+\echo Use "ALTER EXTENSION seg UPDATE TO '1.4'" to load this file. \quit
+
+-- Remove @ and ~
+DROP OPERATOR @ (seg, seg);
+DROP OPERATOR ~ (seg, seg);
index 9ac308084813dafc2a457602d641eb294547d467..e2c6a4750fccdb605fb94b573b58136c833b3b6a 100644 (file)
@@ -1,6 +1,6 @@
 # seg extension
 comment = 'data type for representing line segments or floating-point intervals'
-default_version = '1.3'
+default_version = '1.4'
 module_pathname = '$libdir/seg'
 relocatable = true
 trusted = true
index 3dd89bb14d739ab0f486c0adda12fe9ee220c6a1..adf8dbaa91725a09cfd34082e33d74bdabf96385 100644 (file)
    
   
 
-  
-   (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.  Notice that the old names
-   are reversed from the convention formerly followed by the core geometric
-   data types!)
-  
-
   
    In addition to the above operators, the usual comparison
    operators shown in  are
index e867fcc5aee55c4c13d82567a37a3b3d8ac72c80..db5779052a564c80802313e09d3fad4f25a956ac 100644 (file)
@@ -318,16 +318,6 @@ key => NULL
     
   
 
-  
-  
-   Prior to PostgreSQL 8.2, the containment operators @>
-   and <@ were called @ and ~,
-   respectively. These names are still available, but are deprecated and will
-   eventually be removed. Notice that the old names are reversed from the
-   convention formerly followed by the core geometric data types!
-   
-  
-
   
    <type>hstore</type> Functions
     
index af44c7b2142d1d36be7e0778ef3b35d881278b35..dfe98279c09ca390cecf03fc6e3b4ab645847b30 100644 (file)
    
   
 
-  
-   (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.  Notice that the old names are reversed from the convention
-   formerly followed by the core geometric data types!)
-  
-
   
    The operators &&@> and
    <@ are equivalent to PostgreSQL's built-in
index e0dfbc76cf35056c11052eee09aac70653b94af6..9be69e3609fa558d7a5db3b3221958d5f2ffa18c 100644 (file)
@@ -352,14 +352,6 @@ test=> select '6.25 .. 6.50'::seg as "pH";
     
   
 
-  
-   (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.  Notice that the old names
-   are reversed from the convention formerly followed by the core geometric
-   data types!)
-  
-
   
    In addition to the above operators, the usual comparison
    operators shown in  are