Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YvLHp-0003rt-Ot for pgsql-bugs@arkaria.postgresql.org; Thu, 21 May 2015 07:53:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YvLHp-0001Co-9I for pgsql-bugs@arkaria.postgresql.org; Thu, 21 May 2015 07:53:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YvLHo-0001Ce-9w for pgsql-bugs@postgresql.org; Thu, 21 May 2015 07:53:00 +0000 Received: from eu1sys200aog107.obsmtp.com ([207.126.144.123] helo=mail-wi0-f176.google.com) by magus.postgresql.org with smtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1YvLHk-0006zO-Om for pgsql-bugs@postgresql.org; Thu, 21 May 2015 07:52:59 +0000 Received: from mail-wi0-f176.google.com ([209.85.212.176]) (using TLSv1) by eu1sys200aob107.postini.com ([207.126.147.11]) with SMTP ID DSNKVV2O0ofyBX/KmjFOJW3PUlkszm/g4lIf@postini.com; Thu, 21 May 2015 07:52:56 UTC Received: by wizk4 with SMTP id k4so5057463wiz.1 for ; Thu, 21 May 2015 00:52:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=HZnfE2/8iKhWpHiIAjwMDX9ziAK6FfSQMxV20aTrkfI=; b=BysXrXJU+eTmoy1drB16GKHnTcqEmYafF7/A3i/y8jHT4xcJJuah/eCIkDKPsEltrZ 4EFdMOU0z6/FP6ckzHWgQ4/15d5AyCSn+4I+rmXZTLRQPt/VN0u2LftM6pU7Eh8YgaPw gs8MdMKUyp7BJUQ2oMKN+So31Acp+egDjVrI0Ce4Y2yr/cwE6exC79huRqUztWIlg4Cl JeRzmsI5B5CD2dKVBHpPeVsg/u1G+4Zbtapfhw1aMwuke04q6A2pO/w5nXm5I3eSns7r B8pLJSf3VG0GXDOFlaFhViY6EPKJtROZHT07pQVKNGOwHCCOgfMA4t1ELHEWsFpLkBq5 30ig== X-Gm-Message-State: ALoCoQkV1vS23pvLVTwT0Sm3jw7HfNxgPlogRqLL0sgDyk5mrMjxRssJ4RdOGKbka4eFG4fATFbXNZ4hxlwisbmY7SJKRh8pVgSjcWZPTEQEq2EXXvZLZ1bj58tuAc7m1UJn7m6phutKkfMoatui4RwDQPnOgZ2ETg== X-Received: by 10.180.99.231 with SMTP id et7mr49906263wib.23.1432194770843; Thu, 21 May 2015 00:52:50 -0700 (PDT) X-Received: by 10.180.99.231 with SMTP id et7mr49906248wib.23.1432194770723; Thu, 21 May 2015 00:52:50 -0700 (PDT) Received: from ashulgin01.corp.ad.zalando.net ([94.135.236.132]) by mx.google.com with ESMTPSA id bh7sm30707950wjb.8.2015.05.21.00.52.49 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 21 May 2015 00:52:50 -0700 (PDT) From: Oleksandr Shulgin To: Fabien COELHO Cc: mail@bwe.im, PostgreSQL Bugs List Subject: Re: BUG #12379: pgbench should hint to pgbench -i References: <20141231105955.8014.38426@wrigleys.postgresql.org> Date: Thu, 21 May 2015 09:51:57 +0200 In-Reply-To: (Fabien COELHO's message of "Sun, 26 Apr 2015 08:47:13 -0400 (AST)") Message-ID: <87oales6zm.fsf@ashulgin01.corp.ad.zalando.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -4.2 (----) 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 Fabien COELHO writes: > >> 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)? > > Here is a rebase, and it uses two spaces after the colon like it seems it > is done elsewhere. > > HINT: is "foo" the right database? did you initialize first (pgbench -i)? I don't think there is precedent for spitting out "HINT:" in client code (at least grep didn't find it). So this message might look like it's coming from the server, while it doesn't. I think the following is closer to pre-existing experience, IMO: diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 8b8b591..8d8c1fc 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -3250,6 +3250,7 @@ main(int argc, char **argv) if (PQresultStatus(res) != PGRES_TUPLES_OK) { fprintf(stderr, "%s", PQerrorMessage(con)); + fprintf(stderr, "Is \"%s\" the right database? Did you initialize it first (pgbench -i)?\n", dbName); exit(1); } scale = atoi(PQgetvalue(res, 0, 0)); -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs