Re: Constraint ordering

Поиск
Список
Период
Сортировка
От Ron
Тема Re: Constraint ordering
Дата
Msg-id 698dc608-aa1d-9763-714a-b1fe278534d6@gmail.com
обсуждение исходный текст
Ответ на Constraint ordering  (Perry Smith <pedz@easesoftware.com>)
Список pgsql-general
On 4/9/22 09:42, Perry Smith wrote:
> I think (hope) I’ve made a bad assumption.  I have my DB with one table with two constraint on new entries.  The
“first”is for the parent and basename be unique.  The “second” is that the devno and inode are unique if it is a
directory.
>
> When I was doing my early testing, the parent+basename constraint would fire first if it needed to.  Now that I’m
doinga longer test run, the second constraint is firing at a time that I wasn’t expecting.  I’m debugging but it takes
timeto hit this again.
 
>
> My assumption was if the error reported back that the “second" constraint failed that the “first” constraint passed.
ButI bet that isn’t a valid assumption at all.
 
>
> All that to ask: is there a predictable ordering of constraints?

If this would be a problem, then make the constraints deferred (until commit).

-- 
Angular momentum makes the world go 'round.



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Constraint ordering
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Constraint ordering