-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document connection strings for unix sockets with postgres #258
Comments
Hi, and thanks for the Interest! So, yeah |
that's the thing: it does not parse those as far as i can tell. it only takes the one format that i guessed by reading the code since it does the parsing itself rather than giving the whole thing to postgres. if i remember, I'll look into filing a pr on Monday |
yeah, but it then returns a connection string to postgres, see here should have the same format as the input doesn't it on your case? |
Ah. Yes, but most of the formats supported by postgres are thus unsupported. For instance refinery seemingly discards query parameters. |
Ah, I see. I will gladly support them for the drivers that support them for the input urls, if you want to submit a PR :) |
I am using
tmp-postgres
for Haskell which creates a Unix socket with a connection string likehost=/tmp/tmp-postgres-socket-33d7937af9c67679 dbname=postgres port=49905
.I want to use refinery-cli to apply my migrations to such a database.
According to the postgres docs, the connection string can be in several formats, which do support Unix sockets: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
However, it seems that Refinery parses them itself:
refinery/refinery_core/src/config.rs
Lines 225 to 243 in 36e2c21
It seems like I need to generate a connection string like so, but this was obtained largely by guessing:
The text was updated successfully, but these errors were encountered: