dbTalk Databases Forums  

[BUGS] BUG #1025: current_time accepts 24:00:00

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1025: current_time accepts 24:00:00 in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PostgreSQL Bugs List
 
Posts: n/a

Default [BUGS] BUG #1025: current_time accepts 24:00:00 - 12-23-2003 , 12:05 AM







The following bug has been logged online:

Bug reference: 1025
Logged by: Rex Recio

Email address: rexrecio (AT) yahoo (DOT) com

PostgreSQL version: 7.3.3

Operating system: Red Hat Linux 7.3

Description: current_time accepts 24:00:00

Details:

I have a table containing 2 columns with default values of current_date and
current_time. When I don't fill in the values, the current_time default
sometimes fill-in a value of 24:00:00 instead of wrapping it to 00:00:00.
The other column with the current_date as default fills-in a value as if the
time is 23:59:59.




---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1025: current_time accepts 24:00:00 - 12-23-2003 , 08:57 AM






"PostgreSQL Bugs List" <pgsql-bugs (AT) postgresql (DOT) org> writes:
Quote:
I have a table containing 2 columns with default values of current_date and
current_time. When I don't fill in the values, the current_time default
sometimes fill-in a value of 24:00:00 instead of wrapping it to 00:00:00.
How is the time column actually declared? If it's got limited precision
(eg, time(0)) then I would expect a current_time value just before
midnight to be rounded to 24:00:00, eg, 23:59:59.765321 -> 24:00:00.
That's not a bug IMHO.

You would probably be better off to replace this design with a single
timestamp column.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.