Date Of Entry and Date Of Change - Mailing list pgsql-novice

From Dale Seaburg
Subject Date Of Entry and Date Of Change
Date
Msg-id D23B5780-9DC1-49E6-97E9-375F853FA498@verizon.net
Whole thread Raw
List 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



pgsql-novice by date:

Previous
From: "Obe, Regina"
Date:
Subject: Re: How to save a image file in a postgres data field.
Next
From: Dale Seaburg
Date:
Subject: Re: Date Of Entry and Date Of Change