Re: Remove mention in docs that foreign keys on partitioned tablesare not supported

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Remove mention in docs that foreign keys on partitioned tablesare not supported
Дата
Msg-id cc95fb54-4c02-f0e6-46eb-e587a96eaf0f@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Remove mention in docs that foreign keys on partitioned tables are not supported  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 6/4/18 16:50, Tom Lane wrote:
> Perhaps, but I'm having a hard time wrapping my mind around what the
> semantics ought to be.  If a trigger on partition A changes the keys
> so that the row shouldn't have gone into A at all, what then?  That
> trigger should never have fired, eh?

The insert will result in an error and everything is rolled back, so you
do kind of get the "should never have" behavior.

It seems we ultimately have to answer the question whether we want
BEFORE triggers executed before or after tuple routing.  Both behaviors
might be useful, so perhaps we'll need two kinds of triggers.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Remove mention in docs that foreign keys on partitioned tablesare not supported
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Remove mention in docs that foreign keys on partitioned tables are not supported