Re: Bug: Cannot pass null in Parameter in Query for ISNULL

Поиск
Список
Период
Сортировка
От Maciek Sakrejda
Тема Re: Bug: Cannot pass null in Parameter in Query for ISNULL
Дата
Msg-id CAH_hXRY2UEBZFAEHGohxz7OKLiwY5QxC2HbRPECsO4hM4cptNw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Bug: Cannot pass null in Parameter in Query for ISNULL  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: Bug: Cannot pass null in Parameter in Query for ISNULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc
>> I hope you are not suggesting that I
>> discuss this with PostgreSQL DB engine engineers. I really can't do
>> that so I will keep requesting a fix here.
>
> Actually, that was exactly what I was suggesting. As I described in my
> previous mail, it's really not something that can be handled in the
> driver. You want a change to how parameters of unknown type are
> handled in IS NULL expressions; that's entirely server-side, the
> driver has no idea what an IS NULL expression looks like. You'll
> probably want a stronger argument than "our JPA implementation doesn't
> pass type information" first though.

Actually, since this is the root of the problem, I'd be curious as to
how all the other major drivers/DBs handle this if they work as
claimed. The other drivers must either inline the values into the SQL
(i.e., the driver takes care of parameterization) which side-steps
this problem (trading it for others), have server-side support for
this (I'd be surprised if this is widely supported since it's not a
trivial feature and not that broadly useful), or work some unexpected
magic in the driver (though I'm rather skeptical that something is
feasible there). If you're serious about this, a good way to continue
this discussion would be to illustrate how this works in other
implementations of the spec.

I guess one possible way to do this would be to only inline null
values when binding parameters, although that seems on the dangerous
side of clever (and you'd have a hell of a time getting it to work
with named prepared statements).
---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Joel Jacobson
Дата:
Сообщение: Re: [HACKERS] Java LISTEN/NOTIFY client library work-around
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug: Cannot pass null in Parameter in Query for ISNULL