From: Ravi Rangaswamy <rrangaswamy@gobalto.com>
To: pgsql-jdbc@postgresql.org
Subject: Support for WITH Queries (Common Table Expressions)
Date: Wed, 25 May 2016 13:13:35 -0700
Message-ID: <5746076F.6040403@gobalto.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
Hi,
Does the PostgreSQL JDBC driver support WITH Queries (Common Table
Expressions)? When I execute the query using
Statement.executeQuery(sql), I get an error an error "syntax error at
end of input". I tried with the sample query listed in the PostgreSQL
documentation of CTEs
<https://www.postgresql.org/docs/9.1/static/queries-with.html; and still
get the same error.
Version used:
postgresql-9.4-1205.jdbc4
Exception:
org.postgresql.util.PSQLException: ERROR: syntax error at end of input
Position: 189
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2182)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1911)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:173)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:645)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:481)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:361)
Regards,
Ravi
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-jdbc@postgresql.org
Cc: rrangaswamy@gobalto.com
Subject: Re: Support for WITH Queries (Common Table Expressions)
In-Reply-To: <5746076F.6040403@gobalto.com>
References: <5746076F.6040403@gobalto.com>
* 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