Ticket #4546 (closed enhancement: fixed)
PATCH: Proper UNIX socket support for PostgreSQL
| Reported by: | pacopablo | Owned by: | mgood |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.10.4 |
| Component: | general | Version: | 0.10.3 |
| Severity: | normal | Keywords: | postgresql unix socket |
| Cc: | pacopablo@… |
Description (last modified by mgood) (diff)
Currently, if one wants to use UNIX sockets for PostgreSQL (much nicer than TCP), trac only supports connecting to the default socket defined in the PGHOST environment variable.
This is hackish.
Attached is a 2 line patch that allows the host to be specified in the database url. it also give preference to UNIX sockets of TCP sockets. This meaning that if a TCP host s specified and a UNIX socket are given, the UNIX socket will be used.
Usage:
postgres://user:password@/database?host=/path/to/socket/dir
Currently, one can only connect to the default socket dir via:
postgres://user:password@/database
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
