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

From Julien Rouhaud
Subject Re: BUG #12379: pgbench should hint to pgbench -i
Date
Msg-id 55995FAE.8070809@dalibo.com
Whole thread Raw
In response to Re: BUG #12379: pgbench should hint to pgbench -i  (Guillaume Lelarge <guillaume@lelarge.info>)
List pgsql-bugs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/07/2015 18:34, Guillaume Lelarge wrote:
> Le 5 juil. 2015 6:28 PM, "Fabien COELHO" <coelho@cri.ensmp.fr
> <mailto:coelho@cri.ensmp.fr>> a écrit :
>>
>>
>> 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 the 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.
>

I totally agree. I mark the patch as ready for committer.

> -- Guillaume
>


- --
Julien Rouhaud
http://dalibo.com - http://dalibo.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQEcBAEBAgAGBQJVmV+uAAoJELGaJ8vfEpOqTRIIAIyht/HdeR3OwlUfkWK1z26c
m7a4B/wpwy3AtYmO5yBkCEbSZmXtsZOvZM9gL0rcdeP0Jwh/MT+yu+utz+j58jwV
6TcdzJP4EkKjjQXjkCwdPtXin+Qy5s+zTBJ9gTJflmIKlCTFa3dvX0/VWeElVp2L
bO4bPQMknLhqkqfAlGSgb60xaFl2OxTqvrvea+W/hj49LxtBaOhgh83Pe8G/MaSj
zKXAsa0UHfD1QF+goCzOFPRe5OaXgNBIUbNzL11DsfwepAIZ5yr4SKGLS3F7gAvV
sWKh8aEG6+Ysof509IYbtBSIMCpdyL5niYE9GTKUqBzP4SH6t+XBYVT4nd+CfpI=
=j/Uq
-----END PGP SIGNATURE-----

pgsql-bugs by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: BUG #12379: pgbench should hint to pgbench -i
Next
From: Peter Kroon
Date:
Subject: dblink max per function