time and current_time default formats

From: Thomas O'Connell <tfo(at)monsterlabs(dot)com>
To: pgsql-bugs(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: time and current_time default formats
Date: 2002-12-12 21:58:09
Message-ID: tfo-3697AB.15580912122002@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs 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

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2002-12-12 22:18:44 Bug #847: plpgsql 'raise notice' > 4000 chars disconnects pgsql backend 7.2.1
Previous Message Bruce Momjian 2002-12-12 21:49:30 Re: ecpg Oracle compatibility issue

Browse pgsql-general by date

  From Date Subject
Next Message Johnson, Shaunn 2002-12-12 22:03:09 Re: problems updating table
Previous Message Timothy Grant 2002-12-12 21:57:59 Restoring a pg_dumped file...