From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | Mark Rotteveel <mark(at)lawinegevaar(dot)nl> |
Cc: | pgsql-jdbc(at)lists(dot)postgresql(dot)org |
Subject: | Re: [PostgresJDBCDriver 42.2.2 Strange Behavior] Observed precision and scale being set as 17 for 'Double Precision data type' |
Date: | 2018-04-22 19:25:04 |
Message-ID: | CADK3HHLw7yAKm9ZMHKDk4RQOmAe5CiwS3s5r1QXUTbDc0jkTrQ@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Please file an issue here https://github.com/pgjdbc/pgjdbc/issues
Dave Cramer
davec(at)postgresintl(dot)com
www.postgresintl.com
On 20 April 2018 at 08:39, Mark Rotteveel <mark(at)lawinegevaar(dot)nl> wrote:
> On 19-4-2018 05:36, Sachin Kumar wrote:
>
>> Hi Postgres Team,
>>
>> I have observed PostgresJDBCDriver 42.2.2 returning precision and scale
>> both same as 17 for 'double precision' data type.
>>
>
> Scale has no meaning for double precision, as such it should return 0
> always (from the javadoc of ResultSetMetaData.getScale(..): "Gets the
> designated column's number of digits to right of the decimal point. 0 is
> returned for data types where the scale is not applicable.".
>
> It sounds like a bug to me, to be honest.
>
>
> 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/d5f1cf7c35b05318947021
>> d41e73b6953f623256/pgjdbc/src/main/java/org/postgresql/jdbc/
>> TypeInfoCache.java#L659
>>
>
>
> --
> Mark Rotteveel
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2018-04-23 22:18:55 | Re: Bug sent to bugs list |
Previous Message | Brian K | 2018-04-20 17:01:08 | Bug sent to bugs list |