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

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: why semicolon after begin is not allowed in postgresql?
Date: 2013-11-25 23:36:26
Message-ID: 1385422586132-5780250.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2013-11-25 23:37:22 Re: Extension Templates S03E11
Previous Message Andrew Dunstan 2013-11-25 23:32:21 Re: why semicolon after begin is not allowed in postgresql?