Re: BUG #12379: pgbench should hint to pgbench -i - Mailing list pgsql-bugs

From Guillaume Lelarge
Subject Re: BUG #12379: pgbench should hint to pgbench -i
Date
Msg-id CAECtzeVxR3zDJAcnzYrGu+ykUbU8DiY7w9_-TDToFY0ZSmOo-Q@mail.gmail.com
Whole thread Raw
In response to Re: BUG #12379: pgbench should hint to pgbench -i  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: BUG #12379: pgbench should hint to pgbench -i  (Julien Rouhaud <julien.rouhaud@dalibo.com>)
List pgsql-bugs
Le 5 juil. 2015 6:28 PM, "Fabien COELHO" <coelho@cri.ensmp.fr> a =C3=A9crit=
 :
>
>
> Hello Guillaume & Julien,
>
> Thanks for the comments and the improvements!
>
>>> I can't look at the code right now, but doesn't it use PQdb() to get th=
e
>>> name of the database? If it doesn't, it probably should.
>>
>>
>> I'm attaching a new version of the patch, which retrieves the actual
>> database name once connected if needed. That only solves this message
>> though, the other ones being displayed before the connection is
available.
>
>
> I'm not sure it is worth bothering with setting dbname which seems not to
be used afterwards anyway. I would suggest to coldly call PQdb on the
connection for the error message and thus simplify the code, as attached.
>

That's fine with me.

--=20
Guillaume

pgsql-bugs by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: BUG #12379: pgbench should hint to pgbench -i
Next
From: Julien Rouhaud
Date:
Subject: Re: BUG #12379: pgbench should hint to pgbench -i