This article covers two ways to connect DBeaver to PostgreSQL: via the JDBC driver (recommended) and via an ODBC driver. Here is what you need to know before you begin:
- DBeaver is a free, universal database management tool that supports PostgreSQL through both JDBC and ODBC drivers, with no programming experience required to set it up
- JDBC is the simpler path — DBeaver includes a built-in PostgreSQL driver and will prompt you to download it automatically when creating a new connection
- ODBC requires an extra setup step — you need to configure a DSN (Data Source Name) in your system’s ODBC Data Source Administrator before connecting through DBeaver
- Default connection port is 5432 — you will need your host, database name, username, and password to complete the connection settings
- Once connected, you can query tables, run SQL scripts, export data, view ER diagrams, and manage schemas directly from DBeaver’s GUI
- For teams moving PostgreSQL data into a warehouse, a no-code pipeline tool like Hevo automates that process without manual exports or scripts
PostgreSQL is used by 49% of developers, making it the most popular database for the second year in a row, according to the Stack Overflow 2024 Developer Survey. As adoption grows, so does the need to manage PostgreSQL data efficiently without relying entirely on the command line.
DBeaver is one of the most widely used tools for that. It is a free, open-source database management client with over 40,000 stars on GitHub, used by developers, analysts, and database administrators across teams of every size.It connects to PostgreSQL through a JDBC or ODBC driver and gives you a full GUI for running queries, browsing schemas, exporting data, and managing your database without building a single data pipeline manually.
There are two ways to set up the connection. JDBC is simpler and uses DBeaver’s built-in PostgreSQL driver. ODBC requires configuring a DSN first but is a reliable alternative when JDBC is not available or not preferred.
This guide walks through both methods step by step.
Hevo connects to PostgreSQL out of the box, replicates data continuously, and handles schema changes automatically.
- 150+ pre-built connectors including PostgreSQL, Snowflake, and BigQuery
- Auto-healing pipelines with intelligent retries and fault-tolerant architecture
- Full pipeline visibility with row-level logs and anomaly alerts
Trusted by 2,000+ data teams. Rated 4.3/5 on G2.
Table of Contents
Why Connect DBeaver to PostgreSQL?
DBeaver acts as a data management layer between you and your PostgreSQL server. Instead of running every operation through the command line, you get a visual interface to query, edit, and manage your data without writing administrative scripts from scratch.
Here is what the connection gives you in practice:
- Run SQL queries without a terminal. Write and execute SQL directly in DBeaver’s SQL editor, which includes syntax highlighting, autocomplete, and execution history.
- Browse and edit data visually. View table contents in a spreadsheet-style grid and filter, sort, or edit rows inline without writing SELECT or UPDATE statements manually.
- Manage your database structure. Browse schemas, tables, views, indexes, sequences, and functions through the Database Navigator without needing to remember system catalog queries.
- Generate and export ER diagrams. DBeaver auto-generates entity relationship diagrams for any table or schema. Export them in GIF, PNG, BMP, SVG, and GraphML formats for documentation or sharing.
- Handle data import and export. Move data in and out of PostgreSQL using CSV, JSON, XML, Excel, and other formats directly from the DBeaver interface, with no scripts needed.
- Backup and restore databases. Run pg_dump-based backups and restores through DBeaver’s Tools menu without touching the command line.
- Manage users, roles, and permissions. Create and edit PostgreSQL roles, assign permissions, and configure policies through a visual interface rather than writing GRANT and REVOKE statements manually.
See how Hevo moves it to your warehouse automatically.
Connecting DBeaver to PostgreSQL via JDBC Driver
This is the recommended method for most users. DBeaver includes a built-in PostgreSQL JDBC driver and downloads it automatically when you create your first connection.
What you need before starting:
- DBeaver Community Edition installed on your machine
- Your PostgreSQL credentials: host, port, database name, username, and password
Step 1: Install DBeaver Community Edition
Download the installer for your operating system from DBeaver’s official website. DBeaver supports Windows, macOS, and Linux.
Run the installer and follow the setup wizard. When prompted to select components, you can check “Associate .SQL files” if you want .sql files to open directly in DBeaver by default. Click Next and complete the installation.
Step 2: Open the new connection wizard
Launch DBeaver. In the top menu, go to Database > New Database Connection, or click the plug icon in the upper left corner of the application window.
The connection wizard will open with a searchable list of all supported databases.
The connection wizard lists all supported databases. Use the search box or browse by category to find PostgreSQL quickly.
Step 3: Select PostgreSQL
Search for PostgreSQL in the search box or browse the SQL tab. Select it and click Next.
Note: DBeaver will prompt you to download the PostgreSQL driver automatically if it is not already installed. Click Download to proceed. You do not need to download the JDBC .jar file manually for a standard connection.
Step 4: Fill in your connection details
On the Main tab of the Connection Settings dialog, enter the following:
- Host: your PostgreSQL server address (e.g., localhost or a remote IP or hostname)
- Port: 5432 (default — change only if your server uses a custom port)
- Database: the name of your PostgreSQL database
- Username: your PostgreSQL username
- Password: your PostgreSQL password
Fill in your host, port, database name, and credentials on the Main tab. Default port is 5432.
Step 5: Configure additional settings (optional)
Click the PostgreSQL tab to view driver-specific properties if you need to adjust performance or compatibility settings. For most standard connections, the default values work fine.
The PostgreSQL tab shows driver-specific properties. These are optional for a standard connection.
Step 6: Test the connection
Click Test Connection at the bottom of the dialog.
If your credentials and host details are correct, you will see a “Connected” success message showing driver version details. Click OK to dismiss it, then click Finish to save the connection.
A successful connection shows driver details in the confirmation dialog. Click OK then Finish to proceed.
Your PostgreSQL database will now appear in the Database Navigator panel on the left.
Hevo connects to PostgreSQL and keeps your data pipeline running without babysitting.
Try Hevo for Free
Step 7: Query your data
Right-click any table in the Database Navigator and select View Data to load its contents in the main workspace.
To write a custom query, open the SQL Editor tab and click New SQL Script. Write your query and press Ctrl+Enter to run it.
Optional: Using a specific JDBC driver version
If you need a particular version of the PostgreSQL JDBC driver rather than the one DBeaver downloads automatically, you can add it manually. Download the required .jar from jdbc.postgresql.org. In DBeaver, open Database > Driver Manager, select PostgreSQL, click Edit, and use Add File to locate the .jar. Click OK and re-test the connection.
Create an ODBC Data Source to Use PostgreSQL Data in DBeaver
Before you can connect to PostgreSQL via ODBC in DBeaver, you need to configure a DSN (Data Source Name) on your operating system. This tells DBeaver how to reach your PostgreSQL server through the ODBC layer.
What you need before starting:
- A PostgreSQL ODBC driver installed on your machine. The free option is psqlODBC, the official driver from the PostgreSQL project. Devart also offers a commercial alternative with additional features.
- Your PostgreSQL connection details: host, port, database name, username, and password.
Step 1: Open ODBC Data Sources on your machine
Windows 10 / 11: Search for “ODBC Data Sources (64-bit)” in the Start menu and open it.
Alternatively, go to Control Panel > System and Security > Windows Tools > ODBC Data Sources (64-bit).
Note: Use the 64-bit version. DBeaver runs on a 64-bit JVM and does not support 32-bit ODBC drivers.
Step 2: Add a new DSN
In the ODBC Data Source Administrator window:
- Click the System DSN tab to make the data source available to all users on the machine, or User DSN to configure it for your account only.
- Click Add, select your PostgreSQL ODBC driver from the list (e.g., PostgreSQL Unicode or Devart ODBC Driver for PostgreSQL), and click Finish.
Name your data source and fill in the connection parameters including host, port, database, and credentials.
Step 3: Configure the DSN connection parameters
Fill in the following fields:
- Data Source Name: a label you will use to identify this connection in DBeaver (e.g., postgres_local)
- Host: your PostgreSQL server address
- Port: 5432 (default)
- Database: your database name
- Username and Password: your PostgreSQL credentials
Click Test to confirm the connection works, then click Save or OK.
Fixing incorrect string display (important): If you see SQL_WVARCHAR data types displaying incorrectly in DBeaver after connecting, go to the Advanced Settings tab of the DSN configuration and set String Types to Ansi. This ensures all string types return as SQL_CHAR, SQL_VARCHAR, and SQL_LONGVARCHAR.
Step 4: Open a new database connection in DBeaver
Launch DBeaver. In the top menu, go to Database > New Database Connection.
Open the connection wizard from the Database menu.
Step 5: Select ODBC as the connection type
In the “Connect to a database” wizard, scroll to or search for ODBC and click Next.
Select ODBC in the wizard. Note: if you see “ODBC – Legacy” in your version, update DBeaver as this option was removed in version 23.1.
Step 6: Enter your DSN
In the Database/Schema field, type the DSN name you created in Step 3 (e.g., postgres_local).
Enter the DSN name you configured in the ODBC Data Source Administrator.
Click Test Connection. If everything is configured correctly, you will see a success message. Click Finish to save the connection.
Using ODBC Driver to Connect PostgreSQL Data from DBeaver
Read about step-by-step installation of ODBC driver in PostgreSQL and easily connect to any specified back-end database. Let’s understand the steps involved.
- Click on New Database Connection in the Database menu.
- Click ODBC and select Next in the Connect to database wizard.
- Type in the formerly configured DSN in the Database/Schema.
- Select Test Connection. A success image wil be displayed if you did it right.
Conclusion
DBeaver gives you a practical way to work with PostgreSQL without relying on the command line for every operation. Whether you are querying data, managing schemas, or running backups, the connection keeps your workflow inside a single interface.
For teams that need to go beyond local database management and move PostgreSQL data into a data warehouse for analysis, the manual work adds up quickly. Hevo automates that entire process. It connects to PostgreSQL out of the box, replicates data continuously, handles schema changes automatically, and keeps your pipeline running without engineering overhead.
With 150+ pre-built connectors, built-in data transformation, and full visibility into every sync, Hevo is built for teams that need reliable data movement at scale.
Get started for free — Hevo’s free plan supports up to 1M events per month. For growing data volumes, explore transparent pricing with no hidden fees or surprise overages.
References:
PostgreSQL ODBC connection details
Frequently Asked Questions
1. How to install PostgreSQL driver in DBeaver?
DBeaver automatically installs the PostgreSQL driver if it’s missing. Simply create a new PostgreSQL connection, and it will prompt you to download the necessary driver.
2. Does DBeaver support PostgreSQL?
Yes, DBeaver fully supports PostgreSQL and allows connecting, querying, and managing PostgreSQL databases.
3. How do I add a driver in DBeaver?
Go to Database > Driver Manager > Select New > Enter driver details or choose from the existing list. If it’s missing, DBeaver will prompt you to download the driver.
4. Where can I find the PostgreSQL driver?
You can find PostgreSQL drivers on the official PostgreSQL website or directly within DBeaver when setting up a PostgreSQL connection.
5. What is the difference between JDBC and ODBC connections in DBeaver?
JDBC is the simpler and more commonly used method. DBeaver includes a built-in PostgreSQL JDBC driver and downloads it automatically on first connection, so no manual setup is needed. ODBC requires you to first configure a DSN on your operating system before connecting through DBeaver. For most users, JDBC is the recommended path. ODBC is useful when your environment already uses ODBC drivers or when specific driver configurations are required.
6. Why is my DBeaver PostgreSQL connection failing?
The most common reasons are incorrect credentials, a wrong port number, or the PostgreSQL server not accepting remote connections. Check the following:
Confirm the host address, port (default is 5432), database name, username, and password are all correct.
Verify your PostgreSQL server is running and accessible from your machine
Check your pg_hba.conf file to ensure your IP address is allowed to connect
If connecting remotely, confirm that your firewall allows traffic on port 5432
If you see a driver-related error, try clicking Download in the driver prompt to let DBeaver install the latest JDBC driver automatically.
7. Can DBeaver Community Edition connect to PostgreSQL via ODBC?
Yes, but it requires manual configuration. DBeaver Community Edition does not have built-in ODBC integration like the Enterprise edition. You need to install a PostgreSQL ODBC driver such as psqlODBC, configure a DSN in your operating system’s ODBC Data Source Administrator, and then connect through DBeaver by selecting ODBC in the new connection wizard. DBeaver Community Edition version 23.1 and above no longer supports the Legacy ODBC option, so make sure you are selecting the standard ODBC connection type.