On Tue, Mar 19, 2013 at 10:12:21AM -0400, Steve Singer wrote:
> >so it is clearly possible for PQconndefaults() to return NULL for
> >service file failures. The questions are:
> >
> >* Is this what we want?
>
> What other choices do we have? I don't think PQconndefaults() should
> continue on as if PGSERVICE wasn't set in the environment after a
> failure from parseServiceInfo.
True. Ignoring a service specification seems wrong, and issuing a
warning message weak.
> >* Should we document this?
>
> Yes the documentation should indicate that PQconndefaults() can
> return NULL for more than just memory failures.
The attached patch fixes this. I am unclear about backpatching this as
it hits lot of code, is rare, and adds new translation strings. On the
other hand, it does crash the applications.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +