Re: How to "ping" the database

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to "ping" the database
Дата
Msg-id 7581.1124310348@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to "ping" the database  (Bill Moseley <moseley@hank.org>)
Список pgsql-general
Bill Moseley <moseley@hank.org> writes:
> I'm about to post a bug report on DBD::Pg, but I'm wondering if anyone
> here could suggest a better way to implement ping() that doesn't fail
> just because Postgresql is not allowing SELECTS.

I think you could just send an empty query string and see if anything
comes back.

Of course, this begs the question of what ping is really supposed to
test and when it's supposed to be allowable.  The above will not work
if in the middle of retrieving a query result, for example.

            regards, tom lane

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Finding nearest numeric value
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: COMMIT in ps output