pgjdbc/pgjdbc — pull request #223 by byronvf (2014-11-28 18:57:31+00:00)
Title: Honor stringtype=unspecified when also saving null values

This change applies the stringtype=unspecified setting to null values when using JDBC's setNull method with a sqlType of VARCHAR in addition to the setString method. Currently, saving a string with setString applies oid.UNSPECIFIED, but saving null with setNull(index, java.sql.Types.VARCHAR) saves with oid.VARCHAR. This causes problem with ORM layers that are, for example, saving strings to timestamp columns, which works in the non-null case, but creates a postgresql error when null.