Skip to content

Commit

Permalink
[postgres] set DateStyle explicitly (#2399)
Browse files Browse the repository at this point in the history
  • Loading branch information
heavycrystal authored Dec 30, 2024
1 parent c1b3c54 commit 50e6a19
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flow/connectors/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func NewPostgresConnector(ctx context.Context, env map[string]string, pgConfig *
runtimeParams := connConfig.Config.RuntimeParams
runtimeParams["idle_in_transaction_session_timeout"] = "0"
runtimeParams["statement_timeout"] = "0"
runtimeParams["DateStyle"] = "ISO, DMY"

tunnel, err := NewSSHTunnel(ctx, pgConfig.SshConfig)
if err != nil {
Expand Down Expand Up @@ -138,6 +139,7 @@ func (c *PostgresConnector) CreateReplConn(ctx context.Context) (*pgx.Conn, erro
replConfig.Config.RuntimeParams["replication"] = "database"
replConfig.Config.RuntimeParams["bytea_output"] = "hex"
replConfig.Config.RuntimeParams["intervalstyle"] = "postgres"
replConfig.Config.RuntimeParams["DateStyle"] = "ISO, DMY"
replConfig.DefaultQueryExecMode = pgx.QueryExecModeSimpleProtocol

conn, err := c.ssh.NewPostgresConnFromConfig(ctx, replConfig)
Expand Down

0 comments on commit 50e6a19

Please sign in to comment.