Commit 4aafd60
authored
docs: explain connecting to unix domain sockets /var/postgresql (#32)
Fixes #27 by adding a FAQ
entry to the README explaining how to connect to a server over unix
domain socket.
Although [the Postgres
documentation](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-HOST)
explains that you can use a `?host=%2Fvar%2Fpostgres` connection string
option instead of specifying the host in the URL, I didn't know this and
I imagine most people also are unfamiliar with this option.
And, although the documentation says that you can pass a URL-encoded
host in the connection string and just expect it to work, that doesn't
happen with `sql.Open` — it always fails.
So, thanks @ptman for opening the issue and discovering the solution,
this PR just adds that information to the README.1 parent acc1091 commit 4aafd60
1 file changed
+26
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
642 | 668 | | |
643 | 669 | | |
644 | 670 | | |
| |||
0 commit comments