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

Commit2d6cb17

Browse files
committed
Remove ill-considered (not to mention undocumented) attempt to make
contrib/intarray's GIN opclass override the built-in default. Per bug #3048and other complaints.
1 parentaa33bdd commit2d6cb17

File tree

5 files changed

+6
-14
lines changed

5 files changed

+6
-14
lines changed

‎contrib/intarray/README.intarray

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ This is an implementation of RD-tree data structure using GiST interface
22
of PostgreSQL. It has built-in lossy compression.
33

44
Current implementation provides index support for one-dimensional array of
5-
int4's -gist__int_ops, suitable for small and medium size of arrays (usedon
5+
integers:gist__int_ops, suitable for small and medium size of arrays (usedby
66
default), and gist__intbig_ops for indexing large arrays (we use superimposed
7-
signature with length of 4096 bits to represent sets).
7+
signature with length of 4096 bits to represent sets). There is also a
8+
non-default gin__int_ops for GIN indexes on integer arrays.
89

910
All work was done by Teodor Sigaev (teodor@stack.net) and Oleg Bartunov
1011
(oleg@sai.msu.su). See http://www.sai.msu.su/~megera/postgres/gist

‎contrib/intarray/_int.sql.in

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,6 @@ AS
458458
STORAGEintbig_gkey;
459459

460460
--GIN
461-
--mark built-in gin's _int4_ops as non default
462-
update pg_catalog.pg_opclass set opcdefault = 'f'
463-
where opcmethod = (select oid from pg_catalog.pg_am where amname='gin') and
464-
opcname = '_int4_ops';
465461

466462
CREATE FUNCTION ginint4_queryextract(internal, internal, int2)
467463
RETURNS internal
@@ -474,7 +470,7 @@ AS 'MODULE_PATHNAME'
474470
LANGUAGE C;
475471

476472
CREATE OPERATOR CLASS gin__int_ops
477-
DEFAULTFOR TYPE _int4 USING gin
473+
FOR TYPE _int4 USING gin
478474
AS
479475
OPERATOR3&&,
480476
OPERATOR6= (anyarray, anyarray)RECHECK,

‎contrib/intarray/expected/_int.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ SELECT count(*) from test__int WHERE a @@ '(20&23)|(50&68)';
516516
(1 row)
517517

518518
DROP INDEX text_idx;
519-
CREATE INDEX text_idx on test__int using gin ( a );
519+
CREATE INDEX text_idx on test__int using gin ( agin__int_ops);
520520
SELECT count(*) from test__int WHERE a && '{23,50}';
521521
count
522522
-------

‎contrib/intarray/sql/_int.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ SELECT count(*) from test__int WHERE a @> '{20,23}' or a @> '{50,68}';
111111
SELECTcount(*)from test__intWHERE a @@'(20&23)|(50&68)';
112112

113113
DROPINDEX text_idx;
114-
CREATEINDEXtext_idxon test__int using gin ( a );
114+
CREATEINDEXtext_idxon test__int using gin ( agin__int_ops);
115115

116116
SELECTcount(*)from test__intWHERE a &&'{23,50}';
117117
SELECTcount(*)from test__intWHERE a @@'23|50';

‎contrib/intarray/uninstall__int.sql

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,3 @@ DROP FUNCTION boolop(_int4, query_int);
123123
DROPFUNCTION querytree(query_int);
124124

125125
DROPTYPE query_int CASCADE;
126-
127-
--mark built-in gin's _int4_ops as default again
128-
updatepg_catalog.pg_opclassset opcdefault='t'
129-
where opcmethod= (selectoidfrompg_catalog.pg_amwhere amname='gin')and
130-
opcname='_int4_ops';

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp