From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: realdreams84@gmail.com
Subject: BUG #17253: Composite partition table configuration error
Date: Fri, 29 Oct 2021 01:27:35 +0000
Message-ID: <17253-ffda00e1d80f44b4@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 17253
Logged by: 재문 이
Email address: realdreams84@gmail.com
PostgreSQL version: 12.5
Operating system: centos7.9
Description:
hi
I created a range hash composite partition as follows. or list range
partition
create table emp(
empno int4 NOT null,
birthday date NOT NULL,
firstnmvarchar(14) NOT NULL,
lastnm varchar(16) NOT NULL,
sex bpchar(1) NOT NULL,
dt date NOT NULL
) partition by list(sex);
create table p_1 partition of emp for values in('M') partition by
range(dt);
create table p_2 partition of emp for values in('F') partition by
range(dt);
insert into test2_p(select * from emp where dt >= '2000-01-01' and dt <=
'2000-01-31');
Created but cannot insert data
SQL Error [23514]: ERROR: no partition of relation "p_1" found for row¶
Detail: Partition key of the failing row contains ("dt") = (2000-01-12).
create table emp(
empno int4 NOT null,
birthday date NOT NULL,
firstnmvarchar(14) NOT NULL,
lastnm varchar(16) NOT NULL,
sex bpchar(1) NOT NULL,
dt date NOT NULL
) partition by range(dt);
create table p_1 partition of emp for values from ('2000-01-01') to
('2000-02-01') partition by hash (idx);
insert into p_1_p(select * from emp where dt >= '2000-01-01' and dt <=
'2000-02-01');
The table is created, but data cannot be inserted. Is it not supported or
how to insert and create data, please guide.
thank you
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, realdreams84@gmail.com
Subject: Re: BUG #17253: Composite partition table configuration error
In-Reply-To: <17253-ffda00e1d80f44b4@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox