Re: jdbc url

From: Josh Burdick <jburdick(at)gradient(dot)cis(dot)upenn(dot)edu>
To: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: jdbc url
Date: 2002-03-18 17:44:14
Message-ID: 3C96276E.1090709@gradient.cis.upenn.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Marin Dimitrov wrote:

>hi,
>
>can I pass the username and password for the connection as part of the JDBC
>url?
>
>having read some docs it seems that this is not possible, i.e. I can't use
>the getConnection(String url) method but I should use the
>getConnection(String url, String user, String password) one
>

With the devpgjdbc2 jar, I've been able to use

jdbc:postgresql://linuxmxm/bfdb?user=<username>&password=<password>

(substituting in <username> and <password>.)
I think I found that from digging through the source. Don't know
exactly which versions support this, though. (Also, I'm assuming that
you're using the old-style java.sql.Driver methods, which is what I've
been using.)
Josh

>
>thanx,
>
> Marin
>
>----
>"...what you brought from your past, is of no use in your present. When
>you must choose a new path, do not bring old experiences with you.
>Those who strike out afresh, but who attempt to retain a little of the
>old life, end up torn apart by their own memories. "
>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
>
--
Josh Burdick
jburdick(at)gradient(dot)cis(dot)upenn(dot)edu
http://www.cis.upenn.edu/~jburdick

In response to

  • jdbc url at 2002-03-18 17:09:07 from Marin Dimitrov

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Michael Adler 2002-03-18 18:47:21 mishandling of NOTICE?
Previous Message Marin Dimitrov 2002-03-18 17:09:07 jdbc url