Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YUW3w-00087c-30 for pgsql-bugs@arkaria.postgresql.org; Sun, 08 Mar 2015 07:55:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YUW3u-00046c-1a for pgsql-bugs@arkaria.postgresql.org; Sun, 08 Mar 2015 07:55:46 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YUW3s-00046V-VH for pgsql-bugs@postgresql.org; Sun, 08 Mar 2015 07:55:45 +0000 Received: from boipeva.ensmp.fr ([194.214.158.101]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YUW3j-00061u-T0 for pgsql-bugs@postgresql.org; Sun, 08 Mar 2015 07:55:42 +0000 Received: from cri.ensmp.fr (154.237.219.88.rev.sfr.net [88.219.237.154]) (authenticated bits=0) by boipeva.ensmp.fr (8.14.9/8.14.9/JMMC-22/Oct/2013) with ESMTP id t287tQZb032002 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 Mar 2015 08:55:28 +0100 Date: Sun, 8 Mar 2015 08:55:25 +0100 (CET) From: Fabien COELHO X-X-Sender: fabien@sto To: mail@bwe.im cc: PostgreSQL Bugs List Subject: Re: BUG #12379: pgbench should hint to pgbench -i In-Reply-To: <20141231105955.8014.38426@wrigleys.postgresql.org> Message-ID: References: <20141231105955.8014.38426@wrigleys.postgresql.org> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-1422486202-1425801327=:4406" X-Miltered: at boipeva.ensmp.fr with ID 54FC006E.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Auth: USER-ID fabien.coelho X-j-chkmail-Enveloppe: 54FC006E.000 from 154.237.219.88.rev.sfr.net/154.237.219.88.rev.sfr.net/88.219.237.154/cri.ensmp.fr/ 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 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1422486202-1425801327=:4406 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed > $ pgbench bench -s 90000000 -j 1 -c 10 > ERROR: relation "pgbench_branches" does not exist > LINE 1: select count(*) from pgbench_branches > > 11:51 MatheusOl$ bwe: You need to run `pgbench -i` first > > Why does the error message does not tell me this plainly? :) Let us be nice to users. Attached is a very small patch which adds a simple HINT on this initial failure, for submission to the next commitfest. sh> ./pgbench foo ERROR: relation "pgbench_branches" does not exist LINE 1: select count(*) from pgbench_branches ^ HINT: is "foo" the right database? did you initialize first (pgbench -i)? -- Fabien. --8323329-1422486202-1425801327=:4406 Content-Type: TEXT/x-diff; name=pgbench-hint-1.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=pgbench-hint-1.patch ZGlmZiAtLWdpdCBhL2NvbnRyaWIvcGdiZW5jaC9wZ2JlbmNoLmMgYi9jb250 cmliL3BnYmVuY2gvcGdiZW5jaC5jDQppbmRleCA3MDZmZGY1Li4xYzMyNGNl IDEwMDY0NA0KLS0tIGEvY29udHJpYi9wZ2JlbmNoL3BnYmVuY2guYw0KKysr IGIvY29udHJpYi9wZ2JlbmNoL3BnYmVuY2guYw0KQEAgLTMyMTIsNiArMzIx Miw3IEBAIG1haW4oaW50IGFyZ2MsIGNoYXIgKiphcmd2KQ0KIAkJaWYgKFBR cmVzdWx0U3RhdHVzKHJlcykgIT0gUEdSRVNfVFVQTEVTX09LKQ0KIAkJew0K IAkJCWZwcmludGYoc3RkZXJyLCAiJXMiLCBQUWVycm9yTWVzc2FnZShjb24p KTsNCisJCQlmcHJpbnRmKHN0ZGVyciwgIkhJTlQ6IGlzIFwiJXNcIiB0aGUg cmlnaHQgZGF0YWJhc2U/IGRpZCB5b3UgaW5pdGlhbGl6ZSBmaXJzdCAocGdi ZW5jaCAtaSk/XG4iLCBkYk5hbWUpOw0KIAkJCWV4aXQoMSk7DQogCQl9DQog CQlzY2FsZSA9IGF0b2koUFFnZXR2YWx1ZShyZXMsIDAsIDApKTsNCg== --8323329-1422486202-1425801327=:4406 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs --8323329-1422486202-1425801327=:4406--