mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2026-02-02 17:35:08 +01:00
Postgres defaults to unix socket with no host #229
Closes #229 When there's no host given in a postgres connection url, use the unix domain default socket. Previously, the default was a localhost TCP connection. This default behavior is more in line with standard postgres clients out there, like psql.
This commit is contained in:
parent
6243c2b9a9
commit
8175745cfe
2 changed files with 5 additions and 5 deletions
|
|
@ -48,7 +48,7 @@ func connectionString(u *url.URL) string {
|
|||
|
||||
// default hostname
|
||||
if hostname == "" {
|
||||
hostname = "localhost"
|
||||
query.Set("host", "/var/run/postgresql")
|
||||
}
|
||||
|
||||
// host param overrides url hostname
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue