Jump to content

PL/pgSQL

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Turnstep (talk | contribs) at 19:09, 25 February 2005 (Creation of pl/pgsql page). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

PL/pgSQL (Procedural Language/PostgreSQL Structured Query Language) is a procedural language built into the PostgreSQL RDBMS. It closely resembles Oracle's PL/SQL language.

PL/pgSQL, as a true programming language, allows much more control than basic SQL, including the ability to use loops and advanced control structures. Programs created in the PL/PgSQL language are called functions, and can be called as part of a SQL statement, or as the action that a trigger performs.

PL/pgSQL is the only "PL" language installed by default for PostgreSQL, but many others are available, including PL/Perl, PL/python, PL/PHP, PL/Java, PL/sh, PL/Tcl, PL/R, and PL/Ruby.

References