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

From Eduardo Pérez Ureta
Subject Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type
Date
Msg-id CAM7oS3HQwJoiT4Yza5kG-zcTU_grPA1RrtniuekvCuUR+C7hpg@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-bugs
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.

You say PostgreSQL is strongly typed, but an unknown type is accepted in the cases I presented before. Do you mean that PostgreSQL is not following the SQL standard?

On Oct 16, 2017 4:03 PM, "David G. Johnston" <david.g.johnston@gmail.com> wrote:
On Sun, Oct 15, 2017 at 10:40 PM, Eduardo Pérez Ureta <edpeur@gmail.com> wrote:
My example is even better!
There is no need to infer the type as it is not needed!
PostgreSQL should be able to infer that no type is needed.

​It could - but since SQL is a strongly typed language it doesn't have that luxury.

The original thread you pointed to complained about the regression from protocol v2 to protocol v3.  Is that your complaint too or do you have some other use case?

David J.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup
Next
From: "David G. Johnston"
Date:
Subject: Re: [BUGS] BUG #14853: Parameter type is required even when the querydoes not need to know the type