4 Stored Procedure Language
This chapter describes the Stored Procedure Language - SPL. SPL is a highly productive, procedural programming language for writing custom procedures, functions, triggers, and packages for Postgres Plus Advanced Server. SPL:
● adds full procedural programming functionality to complement the SQL language.
● provides a single, common language to create stored procedures, functions, triggers, and packages for the Postgres Plus Advanced Server database.
● is integrated with pgAdmin III to provide a seamless development and testing environment.
● promotes the use of reusable code.
● is easy to use.
This chapter describes the basic elements of an SPL program, before providing an overview of the organization of an SPL program and how it is used to create a procedure or a function. Triggers, while still utilizing SPL, are sufficiently different to warrant a separate discussion (see Chapter 5 for information about triggers). Packages are discussed in Chapter 6.
The remaining sections of this chapter delve into the details of the SPL language and provide examples of its application.