From: | Dale Seaburg <kg5lt(at)verizon(dot)net> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Date Of Entry and Date Of Change |
Date: | 2008-08-30 21:49:37 |
Message-ID: | D23B5780-9DC1-49E6-97E9-375F853FA498@verizon.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
I need to be able to establish the Date of Entry (INSERT) and Date of
Change (UPDATE) of a row to a table. I have added to my table two
columns, named 'doe' and 'doc' respectively. For sake of
discussion, let's call the Table 'instr'. What would be the best
method of added the current timestamp (date and time) to each of
these two new columns. In my mind, the timestamp would need to be
added just before the row was INSERTed or UPDATEd to prevent any
"race" condition.
I have looked at Triggers and Functions in the pgAdmin helps, but it
is confusing at best, how to arrive at a solution. Any help would be
appreciated. Perhaps, a simple example to get me headed in the right
direction.
Regards,
Dale Seaburg
From | Date | Subject | |
---|---|---|---|
Next Message | Dale Seaburg | 2008-08-31 02:43:08 | Re: Date Of Entry and Date Of Change |
Previous Message | Obe, Regina | 2008-08-28 22:01:16 | Re: How to save a image file in a postgres data field. |