Re: updating table field whenever other table field changes
В списке pgsql-general по дате отправления:
| От | Jan Wieck |
|---|---|
| Тема | Re: updating table field whenever other table field changes |
| Дата | |
| Msg-id | 3E8CDFDF.2486DCDF@Yahoo.com обсуждение исходный текст |
| Ответ на | updating table field whenever other table field changes (tech7890@yahoo.com (Andrew)) |
| Список | pgsql-general |
Andrew wrote: > > Hello postgresql.questions group! > > What do you think the best way to attack the following is: > parent table a - [status_field] > > child table b - [status_field] > > I need trigger or similar to achieve the following: > if a.status_field changes than all children of table a have their > b.status_field change to the same value as a. If b.status_field allways has to have a value that exists in a.status_field (or maybe NULL if you allow it to), you want to define a FOREIGN KEY constraint with the referential action ON UPDATE CASCADE. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера