SPL is a procedural, block-structured language. You can use SPL to create four types of programs, including procedures, functions, triggers, and packages.

In addition, SPL is used to create subprograms. A subprogram refers to a subprocedure or a subfunction, which are nearly identical in appearance to procedures and functions, but differ in that procedures and functions are standalone programs, which are individually stored in the database and can be invoked by other SPL programs or from PSQL. Subprograms can only be invoked from within the standalone program in which they are created.