Timestamp Default value

From: "Christopher A(dot) Goodfellow" <cgoodfellow(at)tealuxe(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Timestamp Default value
Date: 2004-04-21 15:58:46
Message-ID: 000c01c427b9$881dbda0$030a640a@tealuxe.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I created a table with column named orderdate and a default of Now() by the
following command:

CREATE TABLE "trans_test" (
"orderdate" timestamp without time zone DEFAULT timestamp 'now ( )' NOT
NULL,
etc...

The value inserted into this column when a record is inserted into the
table is the date and time the table was created. How do I get the value to
be the date and time the record is inserted short of modifying all my script
code and removing the default value?

This method did work in version 6.5. I am currently running 7.3.2.

Thank You,
Christopher A. Goodfellow
Director of Information Technology
Tealuxe, Inc.
Phone: 508 520 7887 ex:22
Fax: 508 528 8999
www.tealuxe.com
tea for all

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Guerin 2004-04-21 17:23:57 vacuum full question.
Previous Message JP Beaudry 2004-04-21 15:16:57 RE: [NOVICE] Création de BD