Re: ECPG connection timeouts

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Edmund Bacon <edmund(dot)bacon(at)devstudios(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: ECPG connection timeouts
Date: 2008-03-23 17:34:10
Message-ID: 20080323173410.GB6560@feivel.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Tue, Mar 18, 2008 at 04:47:51PM -0600, Edmund Bacon wrote:
> Is it possible to control how long ECPG takes when trying to connect to
> a database on a remote system (e.g. connect to tcp:postgres//remote/db)

With ecpg calling libpq's connect functions you can just look here for possible options:

http://www.postgresql.org/docs/8.3/interactive/libpq-connect.html

You should use something like
tcp:postgresql://server/database?connect_timeout=14 as database name in
a connect statement.

However, you will notice that this doesn't work as I just found that the
parser doesn't like the "=14" part. I will fix this in a minute.

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes(at)jabber(dot)org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message meskes 2008-03-23 18:14:17 Re: ECPG connection timeouts
Previous Message Edmund Bacon 2008-03-18 22:47:51 ECPG connection timeouts