Re: BUG #14853: Parameter type is required even when the query does not need to know the type

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Eduardo Pérez Ureta <edpeur(at)gmail(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14853: Parameter type is required even when the query does not need to know the type
Date: 2017-10-16 18:25:56
Message-ID: CAKFQuwY=HOaXef_pAmSUXJT3oqUcrRVD-GNvgFcUD8OtLyMBdQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Oct 16, 2017 at 10:39 AM, Eduardo Pérez Ureta <edpeur(at)gmail(dot)com>
wrote:

> I ran the PostgreSQL test suite (make check) and all the tests passed, so,
> my change should not break anything.
> Maybe PostgreSQL should be changed to not require a type in this case.
>

​I would say that the restriction that I describe is not tested/enforced
then. But even if it was the problem would be that no where else in the
test suite would queries with un-typed input parameters be used since they
have been disallowed until now. That is just the nature of programming to
a strict constraint and then attempting to loosen it up in the future -
there will be no code that actually exercises the loosened constraints.
That's why I suggested running your application test suite - right now it
is getting errors; if you change only PostgreSQL does the JDBC driver and
your application begin to work correctly with the changed server behavior?

I'd suggest you simply accept that, right now, PostgreSQL refuses allow an
outcome of "no type is needed". You are welcome to spend as much time as
you'd like convincing others that doing so is wrong and that not doing so
is both useful and safe. I suppose you've already done that and it is now
up to someone more qualified to explain exactly why what you propose will
not work. That someone is not me.

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-10-16 18:33:56 Re: BUG #14853: Parameter type is required even when the query does not need to know the type
Previous Message Tomas Vondra 2017-10-16 18:09:21 Re: BUG #14853: Parameter type is required even when the query does not need to know the type