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 5293E049.7090505@catalyst.net.nz
Whole thread Raw
In response to Re: why semicolon after begin is not allowed in postgresql?  (David Johnston <polobo@yahoo.com>)
List pgsql-hackers
On 26/11/13 12:13, David Johnston wrote:
> Mark Kirkwood-2 wrote
>> Postgres supports many procedural languages (e.g plperl, plpython) and all
>>
>> So in the case of plpgsql - it needs to follow the Ada grammar,
>> otherwise it would be useless.
>
> I do not follow the "useless" conclusion - what, present day, does Ada got
> to do with it?  And the request is to alter only plpgsql, not "all the other
> languages".  To the casual end-user plpgsql is an internal language under
> our full control and installed by default in all new releases.  Is it really
> unreasonable to expect us to design in some level of coordination between it
> and SQL?
>
> Cross-compatibility is a valid reason though I'm guessing with all the
> inherent differences between our standard PL and other database's PLs that
> making this change would not be a materially noticeable additional
> incompatibility.
>

I guess I was thinking "useless as an example of a PL/SQL or Ada 
compatible language", which I probably should have stated fully - sorry. 
While we do add extra features to plpgsql we don't usually add 
deliberately PL/SQL or Ada incompatible ones. Where we do, sometimes 
might wish we had not (ISTR a discussion about PERFORM).

Other posters have pointed out that adding the semi colon to BEGIN 
confuses its main reason for existence - indicating the start of a code 
block, and would also confuse the casual reader about whether a code 
block or transaction was starting. All in all a materially noticeable 
incompatibility!

regards

Mark



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Extension Templates S03E11
Next
From: Andreas Karlsson
Date:
Subject: Re: Put json type into alphabetical order in manual table