Re: Trigger which fires on commit? (Multi-table intergrity constraint)
В списке pgsql-general по дате отправления:
| От | Richard Huxton |
|---|---|
| Тема | Re: Trigger which fires on commit? (Multi-table intergrity constraint) |
| Дата | |
| Msg-id | 200208080948.15184.dev@archonet.com обсуждение исходный текст |
| Ответ на | Trigger which fires on commit? (Multi-table intergrity constraint) (Stephane Bortzmeyer <bortzmeyer@nic.fr>) |
| Список | pgsql-general |
On Thursday 08 Aug 2002 9:22 am, Stephane Bortzmeyer wrote: > Hello, > > [Question already asked but may be badly explained. I rephrase it.] > > I have several tables and an integrity constraint which spans several > tables (for an Internet registry, a table Domains, a table Hosts and a > table Nameservers which links them: a Domain needs >= 2 > nameservers). The tables are updated in the same transaction and I > want the database to be OK after the commit. > > I can check many things from triggers but apparently triggers can only > be fired for a statement (like INSERT), not for a whole transaction. > > Oracle supports ON COMMIT triggers and they solve nicely this > problem. But apparently PostgreSQL does not. Any idea? How about a num_ns_per_domain table - insert into that and add a constraint there. Not sure about performance issues. - Richard Huxton
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера