Re: BUG #3867: PQconnectdb(NULL) cores instead of errors.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ken Lorber" <keni(at)stacksafe(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3867: PQconnectdb(NULL) cores instead of errors.
Date: 2008-01-10 19:21:07
Message-ID: 9629.1199992867@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Ken Lorber" <keni(at)stacksafe(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2008-01-10 20:19:41 Re: BUG #3860: xpath crashes backend when is querying xmlagg result
Previous Message Ken Lorber 2008-01-10 18:27:54 BUG #3867: PQconnectdb(NULL) cores instead of errors.