Skip site navigation (1) Skip section navigation (2)

Re: Cannot pass null in Parameter in Query for ISNULL

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Bernard <bht237(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Cannot pass null in Parameter in Query for ISNULL
Date: 2012-04-22 09:33:04
Message-ID: CADK3HHJqziu=Pks3VBkd+sz54crz=0XwY3UQW-+cFozSMmvk2A@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Bernard,

This from Tom

http://archives.postgresql.org/pgsql-jdbc/2011-12/msg00007.php

Suggests that this is not a simple problem. Can you send me the unit
tests though.

Dave Cramer

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



On Sat, Apr 21, 2012 at 8:57 PM, Bernard <bht237(at)gmail(dot)com> wrote:
> Hi,
>
> We have a driver issue with postgresl that doesn't exist with other
> databases.
>
> It happens with Java JPA implementations when a very simple query is
> executed like:
>
> SELECT a FROM Author a WHERE :lastName IS NULL OR LOWER(a.lastName) =
> :lastName
>
> See
> http://en.wikipedia.org/wiki/Java_Persistence_Query_Language#Examples
>
> :lastName is a parameter, and the null check is on the parameter so
> there shouldn't be a problem with this at all.
>
> Maciek has suggested a solution for this driver issue at
> http://archives.postgresql.org/pgsql-jdbc/2011-12/msg00017.php
>
> I wonder when this could be resolved? Apparently there is a related
> back-end issue.
>
> I have a few JUnit test for this so please ask.
>
> Kind Regards,
>
> Bernard
>
>
>
> --
> 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

Responses

pgsql-jdbc by date

Next:From: Maciek SakrejdaDate: 2012-04-23 03:07:39
Subject: Re: Cannot pass null in Parameter in Query for ISNULL
Previous:From: BernardDate: 2012-04-22 04:50:12
Subject: Cannot pass null in Parameter in Query for ISNULL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group