From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | Julien Rouhaud <julien(dot)rouhaud(at)dalibo(dot)com>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, mail(at)bwe(dot)im, Oleksandr Shulgin <oleksandr(dot)shulgin(at)zalando(dot)de>, PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #12379: pgbench should hint to pgbench -i |
Date: | 2015-07-06 00:33:31 |
Message-ID: | 23314.1436142811@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> writes:
> 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.
I looked at this a bit and have a few comments:
* I think it might be best to restrict the hint to appear only in the
case that the SQLSTATE is ERRCODE_UNDEFINED_TABLE. There are a lot of
possible failures here, and I'm not sure this hint is apropos for any
but that one.
* I really don't care for "HINT pgbench: " as that's got pretty much
nothing to do with any other message formatting we have anywhere,
least of all the existing hint-like messages in pgbench. I've started
a different thread at
http://www.postgresql.org/message-id/22280.1436139973@sss.pgh.pa.us
to discuss what the general message formatting in pgbench ought to be,
and probably this needs to wait for the outcome of that discussion.
* I'd be a bit inclined to reduce the message to something like
Perhaps you need to do initialization ("pgbench -i") in database "foo"
so that we can avoid the question of formatting of multi-sentence hints.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2015-07-06 02:43:38 | Re: BUG #13487: GetBufferFromRing code bug |
Previous Message | Peter Kroon | 2015-07-05 18:54:47 | Re: dblink max per function |