Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type
Дата
Msg-id a3bd5954-24d8-9f99-8cb6-fad9ddf02648@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type  (Eduardo Pérez Ureta <edpeur@gmail.com>)
Ответы Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type
Список pgsql-bugs
Hi,

On 10/16/2017 05:24 PM, Eduardo Pérez Ureta wrote:
> I have an application that I am trying to make it work in PostgreSQL and
> PostgreSQL seems to be the only database that does not support queries like:
> SELECT 1 WHERE ? IS NULL
> with a Java setTimestamp parameter.
>

So you're passing a timestamp value to PostgreSQL only to find out if
it's NULL? I don't want to be rude, but that seems a bit ... strange.

> 
> You say PostgreSQL is strongly typed, but an unknown type is accepted
> in the cases I presented before.
>

As David already pointed out before, these examples are not equal. In
the other cases PostgreSQL can easily infer the data type from other
parts of the query (e.g. target column in an INSERT). But that's not the
case here.

>
> Do you mean that PostgreSQL is not following the SQL standard?
> 

Can you kindly point us to the part where SQL Standard requires the
behavior you're requesting?

thanks

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [BUGS] BUG #14858: Inaccurate estimations after bulk delete andbulk insert
Следующее
От: Eduardo Pérez Ureta
Дата:
Сообщение: Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type