pgjdbc/pgjdbc — pull request #89 by ChenHuajun (2013-10-09 12:54:32+00:00)
Title: set a fixed lc_monetary to avoid error in some culture.

Hi , all

Currenttly pgjdbc seem to only supported dollar as monetary .
For example,when lc_monetary = 'zh_CN.UTF8',the folloing code will fail.

PreparedStatement stmt = con.prepareStatement("select 1::money");
ResultSet rs = stmt.executeQuery();
rs.next()
System.out.print(rs.getObject(1));// throw error:Bad value for type double : ￥1

To support all monetaries is not practical.Since pgjdbc only support dollar i suggest set lc_monetary to 'C' when connecting. So regardless the setting of lc_monetary in the backend we can read and write money data via pgjdbc.

regard,
Chen Huajun