All Products
Search
Document Center

PolarDB:pgAdmin4

Last Updated:Oct 29, 2024

This topic describes how to use pgAdmin4 to connect to a PolarDB for PostgreSQL (Compatible with Oracle) database and debug PL/SQL stored procedures.

Prerequisites

  • The engine version of the PolarDB for PostgreSQL (Compatible with Oracle) database is 2.0.

  • A database account is created in the PolarDB for PostgreSQL (Compatible with Oracle) cluster. For more information, see Create a database account.

  • The IP address of the host used to access the PolarDB for PostgreSQL (Compatible with Oracle) cluster is added to the whitelist of the cluster. For more information, see Configure a whitelist for a cluster.

  • In a PolarDB for PostgreSQL (Compatible with Oracle) database whose engine version is earlier than 2.0.14.22.0, the displayed row number of a PL/SQL breakpoint is one less than the actual row number of the breakpoint.

    For example, if a breakpoint is in the 10th row, the displayed row number of the breakpoint is 9.

Download link

Deployment and usage

  1. Add a PolarDB for PostgreSQL (Compatible with Oracle) cluster as the server.

    image

    image

    image

  2. Use pgAdmin4 to run commands.

    image

  3. Debug a PL/SQL stored procedure.

    • Direct debugging

      Note

      To debug a stored procedure that includes the out parameter, use the indirect debugging method.

      PolarDB for PostgreSQL (Compatible with Oracle) databases support the debugging of PL/SQL stored procedures, functions, and packages.

      image

      PL/SQL stored procedures, functions, and packages are all displayed in the Schema section. You can choose Debugging > Debug to start debugging.

      image

      image

      Note

      You can add or delete breakpoints only after the debugging process starts.

    • Indirect debugging

      Choose Debugging > Debug. The current session waits for other sessions to call the function.

      image

      image

      image

      image

Release notes

Version 8.8.1 (2024-09-29)

  • New feature: Debugging a PL/SQL stored procedure is supported for PolarDB for PostgreSQL (Compatible with Oracle) 2.0.