Re: BUG #12379: pgbench should hint to pgbench -i

From: "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: mail <mail(at)bwe(dot)im>, PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #12379: pgbench should hint to pgbench -i
Date: 2015-05-21 08:20:56
Message-ID: CACACo5SKW1GFrHTzOWLHJeXCEoQrEiijdtqo4d7hrvLW3_NFiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, May 21, 2015 at 10:10 AM, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:

>
> Hello Oleksandr,
>
> 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 do not see that as a problem. From my point of view a "HINT" is just
> what it is, and the message says clearly that it comes from pgbench.
>
> I think the following is closer to pre-existing experience, IMO:
>> + fprintf(stderr, "Is \"%s\" the right database? Did you initialize it
>> first (pgbench -i)?\n", dbName);
>>
>
> Hmmm. I liked to have a prefix on the line, that gives a purpose to the
> sentence. Maybe:
>
> HINT (pgbench): Is "foo" the right database? Did you initialize (-i)
> first?
>
> Or
>
> pgbench: ...
>
> Or
>
> pgbench HINT: ...

Well, prefixing with "<binaryname>: " makes sense to me in the general
case. But would it not be odd to do that for this message, and not the
whole lot of the rest of stuff pgbench can print to stderr, which are not
fatal errors, that is: hints?

--
Alex

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Fabien COELHO 2015-05-21 11:33:34 Re: BUG #12379: pgbench should hint to pgbench -i
Previous Message Fabien COELHO 2015-05-21 08:10:04 Re: BUG #12379: pgbench should hint to pgbench -i