Skip site navigation (1) Skip section navigation (2)

RE: How connect JDBC

From: "Raghunath T" <raghunatht(at)mindtree(dot)com>
To: "Raghunath T" <raghunatht(at)mindtree(dot)com>, Gabriel García <gaby3011(at)yahoo(dot)com(dot)ar>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: RE: How connect JDBC
Date: 2001-04-06 06:58:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Hey Gabriel,
	I think the following mail to you describes everything that you need
to connect to database with java. If something is not working, check your
pg_hba.conf file and start postmaster with the -i option. You could use the
following command for that
	pg_ctl -o "-i" start

Raghunath T

-----Original Message-----
From:	Raghunath T
Sent:	Wed 4/4/2001 9:41 PM
To:	Gabriel García
Subject:	RE: [JDBC] How connect JDBC

	you'll have to first build the jdbc driver. Typically it would be
	For this you go to postgresql-7.0.2/src/interfaces/jdbc and then type
make jdbc1 or make jdbc2 (if you need j2se support)
	This will give you postgresql.jar file
	update ur classpath env variable to include the full path of
	Then in your code add
		java.sql.Connection conn =
DriverManager.getConnection("jdbc:postgresql://<host ip>:<port
	host ip : is the ip address of the host. could be something like 
	port : usually it is 5432 unless you are running postmaster on some
other port.
	If your java code is on the same machine as your database then you
need not give ip and port.
	You could just say "jdbc:postgresql:<dbname>"

	I hope this should be sufficient :-))

Raghunath T
-----Original Message-----
From:	Gabriel García
Sent:	Wed 4/4/2001 9:18 PM
To:	pgsql-jdbc(at)postgresql(dot)org
Subject:	[JDBC] How connect JDBC

I have a program's java, and I need read a Postgres database, How I can call
the database from java.
Thanks in advance.

Do You Yahoo!?
Get your free address at

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

pgsql-jdbc by date

Next:From: Peter T MountDate: 2001-04-06 07:32:10
Subject: Re: WG: JDBC 2.0 Scrollable Result Sets -- Slightly going mad --
Previous:From: Knud Alex MuellerDate: 2001-04-05 17:30:55
Subject: WG: JDBC 2.0 Scrollable Result Sets -- Slightly going mad --

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group