JDBC + ENUM + NULL Insert ==
JDBC + ENUM + NULL Insert ==
От:
Marc Fournier <mfournier@sd63.bc.ca>
Дата:
We implemented the 'unspecified' solution to allow us to use ENUMs, but when we try and enter a NULL value through JDBC to an ENUM field, we get the an error about not being able to insert a varchar into an ENUM … but NULL isn't varchar or anything else … so why are we getting that sort of message, and is there some way to fix?
Re: JDBC + ENUM + NULL Insert ==
От:
Dave Cramer <pg@fastcrypt.com>
Дата:
Marc,
What would be useful is a test case to see exactly what you are doing. However the JDBC API setNull(parameterIndex, type) does actually require a type.
On Fri, Feb 22, 2013 at 6:28 PM, Marc Fournier <mfournier@sd63.bc.ca> wrote:
We implemented the 'unspecified' solution to allow us to use ENUMs, but when we try and enter a NULL value through JDBC to an ENUM field, we get the an error about not being able to insert a varchar into an ENUM …
but NULL isn't varchar or anything else … so why are we getting that sort of message, and is there some way to fix?
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc