> Greetings all, i've been reading your postings awhiles now and have come
> complete tyro to aprentice novice reading them :) Its about time for me
> cutting my teeth on something real, and i'll have to start doing triggers
> enough for a charity project i'm doing, can anyone give some pointers on
> events i can handle, how i can detect them, and what i can do once i have?
You can have triggers run before or after the insert, update or deletion of
The trigger will be run once per row affected by the SQL statement.
In before triggers you can modify the request being done. For insert or
allows you to change the row that is going to be placed into the database
tuple you return at the end of the trigger). For all three actions, you may
action on that row (by returning NULL). Before triggers are useful on
insert and update
for doing modifications like adding timestamp columns and such.
In after triggers you can run things that want to see the state of the
the statement action has occurred (like the row has been inserted, affected
have been updated, etc...). Our current foreign key support is a special
after triggers as an example of things that can be done.
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
In response to
pgsql-novice by date
|Next:||From: Frank Bax||Date: 2002-01-24 12:50:58|
|Subject: Re: Disk I/O|
|Previous:||From: denis||Date: 2002-01-24 05:57:34|
|Subject: Disk I/O|