July 2005
Intermediate to advanced
1032 pages
27h 10m
English
Now that you have an overview of the components of a PL/pgSQL function, let's look at the function body in greater detail. I'll start by showing you how to include documentation (that is, comments) in your PL/pgSQL functions. Next, I'll look at variable declarations. Finally, I'll finish up this section by describing the different kinds of statements that you can use inside of a PL/pgSQL function.
There are two comment styles in PL/pgSQL. The most frequently seen comment indicator is the double dash: --. A double dash introduces a comment that extends to the end of the current line. For example:
-- This line contains a comment and nothing else DECLARE customer_id INTEGER; -- This is also a comment -- due_date DATE; -- ...
Read now
Unlock full access