summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas2016-07-26 19:32:57 +0000
committerRobert Haas2016-07-26 19:32:57 +0000
commitfe5e3fce798dccf3f298b65c5d9a132e9646712a (patch)
tree3739778192b9fda41e9dbdf5d6cfc182c0e94329
parent4452000f310b8c1c947ee724618c1bc31ed20242 (diff)
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.
-rw-r--r--contrib/citext/Makefile4
-rw-r--r--contrib/citext/citext--1.2--1.3.sql7
-rw-r--r--contrib/citext/citext--1.3.sql (renamed from contrib/citext/citext--1.2.sql)0
-rw-r--r--contrib/citext/citext.control2
4 files changed, 10 insertions, 3 deletions
diff --git a/contrib/citext/Makefile b/contrib/citext/Makefile
index 363a11ba9c6..e39d3eee61b 100644
--- a/contrib/citext/Makefile
+++ b/contrib/citext/Makefile
@@ -3,8 +3,8 @@
MODULES = citext
EXTENSION = citext
-DATA = citext--1.2.sql citext--1.1--1.2.sql citext--1.0--1.1.sql \
- citext--unpackaged--1.0.sql
+DATA = citext--1.3.sql citext--1.2--1.3.sql citext--1.1--1.2.sql \
+ citext--1.0--1.1.sql citext--unpackaged--1.0.sql
PGFILEDESC = "citext - case-insensitive character string data type"
REGRESS = citext
diff --git a/contrib/citext/citext--1.2--1.3.sql b/contrib/citext/citext--1.2--1.3.sql
new file mode 100644
index 00000000000..4ab867915c7
--- /dev/null
+++ b/contrib/citext/citext--1.2--1.3.sql
@@ -0,0 +1,7 @@
+/* contrib/citext/citext--1.2--1.3.sql */
+
+-- complain if script is sourced in psql, rather than via ALTER EXTENSION
+\echo Use "ALTER EXTENSION citext UPDATE TO '1.3'" to load this file. \quit
+
+UPDATE pg_aggregate SET aggcombinefn = 'citext_smaller'
+WHERE aggfnoid = 'min(citext)'::pg_catalog.regprocedure;
diff --git a/contrib/citext/citext--1.2.sql b/contrib/citext/citext--1.3.sql
index c2d0c0ce9be..c2d0c0ce9be 100644
--- a/contrib/citext/citext--1.2.sql
+++ b/contrib/citext/citext--1.3.sql
diff --git a/contrib/citext/citext.control b/contrib/citext/citext.control
index 7cba65d1105..5f080df3ee3 100644
--- a/contrib/citext/citext.control
+++ b/contrib/citext/citext.control
@@ -1,5 +1,5 @@
# citext extension
comment = 'data type for case-insensitive character strings'
-default_version = '1.2'
+default_version = '1.3'
module_pathname = '$libdir/citext'
relocatable = true