Re: org.postgresql.util.PSQLException: ERROR: syntax error at or near "(" when calling org.postgresql.jdbc.PgPreparedStatement.getParameterMetaData - Mailing list pgsql-jdbc

From David G. Johnston
Subject Re: org.postgresql.util.PSQLException: ERROR: syntax error at or near "(" when calling org.postgresql.jdbc.PgPreparedStatement.getParameterMetaData
Date
Msg-id CAKFQuwZrxMW6mnyLtc8ZPdzS94p7+jO8gAbRU7F=oAsBGsoDvA@mail.gmail.com
Whole thread Raw
In response to org.postgresql.util.PSQLException: ERROR: syntax error at or near "(" when calling org.postgresql.jdbc.PgPreparedStatement.getParameterMetaData  (Siddharth Jain <siddhsql@gmail.com>)
List pgsql-jdbc
On Fri, Feb 10, 2023 at 2:26 PM Siddharth Jain <siddhsql@gmail.com> wrote:

We are using Postgres 14.4 server and 42.5.2 of org.postgresql:postgresql to connect to it from Java.
We get following exception:
Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "("
  Position: 13
 
where the code in the last line is:
ParameterMetaData parameterMetaData = query.getParameterMetaData();

How can we fix this?


If the broken query is one generated by the driver you probably cannot, you would need to file a bug report.  I strongly doubt your lack of current-ness on the PostgreSQL is going to be an influence here but maybe...

In any case you are going to need something much more descriptive, and ideally executable than this, if you actually want to debug and then file a bug report (or fix your code if that is where the problem originates).

David J.

pgsql-jdbc by date:

Previous
From: Prasanth
Date:
Subject: Re: org.postgresql.util.PSQLException: ERROR: syntax error at or near "(" when calling org.postgresql.jdbc.PgPreparedStatement.getParameterMetaData
Next
From: Siddharth Jain
Date:
Subject: Re: org.postgresql.util.PSQLException: ERROR: syntax error at or near "(" when calling org.postgresql.jdbc.PgPreparedStatement.getParameterMetaData