How do I make a timestamp column default to current time

From: "zagman" <daveh(at)allheller(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: How do I make a timestamp column default to current time
Date: 2006-03-16 05:28:41
Message-ID: 1142486921.826368.268000@p10g2000cwp.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi,

I'm setting up a simple timecard program and I need a column that
defaults to the current time when a new row is inserted. How can I do
this I tried setting the default to 'now' but all that does is put the
time I created the table in each row! I'm also new to postgresql and if
someone can give me a pointer or two in the right direction I would be
appreciative.

Thanks,

Dave

Responses

Browse pgsql-general by date

  From Date Subject
Next Message mike 2006-03-16 05:42:52 Re: invalid UTF-8 byte sequence detected
Previous Message Wes 2006-03-16 05:20:20 invalid UTF-8 byte sequence detected