pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oleksandr Shulgin <oleksandr.shulgin@zalando.de>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: mail@bwe.im, PostgreSQL Bugs List <pgsql-bugs@postgresql.org>
Subject: Re: BUG #12379: pgbench should hint to pgbench -i
Date: Thu, 21 May 2015 09:51:57 +0200
Message-ID: <87oales6zm.fsf@ashulgin01.corp.ad.zalando.net> (raw)
In-Reply-To: <alpine.DEB.2.10.1504260845160.6827@sto>
References: <20141231105955.8014.38426@wrigleys.postgresql.org>
	<alpine.DEB.2.10.1503080851220.4406@sto>
	<alpine.DEB.2.10.1504260845160.6827@sto>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Fabien COELHO <coelho@cri.ensmp.fr> 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:

inline patch 1: src/bin/pgbench/pgbench.c (+1/-0 lines) download inline-1.patchdiff --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

view thread (23+ messages)  latest in thread

Message-ID: <87oales6zm.fsf@ashulgin01.corp.ad.zalando.net>
Permalink:  ../87oales6zm.fsf@ashulgin01.corp.ad.zalando.net/
Also on:    postgresql.org/message-id/87oales6zm.fsf@ashulgin01.corp.ad.zalando.net

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: oleksandr.shulgin@zalando.de, coelho@cri.ensmp.fr
  Subject: Re: BUG #12379: pgbench should hint to pgbench -i
  In-Reply-To: <87oales6zm.fsf@ashulgin01.corp.ad.zalando.net>
  References: <20141231105955.8014.38426@wrigleys.postgresql.org> <alpine.DEB.2.10.1503080851220.4406@sto> <alpine.DEB.2.10.1504260845160.6827@sto> <87oales6zm.fsf@ashulgin01.corp.ad.zalando.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox