The PSQL Module Body
The PSQL module body starts with an optional section that declares variables and subroutines, followed by a block of statements that run in a logical sequence, like a program.A block of statements — or compound statement — is enclosed by the BEGIN and END keywords, and is executed as a single unit of code.The main BEGIN…END block may contain any number of other BEGIN…END blocks, both embedded and sequential.Blocks can be nested to a maximum depth of 512 blocks.All statements except BEGIN and END are terminated by semicolons (‘;’).No other character is valid for use as a terminator for PSQL statements.