Thanks, Vladimir! Local build of 9.4.1210-SNAPSHOT works great; all my legal test queries execute successfully now.
Just FYI, the new driver threw java.lang.ArrayIndexOutOfBoundsException with an illegal query: SELECT /* /* */ 1
java.lang.ArrayIndexOutOfBoundsException
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:597)
at java.lang.StringBuilder.append(StringBuilder.java:190)
at org.postgresql.core.Parser.parseSql(Parser.java:1037)
at org.postgresql.core.Parser.replaceProcessing(Parser.java:974)
at org.postgresql.core.CachedQueryCreateAction.create(CachedQueryCreateAction.java:43)
at org.postgresql.core.CachedQueryCreateAction.create(CachedQueryCreateAction.java:19)
at org.postgresql.util.LruCache.borrow(LruCache.java:118)
at org.postgresql.core.QueryExecutorBase.borrowQuery(QueryExecutorBase.java:261)
at org.postgresql.jdbc.PgConnection.borrowQuery(PgConnection.java:146)
at org.postgresql.jdbc.PgPreparedStatement.<init>(PgPreparedStatement.java:91)
at org.postgresql.jdbc.PgConnection.prepareStatement(PgConnection.java:1259)
at org.postgresql.jdbc.PgConnection.prepareStatement(PgConnection.java:1625)
at org.postgresql.jdbc.PgConnection.prepareStatement(PgConnection.java:418)
I'm not suggesting this needs to be addressed... unbalanced comments will of course be rejected by the server anyway.
Thanks,
Adam
On 8/28/2016 8:00 AM, Vladimir Sitnikov wrote:
>The dollar sign ($) is the only case we came across in our test environments, but it looks like a single quote (') or double quote (") in a comment also trips up the parser. As do the two-character combinations {D, {E, {F, {O, and {T... and their lowercase equivalents. A full set of test queries that fail when executed via postgresql-9.4.1209.jar:
Thanks for the analysis.
The fix is available in 9.4.1210-SNAPSHOT
Vladimir