Re: CURRENT_TIME
lockhart@fourpalms.org
From: Thomas Lockhart <lockhart@fourpalms.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Simeó Reig <simeo@incofisa.com>, pgsql-general@postgresql.org, pgsql-hackers@postgresql.org
Date: 2002-11-07T06:50:00Z
Lists: pgsql-hackers, pgsql-general
Attachments
- date.c.patch (text/plain) patch
...
> In the long run, seems like it would be a good idea for type TIME
> WITHOUT TIME ZONE's input converter to accept and ignore a timezone
> field, just as type TIMESTAMP WITHOUT TIME ZONE does:
...
> Thomas, what do you think --- was this behavior deliberate or an
> oversight?
The behavior was deliberate, but predates the implementation of
TIMESTAMP WITHOUT TIME ZONE. The time zone is already ignored when
converting directly from TIME WITH TIME ZONE to TIME WITHOUT TIME ZONE:
lockhart=# select cast(time with time zone '2002-11-06
22:25:57.796141-05' as time);
time
-----------------
22:25:57.796141
and one could claim that this should be allowed from string constants too:
thomas=# select cast('2002-11-06 22:25:57.796141-05' as time);
time
-----------------
22:25:57.796141
Patch included to allow this latter case...
- Thomas