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

From: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
To: David Johnston <polobo(at)yahoo(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: why semicolon after begin is not allowed in postgresql?
Date: 2013-11-25 23:42:01
Message-ID: 5293E049.7090505@catalyst.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2013-11-25 23:44:32 Re: Put json type into alphabetical order in manual table
Previous Message Heikki Linnakangas 2013-11-25 23:37:22 Re: Extension Templates S03E11