O'Reilly logo

PostgreSQL Developer's Handbook by Hans-Jürgen Schönig, Ewald Geschwinde

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. PL/PGSQL

PostgreSQL provides a special programming language for developing functions within SQL code. This programming language (that's the reason why it is called PL/pgSQL) offers the programmer far more execution potential than simple SELECT, INSERT, or UPDATE commands. The power of PL/pgSQL can be used to solve problems that cannot be solved with pure SQL statements. The package was initially written by Jan Wieck. Let's take a look at the main ideas and basic concepts of PL/pgSQL.

PL/pgSQL is a procedural language and is similar to Oracle's PL/SQL (see the section titled “Why Use PL/pgSQL,” later in this chapter). Like PL/SQL, PL/pgSQL is a block-oriented language that supports variable declaration, loops, logical constructs, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required