timestamp 'default' question

Поиск
Список
Период
Сортировка
От Charles Hauser
Тема timestamp 'default' question
Дата
Msg-id 1047583695.6587.28.camel@pandorina.biology.duke.edu
обсуждение исходный текст
Ответы Re: timestamp 'default' question  (Jeff Fitzmyers <jeff@cloverpub.com>)
Re: timestamp 'default' question  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Dousak "May (Phoebus Apollonus)"
Дата:
Сообщение: Re: Function in selection?
Следующее
От: Dousak "May (Phoebus Apollonus)"
Дата:
Сообщение: Re: Function in selection?