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

Commit94be9e3

Browse files
committed
Fix citext's upgrade-from-unpackaged script to set its collation correctly.
Although there remains some debate about how CREATE TYPE should representthe collation property, this doesn't really affect what we need to do incitext's script, so go ahead and fix that.
1 parent6252c4f commit94be9e3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,15 @@ ALTER EXTENSION citext ADD function strpos(citext,citext);
7474
ALTER EXTENSION citext ADD function replace(citext,citext,citext);
7575
ALTER EXTENSION citext ADD function split_part(citext,citext,integer);
7676
ALTER EXTENSION citext ADD functiontranslate(citext,citext,text);
77+
78+
--
79+
-- As of 9.1, type citext should be marked collatable. There is no ALTER TYPE
80+
-- command for this, so we have to do it by poking the pg_type entry directly.
81+
-- Notes: 100 is the OID of the "pg_catalog.default" collation --- it seems
82+
-- easier and more reliable to hard-wire that here than to pull it out of
83+
-- pg_collation. Also, we don't need a pg_depend entry since the default
84+
-- collation is pinned.
85+
--
86+
87+
UPDATEpg_catalog.pg_typeSET typcollation=100
88+
WHEREoid='citext'::pg_catalog.regtype;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp