Skip to content

Commit 7016e71

Browse files
committed
comment fix
1 parent d7be0d5 commit 7016e71

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

ext/pdo_pgsql/pgsql_statement.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,9 @@ static int pgsql_stmt_dtor(pdo_stmt_t *stmt)
8686
res = PQexec(H->server, q);
8787
efree(q);
8888
} else {
89-
/* Inside a transaction, already aborted, or connection is unusable:
90-
* skip DEALLOCATE. On servers that reject it (e.g. Aurora DSQL) it
91-
* would poison the transaction (GH-21869); on any server the server
92-
* frees the prepared statement when the transaction ends. */
89+
/* Outside PQTRANS_IDLE, skip DEALLOCATE: on libpq < 17 some servers
90+
* (e.g. Aurora DSQL) reject it and poison the tx (GH-21869). The
91+
* statement is session-scoped, so it's freed on disconnect. */
9392
res = NULL;
9493
}
9594
#else

0 commit comments

Comments
 (0)