Re: ECPG could not connect to the database. - Mailing list pgsql-general

From Michael Meskes
Subject Re: ECPG could not connect to the database.
Date
Msg-id 20001207140427.B4718@feivel.credativ.de
Whole thread Raw
In response to ECPG could not connect to the database.  (Joachim Jaeckel <Joachim.Jaeckel@coffeebreak.de>)
List pgsql-general
On Mon, Dec 04, 2000 at 10:11:00AM +0100, Joachim Jaeckel wrote:
> I´m trying to use embedded sql with postgresql through ecpg. But if I
> try to make a connection to my database, I get the following error at
> runtime:
>
> Could not connect to database buecher@localhost in line 18.
> (I´m using postgresql 7.0.2)

Do you write a log file? Does it contain anything additional information?

> psql and the jdbc is working, but not the ecpg connection.

Are you sure you use the very same connect string? psql and libecpg both use
libpq to connect to the database. Maybe you have some different settings in
some environment variables? Or do you use IP numbers? I know that libecpg
does not connect to a given IP number while psql does. Frankly I have no
ide whatsoever where this comes from. But I have to figure out before we
relaese.

> exec sql connect to buecher;
> exec sql connect to buecher user joe;
> exec sql connect to buecher user joe identified by blubber;
>
> and everything ends in the same message.

How does your psql connect command look like?

> Do I have to configure something additionally for ecpg? Or anything else
> special?

No. It should work without any special configuration.

Michael

--
Michael Meskes
Michael@Fam-Meskes.De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!

pgsql-general by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: localization design for DB structures?
Next
From: gb@a3design.de
Date:
Subject: fetchone vs. fetchmany with pygres...