↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Functions / System Information Functions And Operators

pg_get_functiondef

Read the PG 18 manual

Reconstructs the creating command for a function or procedure.

Reading PG 18current·documented in 19 of 27 versions, 8.4 to 20

Signatures & examples

pg_get_functiondef ( func oid ) → text
Reconstructs the creating command for a function or procedure. (This is a decompiled reconstruction, not the original text of the command.) The result is a complete CREATE OR REPLACE FUNCTION or CREATE OR REPLACE PROCEDURE statement.
Version history 3
  1. 12 → 13 changed
  2. 10 → 11 changed
  3. 8.3 → 8.4 added

Definition snapshot: b7bd9cda · English manual source