Skip site navigation (1) Skip section navigation (2)

Re: pgadmin error

From: "Charlie Holleran" <charles(dot)holleran(at)shiftenergy(dot)com>
To: "Dave Page" <dpage(at)pgadmin(dot)org>
Cc: <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: pgadmin error
Date: 2012-05-17 02:24:09
Message-ID: 41A5272E49B948728F7936E75053765D@CharlieLaptop (view raw, whole thread or download thread mbox)
Lists: pgadmin-hackers
Hi Dave

 Tried some more queries to qualify the rounding problem accessing data in 
pgadmin.  Not quite what was expected.  Hmmm...

Edit view brings back the values such as 8.53639e+06.

What has been stored in the table are numbers in increasing value.


SELECT col1, col2, date_observed,
  rt_value v0, rt_value::TEXT v1, to_char(rt_value, '999999999') v2,
  rt_value::NUMERIC v3, rt_value::NUMERIC::TEXT v4, 
to_char(rt_value::NUMERIC, '999999999') v5,
  rt_value::double precision v6, rt_value::double precision::TEXT v7, 
to_char(rt_value::double precision, '999999999') v8
FROM tbla
WHERE (col1,col2) = ( (-1465867942,-3248196) )
AND date_observed >= '9-May-2012 23:57'
AND date_observed < '10-May-2012'
ORDER BY col1, col2, date_observed



-1465867942;-3248196;"2012-05-09 23:57:00-03";8.53639e+06;"8.53639e+06";" 
8536388";8536390;"8536390";"   8536390";8536388;"8536388";"   8536388"
-1465867942;-3248196;"2012-05-09 23:58:00-03";8.5364e+06;"8.5364e+06";" 
8536396";8536400;"8536400";"   8536400";8536396;"8536396";"   8536396"
-1465867942;-3248196;"2012-05-09 23:59:00-03";8.5364e+06;"8.5364e+06";" 
8536404";8536400;"8536400";"   8536400";8536404;"8536404";"   8536404"



CREATE TABLE tbldaq_adb
  id bigserial NOT NULL,
  col1 integer NOT NULL,
  col2 integer NOT NULL,
  date_observed timestamp with time zone NOT NULL,
  rt_value real NOT NULL,



From: "Dave Page" <dpage(at)pgadmin(dot)org>
Sent: Wednesday, May 16, 2012 2:51 PM
To: "Charlie Holleran" <charles(dot)holleran(at)shiftenergy(dot)com>
Cc: <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgadmin-hackers] pgadmin error

> On Wed, May 16, 2012 at 10:04 AM, Charlie Holleran
> <charles(dot)holleran(at)shiftenergy(dot)com> wrote:
>> Is there a way to configure the JDBC driver that pgadmin uses to access 
>> the
>> db's?  I'm using pg's postgresql-8.4-701.jdbc4.jar in my code and I get 
>> the
>> correct values from the db.  But pgadmin does not get the correct values
>> back.  pgadmin is rounding real's to 6 significant digits, independent of
>> the magnitude of the value.  real's obviously have an issue with 
>> resolution
>> as the magnitude of the number increases.  But this pgadmin issue is not
>> magnitude dependent.  Second the real datatype issue loses resolution in
>> power of 2's.  pgadmin is losing in the power of 10's.  It seems like a
>> string parsing issue in the jdbc that only parses the first 6 digits.
>> So I'd like to configure pgadmin to use the same jdbc driver as my code.
>> Which works.  Where can I set the driver for pgadmin?
> pgAdmin isn't a Java app. It's written in C++ and uses libpq to access
> the server.
> Where in pgAdmin do you see the rounding? (query tool, edit grid
> or...). Can you provide a self contained test case?
> -- 
> Dave Page
> Blog:
> Twitter: @pgsnake
> EnterpriseDB UK:
> The Enterprise PostgreSQL Company

In response to


pgadmin-hackers by date

Next:From: Guillaume LelargeDate: 2012-05-17 11:20:02
Subject: pgAdmin website commit: Update website's french translation
Previous:From: Begina FelicysymDate: 2012-05-16 19:07:19
Subject: Odp: PL pgAdmin website commit: Update .pot file.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group