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 1pQbON-00085V-Fk for pgsql-jdbc@arkaria.postgresql.org; Fri, 10 Feb 2023 21:57:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pQbOK-0002Gg-ER for pgsql-jdbc@arkaria.postgresql.org; Fri, 10 Feb 2023 21:57:12 +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 1pQbOK-0002GU-4F for pgsql-jdbc@lists.postgresql.org; Fri, 10 Feb 2023 21:57:12 +0000 Received: from mail-yb1-xb35.google.com ([2607:f8b0:4864:20::b35]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pQbOF-0008HX-Dm for pgsql-jdbc@lists.postgresql.org; Fri, 10 Feb 2023 21:57:11 +0000 Received: by mail-yb1-xb35.google.com with SMTP id x4so8050257ybp.1 for ; Fri, 10 Feb 2023 13:57:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jp/r3+hF7LyPKjKh/6Xy4gcah3TCu5XtfhcKxXxGQAY=; b=nIeW2LkWHXG9mOj1pDIhKFrU4P+HelE6v6xROpUkQagsZLgYdbuQbpvtIFWRBNauhw sxD8DGoQGLNBxYX/3byN20xuyhmMi1kYY9FvbW1kkYg+st5vy82zEstbeTtEYlNbpFq8 XGDtl1eEetaxikgdnssxGObh+rR7IMVo3PjXU31KepL1zaiEkMYt036vQlhliITmDHcF tbWPtmNk5qfsptg8S8l26UUR26gfLWYTMDSUFXRGg1/SN+0rCzC16R2/+UTPiGF3hgFE 0dJWIZb2fLZIOyl2k3tLqIYRIrdyn0mclbl42mVIhTr6hiTCIqAAzTeYLS+WkYbhofB+ s3CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jp/r3+hF7LyPKjKh/6Xy4gcah3TCu5XtfhcKxXxGQAY=; b=xcDNwDBh6PCvsyoUbFzGEw+opTW0Yq3PjXBh0nH3aVxnbctqYJ1fAPpNrIf6+NAilR xZPdk+xAMsGU9/f87C8aDxUUkhHhE1M4MKcpige8Y+E/D3nigVoy76vyukEICymo0ctB hTV8hGojoGa+KsVBJaLxza1KkHsmtA2uSz5BHMgNC0MS/PaHR9S0pQd6/7XxLzvXMRKw sR6y9Yke2gV0SQeSjh2o7kI/B3x+KX3ctQiY+ksUCY8g0XQ/BlUnKGaKPs3360TNrc4n qdAIq3jm89w06H7KfJ4+htJybsiCtD923CWrf5pokggkoT0Mdb6nbTwGTDprYZGLNGJT yoEQ== X-Gm-Message-State: AO0yUKXtf6HVAwTdTpEfOGIakrUUYhs9r+SyZ3ExFJO1T1hNM+5xkhM+ oKIvyDU7JwPly+DhmMDwirfomT6QyZeqbht5BHk= X-Google-Smtp-Source: AK7set80xN3e96d8kJM+QDu3mSTH381wBr0Bhkv18+/b0nEvp9aLdAdve0LDkcV2u95TxfRbBVFu/1CZ4jYciKkrXjQ= X-Received: by 2002:a5b:bd0:0:b0:8eb:28c8:c1d1 with SMTP id c16-20020a5b0bd0000000b008eb28c8c1d1mr470008ybr.412.1676066220805; Fri, 10 Feb 2023 13:57:00 -0800 (PST) MIME-Version: 1.0 References: <7bae9dbf-b192-5ea5-838f-23f30d4f5f5e@pangburngroup.com> In-Reply-To: <7bae9dbf-b192-5ea5-838f-23f30d4f5f5e@pangburngroup.com> From: Siddharth Jain Date: Fri, 10 Feb 2023 13:56:49 -0800 Message-ID: Subject: Re: org.postgresql.util.PSQLException: ERROR: syntax error at or near "(" when calling org.postgresql.jdbc.PgPreparedStatement.getParameterMetaData To: dbadmin@pangburngroup.com Cc: pgsql-jdbc@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000b6121e05f45f93c9" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000b6121e05f45f93c9 Content-Type: text/plain; charset="UTF-8" Thanks. query was the problem indeed. My mistake. On Fri, Feb 10, 2023 at 1:33 PM Prasanth wrote: > Did you check the query being used? Most likely that is where the issue > would be. > > On 2/10/23 3:26 PM, Siddharth Jain wrote: > > 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. > > > --000000000000b6121e05f45f93c9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks. query was the problem indeed. My mistake.
On Fri, F= eb 10, 2023 at 1:33 PM Prasanth <dbadmin@pangburngroup.com> wrote:
=20 =20 =20
Did you check the query being used? Most likely that is where the issue would be.

On 2/10/23 3:26 PM, Siddharth Jain wrote:
=20
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 "("
=C2=A0 Position: 13
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutor= Impl.java:2676)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.j= ava: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(PgPreparedStat= ement.java:1705)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.getParameterMetaData(D= elegatingPreparedStatement.java:162)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.getParameterMetaData(D= elegatingPreparedStatement.java:162)
at cdao.dpde.InsertHelper.setParameters(InsertHelper.java:53)
where the code in the last line is:
ParameterMetaData parameterMetaData =3D query.getParameterMetaData();

How can we fix this?

S.

--000000000000b6121e05f45f93c9--