Обсуждение: pgsql: Allow times of 24:00:00 to match rounding behavior:

Поиск
Список
Период
Сортировка

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

От
momjian@svr1.postgresql.org (Bruce Momjian)
Дата:
Log Message:
-----------
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.

Modified Files:
--------------
    pgsql/doc/src/sgml:
        datatype.sgml (r1.160 -> r1.161)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/datatype.sgml.diff?r1=1.160&r2=1.161)
    pgsql/src/backend/utils/adt:
        datetime.c (r1.158 -> r1.159)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/datetime.c.diff?r1=1.158&r2=1.159)
        nabstime.c (r1.143 -> r1.144)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/nabstime.c.diff?r1=1.143&r2=1.144)
    pgsql/src/interfaces/ecpg/pgtypeslib:
        dt_common.c (r1.30 -> r1.31)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/pgtypeslib/dt_common.c.diff?r1=1.30&r2=1.31)