Opened 17 years ago
Last modified 9 years ago
#4546 closed enhancement
PATCH: Proper UNIX socket support for PostgreSQL — at Initial Version
Reported by: | pacopablo | Owned by: | Jonas Borgström |
---|---|---|---|
Priority: | normal | Milestone: | 0.10.4 |
Component: | general | Version: | 0.10.3 |
Severity: | normal | Keywords: | postgresql, unix, socket |
Cc: | pacopablo@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
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@/host=/path/to/socket/dir
Currently, one can only connect to the default socket dir via:
postgres://user:password@/
patch to enable use of UNIX sockets withPostgreSQL