From: from-postgresql@xenomachina.com
To: pgsql-bugs@postgresql.org
Subject: BUG #14576: JDBC's PreparedStatement.getParameterMetaData fails with 'could not determine polymorphic type'
Date: Fri, 03 Mar 2017 17:56:26 +0000
Message-ID: <20170303175626.25057.3985@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: 14576
Logged by: Laurence Gonsalves
Email address: from-postgresql@xenomachina.com
PostgreSQL version: 9.5.6
Operating system: Ubuntu Linux 16.04
Description:
I am using the JDBC driver "org.postgresql:postgresql:42.0.0.jre7".
I'm creating a PreparedStatement with the following SQL:
SELECT code, title, did
FROM films
WHERE did in (select * from unnest(?));
I can set the parameter and execute the query without problems, but if I
call getParameterMetaData() on the PreparedStatement (before executing
the query) an exception is thrown:
Exception in thread "main" org.postgresql.util.PSQLException: ERROR:
could not determine polymorphic type because input has type "unknown"
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at
org.postgresql.jdbc3.AbstractJdbc3Statement.getParameterMetaData(AbstractJdbc3Statement.java:414)
...
This makes it impossible to (programmatically) determine even the number
of parameters the PreparedStatement accepts.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: from-postgresql@xenomachina.com
Subject: Re: BUG #14576: JDBC's PreparedStatement.getParameterMetaData fails with 'could not determine polymorphic type'
In-Reply-To: <20170303175626.25057.3985@wrigleys.postgresql.org>
References: <20170303175626.25057.3985@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