Re: [HACKERS] NOT NULL constraints on range partition key columns

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: [HACKERS] NOT NULL constraints on range partition key columns
Дата
Msg-id 6fd1a00e-2963-06f9-2baf-26dcc9fbc240@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: [HACKERS] NOT NULL constraints on range partition key columns  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [HACKERS] NOT NULL constraints on range partition key columns  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On 2017/05/16 4:29, Robert Haas wrote:
> On Mon, May 15, 2017 at 9:12 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>> Can't we allow NULL to get inserted into the partition (leaf
>> partition) if the user uses the partition name in Insert statement?
> 
> That would be terrible behavior - the behavior of tuple routing should
> match the enforced constraints.
>
>> For root partitions, I think for now giving an error is okay, but once
>> we have default partitions (Rahila's patch), we can route NULLS to
>> default partition.
> 
> Yeah, that's exactly why I think we should make the change Amit is
> proposing here.  If we don't, then we won't be able to accept NULL
> values even after we have the default partitioning stuff.

Attached is a patch for consideration.  There are 2 actually, but maybe
they should be committed together if we decide do go with this.

Thanks,
Amit

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: [HACKERS] Bug in ExecModifyTable function and trigger issues forforeign tables
Следующее
От: amul sul
Дата:
Сообщение: Re: [HACKERS] [POC] hash partitioning