Re: Question on triggers and plpgsql
От | Sean Davis |
---|---|
Тема | Re: Question on triggers and plpgsql |
Дата | |
Msg-id | fef7e50cf33b53ca481ecb2554cd6403@mail.nih.gov обсуждение исходный текст |
Ответ на | Re: Question on triggers and plpgsql (John DeSoi <desoi@pgedit.com>) |
Ответы |
Re: Question on triggers and plpgsql
Re: Question on triggers and plpgsql |
Список | pgsql-sql |
On Apr 8, 2005, at 8:28 AM, John DeSoi wrote: > > On Apr 7, 2005, at 5:45 PM, Carlos Moreno wrote: > >> The thing seems to work -- I had to go in a shell as user >> postgres and execute the command: >> >> $ createlang -d dbname plpgsql >> >> (I'm not sure I understand why that is necessary, or >> what implications -- positive or negative -- it may have) > > As a security measure, no pl language is available by default. What > you did is correct. There is not much (any?) risk with pl/pgsql, so > you can install it in template1 so it will be available in any new > database you create. > >> >> Am I doing the right thing? Have I introduced some sort >> of catastrophe waiting to happen? > > I did not notice any problems. > Just one detail, but in the form of a question. In the original posting, I think the trigger was doing the logging for something happening on a table as a before insert or update--I may be wrong on that detail. I would think of doing such actions AFTER the update/insert. In the world of transaction-safe operations, is there ANY danger in doing the logging as a BEFORE trigger rather than an AFTER trigger? Thanks, Sean
В списке pgsql-sql по дате отправления: