Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBn5u-0001P5-Ip for pgsql-bugs@arkaria.postgresql.org; Sun, 05 Jul 2015 16:48:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZBn5t-0005R6-V8 for pgsql-bugs@arkaria.postgresql.org; Sun, 05 Jul 2015 16:48:42 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZBn55-0004l7-As for pgsql-bugs@postgresql.org; Sun, 05 Jul 2015 16:47:51 +0000 Received: from mimolette.dalibo.net ([212.85.154.222]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZBn4x-0000qR-LF for pgsql-bugs@postgresql.org; Sun, 05 Jul 2015 16:47:49 +0000 Received: from [192.168.0.4] (aur75-1-78-192-238-147.fbxo.proxad.net [78.192.238.147]) by mimolette.dalibo.net (Postfix) with ESMTPSA id 90B526093E2; Sun, 5 Jul 2015 18:47:42 +0200 (CEST) Message-ID: <55995FAE.8070809@dalibo.com> Date: Sun, 05 Jul 2015 18:47:42 +0200 From: Julien Rouhaud User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Guillaume Lelarge , Fabien COELHO CC: Oleksandr Shulgin , mail@bwe.im, PostgreSQL Bugs List Subject: Re: BUG #12379: pgbench should hint to pgbench -i References: <20141231105955.8014.38426@wrigleys.postgresql.org> <87oales6zm.fsf@ashulgin01.corp.ad.zalando.net> <55984046.60901@dalibo.com> <559908D4.7020901@dalibo.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/07/2015 18:34, Guillaume Lelarge wrote: > Le 5 juil. 2015 6:28 PM, "Fabien COELHO" > 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----- -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs