[PostgresJDBCDriver 42.2.2 Strange Behavior] Observed precision and scale being set as 17 for 'Double Precision data type'

From: Sachin Kumar <sachin170392(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: [PostgresJDBCDriver 42.2.2 Strange Behavior] Observed precision and scale being set as 17 for 'Double Precision data type'
Date: 2018-04-19 03:36:19
Message-ID: CAHe_HcrW5JqjG-Tz6cXQM3=ko8p-NYRaHGzX9_=swrwnWfbtXA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi Postgres Team,

I have observed PostgresJDBCDriver 42.2.2 returning precision and scale
both same as 17 for 'double precision' data type.

Ideally scale should not be same as precision otherwise it will indicate
only value between o and 1(exclusive) are allowed to load in it.

Can you please look in to this issue and please let me understand why
precision and scale has been set as 17(hardcoded value) for postgres
'double precision' data type?

GIT Src code link for reference[Hardcoded '17']:
https://github.com/pgjdbc/pgjdbc/blob/d5f1cf7c35b05318947021d41e73b6953f623256/pgjdbc/src/main/java/org/postgresql/jdbc/TypeInfoCache.java#L659

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Mark Rotteveel 2018-04-20 12:39:13 Re: [PostgresJDBCDriver 42.2.2 Strange Behavior] Observed precision and scale being set as 17 for 'Double Precision data type'
Previous Message Dave Cramer 2018-04-16 13:50:20 Re: regarding java.sql2