index 6d2f36da2df0b6ecd23c7cf76aa449c31f909c5f..0dc03dd984081c9b88ff306b25a1187d1cb2c795 100644 (file)
@@ -4209,6 +4209,7 @@ transformPartitionBoundValue(ParseState *pstate, Node *val,
*/
if (!IsA(value, Const))
{
+ assign_expr_collations(pstate, value);
value = (Node *) expression_planner((Expr *) value);
value = (Node *) evaluate_expr((Expr *) value, colType, colTypmod,
partCollation);
index 8ed4fae934d0c4b83f7efc3400e54d2ce8816930..45f4a73447851536f588fe4caaa5d4f5f1e9b907 100644 (file)
Partition of: parted_notnull_inh_test FOR VALUES IN (1)
drop table parted_notnull_inh_test;
+-- check that collations are assigned in partition bound expressions
+create table parted_boolean_col (a bool, b text) partition by list(a);
+create table parted_boolean_less partition of parted_boolean_col
+ for values in ('foo' < 'bar');
+create table parted_boolean_greater partition of parted_boolean_col
+ for values in ('foo' > 'bar');
+drop table parted_boolean_col;
-- check for a conflicting COLLATE clause
create table parted_collate_must_match (a text collate "C", b text collate "C")
partition by range (a);
index e6f0188a51898328709f7f9054b5b3b4cf298444..22602aae5d2a8a57216182aa1adf27991a46eb4a 100644 (file)
@@ -801,6 +801,14 @@ insert into parted_notnull_inh_test (b) values (null);
\d parted_notnull_inh_test1
drop table parted_notnull_inh_test;
+-- check that collations are assigned in partition bound expressions
+create table parted_boolean_col (a bool, b text) partition by list(a);
+create table parted_boolean_less partition of parted_boolean_col
+ for values in ('foo' < 'bar');
+create table parted_boolean_greater partition of parted_boolean_col
+ for values in ('foo' > 'bar');
+drop table parted_boolean_col;
+
-- check for a conflicting COLLATE clause
create table parted_collate_must_match (a text collate "C", b text collate "C")
partition by range (a);