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

From David Johnston
Subject Re: why semicolon after begin is not allowed in postgresql?
Date
Msg-id 1385422586132-5780250.post@n5.nabble.com
Whole thread Raw
In response to Re: why semicolon after begin is not allowed in postgresql?  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan wrote
> 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?

Doh!

IF / THEN / ELSE / ENDIF .... (concept, not syntax)

That also does help to reinforce the point being made here...

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/why-semicolon-after-begin-is-not-allowed-in-postgresql-tp5779905p5780250.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: why semicolon after begin is not allowed in postgresql?
Next
From: Heikki Linnakangas
Date:
Subject: Re: Extension Templates S03E11