Re: BUG #15212: Default values in partition tables don't work asexpected and allow NOT NULL violation
| От | Amit Langote |
|---|---|
| Тема | Re: BUG #15212: Default values in partition tables don't work asexpected and allow NOT NULL violation |
| Дата | |
| Msg-id | 7d42123a-2d60-2829-8d6b-0c28e3e32376@lab.ntt.co.jp обсуждение исходный текст |
| Ответ на | Re: BUG #15212: Default values in partition tables don't work asexpected and allow NOT NULL violation (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>) |
| Ответы |
Re: BUG #15212: Default values in partition tables don't work asexpected and allow NOT NULL violation
|
| Список | pgsql-hackers |
On 2018/11/09 14:04, Amit Langote wrote: > On 2018/11/09 4:39, Alvaro Herrera wrote: >> and if somebody has it, a change to how defaults are applied >> when routing tuples. > > I haven't written such a patch yet. Do we want such a feature? Or is it a *bug* of tuple-routing that it doesn't substitute default values that may be defined for partitions? It kind of looks like one if you see an example like this. create table p (a int, b int) partition by list (a); create table p1 partition of p (b not null default 1) for values in (1); insert into p1 values (1); table p; a │ b ───┼─── 1 │ 1 (1 row) insert into p values (1); ERROR: null value in column "b" violates not-null constraint DETAIL: Failing row contains (1, null). Thanks, Amit
В списке pgsql-hackers по дате отправления: