pgjsonrpc
A JSON-RPC 2.0 implementation
pgjsonrpc · A JSON-RPC 2.0 implementation
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101669 | pgjsonrpc | pgjsonrpc | 0.0.1 | UTIL | PostgreSQL | SQL |
Usage
Sources:
- Official upstream README
- Official extension control file (pgjsonrpc.control)
- Official extension SQL (pgjsonrpc.sql)
pgjsonrpc — Implementation of JSON-RPC 2.0 as a PostgreSQL extension. Use it for the corresponding SQL or database utility workflow. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.
Core Workflow
Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.
Important Objects
jsonrpc.echo(p_request JSON)is an extension function and returnsJSON.jsonrpc.error_response(p_request JSON, p_code INTEGER, p_message TEXT, p_data JSON)is an extension function and returnsJSON.jsonrpc.execute(p_request TEXT)is an extension function and returnsJSON.jsonrpc.get_response(p_request JSON, p_jsonrpc TEXT, p_id TEXT, p_result JSON, p_code INTEGER, p_message TEXT)is an extension function and returnsJSON.jsonrpc.success_response(p_request JSON, p_result ANYELEMENT)is an extension function and returnsJSON.jsonrpc.methodsis a table installed or managed by the extension.jsonrpcis a schema created by the extension.
Requirements and Caveats
- The reviewed control file declares default version
0.0.1. - The control file marks the extension as relocatable.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.