Permalink
Browse files

fix: prepared statement "S_2" does not exist in batch executions

Register cleanup for statement unprepare early, so it points to the proper statement name
  • Loading branch information...
vlsi committed Dec 6, 2015
1 parent e5ac899 commit fa310e076954f9686be879319af622aa30131b0f
Showing with 1 addition and 1 deletion.
  1. +1 −1 pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java
@@ -1196,6 +1196,7 @@ private void sendParse(SimpleQuery query, SimpleParameterList params, boolean on
// under us.
query.setStatementName(statementName);
query.setStatementTypes((int[])typeOIDs.clone());
registerParsedQuery(query, statementName);
}
byte[] encodedStatementName = query.getEncodedStatementName();
@@ -1731,7 +1732,6 @@ protected void processResults(ResultHandler handler, int flags) throws IOExcepti
if (logger.logDebug())
logger.debug(" <=BE ParseComplete [" + parsedStatementName + "]");
registerParsedQuery(parsedQuery, parsedStatementName);
break;
case 't': // ParameterDescription

0 comments on commit fa310e0

Please sign in to comment.