PL/pgSQL [SEP] based on
, so there are few differences. The PL/pgPSM contributed module implements the standard. The main features of PSM that differ from PL/pgSQL:
- Exception handlers are subroutines (continue handlers);
- Warnings can be handled like an exception;
- Declaration of variables should be based on SQL query result.
All three languages (Oracle PL/SQL, PostgreSQL PL/pgSQL and ISO SQL/PSM) are originally descended from the Ada programming language.
Inline documentation external support.
Formal
PL/pgSQL
PL/pgSQL (Procedural Language/PostgreSQL) is a procedural programming language supported by the PostgreSQL ORDBMS. It closely resembles Oracle's PL/SQL language. Implemented by Jan Wieck, PL/pgSQL first appeared with PostgreSQL 6.4, released on October 30, 1998. Version 9 also implements some ISO SQL/PSM features, like overloading of SQL-invoked functions and procedures.
PL/pgSQL, as a fully featured programming language, allows much more procedural control than SQL, including the ability to