Skip site navigation (1) Skip section navigation (2)

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$ (view raw, whole thread or download thread mbox)
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
>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

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group