Re: BUG #3867: PQconnectdb(NULL) cores instead of errors. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3867: PQconnectdb(NULL) cores instead of errors.
Date
Msg-id 9629.1199992867@sss.pgh.pa.us
Whole thread Raw
In response to BUG #3867: PQconnectdb(NULL) cores instead of errors.  ("Ken Lorber" <keni@stacksafe.com>)
List pgsql-bugs
"Ken Lorber" <keni@stacksafe.com> writes:
> PQconnectdb(NULL) cores in strdup() in interfaces/libpq/fe-connect.c:3091
> (conninfo_parse).  Throwing an error would be more useful.

99% of library routines will core if you pass them a null for an
argument that that's not specifically documented to be allowed for.
If you're expecting otherwise, you should adjust your expectations.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Ken Lorber"
Date:
Subject: BUG #3867: PQconnectdb(NULL) cores instead of errors.
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #3860: xpath crashes backend when is querying xmlagg result