Skip to content

Commit

Permalink
Convert the README to markdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpage committed Jul 19, 2024
1 parent dfd9bea commit 97fd914
Showing 1 changed file with 20 additions and 41 deletions.
61 changes: 20 additions & 41 deletions README.pldebugger → README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,31 @@
PostgreSQL pl/pgsql Debugger API
================================
# PostgreSQL pl/pgsql Debugger API

This module is a set of shared libraries which implement an API for debugging
pl/pgsql functions on PostgreSQL 8.4 and above. The pgAdmin project
(http://www.pgadmin.org/) provides a client user interface as part of pgAdmin
III v1.10.0 and above, and pgAdmin 4.
pl/pgsql functions on PostgreSQL 8.4 and above. The
[pgAdmin project](http://www.pgadmin.org/) provides a client user interface.

If you wish to debug functions on PostgreSQL 8.4, 9.0 or 9.1, please checkout
the PRE-9_2 branch from GIT.

If you wish to debug functions on PostgreSQL 8.2 or 8.3, please checkout the
PRE_8_4_SERVER branch from CVS.


Installation
------------
## Installation

- Copy this directory to contrib/ in your PostgreSQL source tree.

- Run 'make; make install'
- Run `make && make install`

- Edit your postgresql.conf file, and modify the shared_preload_libraries config
option to look like:

shared_preload_libraries = '$libdir/plugin_debugger'
`shared_preload_libraries = '$libdir/plugin_debugger'`

- Restart PostgreSQL for the new setting to take effect.

- Run the following command in the database or databases that you wish to
debug functions in:

CREATE EXTENSION pldbgapi;
`CREATE EXTENSION pldbgapi;`

(on server versions older than 9.1, you must instead run the pldbgapi--1.1.sql
script directly using psql).


Usage
-----
## Usage

Connect pgAdmin to the database containing the functions you wish to debug.
Right-click the function to debug, and select Debugging->Debug to execute and
Expand All @@ -48,9 +36,7 @@ and allow you to debug in-context.

For further information, please see the pgAdmin documentation.


Troubleshooting
---------------
## Troubleshooting

The majority of problems we've encountered with the plugin are caused by
failing to add (or incorrectly adding) the debugger plugin library to the
Expand All @@ -59,9 +45,7 @@ which, the server *must* be restarted). This will prevent global breakpoints
working on all platforms, and on some (notably Windows) may prevent the
pldbgapi.sql script from executing correctly.


Architecture
------------
## Architecture

The debugger consists of three parts:

Expand All @@ -83,31 +67,26 @@ to the target via a socket. The protocol between the proxy and the target
backend is not visible to others, and is subject to change. The pldbg_*
API functions form the public interface to the debugging facility.


```
debugger client *------ libpq --------* Proxy backend
(pgAdmin) *
|
pldebugger socket connection
|
*
application client *----- libpq -------* Target backend
```

## Licence

Licence
-------

The pl/pgsql debugger API is released under the Artistic Licence v2.0.

https://opensource.org/licenses/artistic-license-2.0

Copyright (c) 2004-2022 EnterpriseDB Corporation. All Rights Reserved.

The pl/pgsql debugger API is released under the
[Artistic Licence v2.0](https://opensource.org/licenses/artistic-license-2.0).

Contact
-------
Copyright (c) 2004-2024 EnterpriseDB Corporation. All Rights Reserved.

For support, please email the pgAdmin support mailing list. See

http://www.pgadmin.org/support/
## Contact

for more details.
For support, please email the pgAdmin support mailing list. See
[http://www.pgadmin.org/support/](http://www.pgadmin.org/support/) for more
details.

0 comments on commit 97fd914

Please sign in to comment.