Ticket #53 (closed defect: fixed)
Remove needless NULL checks from the PostgreSQL modules
| Reported by: | smoku | Owned by: | smoku |
|---|---|---|---|
| Priority: | major | Component: | storage |
| Version: | 2.1 | Keywords: | |
| Cc: | Tracforge_linkmap: | ||
| Blocking: | Blocked By: |
Description
The PostgreSQL modules (c2s/authreg_pgsql.c and sm/storage_pgsql.c) contain checks to make sure that neither of the configuration parameters host, port, dbname, user, and pass are NULL meaning they have not been set in the configuration file.
This is not needed, as PQsetdbLogin() allows all these values to be NULL and uses sensible defaults in that case. Especially annoying is the check for "host == NULL", because the hostname parameter actually needs to be NULL to connect to the database server through unix domain sockets, and hence the NULL check forces one to set up PostgreSQL so that it listens on a TCP socket.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
