Re: update in rule - Mailing list pgsql-admin

From Radoslaw Stachowiak
Subject Re: update in rule
Date
Msg-id 20011107115249.V7681@blue.alter.pl
Whole thread Raw
In response to Re: update in rule  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: update in rule
List pgsql-admin
*** Stephan Szabo <sszabo@megazone23.bigpanda.com> [Wednesday, 17.October.2001, 12:04 -0700]:
> create function adresses_trigger() returns opaque as '
> begin
>  NEW.date_maj := now();
>  return NEW;
> end;' language 'plpgsql';
> create trigger tr before update on adresses for each row execute
>  procedure adresses_trigger();

why sould I use before (instead of after)?
isnt it a little dangerous in transactions? /hope not/

I know difference between both forms. The question is rather about if
timestamp updating shouldnt be run AFTER update which I think is closer
to a real world situations (of course evth vary). But maybe there are
some probles with after, which I dont know about?

Just being curious...

--
radoslaw.stachowiak.........................................http://alter.pl/

pgsql-admin by date:

Previous
From: Radoslaw Stachowiak
Date:
Subject: strange behaviour of gettimeofday() and pg_dump
Next
From: "Sean K. Sell"
Date:
Subject: Re: update in rule