SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru johnjohn2's Avatar
    Join Date
    Apr 2004
    Location
    here
    Posts
    746
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    postgresql default field value manipulation question

    Is there a way to have a timestamp field in postgresql update to current date/time whenever there is a change to the record? I want to be able to change the date/time for tracking purposes. If I can do it at the table level that would be great.

    Also, was wondering if it's necessary to specify a length for a timestamp field.

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2004
    Location
    Norway
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use a trigger to perform the desired action on an update.

  3. #3
    SitePoint Guru johnjohn2's Avatar
    Join Date
    Apr 2004
    Location
    here
    Posts
    746
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you know of any good sites that lists examples are tutorials on working with postgresql triggers?

    Quote Originally Posted by Stream
    You can use a trigger to perform the desired action on an update.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •