Trouble with float4 after upgrading from 6.5.3 to 7.0.2

Поиск
Список
Период
Сортировка
От Romanenko Mikhail
Тема Trouble with float4 after upgrading from 6.5.3 to 7.0.2
Дата
Msg-id 006601c0005f$40dea4c0$01011aac@angg.ru
обсуждение исходный текст
Ответы Re: Trouble with float4 after upgrading from 6.5.3 to 7.0.2  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
After trying to upgrade PostgreSQL from 6.5.3 to 7.0.2 I got into trouble with float4. I'll try to explain it by
example.

postgres@lee: ~$ createdb -E LATIN1 -e testfloat
CREATE DATABASE "testfloat" WITH ENCODING = 'LATIN1'
CREATE DATABASE
postgres@lee: ~$ psql testfloat
testfloat=# create table tftbl (f1 float4, f2 float4);
CREATE
testfloat=# insert into tftbl values (10, 20);
INSERT 212682 1
testfloat=# select * from tftbl;
 f1 | f2
----+----
 10 | 20
(1 row)

testfloat=# update tftbl set f1=10.1 where f1=10 and f2=20;
UPDATE 1
testfloat=# update tftbl set f2=20.2 where f1=10.1 and f2=20;
UPDATE 0
testfloat=# select * from tftbl;
  f1  | f2
------+----
 10.1 | 20
(1 row)

testfloat=# update tftbl set f2=20.2 where f1=float4(10.1) and f2=20;
UPDATE 1
testfloat=# select * from tftbl;
  f1  |  f2
------+------
 10.1 | 20.2
(1 row)

In my real client application (Windows 98, Borland C++ Builder 5.0, BDE 5.1.1.1, PostODBC 06.50.0000) I cannot in all
casesuse expressions like f1=float4(10.1) instead of simple f1=10.1 because BDE and PostODBC construct queries by
themselveswhen I, for example, update tables from BCB components (BDE complains, that another user changed the record,
whileI am the only user at the time). They use f1=10.1-like format. With PostgeSQL 6.5.3 I have no problem of the kind. 

PostgreSQL lives in Debian Linux (woody), kernel 2.2.14, libc6 2.1.3, locales 2.1.3, here is output of locale:
lee:~# locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=

Any help, tip or hint would be appreciated.

Thank you, Mikhail.





В списке pgsql-general по дате отправления:

Предыдущее
От: Vince Vielhaber
Дата:
Сообщение: Re:
Следующее
От: Simon Brooke
Дата:
Сообщение: Auto-increment datatypes and JDBC