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

Commit0024e34

Browse files
committed
Fix upgrade of contrib/intarray and contrib/unaccent from 9.0.
Take care of a couple of discrepancies between what you get from a freshinstall and what the first-draft update-from-unpackaged scripts produced.
1 parentec65a79 commit0024e34

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

‎contrib/intarray/intarray--unpackaged--1.0.sql

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,23 @@ ALTER EXTENSION intarray ADD operator class gist__intbig_ops using gist;
6868
ALTER EXTENSION intarray ADD operator family gin__int_ops using gin;
6969
ALTER EXTENSION intarray ADD operator class gin__int_ops using gin;
7070

71-
-- these two functions have different signatures in 9.1, but we don't
72-
-- bother trying to fix them because GIN doesn't care much
71+
-- These functions had different signatures in 9.0. We can't just
72+
-- drop and recreate them because they are linked into the GIN opclass,
73+
-- so we need some ugly hacks.
74+
75+
-- First, absorb them into the extension under their old identities.
76+
7377
ALTER EXTENSION intarray ADD function ginint4_queryextract(internal,internal,smallint,internal,internal);
7478
ALTER EXTENSION intarray ADD function ginint4_consistent(internal,smallint,internal,integer,internal,internal);
79+
80+
-- Next, fix the parameter lists by means of direct UPDATE on the pg_proc
81+
-- entries. This is ugly as can be, but there's no other way to do it
82+
-- while preserving the identities (OIDs) of the functions.
83+
84+
UPDATEpg_catalog.pg_proc
85+
SET pronargs=7, proargtypes='2281 2281 21 2281 2281 2281 2281'
86+
WHEREoid='ginint4_queryextract(internal,internal,smallint,internal,internal)'::pg_catalog.regprocedure;
87+
88+
UPDATEpg_catalog.pg_proc
89+
SET pronargs=8, proargtypes='2281 21 2281 23 2281 2281 2281 2281'
90+
WHEREoid='ginint4_consistent(internal,smallint,internal,integer,internal,internal)'::pg_catalog.regprocedure;

‎contrib/unaccent/unaccent--unpackaged--1.0.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ ALTER EXTENSION unaccent ADD function unaccent_init(internal);
66
ALTER EXTENSION unaccent ADD function unaccent_lexize(internal,internal,internal,internal);
77
ALTER EXTENSION unaccent ADDtext search template unaccent;
88
ALTER EXTENSION unaccent ADDtext search dictionary unaccent;
9+
10+
-- These functions are marked as stable in 9.1, were not before:
11+
12+
ALTERFUNCTION unaccent(regdictionary,text) STABLE;
13+
ALTERFUNCTION unaccent(text) STABLE;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp