Re: Default numeric scale of zero in JDBC?
От | Oliver Jowett |
---|---|
Тема | Re: Default numeric scale of zero in JDBC? |
Дата | |
Msg-id | 45AFEC9C.7080102@opencloud.com обсуждение исходный текст |
Ответ на | Re: Default numeric scale of zero in JDBC? (Todd Shoemaker <jtshoe11@yahoo.com>) |
Список | pgsql-jdbc |
Todd Shoemaker wrote: > Hello, > > I downloaded the jdbc source and noted that if I specified a default scale of 4 in AbstractJdbc2ResultSetMetadata.getScale()(if the column is numeric and the scale is -1), I received the desired results. I further updated the code to provide a private DEFAULT_NUMERIC_PRECISION that defaults to 4, which can be overriddenwith the System property org.postgresql.jdbc2.DEFAULT_NUMERIC_SCALE. I built this and tested it within SquirrelSQL and it works properly, and the system property is working to override this default. Would this be an updatethat the jdbc driver developers would be interested in? > > I suppose my other question is, what do other JDBC drivers default this to? Also, does this imply that others do not usenon-integer arithmetic with sql through JDBC? Given that the reported metadata scale does not affect what the driver does at all, and all the computation is done on the server side, I'd say that any rounding that is happening is happening in whatever is using the driver's metadata ("Squirrel SQL?") -O
В списке pgsql-jdbc по дате отправления: