pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
SV: Using Postgres jdbc driver with Oracle SQL Developer
4+ messages / 4 participants
[nested] [flat]

* SV: Using Postgres jdbc driver with Oracle SQL Developer
@ 2020-07-06 11:26 Niels Jespersen <NJN@dst.dk>
  2020-07-06 13:33 ` Re: SV: Using Postgres jdbc driver with Oracle SQL Developer Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Niels Jespersen @ 2020-07-06 11:26 UTC (permalink / raw)
  To: Niels Jespersen <NJN@dst.dk>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

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

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: SV: Using Postgres jdbc driver with Oracle SQL Developer
  2020-07-06 11:26 SV: Using Postgres jdbc driver with Oracle SQL Developer Niels Jespersen <NJN@dst.dk>
@ 2020-07-06 13:33 ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-07-06 13:41   ` Re: SV: Using Postgres jdbc driver with Oracle SQL Developer Dave Cramer <davecramer@postgres.rocks>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2020-07-06 13:33 UTC (permalink / raw)
  To: Niels Jespersen <NJN@dst.dk>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Niels Jespersen <NJN@dst.dk> writes:
> Sorry, "way to provide a default username" should have been "way to provide a default databasename"

Not sure, but you'd be more likely to find a knowledgeable answer
on the pgsql-jdbc list.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: SV: Using Postgres jdbc driver with Oracle SQL Developer
  2020-07-06 11:26 SV: Using Postgres jdbc driver with Oracle SQL Developer Niels Jespersen <NJN@dst.dk>
  2020-07-06 13:33 ` Re: SV: Using Postgres jdbc driver with Oracle SQL Developer Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-07-06 13:41   ` Dave Cramer <davecramer@postgres.rocks>
  2020-07-06 15:35     ` Re: SV: Using Postgres jdbc driver with Oracle SQL Developer legrand legrand <legrand_legrand@hotmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Dave Cramer @ 2020-07-06 13:41 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Niels Jespersen <NJN@dst.dk>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

On Mon, 6 Jul 2020 at 09:33, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Niels Jespersen <NJN@dst.dk> writes:
> > Sorry, "way to provide a default username" should have been "way to
> provide a default databasename"
>
> Not sure, but you'd be more likely to find a knowledgeable answer
> on the pgsql-jdbc list.
>
>
Same way, in the properties object. But I'm totally unfamiliar with Oracle
SQL Developer. Can you provide properties at all ?

Dave

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: SV: Using Postgres jdbc driver with Oracle SQL Developer
  2020-07-06 11:26 SV: Using Postgres jdbc driver with Oracle SQL Developer Niels Jespersen <NJN@dst.dk>
  2020-07-06 13:33 ` Re: SV: Using Postgres jdbc driver with Oracle SQL Developer Tom Lane <tgl@sss.pgh.pa.us>
  2020-07-06 13:41   ` Re: SV: Using Postgres jdbc driver with Oracle SQL Developer Dave Cramer <davecramer@postgres.rocks>
@ 2020-07-06 15:35     ` legrand legrand <legrand_legrand@hotmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: legrand legrand @ 2020-07-06 15:35 UTC (permalink / raw)
  To: pgsql-general

Try Replacing hostname by hostname/Database?
Don’t Forget ?

Regards
PAscal




--
Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2020-07-06 15:35 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06 11:26 SV: Using Postgres jdbc driver with Oracle SQL Developer Niels Jespersen <NJN@dst.dk>
2020-07-06 13:33 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-07-06 13:41   ` Dave Cramer <davecramer@postgres.rocks>
2020-07-06 15:35     ` legrand legrand <legrand_legrand@hotmail.com>

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