time and current_time default formats - Mailing list pgsql-general

From Thomas O'Connell
Subject time and current_time default formats
Date
Msg-id tfo-3697AB.15580912122002@news.hub.org
Whole thread Raw
List 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 by date:

Previous
From: Timothy Grant
Date:
Subject: Restoring a pg_dumped file...
Next
From: "Johnson, Shaunn"
Date:
Subject: Re: problems updating table