| От | brichard@cafod.org.uk (Bruce Richardson) |
|---|---|
| Тема | Re: Trigger and Permissions |
| Дата | |
| Msg-id | 20010226225704.A13399@usb.cafod.org.uk обсуждение исходный текст |
| Ответ на | Trigger and Permissions (Tulio Oliveira <mestredosmagos@marilia.com>) |
| Список | pgsql-general |
On Mon, Feb 26, 2001 at 03:04:18PM -0300, Tulio Oliveira wrote: > THE QUESTION:::: > > How can I make a trigger that insert data in a table that no normal user > have INSERT PERMISSION ? While connected to the database as superuser, create a view of the log table. Then create an insert rule so that when someone inserts a record into the view the rule inserts the record into the log table. Give your users permission to insert into the view. This will work because rules act as if they were run by the person who *owns* the view/table that the rule is tied to and *not* the person who is actually logged in. -- Bruce
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера