Joseph Adams <joeyadams3.14159@gmail.com> writes:
> I couldn't reproduce this (using upstream source on Ubuntu). However,
> I did find a little bug in libpq causing the connection handle to
> become NULL in the event of an option parsing error. This bug has
> been around since release 9.0.0, and may be unrelated to the problem.
Yeah, that's clearly a bug --- fix committed, thanks for the patch!
It could explain Devrim's report if the parameters passed by psql had
some problem that was detectable by conninfo_array_parse(). That seems
a bit unlikely, but I did think of one possibility: if Devrim was
testing 9.1 psql with a 9.0 libpq (perhaps due to an rpath issue)
then 9.0 libpq would spit up on client_encoding, which wasn't a legal
connection parameter in 9.0.
regards, tom lane