Variable, Cursor and Subroutine Declarations
The optional declarations section, located at the start of the body of the procedure definition, defines variables (including cursors) and subroutines local to the procedure.Local variable declarations follow the same rules as parameters regarding specification of the data type.See details in the PSQL chapter for DECLARE VARIABLE
, DECLARE CURSOR
, DECLARE FUNCTION
, and DECLARE PROCEDURE
.