Skip to content

Not working create_range_partitions with bigint or numeric data type ID #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DmitriyAr opened this issue Sep 12, 2016 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@DmitriyAr
Copy link

If you change the data type of the ID column to bigint or numeric pg_pathman gives an error and is disabled:

CREATE TABLE items (
    id       BIGINT PRIMARY KEY,
    name     TEXT,
    code     BIGINT);

INSERT INTO items (id, name, code)
SELECT g, md5(g::text), random() * 100000
FROM generate_series(1, 100000) as g;

SELECT create_range_partitions('items', 'id', 1, 1000);

WARNING: Constant type in some check constraint does not match the partitioned column's type
ERROR: Wrong constraint format for RANGE partition "items_1"
HINT: pg_pathman will be disabled to allow you to resolve this issue
CONTEXT: SQL statement "WITH part_data AS (DELETE FROM ONLY items RETURNING *)
INSERT INTO items SELECT * FROM part_data"
PL/pgSQL function partition_data(regclass) line 11 at EXECUTE
SQL statement "SELECT public.partition_data(parent_relid)"
PL/pgSQL function create_range_partitions(regclass,text,anyelement,anyelement,integer,boolean) line 81 at PERFORM

SELECT version()
PostgreSQL 9.5.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17), 64-bit

@funbringer funbringer added the bug label Sep 12, 2016
@funbringer
Copy link
Collaborator

Hi @DmitriyAr,

Thanks for pointing this out. This issue will be fixed ASAP. Stay tuned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants