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