git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8c2d8f6)
Remove use of deprecated containment operators in tests
Tue, 3 Nov 2020 08:03:22 +0000 (09:03 +0100)
Tue, 3 Nov 2020 08:20:56 +0000 (09:20 +0100)
Switch @ to <@ and ~ to @> in gist-related tests. The old operator
names have been deprecated and will eventually (possibly soon) be
removed.

Author: Justin Pryzby <pryzby@telsasoft.com>
Discussion: https://www.postgresql.org/message-id/flat/20201027032511.GF9241@telsasoft.com


diff --git a/src/test/regress/expected/create_am.out b/src/test/regress/expected/create_am.out
index b9dc82dd3c3a324cf10fc401fa1a5451c630fd87..730011526a8efcf46a7f62602786759c9a3e9f93 100644 (file)
--- a/src/test/regress/expected/create_am.out
+++ b/src/test/regress/expected/create_am.out
@@ -46,18 +46,18 @@ SET enable_indexscan = ON;
SET enable_bitmapscan = OFF;
EXPLAIN (COSTS OFF)
SELECT * FROM fast_emp4000
- WHERE home_base @ '(200,200),(2000,1000)'::box
+ WHERE home_base <@ '(200,200),(2000,1000)'::box
ORDER BY (home_base[0])[0];
- QUERY PLAN
-----------------------------------------------------------------
+ QUERY PLAN
+-----------------------------------------------------------------
Sort
Sort Key: ((home_base[0])[0])
-> Index Only Scan using grect2ind2 on fast_emp4000
- Index Cond: (home_base @ '(2000,1000),(200,200)'::box)
+ Index Cond: (home_base <@ '(2000,1000),(200,200)'::box)
(4 rows)
SELECT * FROM fast_emp4000
- WHERE home_base @ '(200,200),(2000,1000)'::box
+ WHERE home_base <@ '(200,200),(2000,1000)'::box
ORDER BY (home_base[0])[0];
home_base
-----------------------
diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out
index 17f1383ea49a260d0bea9e6c13139db05cf39fe0..93a8736a3f408d46bb5ee267b499730bcefccc9e 100644 (file)
--- a/src/test/regress/expected/create_index.out
+++ b/src/test/regress/expected/create_index.out
@@ -75,7 +75,7 @@ SET enable_seqscan = ON;
SET enable_indexscan = OFF;
SET enable_bitmapscan = OFF;
SELECT * FROM fast_emp4000
- WHERE home_base @ '(200,200),(2000,1000)'::box
+ WHERE home_base <@ '(200,200),(2000,1000)'::box
ORDER BY (home_base[0])[0];
home_base
-----------------------
@@ -95,7 +95,7 @@ SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL;
278
(1 row)
-SELECT * FROM polygon_tbl WHERE f1 ~ '((1,1),(2,2),(2,1))'::polygon
+SELECT * FROM polygon_tbl WHERE f1 @> '((1,1),(2,2),(2,1))'::polygon
ORDER BY (poly_center(f1))[0];
f1
---------------------
@@ -259,18 +259,18 @@ SET enable_indexscan = ON;
SET enable_bitmapscan = OFF;
EXPLAIN (COSTS OFF)
SELECT * FROM fast_emp4000
- WHERE home_base @ '(200,200),(2000,1000)'::box
+ WHERE home_base <@ '(200,200),(2000,1000)'::box
ORDER BY (home_base[0])[0];
- QUERY PLAN
-----------------------------------------------------------------
+ QUERY PLAN
+-----------------------------------------------------------------
Sort
Sort Key: ((home_base[0])[0])
-> Index Only Scan using grect2ind on fast_emp4000
- Index Cond: (home_base @ '(2000,1000),(200,200)'::box)
+ Index Cond: (home_base <@ '(2000,1000),(200,200)'::box)
(4 rows)
SELECT * FROM fast_emp4000
- WHERE home_base @ '(200,200),(2000,1000)'::box
+ WHERE home_base <@ '(200,200),(2000,1000)'::box
ORDER BY (home_base[0])[0];
home_base
-----------------------
@@ -309,17 +309,17 @@ SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL;
(1 row)
EXPLAIN (COSTS OFF)
-SELECT * FROM polygon_tbl WHERE f1 ~ '((1,1),(2,2),(2,1))'::polygon
+SELECT * FROM polygon_tbl WHERE f1 @> '((1,1),(2,2),(2,1))'::polygon
ORDER BY (poly_center(f1))[0];
- QUERY PLAN
------------------------------------------------------------
+ QUERY PLAN
+------------------------------------------------------------
Sort
Sort Key: ((poly_center(f1))[0])
-> Index Scan using gpolygonind on polygon_tbl
- Index Cond: (f1 ~ '((1,1),(2,2),(2,1))'::polygon)
+ Index Cond: (f1 @> '((1,1),(2,2),(2,1))'::polygon)
(4 rows)
-SELECT * FROM polygon_tbl WHERE f1 ~ '((1,1),(2,2),(2,1))'::polygon
+SELECT * FROM polygon_tbl WHERE f1 @> '((1,1),(2,2),(2,1))'::polygon
ORDER BY (poly_center(f1))[0];
f1
---------------------
diff --git a/src/test/regress/sql/create_am.sql b/src/test/regress/sql/create_am.sql
index 97df244d172a0902be6a6f2bf4b482ac0f820667..6dd0de4272606e55e741b70eb0773e2f97b181a9 100644 (file)
--- a/src/test/regress/sql/create_am.sql
+++ b/src/test/regress/sql/create_am.sql
@@ -50,10 +50,10 @@ SET enable_bitmapscan = OFF;
EXPLAIN (COSTS OFF)
SELECT * FROM fast_emp4000
- WHERE home_base @ '(200,200),(2000,1000)'::box
+ WHERE home_base <@ '(200,200),(2000,1000)'::box
ORDER BY (home_base[0])[0];
SELECT * FROM fast_emp4000
- WHERE home_base @ '(200,200),(2000,1000)'::box
+ WHERE home_base <@ '(200,200),(2000,1000)'::box
ORDER BY (home_base[0])[0];
EXPLAIN (COSTS OFF)
diff --git a/src/test/regress/sql/create_index.sql b/src/test/regress/sql/create_index.sql
index 4e45b186131bcad4366cedeb5352b8252f402b4d..b27643cad68c8f35f36de7c0dd5be931d42d5d97 100644 (file)
--- a/src/test/regress/sql/create_index.sql
+++ b/src/test/regress/sql/create_index.sql
@@ -107,14 +107,14 @@ SET enable_indexscan = OFF;
SET enable_bitmapscan = OFF;
SELECT * FROM fast_emp4000
- WHERE home_base @ '(200,200),(2000,1000)'::box
+ WHERE home_base <@ '(200,200),(2000,1000)'::box
ORDER BY (home_base[0])[0];
SELECT count(*) FROM fast_emp4000 WHERE home_base && '(1000,1000,0,0)'::box;
SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL;
-SELECT * FROM polygon_tbl WHERE f1 ~ '((1,1),(2,2),(2,1))'::polygon
+SELECT * FROM polygon_tbl WHERE f1 @> '((1,1),(2,2),(2,1))'::polygon
ORDER BY (poly_center(f1))[0];
SELECT * FROM circle_tbl WHERE f1 && circle(point(1,-2), 1)
@@ -161,10 +161,10 @@ SET enable_bitmapscan = OFF;
EXPLAIN (COSTS OFF)
SELECT * FROM fast_emp4000
- WHERE home_base @ '(200,200),(2000,1000)'::box
+ WHERE home_base <@ '(200,200),(2000,1000)'::box
ORDER BY (home_base[0])[0];
SELECT * FROM fast_emp4000
- WHERE home_base @ '(200,200),(2000,1000)'::box
+ WHERE home_base <@ '(200,200),(2000,1000)'::box
ORDER BY (home_base[0])[0];
EXPLAIN (COSTS OFF)
@@ -176,9 +176,9 @@ SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL;
SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL;
EXPLAIN (COSTS OFF)
-SELECT * FROM polygon_tbl WHERE f1 ~ '((1,1),(2,2),(2,1))'::polygon
+SELECT * FROM polygon_tbl WHERE f1 @> '((1,1),(2,2),(2,1))'::polygon
ORDER BY (poly_center(f1))[0];
-SELECT * FROM polygon_tbl WHERE f1 ~ '((1,1),(2,2),(2,1))'::polygon
+SELECT * FROM polygon_tbl WHERE f1 @> '((1,1),(2,2),(2,1))'::polygon
ORDER BY (poly_center(f1))[0];
EXPLAIN (COSTS OFF)
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /