This is an automated email from the ASF dual-hosted git repository. rcordier pushed a commit to branch postgresql in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 005cbd5a908c5a2fb92e5c3432bbb66e210909db Author: Benoit TELLIER <[email protected]> AuthorDate: Fri Nov 10 10:36:43 2023 +0100 JAMES-2586 Use prepared statements by default --- .../org/apache/james/backends/postgres/utils/PostgresExecutor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backends-common/postgres/src/main/java/org/apache/james/backends/postgres/utils/PostgresExecutor.java b/backends-common/postgres/src/main/java/org/apache/james/backends/postgres/utils/PostgresExecutor.java index 43b5efa4e1..1c92abc197 100644 --- a/backends-common/postgres/src/main/java/org/apache/james/backends/postgres/utils/PostgresExecutor.java +++ b/backends-common/postgres/src/main/java/org/apache/james/backends/postgres/utils/PostgresExecutor.java @@ -27,6 +27,7 @@ import org.jooq.DSLContext; import org.jooq.Record; import org.jooq.SQLDialect; import org.jooq.conf.Settings; +import org.jooq.conf.StatementType; import org.jooq.impl.DSL; import com.google.common.annotations.VisibleForTesting; @@ -39,7 +40,8 @@ public class PostgresExecutor { private static final SQLDialect PGSQL_DIALECT = SQLDialect.POSTGRES; private static final Settings SETTINGS = new Settings() - .withRenderFormatted(true); + .withRenderFormatted(true) + .withStatementType(StatementType.PREPARED_STATEMENT); private final Mono<Connection> connection; @Inject --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
