Re: BUG: Unable to bind a null value typed as a UUID in a PreparedStatement

From: Dave Cramer <davecramer(at)gmail(dot)com>
To: Rémi Aubel <remi(dot)aubel(at)gmail(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Postgres Bug <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG: Unable to bind a null value typed as a UUID in a PreparedStatement
Date: 2018-03-28 14:27:05
Message-ID: CADK3HHL04oRUsW1phsqef4LsKnHv7nnR6_UU-FXkF=srwnKnjA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

@Remi,

You are welcome. It would be wonderful it you could test the fix ?

Dave Cramer

On 28 March 2018 at 10:25, Rémi Aubel <remi(dot)aubel(at)gmail(dot)com> wrote:

> Oh Thanks, Dave!
> I had created the issue on GitHub (https://github.com/pgjdbc/
> pgjdbc/issues/1161) and saw you marked it as duplicate.
>
> Le mer. 28 mars 2018 à 16:12, Dave Cramer <davecramer(at)gmail(dot)com> a écrit :
>
>> Remi,
>>
>> See https://github.com/pgjdbc/pgjdbc/pull/1160
>>
>> Dave Cramer
>>
>> On 28 March 2018 at 09:59, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
>> wrote:
>>
>>> On Wed, Mar 28, 2018 at 6:26 AM, Rémi Aubel <remi(dot)aubel(at)gmail(dot)com>
>>> wrote:
>>>
>>>> I need to bind a UUID parameter which may be null in a statement like
>>>> "select * from test table where ? is null or ? = c_uuid".
>>>> Whatever approach I use, the driver rejects my request with "ERROR:
>>>> could not determine data type of parameter $1".
>>>> ​[...]​
>>>> But in the current implementation of the driver, the
>>>> PreparedStatement.setNull(int, int, String) delegates to setNull(int, int)
>>>> so that specifying the type name has no effect.
>>>>
>>>
>>> ​JDBC Driver bugs are off-topic for this list. They should be reported
>>> on the project's GitHub site's Issues List.
>>>
>>> David J.
>>>
>>>
>>>
>> --
>
>
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2018-03-28 14:30:50 Re: BUG: Unable to bind a null value typed as a UUID in a PreparedStatement
Previous Message Rémi Aubel 2018-03-28 14:25:25 Re: BUG: Unable to bind a null value typed as a UUID in a PreparedStatement