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

From Mark Kirkwood
Subject Re: why semicolon after begin is not allowed in postgresql?
Date
Msg-id 5293C2EC.10603@catalyst.net.nz
Whole thread Raw
In response to Re: why semicolon after begin is not allowed in postgresql?  (AK <alkuzo@gmail.com>)
Responses Re: why semicolon after begin is not allowed in postgresql?
List pgsql-hackers
On 26/11/13 09:42, AK wrote:
> Kevin,
>
> I do see your logic now, but this thing is a common mistake - it means that
> this seems counter-intuitive to some people. What would happen if we applied
> Occam's razor and just removed this rule?
>
> All existing code would continue to work as is, and we would have one less
> rule to memorize. That would make PostgreSql a slightly better product,
> right?
>

Perhaps not a good use of Mr Occam's razor. Postgres supports many 
procedural languages (e.g plperl, plpython) and all these have different 
grammar rules from SQL - and from each other. We can't (and shouldn't) 
try altering them to be similar to SQL - it would defeat the purpose of 
providing a procedural environment where the given language works as 
advertised.

So in the case of plpgsql - it needs to follow the Ada grammar, 
otherwise it would be useless.

The fact that different languages may have similar or the same keywords 
with different grammar and punctuation rules is just a fact or life (I 
trip over that often when switching from perl to python in the same day)!

Regards

Mark




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ToDo: fast update of arrays with fixed length fields for PL/pgSQL
Next
From: Kevin Grittner
Date:
Subject: Re: MultiXact bugs