Re: Postgres 9.2.4 "Double Precision" Precision

From: NWRFC Portland <northwestrfc(at)gmail(dot)com>
To: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgres 9.2.4 "Double Precision" Precision
Date: 2013-09-16 20:40:15
Message-ID: CABf4AP0xSMjDQimxB-EgwBb4acvnD6kA654Py1CKrGxeyvDHaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian, Kevin,

Thank you for the clues. It turns out a java process was added (between
the data source and database) at same time of postgres upgrade. It was the
java process that incorrectly handled the double precision data.

Joanne

On Sat, Sep 14, 2013 at 9:57 AM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>wrote:

> On 09/14/2013 08:51 AM, Kevin Grittner wrote:
>
>> Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> wrote:
>>
>> create table float_test (id int, f_fld double precision);
>>> insert into float_test values (1, 6.31);
>>> insert into float_test values (2, 6.32);
>>> select * from float_test ;
>>>
>>> id | f_fld
>>> ----+-------
>>> 1 | 6.31
>>> 2 | 6.32
>>> (2 rows)
>>>
>>
>> If, instead of those inserts I use these:
>>
>> insert into float_test values (1, '6.31');
>> insert into float_test values (1, '6.32');
>> insert into float_test values (1, '6.32'::double precision);
>> insert into float_test values (1, '6.32'::real);
>>
>> I get:
>>
>> id | f_fld
>> ----+------------------
>> 1 | 6.31
>> 1 | 6.32
>> 1 | 6.32
>> 1 | 6.32000017166138
>> (4 rows)
>>
>> Apparently the value is being treated as a real value somewhere.
>>
>
> Interesting, more grist for the mill.
>
>
>
>> --
>> Kevin Grittner
>> EDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/**mailpref/pgsql-general<http://www.postgresql.org/mailpref/pgsql-general>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message karinos57 2013-09-16 23:55:52 using Replace funcion in postgresql
Previous Message Jeff Janes 2013-09-16 16:32:18 Re: Segmentation fault: pg_upgrade 9.1 to 9.3: pg_dump: row number 0 is out of range 0..-1