Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

wwwxxx0cm, www.webdp.net, Event 9 IIS log failed to write entry, wwwxxx jeffs, Catastrophic failure Unexpected method call sequence. 0x8000ffff (-2147418113)., ksh lock a file, [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC failed, sed: -e expression #1, char 1: unterminated address regex, procmail + change subject, w2ksp4.exe download

Links

XODOX
Impressum

#1: Timestamp not working

Posted on 2005-11-12 16:47:16 by 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?

Report this message

#2: Re: Timestamp not working

Posted on 2005-11-12 18:52:43 by Stephen Prinster

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/static/functions-datetime .html

Report this message