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
pgAdmin4 for Windows: pgadmin4-polardb-x64.exe (MD5: 758bad5b1027205c9074fcb05d46abcf)
pgAdmin4 for Mac:
Apple Silicon: pgadmin4-polardb-arm64.dmg (MD5: 373e0d2d03d1c129fd8af9a548b115a6)
Intel: pgadmin4-polardb-x86_64.dmg (MD5: e730dce5e1b2648bc248a73dbaf2571b)
Deployment and usage
Add a PolarDB for PostgreSQL (Compatible with Oracle) cluster as the server.



Use pgAdmin4 to run commands.

Debug a PL/SQL stored procedure.
Direct debugging
NoteTo 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.

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

NoteYou 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.




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.