Re: Correct getScale() behavior? - Mailing list pgsql-jdbc

From tivvpgsqljdbc@gtech-ua.com
Subject Re: Correct getScale() behavior?
Date
Msg-id 4827FB77.1030106@gtech-ua.com
Whole thread Raw
In response to Re: Correct getScale() behavior?  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Kris Jurka написав(ла):
>
> Right, that change would be nice, but it would require a server
> change. The best place to ask about that would be -hackers.  Also how
> do you determine the precision of sum(numeric(7,2))?
I suppose the answer is: "As always, by function definition":
9.18. Aggregate Functions

|sum(/expression/)

|bigint for smallint or int arguments, numeric for bigint arguments,
double precision for floating-point arguments, otherwise the same as the
argument data type

So, sum(numeric(7,2)) must be numeric(7,2). If result do not fit, sql
code  must be raised.

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: JDBC types vs postgres types correspondation
Next
From: Achilleas Mantzios
Date:
Subject: scrollable ResultSet advise