Re: Needless additional partition check in INSERT?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Needless additional partition check in INSERT?
Дата
Msg-id 20180606210847.qmefnjlqyjlqwvam@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Needless additional partition check in INSERT?  (David Rowley <david.rowley@2ndquadrant.com>)
Ответы Re: Needless additional partition check in INSERT?  (David Rowley <david.rowley@2ndquadrant.com>)
Список pgsql-hackers
On 2018-May-10, David Rowley wrote:

> Yeah, the comments do need work. In order to make it a bit easier to
> document I changed the way that check_partition_constr is set. This is
> now done with an if/else if/else clause for both COPY and INSERT.
> 
> Hopefully, that's easier to understand and prevents further mistakes.

I wonder if we should create a new small function that takes the two
resultRelInfos and returns the correct boolean --maybe something like
ExecConstraintsPartConstrNeedsRecheck()-- and then the smarts are in a
single place and we diminish the risk of a divergence.  It looks like a
very ad-hoc thing to have a function for, but then the new argument to
ExecConstraints() *is* pretty ad-hoc already, so encapsulating it seems
better.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: SCRAM with channel binding downgrade attack
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Supporting tls-server-end-point as SCRAM channel binding forOpenSSL 1.0.0 and 1.0.1