DBeaver Documentation

DOWNLOAD pdf

Database driver PostgreSQL on Google Cloud

Note: This driver is available in Lite, Enterprise, Ultimate and Team editions only.

Overview

Google Cloud SQL for PostgreSQL is a managed database service provided by Google Cloud, offering the robust capabilities of Google Cloud PostgreSQL with the added benefits of cloud hosting. This guide is designed to assist in the setup and management of Google Cloud SQL for PostgreSQL databases using DBeaver.

Before you can start managing your database, it's essential to establish a connection in DBeaver. This involves selecting the CloudSQL - PostgreSQL option to connect to the Google Cloud SQL service. If you have not yet created a connection in DBeaver, please refer to our Creating a Connection article for guidance.

Tip: Users with Ultimate and Team editions of DBeaver can connect to their Google Cloud SQL for PostgreSQL databases using the Cloud Explorer.

Feature Highlights

DBeaver extends beyond standard SQL tasks, offering a suite of PostgreSQL-specific features. These capabilities enhance the functionality and management of Google Cloud PostgreSQL databases, catering to specific needs and advanced use cases.

  • Data Types: DBeaver supports complex data types unique to this system. This includes Arrays and various structures, enabling intricate data organization and manipulation.

  • Extensions and Security: DBeaver includes robust support for Extensions, broadening the database's functionality. It also provides comprehensive security features, encompassing Permissions, Policies, and Roles management, ensuring thorough control over database access and operations.

  • Data Organization: For effective data handling, DBeaver supports Partitions. This feature assists in efficient data segmentation and organization, enhancing database performance and management.

  • External Data Integration: The platform also facilitates the integration of Foreign Tables. This feature enables seamless access and manipulation of external data sources, providing a more flexible and expansive data management environment.

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 Google Cloud PostgreSQL.

Note: The connection process in DBeaver utilizes the standard PostgreSQL driver, tailored to interact with the Google Cloud SQL for PostgreSQL service, highlighting its cloud-based characteristics.

PostgreSQL connection settings

In this subsection, we will outline the settings for establishing a direct connection to a Google Cloud PostgreSQL database using DBeaver. Correctly configuring your connection ensures seamless interaction between DBeaver and your Google Cloud 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 Google Cloud PostgreSQL database.
URL If you are connecting via URL, enter the URL of your Google Cloud PostgreSQL database here. This field is hidden if you are connecting via the host.
Host/Instance For a direct connection to a Google Cloud SQL instance, use the format project:region:instance. Here, project refers to your Google Cloud project ID, region denotes the geographical location of your instance, and instance is the unique ID of your Google Cloud SQL instance.
Database Enter the name of the Google Cloud 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.
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:

- Google Cloud IAM
- DBeaver Profile Authentication

You can also read about security in DBeaver PRO.
Local Client Specify the local client, see our article about local client configuration.
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 Google Cloud 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 Displays databases unavailable. 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.
Read table keys with columns Reads table keys with columns.
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 Google Cloud 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:

Driver properties

While managing PostgreSQL databases hosted on Google Cloud with DBeaver, it's important to understand that the underlying driver is the standard PostgreSQL JDBC and ODBC driver.

The settings for Google Cloud 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 Google Cloud 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 Google Cloud 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 Google Cloud 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 Google Cloud PostgreSQL database connections via ODBC/JDBC drivers. This functionality enables you to connect to your Google Cloud 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 Google Cloud PostgreSQL database. Guidance on configuring such connections, specifically SSH, Proxy, Kubernetes, and SSL connections, can be found in various referenced articles. For a comprehensive understanding, please refer to these articles:

Powering Google Cloud PostgreSQL with DBeaver

DBeaver provides a host of features designed for Google Cloud PostgreSQL databases. This includes the ability to view schemas, along with numerous unique capabilities aimed at optimizing database operations.

Google Cloud PostgreSQL database objects

DBeaver lets you view and manipulate a wide range of Google Cloud 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
  • Administer
    • Jobs
    • Session Manager
    • Lock Manager

Google Cloud PostgreSQL additional features in DBeaver

DBeaver provides additional features compatible with Google Cloud 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
Query Execution plan

Did we resolve your issue?