1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-22 02:52:08 +03:00

Allow times of 24:00:00 to match rounding behavior:

regression=# select '23:59:59.9'::time(0);
	   time
	----------
	 24:00:00
	(1 row)

	This is bad because:

	regression=# select '24:00:00'::time(0);
	ERROR:  date/time field value out of range: "24:00:00"

The last example now works.
This commit is contained in:
Bruce Momjian
2005-10-14 11:47:57 +00:00
parent dbc214f7e6
commit a93bf4503f
4 changed files with 27 additions and 18 deletions

View File

@ -1,5 +1,5 @@
<!--
$PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.160 2005/10/02 23:50:06 tgl Exp $
$PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.161 2005/10/14 11:47:56 momjian Exp $
-->
<chapter id="datatype">
@ -1368,7 +1368,7 @@ SELECT b, char_length(b) FROM test2;
<entry>8 bytes</entry>
<entry>times of day only</entry>
<entry>00:00:00.00</entry>
<entry>23:59:59.99</entry>
<entry>24:00:00</entry>
<entry>1 microsecond / 14 digits</entry>
</row>
<row>
@ -1376,7 +1376,7 @@ SELECT b, char_length(b) FROM test2;
<entry>12 bytes</entry>
<entry>times of day only, with time zone</entry>
<entry>00:00:00.00+12</entry>
<entry>23:59:59.99-12</entry>
<entry>24:00:00-12</entry>
<entry>1 microsecond / 14 digits</entry>
</row>
</tbody>