From 50e6a19d6bfbdb68b89c87374772930d8b7ddd3f Mon Sep 17 00:00:00 2001 From: Kevin Biju <52661649+heavycrystal@users.noreply.github.com> Date: Tue, 31 Dec 2024 02:17:48 +0530 Subject: [PATCH] [postgres] set DateStyle explicitly (#2399) --- flow/connectors/postgres/postgres.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flow/connectors/postgres/postgres.go b/flow/connectors/postgres/postgres.go index c12f912213..7f3005134b 100644 --- a/flow/connectors/postgres/postgres.go +++ b/flow/connectors/postgres/postgres.go @@ -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 { @@ -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)