By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,905 Members | 1,783 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,905 IT Pros & Developers. It's quick & easy.

Timestamp not working

P: n/a
Si
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?
Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Si wrote:
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?

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
Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.