BUG #12885: The result of casting a double to an integer depends on the database version
В списке pgsql-bugs по дате отправления:
| От | rschaaf@commoninf.com |
|---|---|
| Тема | BUG #12885: The result of casting a double to an integer depends on the database version |
| Дата | |
| Msg-id | 20150320194337.2573.72944@wrigleys.postgresql.org обсуждение исходный текст |
| Ответы |
Re: BUG #12885: The result of casting a double to an integer depends on the database version
|
| Список | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 12885
Logged by: Rich Schaaf
Email address: rschaaf@commoninf.com
PostgreSQL version: 9.4.1
Operating system: Windows 7
Description:
The result returned by the following query appears to depend on the
PostgreSQL database version.
The query is:
select column1 AS double_value, cast(column1 AS INT) AS int_value
from (VALUES (-2.5::double precision),
(-1.5::double precision),
(-0.5::double precision),
(0.5::double precision),
(1.5::double precision),
(2.5::double precision)) t;
In PostgreSQL 9.3.5, the query returns:
double_value, int_value
-2.5, -3
-1.5, -2
-0.5, -1
0.5, 1
1.5, 2
2.5, 3
PostgreSQL 9.4.1, the query returns:
-2.5, -2
-1.5, -2
-0.5, 0
0.5, 0
1.5, 2
2.5, 2
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера