Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jsPGt-0002Mk-Qq for pgsql-general@arkaria.postgresql.org; Mon, 06 Jul 2020 11:26:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jsPGs-0001R1-Q4 for pgsql-general@arkaria.postgresql.org; Mon, 06 Jul 2020 11:26:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jsPGs-0001Qu-Ge for pgsql-general@lists.postgresql.org; Mon, 06 Jul 2020 11:26:50 +0000 Received: from srvimsva2.dst.dk ([91.208.143.64]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jsPGp-0005el-57 for pgsql-general@lists.postgresql.org; Mon, 06 Jul 2020 11:26:50 +0000 Received: from srvimsva2.dst.dk (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AE0DA104066 for ; Mon, 6 Jul 2020 13:26:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dst.dk; s=dmz20180119; t=1594034805; bh=Kqy0pl68EUydCMk8snhgaNyJqScSaw8uCgrIao3AUR0=; h=From:To:Date; b=xKuVgTkKgCIxtTBn4Bc4jXmvgYGMh9dzodEPiUwxi4AsNIp65Stqm9e9Z8d2aCU3h qYo7x/vpo+Dzg/4RpxEks9YBSloqjiT+7M5Mq6F/AHGCXZ6haJVg+egeFAXk0swvTW dHf6GAy9pG+wJoQMwDVFEvCncG8lxEH7uozkDN0Q= Received: from srvimsva2.dst.dk (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 985F0104063 for ; Mon, 6 Jul 2020 13:26:45 +0200 (CEST) Received: from Sepo.dst.dk (unknown [192.168.64.12]) by srvimsva2.dst.dk (Postfix) with ESMTP for ; Mon, 6 Jul 2020 13:26:45 +0200 (CEST) Received: from srvexc9.dst.local ([172.30.32.49]) by Sepo.dst.dk (JAMES SMTP Server 2.3.2-1) with SMTP ID 622 for ; Mon, 6 Jul 2020 13:26:45 +0200 (CEST) Received: from srvexc8.dst.local (172.30.32.48) by srvexc9.dst.local (172.30.32.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1847.3; Mon, 6 Jul 2020 13:26:45 +0200 Received: from srvexc8.dst.local ([fe80::9df8:5de5:1bf2:8b3b]) by srvexc8.dst.local ([fe80::9df8:5de5:1bf2:8b3b%4]) with mapi id 15.01.1847.009; Mon, 6 Jul 2020 13:26:45 +0200 From: Niels Jespersen To: Niels Jespersen , "pgsql-general@lists.postgresql.org" Subject: SV: Using Postgres jdbc driver with Oracle SQL Developer Thread-Topic: Using Postgres jdbc driver with Oracle SQL Developer Thread-Index: AdZThauDoqB2iLVCRp+H/c4J7/YCmwAAobJw Date: Mon, 6 Jul 2020 11:26:45 +0000 Message-ID: References: <43f6a620ad0945989e01ba48848bc065@dst.dk> In-Reply-To: <43f6a620ad0945989e01ba48848bc065@dst.dk> Accept-Language: da-DK, en-US Content-Language: da-DK X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.22.69.7] Content-Type: multipart/alternative; boundary="_000_e620bb462b6d462ea5e6ae2455324c75dstdk_" MIME-Version: 1.0 X-TM-AS-GCONF: 00 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_e620bb462b6d462ea5e6ae2455324c75dstdk_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Sorry, "way to provide a default username" should have been "way to provide= a default databasename" Fra: Niels Jespersen 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 Dr= iver. 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" tha= t fills a dropdown box with databasenames available on the cluster. This wo= rks great if you connect with the user named postgres, as it will connect t= o the database named postgres and check for available databases. However, i= f you try to connect using for instance username "user1" it will try to con= nect to a database named "user1" This mostly fails, since you most often do= es 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 us= ername. I may file a service request with Oracle to have this fixed down the road s= ometime. In the meantime, is there a way to provide a default username to Postgres j= dbc 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." Ho= w can I inject a property object into the gap between Oracle and Postgres j= dbc? Regards Niels Jespersen --_000_e620bb462b6d462ea5e6ae2455324c75dstdk_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Sorry, = ”way to provide a default username” should have been “way= to provide a default databasename”

&n= bsp;

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 conn= ect, there is a button “Choose database” that fills a dropdown box with databasenames available on the cluster. Thi= s works great if you connect with the user named postgres, as it will conne= ct to the database named postgres and check for available databases. Howeve= r, 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 Oracle= s call of Postgres jdbc, because it does not send a databasename, and the d= river defaults to a database named as the username.

 

I may file a service request wi= th 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-para= meters is says “If a property is specified both in URL and in Pro= perties 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

--_000_e620bb462b6d462ea5e6ae2455324c75dstdk_--