pg_get_functiondef
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
ivorysql | 1.0 | SIM | Apache-2.0 | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 9140 | ivorysql_ora | No | Yes | No | Yes | No | No | sys |
| 9150 | ora_btree_gin | No | Yes | No | Yes | Yes | No | sys |
| 9160 | ora_btree_gist | No | Yes | No | Yes | Yes | No | sys |
| 9170 | pg_get_functiondef | No | Yes | No | Yes | Yes | No | - |
| 9180 | plisql | No | Yes | No | Yes | Yes | No | pg_catalog |
| 9190 | gb18030_2022 | No | Yes | No | Yes | Yes | No | pg_catalog |
from contrib/pg_get_functiondef/pg_get_functiondef.control and package metadata
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.0 | 1817161514 | ivorysql | - |
| RPM | PIGSTY | 5.1 | 1817161514 | ivorysql5 | - |
| DEB | PIGSTY | 5.1 | 1817161514 | ivorysql-5 | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| el8.aarch64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| el9.x86_64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| el9.aarch64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| el10.x86_64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| el10.aarch64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| d12.x86_64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| d12.aarch64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| d13.x86_64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| d13.aarch64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| u22.x86_64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| u22.aarch64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| u24.x86_64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
| u24.aarch64 | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS | PIGSTY MISS |
Install
You can install ivorysql directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
pig repo add pgsql -u # Add repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install ivorysql; # Install for current active PG version
pig ext install -y ivorysql -v 18 # PG 18
dnf install -y ivorysql5 # PG 18
apt install -y ivorysql-5 # PG 18
Create Extension:
CREATE EXTENSION pg_get_functiondef;
Usage
The pg_get_functiondef extension provides functions to retrieve the complete definition (DDL) of PostgreSQL functions and procedures, particularly useful in Oracle compatibility contexts within IvorySQL.
Enabling
CREATE EXTENSION pg_get_functiondef;
Retrieving Function Definitions
-- Get the DDL of a function by OID
SELECT pg_get_functiondef(oid) FROM pg_proc WHERE proname = 'my_function';
-- Get function definition by name
SELECT pg_get_functiondef('my_function'::regproc);
This extension extends the built-in pg_get_functiondef() to support Oracle-compatible function and procedure syntax used by IvorySQL, including PL/iSQL procedure bodies and Oracle-style parameter declarations.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.