Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit fe5e3fc

Browse files
committed
Repair damage done by citext--1.1--1.2.sql.
That script is incorrect in that it sets the combine function for max(citext) twice instead of setting the combine function for max(citext) once and the combine functon for min(citext) once. The consequence is that if you install 1.0 or 1.1 and then update to 1.2, you end up with min(citext) not having a combine function, contrary to what was intended. If you install 1.2 directly, you're OK. Fix things up by defining a new 1.3 version. Upgrading from 1.2 to 1.3 won't change anything for people who first installed the 1.2 version, but people upgrading from 1.0 or 1.1 will get the right catalog contents once they reach 1.3. Report and patch by David Rowley, reviewed by Andreas Karlsson.
1 parent 4452000 commit fe5e3fc

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

contrib/citext/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
MODULES = citext
44

55
EXTENSION = citext
6-
DATA = citext--1.2.sql citext--1.1--1.2.sql citext--1.0--1.1.sql \
7-
citext--unpackaged--1.0.sql
6+
DATA = citext--1.3.sql citext--1.2--1.3.sql citext--1.1--1.2.sql \
7+
citext--1.0--1.1.sql citext--unpackaged--1.0.sql
88
PGFILEDESC = "citext - case-insensitive character string data type"
99

1010
REGRESS = citext

contrib/citext/citext--1.2--1.3.sql

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* contrib/citext/citext--1.2--1.3.sql */
2+
3+
-- complain if script is sourced in psql, rather than via ALTER EXTENSION
4+
\echo Use "ALTER EXTENSION citext UPDATE TO '1.3'" to load this file. \quit
5+
6+
UPDATE pg_aggregate SET aggcombinefn = 'citext_smaller'
7+
WHERE aggfnoid = 'min(citext)'::pg_catalog.regprocedure;
File renamed without changes.

contrib/citext/citext.control

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# citext extension
22
comment = 'data type for case-insensitive character strings'
3-
default_version = '1.2'
3+
default_version = '1.3'
44
module_pathname = '$libdir/citext'
55
relocatable = true

0 commit comments

Comments
 (0)