Improvement of comment for database host setting
|Reported by:||Henrique Romano||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.3|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Currently, the database host setting contains the following comment:
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
However, it isn't true for postgres. An empty string is different from a "localhost" string in that the first one will make postgres uses a unix domain socket rather than a TCP connection.
For default postgres configuration, this difference is the reason of an authentication problem. When using a domain socket, postgres uses "ident" as the authentication mechanism. By using ident authentication, users will only be able to authenticated in the DB if their OS username is the same as the DB username (which isn't necessarily true for a production environment, for example, where apache runs as "www-data" and the DB is owned by the "postgres" or the project owner's username).
I think that a possible solution would be the improvement of this comment in order to let the user know about this problem or at least remove the part where it says that an empty is the same as "localhost".