Skip to content

Constraint type not consistent when partitioning by int8 #33

@digoal

Description

@digoal
postgres=# drop table test;
postgres=# create table test(id int8 primary key, info text, crt_time timestamp);
CREATE TABLE
postgres=# 
postgres=# select create_range_partitions('test'::regclass, 'id', 1::int8, 20000000::int8, 500::int8, false);
 create_range_partitions 
-------------------------
                     500
(1 row)
postgres=# select create_range_update_trigger('test'::regclass);
 create_range_update_trigger 
-----------------------------
 postgres.test_upd_trig_func
(1 row)
postgres=# select disable_parent('test'::regclass);
 disable_parent 
----------------

(1 row)
postgres=# explain select * from test where id=1;
WARNING:  Constant type in some check constraint does not match the partitioned column's type
ERROR:  Wrong constraint format for RANGE partition "test_1"
HINT:  pg_pathman will be disabled to allow you to resolve this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions