Re: why semicolon after begin is not allowed in postgresql? - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: why semicolon after begin is not allowed in postgresql?
Date
Msg-id 5293DE05.8040904@dunslane.net
Whole thread Raw
In response to Re: why semicolon after begin is not allowed in postgresql?  (David Johnston <polobo@yahoo.com>)
Responses Re: why semicolon after begin is not allowed in postgresql?  (David Johnston <polobo@yahoo.com>)
List pgsql-hackers
On 11/25/2013 06:13 PM, David Johnston wrote:


>
> A side observation: why does "DECLARE" not require a block-end keyword but
> instead "BEGIN" acts as effectively both start and end?  BEGIN, IF, FOR,
> etc... all come in pairs but DECLARE does not.
>
>


A complete block is:
    [ DECLARE declarations ]    BEGIN statements    [ EXCEPTIONS handlers ]    END

The declare and exceptions parts are optional, as indicated. Does that 
make it clearer?


cheers

andrew



pgsql-hackers by date:

Previous
From: David Johnston
Date:
Subject: Re: why semicolon after begin is not allowed in postgresql?
Next
From: David Johnston
Date:
Subject: Re: why semicolon after begin is not allowed in postgresql?