Re: Problem with a constraint check on a table.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem with a constraint check on a table.
Дата
Msg-id 20084.1058677465@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Problem with a constraint check on a table.  ("Fabre Lambeau" <faml2@cam.ac.uk>)
Список pgsql-general
"Fabre Lambeau" <faml2@cam.ac.uk> writes:
> I then tried to add a new record, duplicating another one with both
> contact_validity and contact_principal being 'true' (I changed the
> contact_id, obviously, to avoid duplicate entries in primary key).
> PostgreSQL let me insert it, without raising an error, although the function
> is_principalcontact_unique(actor_id, contacttype_id) now returns 'false'
> Any idea why it is so?

Because the constraint is checked before the row is actually inserted.

            regards, tom lane

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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: Is there a way to pass more than 32 parameters to a
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [ADMIN] Error Message Using pg_dumpall