You're doing update right ??? Just update the column... It's even easier if,
when you do your updates... You just:

UPDATE blah SET field = value,....,  updatestamp = 'Now()' WHERE
condition...

GP


"Neal Lindsay" <[EMAIL PROTECTED]> wrote in message
b1r864$2mpp$[EMAIL PROTECTED]">news:b1r864$2mpp$[EMAIL PROTECTED]...
> I have a table that I want to keep track of the user who last modified
> it and the timestamp of the modification. Should I use a trigger or a
rule?
>
> CREATE TABLE stampedtable (
> stampedtableid SERIAL PRIMARY KEY,
> updatestamp timestamp NOT NULL DEFAULT now(),
> updateuser name NOT NULL DEFAULT current_user,
> sometext text
> );
>
> I suspect that I want a rule, but all the examples in the documentation
> seem to update a separate table and not override (or add) the
> insert/update to the timestamp and name columns.
>
> Thanks,
> -Neal
>



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to