Connecting Tech Pros Worldwide Help | Site Map

Timestamp not working

  #1  
Old November 23rd, 2005, 03:04 AM
Si
Guest
 
Posts: n/a
I have added a field to one of my PostgreSQL tables in the "Timestamp"
datatype, but when I add a row to that table I don't get the date and time
inserted into that column? Do I need to put a default value into the column
too?


  #2  
Old November 23rd, 2005, 03:04 AM
Stephen Prinster
Guest
 
Posts: n/a

re: Timestamp not working


Si wrote:[color=blue]
> I have added a field to one of my PostgreSQL tables in the "Timestamp"
> datatype, but when I add a row to that table I don't get the date and time
> inserted into that column? Do I need to put a default value into the column
> too?
>
>[/color]
Yep. I haven't done this for a while, but if my memory serves me, you
need to use CURRENT_TIME, CURRENT_DATE, or CURRENT_TIMESTAMP as a
default value to populate the column. For more on these functions, see
the docs:

http://www.postgresql.org/docs/8.0/s...-datetime.html
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
uploaded file validation is not working jonathan184 answers 10 November 20th, 2007 12:17 PM
Insert into temp tables not working Ross answers 4 November 12th, 2005 11:59 AM
Backup ok but restore not working Fabius answers 1 November 12th, 2005 09:28 AM
Checksum not working ajamrozek answers 7 July 23rd, 2005 09:37 AM