I'm trying to connect to a PostgreSQL 9.1 database using Oracle SQL Developer 3.0.04, but I'm not having any success so far.
First, if I add a third party driver on preferences, when adding a new connection there's no tab for PostgreSQL (it works fine for MySQL though). I'm using a JDBC4 version 9.1 driver, but I tried a JDBC3 of the same version and still get the same thing.
Second, there's nothing like manual configuration tab when adding a new connection. The closest is the Advanced option on Oracle tab, where I can provide a custom URL, but it fails because complains about the selected Driver (of course).
Finally, I got connected importing a connection from an XML file (contents below), but it displays only my schemas and doesn't show my tables inside them.
So, my question is: does Orable SQL Developer support PostgreSQL connections? Is there any other way to have my tables being displayed in the ObjectViewer?
<?xml version = '1.0' encoding = 'UTF-8'?> <References xmlns="http://xmlns.oracle.com/adf/jndi"> <Reference name="Lumea" className="oracle.jdeveloper.db.adapter.DatabaseProvider" credentialStoreKey="Lumea" xmlns=""> <Factory className="oracle.jdeveloper.db.adapter.DatabaseProviderFactory"/> <RefAddresses> <StringRefAddr addrType="user"> <Contents>lumea</Contents> </StringRefAddr> <StringRefAddr addrType="subtype"> <Contents>thirdParty</Contents> </StringRefAddr> <StringRefAddr addrType="customUrl"> <Contents>jdbc:postgresql://localhost:5432/versates</Contents> </StringRefAddr> <StringRefAddr addrType="SavePassword"> <Contents>true</Contents> </StringRefAddr> <StringRefAddr addrType="password"> <Contents>myencryptedpass</Contents> </StringRefAddr> <StringRefAddr addrType="driver"> <Contents>org.postgresql.Driver</Contents> </StringRefAddr> <StringRefAddr addrType="DeployPassword"> <Contents>true</Contents> </StringRefAddr> </RefAddresses> </Reference> </References>
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.
Open a file (File -> New File) and set the file type to SQL (View -> Command Palette -> PostgreSQL: Manage Connection Profiles, and opt to select SQL as your file type, then select SQL from the list). Your file should now have the red barrel SQL icon on the tab. Now create a Connection Profile.
Oracle database management systems, the main difference between these two databases is that PostgreSQL is an open-source database, while Oracle is a closed database system. PostgreSQL is a free relational object-oriented database management system that is developed by volunteer developers worldwide.
The Oracle Foreign Data Wrapper (oracle_fdw) has been available as a production-ready extension to the community version of PostgreSQL since April 8, 2014. This extension allows a PostgreSQL database to connect directly with an Oracle database—much like database links do in Oracle databases.
Oracle SQL Developer 4.0.1.14 surely does support connections to PostgreSQL.
Tools → Preferences
, Database → Third Party JDBC Drivers
and add the jar file (see http://www.oracle.com/technetwork/products/migration/jdbc-migration-1923524.html for step by step example)Database Connection
and instead of Oracle
, select PostgreSQL
tabEdit:
If you have different user name and database name, one should specify in hostname: hostname/database?
(do not forget ?
) or hostname:port/database?
.
(thanks to @kinkajou and @Kloe2378231; more details on https://stackoverflow.com/a/28671213/565525).
I've just downloaded SQL Developer 4.0 for OS X (10.9), it just got out of beta. I also downloaded the latest Postgres JDBC jar. On a lark I decided to install it (same method as other third party db drivers in SQL Dev), and it accepted it. Whenever I click "new connection", there is a tab now for Postgres... and clicking it shows a panel that asks for the database connection details.
The answer to this question has changed, whether or not it is supported, it seems to work. There is a "choose database" button, that if clicked, gives you a dropdown list filled with available postgres databases. You create the connection, open it, and it lists the schemas in that database. Most postgres commands seem to work, though no psql commands (\list, etc).
Those who need a single tool to connect to multiple database engines can now use SQL Developer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With