Replace references to COLLATE "en_US" with COLLATE "C".

Commit f0e44751d7 is turning the
buildfarm red; let's try something hopefully more portable.
This commit is contained in:
Robert Haas 2016-12-07 13:36:57 -05:00
parent f0e44751d7
commit 71efd34fb8
4 changed files with 9 additions and 9 deletions

View File

@ -3034,7 +3034,7 @@ DROP TABLE unparted, fail_part;
-- check that partition bound is compatible
CREATE TABLE list_parted (
a int NOT NULL,
b char(2) COLLATE "en_US",
b char(2) COLLATE "C",
CONSTRAINT check_a CHECK (a > 0)
) PARTITION BY LIST (a);
CREATE TABLE fail_part (LIKE list_parted);
@ -3117,7 +3117,7 @@ ERROR: child table "fail_part" has different collation for column "b"
DROP TABLE fail_part;
-- check that the table being attached has all constraints of the parent
CREATE TABLE fail_part (
b char(2) COLLATE "en_US",
b char(2) COLLATE "C",
a int NOT NULL
);
ALTER TABLE list_parted ATTACH PARTITION fail_part FOR VALUES IN (1);
@ -3130,7 +3130,7 @@ DROP TABLE fail_part;
-- check the attributes and constraints after partition is attached
CREATE TABLE part_1 (
a int NOT NULL,
b char(2) COLLATE "en_US",
b char(2) COLLATE "C",
CONSTRAINT check_a CHECK (a > 0)
);
ALTER TABLE list_parted ATTACH PARTITION part_1 FOR VALUES IN (1);

View File

@ -391,7 +391,7 @@ CREATE TABLE partitioned (
b int,
c text,
d text
) PARTITION BY RANGE (a oid_ops, plusone(b), c collate "default", d collate "en_US");
) PARTITION BY RANGE (a oid_ops, plusone(b), c collate "default", d collate "C");
-- check relkind
SELECT relkind FROM pg_class WHERE relname = 'partitioned';
relkind
@ -429,7 +429,7 @@ ERROR: cannot inherit from partitioned table "partitioned2"
b | integer | | |
c | text | | not null |
d | text | | not null |
Partition key: RANGE (a oid_ops, plusone(b), c, d COLLATE "en_US")
Partition key: RANGE (a oid_ops, plusone(b), c, d COLLATE "C")
\d partitioned2
Table "public.partitioned2"

View File

@ -1923,7 +1923,7 @@ DROP TABLE unparted, fail_part;
-- check that partition bound is compatible
CREATE TABLE list_parted (
a int NOT NULL,
b char(2) COLLATE "en_US",
b char(2) COLLATE "C",
CONSTRAINT check_a CHECK (a > 0)
) PARTITION BY LIST (a);
CREATE TABLE fail_part (LIKE list_parted);
@ -1999,7 +1999,7 @@ DROP TABLE fail_part;
-- check that the table being attached has all constraints of the parent
CREATE TABLE fail_part (
b char(2) COLLATE "en_US",
b char(2) COLLATE "C",
a int NOT NULL
);
ALTER TABLE list_parted ATTACH PARTITION fail_part FOR VALUES IN (1);
@ -2012,7 +2012,7 @@ DROP TABLE fail_part;
-- check the attributes and constraints after partition is attached
CREATE TABLE part_1 (
a int NOT NULL,
b char(2) COLLATE "en_US",
b char(2) COLLATE "C",
CONSTRAINT check_a CHECK (a > 0)
);
ALTER TABLE list_parted ATTACH PARTITION part_1 FOR VALUES IN (1);

View File

@ -397,7 +397,7 @@ CREATE TABLE partitioned (
b int,
c text,
d text
) PARTITION BY RANGE (a oid_ops, plusone(b), c collate "default", d collate "en_US");
) PARTITION BY RANGE (a oid_ops, plusone(b), c collate "default", d collate "C");
-- check relkind
SELECT relkind FROM pg_class WHERE relname = 'partitioned';