-
Notifications
You must be signed in to change notification settings - Fork 35
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
'unix' connection parameter should allow path to directory of unix domain socket #70
Comments
Agreed. On Sat, May 17, 2014 at 12:40 AM, Milosz [email protected] wrote:
|
To clarify why this hasn't been fixed yet. py-postgresql has to figure out where a given installation and/or database stores its file system sockets. We could scan a set of possibilities (assume) or use configuration files, or both. None of these seem desirable. |
@jwp, to clarify, my suggestion is to pass in to py-postgresql the location of these file system sockets. As such, py-postgresql would have parameters
So, there is no need to scan a set of possibilities or use configuration files or anything like that. This change would be predicated on the format of the socket filename itself being constant, which I believe to be true. |
For consistency with other libpq-based clients, py-postgresql should accept the path to the directory of a unix domain socket (e.g. '/var/run/postgresql') instead of the full path to the socket (e.g. '/var/run/postgresql/.s.PGSQL.5432'.) The 'port' connection parameter could be used to home in on the socket file itself (as is the behavior of the psql client.)
For backwards compatibility, the full path option should probably be left in. The program could attempt to parse the 'unix' parameter as a directory path and, on failure, attempt to parse it as a full path.
The text was updated successfully, but these errors were encountered: