[BUGS] BUG #14576: JDBC's PreparedStatement.getParameterMetaData fails with'could not determine polymorphic type' - Mailing list pgsql-bugs

From from-postgresql@xenomachina.com
Subject [BUGS] BUG #14576: JDBC's PreparedStatement.getParameterMetaData fails with'could not determine polymorphic type'
Date
Msg-id 20170303175626.25057.3985@wrigleys.postgresql.org
Whole thread Raw
List pgsql-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

pgsql-bugs by date:

Previous
From: digoal@126.com
Date:
Subject: [BUGS] BUG #14575: Standby recovery process call close() very slow,when drop (many small files) database on Primary.
Next
From: Michael Meskes
Date:
Subject: Re: [BUGS] [HACKERS] Two phase commit in ECPG