Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Improve pg error string when connecting failed
天舟ca2355adbbc9
diff --git a/plugin/db/pg/pg.go b/plugin/db/pg/pg.goindex 9cfe94ef58..0d940a8bb7 100644--- a/plugin/db/pg/pg.go+++ b/plugin/db/pg/pg.go@@ -285,7 +285,10 @@ func guessDSN(username, password, hostname, port, database, sslCA, sslCert, sslK}return dsn, nil}- return "", fmt.Errorf("cannot find valid dsn for connecting %q, make sure the database exists", database)+ if database != "" {+ return "", fmt.Errorf("cannot connecting %q, make sure the connection info is correct and the database exists", database)+ }+ return "", fmt.Errorf("cannot connecting instance, make sure the connection info is correct")}func (driver *Driver) Close(ctx context.Context) error {