Re: Timestamp not working

From: "codeWarrior" <gpatnude(at)hotmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Timestamp not working
Date: 2005-11-15 16:01:03
Message-ID: dld0j2$h5u$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

CREATE TABLE mytable (

id serial not null primary key,

myvalue varchar(50),

create_dt timestamp not null default now()

);

INSERT INTO mytable (myvalue) VALUES ('When was this record inserted ?');
SELECT * FROM mytable;

"Si" <si(at)hotmail(dot)com> wrote in message
news:88odf(dot)2261$fN5(dot)887(at)newsfe6-gui(dot)ntli(dot)net(dot)(dot)(dot)
>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?
>

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2005-11-15 16:29:38 Re: ERROR: could not read block
Previous Message Jim C. Nasby 2005-11-15 15:55:08 Re: Major Problem, need help! Can't run our website!