Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitade49c6

Browse files
committed
Test all contrib-created operator classes with amvalidate.
I'd supposed that people would do this manually when creating new operatorclasses, but the folly of that was exposed today. The tests seem fastenough that we can just apply them during the normal regression tests.contrib/isn fails the checks for lack of complete sets of cross-typeoperators. That's a nice-to-have policy rather than a functionalrequirement, so leave it as-is, but insert ORDER BY in the query toensure consistent cross-platform output.Discussion:https://postgr.es/m/7076.1480446837@sss.pgh.pa.us
1 parent11da83a commitade49c6

File tree

25 files changed

+207
-0
lines changed

25 files changed

+207
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
CREATE EXTENSION btree_gin;
2+
-- Check whether any of our opclasses fail amvalidate
3+
SELECT amname, opcname
4+
FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
5+
WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
6+
amname | opcname
7+
--------+---------
8+
(0 rows)
9+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
CREATE EXTENSION btree_gin;
2+
3+
-- Check whether any of our opclasses fail amvalidate
4+
SELECT amname, opcname
5+
FROM pg_opclass opcLEFT JOIN pg_am amONam.oid= opcmethod
6+
WHEREopc.oid>=16384AND NOT amvalidate(opc.oid);
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
CREATE EXTENSION btree_gist;
2+
-- Check whether any of our opclasses fail amvalidate
3+
SELECT amname, opcname
4+
FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
5+
WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
6+
amname | opcname
7+
--------+---------
8+
(0 rows)
9+

‎contrib/btree_gist/sql/init.sql‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
CREATE EXTENSION btree_gist;
2+
3+
-- Check whether any of our opclasses fail amvalidate
4+
SELECT amname, opcname
5+
FROM pg_opclass opcLEFT JOIN pg_am amONam.oid= opcmethod
6+
WHEREopc.oid>=16384AND NOT amvalidate(opc.oid);

‎contrib/citext/expected/citext.out‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
-- Test citext datatype
33
--
44
CREATE EXTENSION citext;
5+
-- Check whether any of our opclasses fail amvalidate
6+
SELECT amname, opcname
7+
FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
8+
WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
9+
amname | opcname
10+
--------+---------
11+
(0 rows)
12+
513
-- Test the operators and indexing functions
614
-- Test = and <>.
715
SELECT 'a'::citext = 'a'::citext AS t;

‎contrib/citext/expected/citext_1.out‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
-- Test citext datatype
33
--
44
CREATE EXTENSION citext;
5+
-- Check whether any of our opclasses fail amvalidate
6+
SELECT amname, opcname
7+
FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
8+
WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
9+
amname | opcname
10+
--------+---------
11+
(0 rows)
12+
513
-- Test the operators and indexing functions
614
-- Test = and <>.
715
SELECT 'a'::citext = 'a'::citext AS t;

‎contrib/citext/sql/citext.sql‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
CREATE EXTENSION citext;
66

7+
-- Check whether any of our opclasses fail amvalidate
8+
SELECT amname, opcname
9+
FROM pg_opclass opcLEFT JOIN pg_am amONam.oid= opcmethod
10+
WHEREopc.oid>=16384AND NOT amvalidate(opc.oid);
11+
712
-- Test the operators and indexing functions
813

914
-- Test = and <>.

‎contrib/cube/expected/cube.out‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
-- Test cube datatype
33
--
44
CREATE EXTENSION cube;
5+
-- Check whether any of our opclasses fail amvalidate
6+
SELECT amname, opcname
7+
FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
8+
WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
9+
amname | opcname
10+
--------+---------
11+
(0 rows)
12+
513
--
614
-- testing the input and output functions
715
--

‎contrib/cube/expected/cube_2.out‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
-- Test cube datatype
33
--
44
CREATE EXTENSION cube;
5+
-- Check whether any of our opclasses fail amvalidate
6+
SELECT amname, opcname
7+
FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
8+
WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
9+
amname | opcname
10+
--------+---------
11+
(0 rows)
12+
513
--
614
-- testing the input and output functions
715
--

‎contrib/cube/sql/cube.sql‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
CREATE EXTENSION cube;
66

7+
-- Check whether any of our opclasses fail amvalidate
8+
SELECT amname, opcname
9+
FROM pg_opclass opcLEFT JOIN pg_am amONam.oid= opcmethod
10+
WHEREopc.oid>=16384AND NOT amvalidate(opc.oid);
11+
712
--
813
-- testing the input and output functions
914
--

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp