time and current_time default formats

Поиск
Список
Период
Сортировка
От Thomas O'Connell
Тема time and current_time default formats
Дата
Msg-id tfo-3697AB.15580912122002@news.hub.org
обсуждение исходный текст
Список pgsql-general
i haven't seen this covered, yet, so i thought i'd ask:

is there a reason that the default behavior for the time data type is
without timezone, while the default behavior for current_time is to
return timetz?

indirectly, this reveals what might be a bug (in 7.2.3):

db# create table timetable (timecol time);
db# insert into timetable select current_time; -- works just fine
db# create temporary table timetable_tmp as select current_time from
timetable;
db# copy timetable_tmp to '/tmp/timetable_tmp.sql';
db# drop table timetable;
db# create table timetable (timecol time);
db# copy timetable from '/tmp/timetable_tmp.sql';

ERROR:  copy: line 1, Bad time external representation

why does the casting work when inserted via a select but not a copy?

-tfo

В списке pgsql-general по дате отправления:

Предыдущее
От: Timothy Grant
Дата:
Сообщение: Restoring a pg_dumped file...
Следующее
От: "Johnson, Shaunn"
Дата:
Сообщение: Re: problems updating table