Skip to content

Commit

Permalink
Use canonical DateStyle name (#2925)
Browse files Browse the repository at this point in the history
This makes caching variable caching with PgBouncer more efficient, because now the client is setting the same values that the server reports.

See these PgBouncer issues/PRs for details:
pgbouncer/pgbouncer#776
pgbouncer/pgbouncer#879
  • Loading branch information
JelteF committed Jul 4, 2023
1 parent 6b3fb27 commit 258cff3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ private List<StartupParam> getParametersForStartup(String user, String database,
paramList.add(new StartupParam("user", user));
paramList.add(new StartupParam("database", database));
paramList.add(new StartupParam("client_encoding", "UTF8"));
paramList.add(new StartupParam("DateStyle", "ISO"));
paramList.add(new StartupParam("DateStyle", "ISO, MDY"));
paramList.add(new StartupParam("TimeZone", createPostgresTimeZone()));

Version assumeVersion = ServerVersion.from(PGProperty.ASSUME_MIN_SERVER_VERSION.getOrDefault(info));
Expand Down

0 comments on commit 258cff3

Please sign in to comment.