On 26/11/2018 05:58, Amit Langote wrote: > On 2018/11/09 14:38, Amit Langote wrote: >> Rebased due to change in addRangeTableEntryForRelation's API. > > Rebased again due to changes in psql's describe output for partitioned tables.
Review: Is "partition bound" the right term? For list partitioning, it's not really a bound. Maybe it's OK. Keep the ordering of EXPR_KIND_PARTITION_BOUND in the various switch statements consistent. I don't see any treatment of non-immutable expressions. There is a test case with a non-immutable cast that was removed, but that's all. There was considerable discussion earlier in the thread on whether non-immutable expressions should be allowed. I'm not sure what the resolution was, but in any case there should be documentation and tests of the outcome. The collation handling might need another look. The following is allowed without any diagnostic: CREATE TABLE t2 ( a text COLLATE "POSIX" ) PARTITION BY RANGE (a); CREATE TABLE t2a PARTITION OF t2 FOR VALUES FROM ('foo' COLLATE "C") TO ('xyz'); I think the correct behavior would be that an explicit collation in the partition bound expression is an error. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services