User and Timestamps - Mailing list pgsql-general

From google@itrex.de (Simon Heinrich)
Subject User and Timestamps
Date
Msg-id 3849957c.0305220227.1d745582@posting.google.com
Whole thread Raw
Responses Re: User and Timestamps  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List 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

pgsql-general by date:

Previous
From: John
Date:
Subject: Hello
Next
From: "Johann Thoyer"
Date:
Subject: pg_connect()