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

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: BUG #12379: pgbench should hint to pgbench -i
Дата
Msg-id alpine.DEB.2.10.1507051821230.27775@sto
обсуждение исходный текст
Ответ на Re: BUG #12379: pgbench should hint to pgbench -i  (Julien Rouhaud <julien.rouhaud@dalibo.com>)
Ответы Re: BUG #12379: pgbench should hint to pgbench -i  (Guillaume Lelarge <guillaume@lelarge.info>)
Re: BUG #12379: pgbench should hint to pgbench -i  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hello Guillaume & Julien,

Thanks for the comments and the improvements!

>> I can't look at the code right now, but doesn't it use PQdb() to get the
>> name of the database? If it doesn't, it probably should.
>
> I'm attaching a new version of the patch, which retrieves the actual
> database name once connected if needed. That only solves this message
> though, the other ones being displayed before the connection is available.

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.

--
Fabien.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: BUG #12379: pgbench should hint to pgbench -i
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: BUG #12379: pgbench should hint to pgbench -i