timestamp 'default' question - Mailing list pgsql-general

From Charles Hauser
Subject timestamp 'default' question
Date
Msg-id 1047583695.6587.28.camel@pandorina.biology.duke.edu
Whole thread Raw
Responses Re: timestamp 'default' question
Re: timestamp 'default' question
List pgsql-general
All,

I have a TABLE entry for time:

 timeaccessioned  | timestamp without time zone | not null default
('now'::text)::timestamp(6) with time zone


w/ default set to 'now', I thought postgres would fill in time - not so?

When I attempt to load feature table w/out time entered ->

psql:feature.stdin:1: ERROR:  copy: line 1, Missing data for column
"timeaccessioned"


COPY feature (feature_id, dbxref_id, organism_id, name, uniquename,
residues, seqlen, md5checksum, type_id, timeaccessioned,
timelastmodified) FROM stdin;
1       \N      133     scaffold_1      chlre01.1       AAATCCAAGC
376197  53adae6396a767c7e88910c73b9d0b6b        3
\.


Can I get postgres to load current time, or do I need to generate it in
the script creating the SQL?

Charles





pgsql-general by date:

Previous
From: Dousak "May (Phoebus Apollonus)"
Date:
Subject: Re: Function in selection?
Next
From: Dousak "May (Phoebus Apollonus)"
Date:
Subject: Re: Function in selection?