Re: BUG #16714: INSERT ON CONFLICT DO UPDATE fails to infer constraint if it's not at top-level partition

Поиск
Список
Период
Сортировка
От Andy S
Тема Re: BUG #16714: INSERT ON CONFLICT DO UPDATE fails to infer constraint if it's not at top-level partition
Дата
Msg-id CAFAcjJP2wmSU35b=XuOYd3x_HF123kmycrVwRkT4Chn37APKDA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #16714: INSERT ON CONFLICT DO UPDATE fails to infer constraint if it's not at top-level partition  (Andres Freund <andres@anarazel.de>)
Ответы Re: BUG #16714: INSERT ON CONFLICT DO UPDATE fails to infer constraint if it's not at top-level partition  (Andy S <gatekeeper.mail@gmail.com>)
Список pgsql-bugs
On Sat, Nov 14, 2020 at 3:28 AM Andres Freund <andres@anarazel.de> wrote:
At best it is a potentially desirable feature. One that isn't trivial to
implement. We'd have to scan the entire partition tree to ensure there's
a matching constraint on all partitions. 
- BEFORE ROW triggers...
So, the engine does exactly what you say for each row to determine if the leaf partition has any BEFORE ROW triggers defined. Why not to use the chance to determine a certain applicable constraint set?

 
That is not generally the case. You can have parametrized values that
are inserted, and you can have multi-row inserts. In both cases you
cannot make this decision at plan time.

OK. Then I've mistaken, sorry for that. Still `uniq constraint violation` triggers even when it's not defined for the very table named in query.
 

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

Предыдущее
От: Sergei Kornilov
Дата:
Сообщение: Re: Data format mismatch between minor versions
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Data format mismatch between minor versions