Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQavR-0006Zk-6Z for pgsql-jdbc@arkaria.postgresql.org; Fri, 10 Feb 2023 21:27:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pQauS-0007mr-2v for pgsql-jdbc@arkaria.postgresql.org; Fri, 10 Feb 2023 21:26:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQauR-0007mi-Rf for pgsql-jdbc@lists.postgresql.org; Fri, 10 Feb 2023 21:26:19 +0000 Received: from mail-yw1-x112f.google.com ([2607:f8b0:4864:20::112f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pQauP-00080v-TV for pgsql-jdbc@lists.postgresql.org; Fri, 10 Feb 2023 21:26:19 +0000 Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-52ee632329dso11297037b3.6 for ; Fri, 10 Feb 2023 13:26:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BDW+6KaqJPuk0Ke900SPgwfOemvGtNYAroy5dUnIO1w=; b=DR4QkZZZEyYey+j1g1b8BqssIZ4vYI2arL4Xf24pi1ZGnG4cQAqvuUplR+TDGdS3fV Z3OrBoqgcTBMd60+Uub2uUdd5/p0ZIoWpnZnwVBmpG8sE1jUHAmvQaCT425M75MLGgEW SHAcVWkaN7wISxZuLqzaFRunfye9XFAjc3ymEorgQkfy7Rmf5VTEDGJOCXd8Uy/kNYds KLmje59KEGKL1aMMX2ERxUSpO1k8PmdWQr/Wp8h/lQeAe03TS9oxSQkdc28fpe9iYa95 v7cNp9u+WQfmyULggR2mZ1wz+wWIkfE/IQ+OLDMzWA3kJxVomUwlDLZzluy+tkLyh0+T 54uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=BDW+6KaqJPuk0Ke900SPgwfOemvGtNYAroy5dUnIO1w=; b=XhDLfIikEFuuQdKWmdL8xUtQn17KxZjAivtRXiO6KJcXlHmh1xzoKv1SPUiTq+H/5x PxBymcmMjeVUyS+Ithpbpo02UJpJ1JFouYNk56SslkIpWsX6y40RtL8CZYNAwRI3xbLH jWGyivrPkz+5NUVKSN0kVxbgXDZswNU2U6Gdf5wPgmonE/J2P5F2RNcGHVeTzzspAksV WKHntx2bgcTTrmmNgmPVv/EjmBfS8jgkKO1J3UXIWtRBdqzQZbsi6tM4rchE2Bhv8d6g n5pjxaQ4y/LwclbK3ZL+zXJxyKAqRROk0xddmdXdCH5tsbHA2mOerDVvxw1Bs07Lp2Nw aoSw== X-Gm-Message-State: AO0yUKXQ9X/LvdwJQNMO1KNMileSYS7SGBiLcN3GccdC+u1rIdA1KxS0 jhYsY5uPwjEikCzAI5Gso5F+M4SIMCyE8aEenpBb3cERUD4= X-Google-Smtp-Source: AK7set/CdlhcCXQlMRmgfzePUN2XRMyXrc7eUNzG81FiXAqBfy9Ur6piZJBHBv8HdW4mNpvlUZqEawEi697NO/nHixY= X-Received: by 2002:a81:6805:0:b0:52e:e6ed:30b1 with SMTP id d5-20020a816805000000b0052ee6ed30b1mr62079ywc.561.1676064376052; Fri, 10 Feb 2023 13:26:16 -0800 (PST) MIME-Version: 1.0 From: Siddharth Jain Date: Fri, 10 Feb 2023 13:26:05 -0800 Message-ID: Subject: org.postgresql.util.PSQLException: ERROR: syntax error at or near "(" when calling org.postgresql.jdbc.PgPreparedStatement.getParameterMetaData To: pgsql-jdbc@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000c15f5d05f45f253b" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c15f5d05f45f253b Content-Type: text/plain; charset="UTF-8" Hello, 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 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:316) at org.postgresql.jdbc.PgPreparedStatement.getParameterMetaData(PgPreparedStatement.java:1705) at org.apache.commons.dbcp2.DelegatingPreparedStatement.getParameterMetaData(DelegatingPreparedStatement.java:162) at org.apache.commons.dbcp2.DelegatingPreparedStatement.getParameterMetaData(DelegatingPreparedStatement.java:162) at cdao.dpde.InsertHelper.setParameters(InsertHelper.java:53) where the code in the last line is: ParameterMetaData parameterMetaData = query.getParameterMetaData(); How can we fix this? S. --000000000000c15f5d05f45f253b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

We are using Postgres 14.4 serve= r and 42.5.2 of org.postgresql:postgresql to connect to it from Java.
=
We get following exception:
Caused by: org.postgresql.util.P= SQLException: ERROR: syntax error at or near "("
=C2=A0 Positi= on: 13
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse= (QueryExecutorImpl.java:2676)
at org.postgresql.core.v3.QueryExecutorIm= pl.processResults(QueryExecutorImpl.java:2366)
at org.postgresql.core.v= 3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)
at org.postgres= ql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:316)
at org= .postgresql.jdbc.PgPreparedStatement.getParameterMetaData(PgPreparedStateme= nt.java:1705)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.g= etParameterMetaData(DelegatingPreparedStatement.java:162)
at org.apache= .commons.dbcp2.DelegatingPreparedStatement.getParameterMetaData(DelegatingP= reparedStatement.java:162)
at cdao.dpde.InsertHelper.setParameters(Inse= rtHelper.java:53)
where the code in the last line is:
ParameterMetaData parameterMetaData =3D query.getParameterMetaData();

How can we fix this?

S.=
--000000000000c15f5d05f45f253b--