autotimestamping

From: Michael Hanna <zen(at)hwcn(dot)org>
To:
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: autotimestamping
Date: 2003-06-25 18:17:50
Message-ID: 549B8742-A739-11D7-8DBC-00039308EB2C@hwcn.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice pgsql-patches

want an auto timestamping on my table.. SQL of create:
create table healthnotes ( "posted" timestamptz not null default
current_timestamp,
"notes" text,
primary key (posted))

was succ. but how do I set it to autotimestamp when adding entries?

tried:

insert into healthnotes values ('my text notes entry my text notes
entry my text notes entry')

but said the value for timestamp was too long
clearly the autotimestamp isn't set up yet

Michael

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Nabil Sayegh 2003-06-25 18:24:59 Re: autotimestamping
Previous Message Tom Lane 2003-06-25 18:14:38 Re: [NOVICE] connectby() minor bug in errormessage

Browse pgsql-patches by date

  From Date Subject
Next Message Josh Berkus 2003-06-25 18:20:58 Re: Runtime.SGML diff ... please expedite!
Previous Message Tom Lane 2003-06-25 18:14:38 Re: [NOVICE] connectby() minor bug in errormessage