Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker.

Responsive image


PL/pgSQL

PL/pgSQL
Designed byJan Wieck
DeveloperPostgreSQL Global Development Group
First appearedOctober 30, 1998 (1998-10-30)
Websitewww.postgresql.org/docs/current/static/plpgsql.html
Influenced by
PL/SQL, Ada

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.[1] Version 9 also implements some ISO SQL/PSM features, like overloading of SQL-invoked functions and procedures.[2]

PL/pgSQL, as a fully featured programming language, allows much more procedural control than SQL, including the ability to use loops and other control structures. SQL statements and triggers can call functions created in the PL/pgSQL language.

The design of PL/pgSQL aimed to allow PostgreSQL users to perform more complex operations and computations than SQL, while providing ease of use. The language is able to be defined as trusted by the server.[3]

PL/pgSQL is one of the programming languages included in the standard PostgreSQL distribution,[4] the others being PL/Tcl, PL/Perl[5] and PL/Python.[6] In addition, many others are available from third parties, including PL/Java,[7] PL/pgPSM,[8] PL/php,[9] PL/R,[10] PL/Ruby,[11] PL/sh, PL/Lua, Postmodern[12] (based on Common Lisp) and PL/v8. PostgreSQL uses Bison as its parser,[13] making it easy to port many open-source languages, as well as to reuse code.

  1. ^ "PostgreSQL Documentation, Appendix E: Release Notes, Release 6.4". PostgreSQL Global Development Group. January 2012.
  2. ^ "feature T322", SQL standard features (9 ed.), PostgreSQL.
  3. ^ "PL/pgSQL – SQL Procedural Language". PostgreSQL. Retrieved 2007-11-15.
  4. ^ "Procedural Languages". 9 May 2024.
  5. ^ "PL/Perl", Docs (current ed.), PostgreSQL.
  6. ^ "PL/Python", Docs (current ed.), PostgreSQL.
  7. ^ "PL/Java", Gborg (project), PostgreSQL.
  8. ^ SQL/PSM (manual), PostgreSQL, 20 May 2008.
  9. ^ "PL/PHP", Community, Command prompt.
  10. ^ Conway, Joe, PL/R, archived from the original on 2014-06-19, retrieved 2005-02-25.
  11. ^ PL/Ruby (project), Ruby lang, 2018-11-23.
  12. ^ Haverbeke, Marijn (2024-05-27), marijnh/Postmodern, retrieved 2024-06-01
  13. ^ "Parser stage", Docs (9 ed.), PostgreSQL

Previous Page Next Page






PL/pgSQL German PL/PgSQL Spanish PL/pgSQL French PL/pgSQL Italian PL/pgSQL Japanese PL/pgSQL Korean PL/pgSQL Dutch PL/pgSQL Polish PLPGSQL Portuguese PL/pgSQL Russian

Responsive image

Responsive image