pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: edpeur@gmail.com
To: pgsql-bugs@postgresql.org
Cc: edpeur@gmail.com
Subject: BUG #14853: Parameter type is required even when the query does not need to know the type
Date: Fri, 13 Oct 2017 14:03:50 +0000
Message-ID: <20171013140350.8210.40918@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      14853
Logged by:          Eduardo Perez
Email address:      edpeur@gmail.com
PostgreSQL version: Unsupported/Unknown
Operating system:   All
Description:        

The query:
SELECT ? IS NULL
should work even when the parameter type is unknown, as there is no need to
know the type in that query.

For reference:
http://www.postgresql-archive.org/Regression-Problems-with-Timestamp-arguments-td5770255.html

This patch fixes the issue:
inline patch 1: postgres/src/backend/tcop/postgres.c (+0/-14 lines) download inline-1.patch--- postgres/src/backend/tcop/postgres.c +++ postgres/src/backend/tcop/postgres.c @@ -1361,20 +1361,6 @@ &paramTypes, &numParams); - /* - * Check all parameter types got determined. - */ - for (i = 0; i < numParams; i++) - { - Oid ptype = paramTypes[i]; - - if (ptype == InvalidOid || ptype == UNKNOWNOID) - ereport(ERROR, - (errcode(ERRCODE_INDETERMINATE_DATATYPE), - errmsg("could not determine data type of parameter $%d", - i + 1))); - } - if (log_parser_stats) ShowUsage("PARSE ANALYSIS STATISTICS");
-- 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: <20171013140350.8210.40918@wrigleys.postgresql.org>
Permalink:  ../20171013140350.8210.40918@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20171013140350.8210.40918@wrigleys.postgresql.org

 ·  · 

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: edpeur@gmail.com
  Subject: Re: BUG #14853: Parameter type is required even when the query does not need to know the type
  In-Reply-To: <20171013140350.8210.40918@wrigleys.postgresql.org>
  References: <20171013140350.8210.40918@wrigleys.postgresql.org>

* 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