Re: why semicolon after begin is not allowed in postgresql?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: David Johnston <polobo(at)yahoo(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: why semicolon after begin is not allowed in postgresql?
Date: 2013-11-25 23:32:21
Message-ID: 5293DE05.8040904@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Johnston 2013-11-25 23:36:26 Re: why semicolon after begin is not allowed in postgresql?
Previous Message David Johnston 2013-11-25 23:13:53 Re: why semicolon after begin is not allowed in postgresql?