Re: JDBC + ENUM + NULL Insert ==

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Marc Fournier <mfournier(at)sd63(dot)bc(dot)ca>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC + ENUM + NULL Insert ==
Date: 2013-02-23 11:18:26
Message-ID: CADK3HHLex5j0rj2g+wBffBGNrpN9ga9Q9cm86P+rW1LVQJOefg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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.

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On Fri, Feb 22, 2013 at 6:28 PM, Marc Fournier <mfournier(at)sd63(dot)bc(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Maz Mohammadi 2013-02-24 04:05:12 Re: can't access through SSL
Previous Message Marc Fournier 2013-02-22 23:28:58 JDBC + ENUM + NULL Insert ==