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 dd9a44a1-e7a5-4a2e-2830-afdd793cdb9c@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2018/11/12 12:59, Tom Lane wrote:
> Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes:
>> On 2018/11/10 7:33, Tom Lane wrote:
>>> I'd argue not, actually.  I think there is plausible precedent in
>>> updatable views, where what we use is the defaults associated with the
>>> view, not the underlying table.  Correspondingly, what ought to govern
>>> in a partitioned insert is the defaults associated with the table actually
>>> named in the insert command, never mind what its partitions might say.
>>> That is useful for many situations, and it avoids all the logical
>>> inconsistencies you get into if you find that the defaults associated
>>> with some partition would force re-routing elsewhere.
> 
>> ...
>> IOW, it might be a good idea to call the ability to set partition-level
>> defaults a deprecated feature?
> 
> Not necessarily.  They'd apply when you insert directly into a particular
> partition by name.

Yes.  Maybe, we should document that the partition default are not honored
when inserting through the parent.

Thanks,
Amit



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Adding a TAP test checking data consistency on standby withminRecoveryPoint
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: csv format for psql