Re: database URL

From: Aaron Brashears <gila(at)gila(dot)org>
To: Robert LaPreze <rlapreze(at)sgi(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: database URL
Date: 2001-03-19 06:55:44
Message-ID: 20010318225544.A1013@gila.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Fri, Mar 16, 2001 at 01:11:35PM -0500, Robert LaPreze wrote:
> I have been trying to determine the url for a postgres database and was
> wondering if someone be able to provide me with this info.
> I writting java code to interface with the postgres environement and
> have had no luck in finding the db URL info.

If memory serves correctly, the url is constructed as:

jdbc:<databse>:<vendor-specific-urls>

For postgress, this takes the more specific form of:

jdbc:postgresql://<machine-name>:<port>/<database-name>

And finally as an example, this string will access the database called
'foo' on the local machine from a postmaster started with default
parameters.

jdbc:postgresl://localhost:5432/foo

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Bruce Momjian 2001-03-19 16:34:03 Patch application
Previous Message Eric Frazier 2001-03-19 01:26:45 get the query created by PreparedStatement