| From: | google(at)itrex(dot)de (Simon Heinrich) |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | User and Timestamps |
| Date: | 2003-05-22 10:27:42 |
| Message-ID: | 3849957c.0305220227.1d745582@posting.google.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi NG,
working with postgres is very intresting...for a newby like me a big
big playground and so I found a nother toy which i like to handle :)
Rules or Triggers + Functions
In all of the maintable in my DB I have the following Fields:
created timestamptz
createdby vchar(15)
modified timestamptz
modifiedby vchar(15)
Now I like to setup a mechanismus which tke care of inserts and
updates. Everytime an insert is calld created shuld stamped whith the
current loggedin user and createdby whith Current_Timestamp....Same
for update whith modifed and modifedby.
I tried to set up a rule but it wont work because I find no way to
identify the newly inserted row :(
Thankyou for your support
Simon
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Anupama Laxminarayan | 2003-05-22 11:04:40 | Disabling autocommit at the psql prompt |
| Previous Message | Conxita Marín | 2003-05-22 10:27:38 | Is this a bug? : select '26/10/2003'::date + interval '1 day'; |