| От | Thomas Kellerer |
|---|---|
| Тема | Re: Deferrable FK not behaving as expected. |
| Дата | |
| Msg-id | b97cbd9d-1615-c9e1-aff1-683a37fedee9@gmx.net обсуждение исходный текст |
| Ответ на | Deferrable FK not behaving as expected. (Ron <ronljohnsonjr@gmail.com>) |
| Ответы |
Re: Deferrable FK not behaving as expected.
Re: Deferrable FK not behaving as expected. |
| Список | pgsql-general |
Ron schrieb am 07.12.2020 um 19:15:
> Referenced by:
> TABLE "sales_detail" CONSTRAINT "fk_sales_detail_sales_header"
> FOREIGN KEY (cust_id, order_ts) REFERENCES sales_header(cust_id, order_ts) *DEFERRABLE*
I think if you only mention "deferrable" this is the same as "deferrable initially immediate",
so you will need to make them deferrable in your transaction:
SET CONSTRAINTS ALL DEFERRED;
or create the constraint with
deferrable initially deferred
Thomas
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера