From: Niels Jespersen <NJN@dst.dk>
To: Niels Jespersen <NJN@dst.dk>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: SV: Using Postgres jdbc driver with Oracle SQL Developer
Date: Mon, 6 Jul 2020 11:26:45 +0000
Message-ID: <e620bb462b6d462ea5e6ae2455324c75@dst.dk> (raw)
In-Reply-To: <43f6a620ad0945989e01ba48848bc065@dst.dk>
References: <43f6a620ad0945989e01ba48848bc065@dst.dk>
Sorry, "way to provide a default username" should have been "way to provide a default databasename"
Fra: Niels Jespersen <NJN@dst.dk>
Sendt: 6. juli 2020 13:20
Til: pgsql-general@lists.postgresql.org
Emne: Using Postgres jdbc driver with Oracle SQL Developer
Hello all
Oracle SQL Developer allows you to add what they call a Third Party JDBC Driver. With that you can connect and use SQL Developer against Postgres. So far, so good. But when you connect, there is a button "Choose database" that fills a dropdown box with databasenames available on the cluster. This works great if you connect with the user named postgres, as it will connect to the database named postgres and check for available databases. However, if you try to connect using for instance username "user1" it will try to connect to a database named "user1" This mostly fails, since you most often does not have a database named exactly like your username.
I think this is a bug in Oracles call of Postgres jdbc, because it does not send a databasename, and the driver defaults to a database named as the username.
I may file a service request with Oracle to have this fixed down the road sometime.
In the meantime, is there a way to provide a default username to Postgres jdbc out-of-band from the actual calls from Oracle to Poostgres jdbc?
In the documentation https://jdbc.postgresql.org/documentation/head/connect.html#connection-parameters is says "If a property is specified both in URL and in Properties object, the value from Properties object is ignored." How can I inject a property object into the gap between Oracle and Postgres jdbc?
Regards Niels Jespersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: NJN@dst.dk
Subject: Re: Using Postgres jdbc driver with Oracle SQL Developer
In-Reply-To: <e620bb462b6d462ea5e6ae2455324c75@dst.dk>
References: <43f6a620ad0945989e01ba48848bc065@dst.dk> <e620bb462b6d462ea5e6ae2455324c75@dst.dk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox