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 1jsPA8-00029p-2Q for pgsql-general@arkaria.postgresql.org; Mon, 06 Jul 2020 11:19:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jsPA7-0005vr-08 for pgsql-general@arkaria.postgresql.org; Mon, 06 Jul 2020 11:19:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jsPA6-0005vj-8c for pgsql-general@lists.postgresql.org; Mon, 06 Jul 2020 11:19:50 +0000 Received: from srvimsva2.dst.dk ([91.208.143.64]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jsP9y-00051C-RA for pgsql-general@lists.postgresql.org; Mon, 06 Jul 2020 11:19:49 +0000 Received: from srvimsva2.dst.dk (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ED052104067 for ; Mon, 6 Jul 2020 13:19:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dst.dk; s=dmz20180119; t=1594034379; bh=SvhVto4969R3Hvdz4igyIeh4XAU0GK3cuYTWJ6auvqM=; h=From:To:Date; b=gTk49RM1itAtl7rFVuP4V1qfSR8BQHOOcoa0ftN2uCnuhUFsfq7Cv07tVGamW26lE BMBuCD11LFxGMJyA5olF81nIHpJNLOLJezKFhd+Asl1+I23S2tuCmsywkFXRFUklbI xqIloKBTLfX5d6m518uMghyKlbxsS6qU6DzwzATM= Received: from srvimsva2.dst.dk (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E0AB3104066 for ; Mon, 6 Jul 2020 13:19:38 +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:19:38 +0200 (CEST) Received: from srvexc8.dst.local ([172.30.32.48]) by Sepo.dst.dk (JAMES SMTP Server 2.3.2-1) with SMTP ID 654 for ; Mon, 6 Jul 2020 13:19:38 +0200 (CEST) Received: from srvexc8.dst.local (172.30.32.48) by srvexc8.dst.local (172.30.32.48) 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:19:38 +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:19:38 +0200 From: Niels Jespersen To: "pgsql-general@lists.postgresql.org" Subject: Using Postgres jdbc driver with Oracle SQL Developer Thread-Topic: Using Postgres jdbc driver with Oracle SQL Developer Thread-Index: AdZThauDoqB2iLVCRp+H/c4J7/YCmw== Date: Mon, 6 Jul 2020 11:19:38 +0000 Message-ID: <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_43f6a620ad0945989e01ba48848bc065dstdk_" MIME-Version: 1.0 X-TM-AS-GCONF: 00 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_43f6a620ad0945989e01ba48848bc065dstdk_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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_43f6a620ad0945989e01ba48848bc065dstdk_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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_43f6a620ad0945989e01ba48848bc065dstdk_--