JDBC with POSTGRES

Started by Gilles Daroldover 27 years ago2 messagesgeneral
Jump to latest
#1Gilles Darold
darold@neptune.fr

Hello,

I have a little problem with connecting a Java standalone application
and Postgresql 6.3.2. In fact it doesn't connect.

Before sending you the error output, is anybody can tell me if I have
to declare a user/password in the h_dba_conf if I want this to work?
I ask this because I can't test this now. Could you give me the way?

I use the JDBC of the distribution, so normally it works...

Many thanks.

PS: I heard some news about PostgreSQL crash. For me, I use Postgres from
the beginning (it was Postgres95) and I never see a backend crash. Ok I
don't do many things with my databases and there are small but never one
problem... All my gratitude to the contributors.

#2Peter T Mount
peter@retep.org.uk
In reply to: Gilles Darold (#1)
Re: [GENERAL] JDBC with POSTGRES

On Tue, 25 Aug 1998, Gilles Darold wrote:

Hello,

I have a little problem with connecting a Java standalone application
and Postgresql 6.3.2. In fact it doesn't connect.

Before sending you the error output, is anybody can tell me if I have
to declare a user/password in the h_dba_conf if I want this to work?
I ask this because I can't test this now. Could you give me the way?

Three things:

1: Make sure you start the postmaster with -i (to enable TCP/IP)

2: have the clients ip/subnet-mask in pg_hba.conf (true for all
interfaces)

3: create the users within the database (login as the DBA, and use
CREATE USER)

Send the error, as it usually indicates where the problem lies.

PS: I heard some news about PostgreSQL crash. For me, I use Postgres from
the beginning (it was Postgres95) and I never see a backend crash. Ok I
don't do many things with my databases and there are small but never one
problem... All my gratitude to the contributors.

I get them occasionally with the stable releases, but it's usually when
I've done something stupid, or just hammered the server.

--
Peter T Mount peter@retep.org.uk
Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
Java PDF Generator: http://www.retep.org.uk/pdf