From: maxim.boguk@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #10457: Problem with double precision field.
Date: Thu, 29 May 2014 13:56:29 +0000
Message-ID: <20140529135629.10406.69681@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 10457
Logged by: Maxim Boguk
Email address: maxim.boguk@gmail.com
PostgreSQL version: 9.0.17
Operating system: Linux
Description:
Hi I have one database with table which I could not restore via
pg_dump/pg_restore.
I localized the problem at double precision values which could not be
inserted into double precision (weird it is).
[local]:5432 postgres@comon3=# select record_rating from rating.record
where record_rating>0 order by 1 limit 50;
record_rating
----------------------
6.5397686164648e-309
8.1108289380243e-309
2.0326868922821e-308
and so on...
But:
select '6.5397686164648e-309'::double precision;
ERROR: "6.5397686164648e-309" is out of range for type double precision
LINE 2: select '6.5397686164648e-309'::double precision;
select record_rating::text::double precision from rating.record where
record_rating>0 order by record_rating limit 10;
ERROR: "6.5397686164648e-309" is out of range for type double precision
So somehow double precision field could content value which could not be
inserted into it again.
Any ideas what's wrong with the database welcome.
PS: table structure:
obj_id | bigint | not null
default nextval('rating.record_obj_id_seq'::regclass)
obj_created | timestamp with time zone | not null
default now()
obj_modified | timestamp with time zone | not null
default now()
obj_status_did | smallint | not null
default 1
record_rating | double precision |
record_rating_without_attenuation | double precision | default 0
Indexes:
"record_pkey" PRIMARY KEY, btree (obj_id)
Kind Regards,
Maksym
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: maxim.boguk@gmail.com
Subject: Re: BUG #10457: Problem with double precision field.
In-Reply-To: <20140529135629.10406.69681@wrigleys.postgresql.org>
References: <20140529135629.10406.69681@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox