pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Eduardo Pérez Ureta <edpeur@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14853: Parameter type is required even when the query does not need to know the type
Date: Mon, 16 Oct 2017 18:32:57 +0200
Message-ID: <a3bd5954-24d8-9f99-8cb6-fad9ddf02648@2ndquadrant.com> (raw)
In-Reply-To: <CAM7oS3HQwJoiT4Yza5kG-zcTU_grPA1RrtniuekvCuUR+C7hpg@mail.gmail.com>
References: <20171013140350.8210.40918@wrigleys.postgresql.org>
	<CAKFQuwbnCgcYh46JBXSnLvMk47wsHDdnGybSS59CQ5Wp+HewgQ@mail.gmail.com>
	<CAM7oS3GU2v-oAp-Uws0VNUttdjUrNq01Psqttk8X8=xAro4fKg@mail.gmail.com>
	<CAKFQuwZU0OBrJCVfChuXkShi+L_-9psDDUYGXvrnYbbD-Odxug@mail.gmail.com>
	<CAM7oS3H9gU0Gqvz9B9p6h22i8363z=Pv3bdDj74g7-9wmEw8tQ@mail.gmail.com>
	<CAKFQuwawYCkJ+WH1NoGTnn1OEB-4jLE93ktOpeO94xEHPtJNhw@mail.gmail.com>
	<CAM7oS3HQwJoiT4Yza5kG-zcTU_grPA1RrtniuekvCuUR+C7hpg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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



view thread (17+ messages)  latest in thread

Message-ID: <a3bd5954-24d8-9f99-8cb6-fad9ddf02648@2ndquadrant.com>
Permalink:  ../a3bd5954-24d8-9f99-8cb6-fad9ddf02648@2ndquadrant.com/
Also on:    postgresql.org/message-id/a3bd5954-24d8-9f99-8cb6-fad9ddf02648@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com, edpeur@gmail.com, david.g.johnston@gmail.com
  Subject: Re: BUG #14853: Parameter type is required even when the query does not need to know the type
  In-Reply-To: <a3bd5954-24d8-9f99-8cb6-fad9ddf02648@2ndquadrant.com>
  References: <20171013140350.8210.40918@wrigleys.postgresql.org> <CAKFQuwbnCgcYh46JBXSnLvMk47wsHDdnGybSS59CQ5Wp+HewgQ@mail.gmail.com> <CAM7oS3GU2v-oAp-Uws0VNUttdjUrNq01Psqttk8X8=xAro4fKg@mail.gmail.com> <CAKFQuwZU0OBrJCVfChuXkShi+L_-9psDDUYGXvrnYbbD-Odxug@mail.gmail.com> <CAM7oS3H9gU0Gqvz9B9p6h22i8363z=Pv3bdDj74g7-9wmEw8tQ@mail.gmail.com> <CAKFQuwawYCkJ+WH1NoGTnn1OEB-4jLE93ktOpeO94xEHPtJNhw@mail.gmail.com> <CAM7oS3HQwJoiT4Yza5kG-zcTU_grPA1RrtniuekvCuUR+C7hpg@mail.gmail.com> <a3bd5954-24d8-9f99-8cb6-fad9ddf02648@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox