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

Commit55f3d10

Browse files
committed
Remove unreferenced pg_opfamily entry.
The entry with OID 4035, for GIST jsonb_ops, is unused; apparentlyit was added in preparation for index support that never materialized.Remove it, and add a regression test case to detect future mistakesof the same kind.Discussion:https://postgr.es/m/17188.1541379745@sss.pgh.pa.us
1 parent1eaeb02 commit55f3d10

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

‎src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO201811012
56+
#defineCATALOG_VERSION_NO201811051
5757

5858
#endif

‎src/include/catalog/pg_opfamily.dat

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@
172172
opfmethod => 'btree', opfname => 'jsonb_ops' },
173173
{ oid => '4034',
174174
opfmethod => 'hash', opfname => 'jsonb_ops' },
175-
{ oid => '4035',
176-
opfmethod => 'gist', opfname => 'jsonb_ops' },
177175
{ oid => '4036',
178176
opfmethod => 'gin', opfname => 'jsonb_ops' },
179177
{ oid => '4037',

‎src/test/regress/expected/opr_sanity.out

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,6 +1686,16 @@ WHERE p1.opfmethod = 0 OR p1.opfnamespace = 0;
16861686
-----
16871687
(0 rows)
16881688

1689+
-- Look for opfamilies having no opclasses. While most validation of
1690+
-- opfamilies is now handled by AM-specific amvalidate functions, that's
1691+
-- driven from pg_opclass entries below, so an empty opfamily would not
1692+
-- get noticed.
1693+
SELECT oid, opfname FROM pg_opfamily f
1694+
WHERE NOT EXISTS (SELECT 1 FROM pg_opclass WHERE opcfamily = f.oid);
1695+
oid | opfname
1696+
-----+---------
1697+
(0 rows)
1698+
16891699
-- **************** pg_opclass ****************
16901700
-- Look for illegal values in pg_opclass fields
16911701
SELECT p1.oid

‎src/test/regress/sql/opr_sanity.sql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,14 @@ SELECT p1.oid
11221122
FROM pg_opfamilyas p1
11231123
WHEREp1.opfmethod=0ORp1.opfnamespace=0;
11241124

1125+
-- Look for opfamilies having no opclasses. While most validation of
1126+
-- opfamilies is now handled by AM-specific amvalidate functions, that's
1127+
-- driven from pg_opclass entries below, so an empty opfamily would not
1128+
-- get noticed.
1129+
1130+
SELECToid, opfnameFROM pg_opfamily f
1131+
WHERE NOT EXISTS (SELECT1FROM pg_opclassWHERE opcfamily=f.oid);
1132+
11251133

11261134
-- **************** pg_opclass ****************
11271135

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp