Re: Wrong output for 7.0.3 from NULL fields in CASE statement
В списке pgsql-bugs по дате отправления:
| От | Thomas Lockhart |
|---|---|
| Тема | Re: Wrong output for 7.0.3 from NULL fields in CASE statement |
| Дата | |
| Msg-id | 3A9DF334.4664859D@alumni.caltech.edu обсуждение исходный текст |
| Ответ на | Wrong output for 7.0.3 from NULL fields in CASE statement (pgsql-bugs@postgresql.org) |
| Список | pgsql-bugs |
> I am getting output that doesn't make sense from a simple SQL statement.
> I am expecting to get a '0'::text returned by this statement, but
> instead I'm getting very, very small numbers, or other weird things.
> It's a catch for NULL values and isn't interpreting them correctly when
> it gets them.
For a float8 field "d", I can reproduce this with a slightly simpler
case:
lockhart=# select case when (d = null) then 0 else d end from t1;
text
------
0
(1 row)
lockhart=# select case when (d = null) then '0' else d end from t1;
text
-----------------------
1.11784577978351e+253
(1 row)
I haven't tracked it down, but I'll guess that the automatic type
conversion logic is getting confused with the stringy form of zero.
I do not see the symptom in the current development tree.
- Thomas
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера