Thread: psql connect_timeout feature

psql connect_timeout feature

From
Steve Crawford
Date:
I've dug through the docs and peeked at the source and found no way to
specify a connect_timeout so:

1. Did I, in fact, just overlook something?

2. We would find it extremely useful to have this option. Would anyone else?

3. Alternately, what about adding a "raw connection string" feature to
psql. The supplied string would be passed straight to the PQconnectdb
function and allow access to all connection parameters without the
necessity to keep adding individual command-line options for each
individual parameter.

Cheers,
Steve

Re: psql connect_timeout feature

From
Steve Atkins
Date:
On Sep 5, 2007, at 9:59 AM, Steve Crawford wrote:

> I've dug through the docs and peeked at the source and found no way to
> specify a connect_timeout so:
>
> 1. Did I, in fact, just overlook something?

PGCONNECT_TIMEOUT=5 psql ?

There are a lot of useful environment variables that libpq and
anything using libpq supports. They're not documented much
in the client app docs, but you can find them in the libpq docs.

Cheers,
   Steve