Am 27.07.2017 um 15:00 schrieb Pavel Raiskup:
Turns out there's probably a new test that checks that the testsuite runs
through localhost IP, but historically I used the 'psql -h /tmp' like connection
through socket.

Hi Pavel, thanks for the feedback.

The problem here is caused by a change in the PQhost() function in Postgres 9.6, which now returns the directory path instead of the hostname in case of a socket connection (https://www.postgresql.org/docs/9.6/static/libpq-status.html). This PQhost() function is used to get the host attribute of a Pygres connection.

In order to accommodate for that new behavior, we had two options:

1) Document this as the new behavior for Postgres 9.6 here:
http://www.pygresql.org/contents/pg/connection.html#pg.Connection.host

2) Iron this behavior out and return "localhost" as host for a socket connection in Postgres 9.6 as well.

I decided for the latter and patched it in r902, because I wanted Pygres to behave the same in all Postgres versions and because this is what you expect from a "host" attribute. (We could add another attribute for getting the socket, if anybody needs that.)

If you leave dbhost='' in LOCAL_PyGreSQL.py, the test should run without problems, and use a socket connection in the test. Only if you explicitly set dbhost='/tmp', the test with Postgres 9.6 should fail.

Can you confirm?

I've already adapted the tests in SVN to cover this.

-- Chris
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql

Reply via email to