Database driver PostgreSQL
Table of contents
Overview
This guide provides instructions on how to set up and use PostgreSQL with DBeaver.
DBeaver offers extensive support for PostgreSQL, but it might not cover all possible functionalities. If DBeaver is missing a feature you need, please submit a request through our GitHub page. If you are a developer, you have the option to enhance DBeaver's capabilities by contributing your own code. For guidelines on how to do this, check out our Contribution Guide.
Before you start, you must create a connection in DBeaver and select PostgreSQL. If you have not done this, please refer to our Database Connection article.
DBeaver interacts with the PostgreSQL server using a specific driver, it supports all versions of PostgreSQL, but the correct driver must be selected: use PostgreSQL (old) for versions below 8.x and PostgreSQL for newer versions. DBeaver also supports PostgreSQL extensions such as EDB, Google Cloud SQL for PostgreSQL and Fujitsu Enterprise Postgres. You must select the appropriate driver in the Connect to a database window for these extensions.
Setting Up
This section provides an overview of DBeaver's settings for establishing a direct connection and the configuration of secure connections using SSH, proxies, SSL, and the setup of ODBC/JDBC drivers for PostgreSQL.
PostgreSQL connection settings
In this subsection, we will outline the settings for establishing a direct connection to a PostgreSQL database using DBeaver. Correctly configuring your connection ensures seamless interaction between DBeaver and your PostgreSQL database.
1) The first page of the connection settings requires you to fill in specific fields to establish the initial connection.
Field | Description |
---|---|
Connect by (Host/URL) | Choose whether you want to connect using a host or a URL. |
Driver Type | Select the appropriate driver for your PostgreSQL database. |
URL | If you are connecting via URL, enter the URL of your PostgreSQL database here. This field is hidden if you are connecting via the host. |
Host | If you are connecting via host, enter the host address of your PostgreSQL database here. |
Database | Enter the name of the PostgreSQL database you want to connect to. |
Show all databases | Displays all databases in the database navigator. Note: This option works only when the Host connection type is selected. It does not work when connecting via URL. |
Port | Enter the port number for your PostgreSQL database. The default PostgreSQL port is 5432 . |
Authentication | Choose the type of authentication you want to use for the connection. For detailed guides on authentication types, please refer to the following articles: - Native Database Authentication - AWS RDS IAM Authentication - Azure AD Authentication for PostgreSQL - DBeaver Profile Authentication - PostgreSQL Kerberos Authentication - PostgreSQL PgPass Authentication - PostgreSQL SSPI Authentication (Windows SSO) You can also read about security in DBeaver PRO. |
Local Client | Specify the local client, see our article about Local client. |
Connection Details | Provide additional connection details if necessary. |
Driver Name | This field will be auto-filled based on your selected driver type. |
Driver Settings | If there are any specific driver settings, configure them here. |
2) The second page of the connection settings offers additional options that allow you to customize your further connection to the PostgreSQL database.
Field | Description |
---|---|
Show template databases | Displays template databases. This option is available when Show all databases is checked. |
Show databases unavailable for connection | Show databases not available for connection in database list. This option is available when Show all databases is checked. |
Show databases statistics | Displays statistics for databases. |
Read all data types | Reads all data types from the server (including arrays). |
Read table keys with columns | Enable reading table constraints during the column reading stage to ensure accurate recognition of keys. Note that this setting may decrease metadata loading performance. |
Show $$ quote as | Displays $$ quotes as code blocks or strings. |
Show $tagName$ quote as | Displays $tagName$ quotes as code blocks or strings. |
Use prepared statements | Uses prepared statements for SQL execution. |
Connection details
The Connection Details section in DBeaver allows for further customization of your PostgreSQL connection. This includes options for adjusting the Navigator View, setting up Security measures, applying Filters, configuring Connection Initialization settings, and setting up Shell Commands. Each of these settings can significantly impact your database operations and workflow. For detailed guides on these settings, please refer to the following articles:
- Connection Details Configuration
- Database Navigator
- Security Settings Guide
- Filters Settings Guide
- Connection Initialization Settings Guide
PostgreSQL driver properties
The settings for PostgreSQL Driver properties enable you to adjust the performance of the PostgreSQL JDBC and ODBC driver. These adjustments can influence the efficiency, compatibility, and features of your PostgreSQL database.
For a complete walkthrough on setting up PostgreSQL JDBC and ODBC drivers properties, you can refer to the official PostgreSQL JDBC documentation and PostgreSQL ODBC documentation. These guides detail each driver's properties and how they can be used to optimize PostgreSQL database connections.
You can customize the PostgreSQL driver in DBeaver via the Edit Driver page, accessible by clicking on the Driver Settings button on the first page of the driver settings. This page offers a range of settings that can influence your PostgreSQL database connections. For a comprehensive guide on these settings, please refer to our Database drivers article.
ODBC and JDBC Driver Configuration
DBeaver provides extensive capabilities for managing PostgreSQL database connections via ODBC/JDBC drivers. This functionality enables you to connect to your PostgreSQL database using native ODBC drivers, offering an alternative when specific DBeaver drivers are not available.
You can find a comprehensive, step-by-step guide on how to install the driver manager, set up drivers, configure data sources, and establish connections in DBeaver in our ODBC Driver Configuration article.
Secure Connection Configurations
DBeaver supports secure connections to your PostgreSQL database. Guidance on configuring such connections, specifically SSH, Proxy, Kubernetes, AWS SSM and SSL connections, can be found in various referenced articles. For a comprehensive understanding, please refer to these articles:
Powering PostgreSQL with DBeaver
DBeaver provides a host of features designed for PostgreSQL databases. This includes the ability to view schemas, along with numerous unique capabilities aimed at optimizing database operations.
PostgreSQL database objects
DBeaver lets you view and manipulate a wide range of PostgreSQL database objects. DBeaver has extensive support for various PostgreSQL metadata types, allowing you to interact with a wide variety of database objects, such as:
- Databases
- Schemas
- Data types
- Tables
- Columns
- Constraints
- Indexes
- Foreign Keys
- Dependencies
- References
- Partitions
- Triggers
- Rules
- Policies
- Foreign Tables
- Views
- Materialized Views
- Functions
- Sequences
- Data types
- Aggregate functions
- Event Triggers
- Extensions
- Storage
- Tablespaces
- Roles
- Schemas
- Administer
- Jobs
- Session Manager
- Lock Manager
For a practical guide on creating new tables and working with various database objects in PostgreSQL, check out our tutorial.
PostgreSQL Features in DBeaver
DBeaver is not limited to typical SQL tasks. It also includes numerous unique features specifically for PostgreSQL. Beyond regular SQL operations, DBeaver provides a range of PostgreSQL-specific capabilities, such as:
Category | Feature |
---|---|
Data Types | PostgreSQL Arrays |
PostgreSQL Structures | |
Extensions | PostgreSQL Extensions |
Security | PostgreSQL Permissions |
PostgreSQL Policies | |
PostgreSQL Roles | |
Data Organization | PostgreSQL Partitions |
Database Management | PostgreSQL Dependencies |
PostgreSQL Tools | |
External Data | PostgreSQL Foreign Tables |
Additional features compatible with PostgreSQL, but not exclusive to it:
Category | Feature |
---|---|
Data Transfer | Data Import |
Data Export | |
Session Management | Session Manager |
Lock Management | Lock Manager |
Backup and Restore | How to Backup/Restore data |
Schema Management | Schema Compare |
Data Visualization | GIS Guide |
ERD Guide |