Re: question on rules
| От | Jan Wieck |
|---|---|
| Тема | Re: question on rules |
| Дата | |
| Msg-id | 3EE9FC23.8020206@Yahoo.com обсуждение исходный текст |
| Ответ на | question on rules (weigelt@metux.de) |
| Список | pgsql-sql |
Tom Lane wrote: > weigelt@metux.de writes: >> i'd like to write an rule which fills out some empty attrs on >> insert (w/ data from other given attrs). > > You'd be better off doing this with a BEFORE INSERT trigger. The only way to do it with rules would be to create a view over the basetable, create an insert rule over the view and then have the application doing the insert into the view instead. So "better" could be considered an understatement :-) 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-sql по дате отправления: