"Christopher A. Goodfellow" <cgoodfellow (AT) tealuxe (DOT) com> writes:
Quote:
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, |
That should just be
... DEFAULT now() ...
or if you want to be SQL spec compliant
... DEFAULT LOCALTIMESTAMP ...
What you have is a timestamp literal that is parsed at the instant of
table creation. The parentheses are perhaps misleading you into
thinking that you have written a function call, but you haven't ---
the timestamp input converter is just ignoring them.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html