Re: Need help in triggers
| From: | Samuel ROZE | Date: | Mon, 05 Oct 2009 17:35:53 +0000 |
| Subject: | Re: Need help in triggers | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-46561@lists.php.net to get a copy of this message | ||
What are you really want to do ? This is an exemple:
CREATE FUNCTION myfunction () RETURNS trigger AS $$
BEGIN
NEW.update_date = 'now'::date;
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER set_update_date AFTER INSERT ON matable FOR EACH ROW
EXECUTE PROCEDURE myfunction();
Le lundi 05 octobre 2009 à 14:36 +0530, Yogendra Kaushik a écrit :
> Hi all's
> i am working on an application in which we are using PostgreSql as an
> database, i need to write trigger for my application. Can any one help me
> how can i write it.
> i have try to write it, but did not get success.
>