From bc2d7aae739cd5f7182a11b676f4266762fda8e7 Mon Sep 17 00:00:00 2001 From: Nikitin Aleksandr Date: Mon, 30 Jun 2025 13:10:26 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20dsn=20+?= =?UTF-8?q?=3D=20"search=5Fpath=3D"=20+=20Settings.DB=5FSCHEMA=20+=20"=20"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- postgres_pgx/postgres_pgx.go | 3 ++- postgres_pgxpool/postgres_pgxpool.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/postgres_pgx/postgres_pgx.go b/postgres_pgx/postgres_pgx.go index 8f464265..ee04ff74 100644 --- a/postgres_pgx/postgres_pgx.go +++ b/postgres_pgx/postgres_pgx.go @@ -150,7 +150,8 @@ func GetConnectionString(ApplicationName string) string { dsn += "password=" + Settings.DB_PASSWORD + " " dsn += "dbname=" + Settings.DB_NAME + " " dsn += "port=" + Settings.DB_PORT + " sslmode=disable TimeZone=" + constants.TIME_ZONE + " " - dsn += "application_name=" + ApplicationName + dsn += "application_name=" + ApplicationName + " " + dsn += "search_path=" + Settings.DB_SCHEMA + " " return dsn } diff --git a/postgres_pgxpool/postgres_pgxpool.go b/postgres_pgxpool/postgres_pgxpool.go index 1eeb0ff8..f64da11f 100644 --- a/postgres_pgxpool/postgres_pgxpool.go +++ b/postgres_pgxpool/postgres_pgxpool.go @@ -136,7 +136,8 @@ func GetConnectionString(ApplicationName string) string { dsn += "password=" + Settings.DB_PASSWORD + " " dsn += "dbname=" + Settings.DB_NAME + " " dsn += "port=" + Settings.DB_PORT + " sslmode=disable TimeZone=" + constants.TIME_ZONE + " " - dsn += "application_name=" + ApplicationName + dsn += "application_name=" + ApplicationName + " " + dsn += "search_path=" + Settings.DB_SCHEMA + " " return dsn }