pgschema
pgschema copied to clipboard
Unable to plan migrations using UNIX socket connection
Hi!
pgschema uses two different ways to generate a DNS:
Because of this user can't find working args set to use to connect to local database with UNIX socket.
--host=/var/run/postgresql works with first one, --host='' - works with the second one.
I can see two possible solutions here:
- Use same DSN generation code in both cases
- Connect to UNIX socket by default when host arg is not set - the way psql binary does it.
Thanks for reporting this. Go with option 1 to make embedded.go use connection.go as well.
Didn't change the host default because it's already set to localhost.