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

From Josh Berkus
Subject Re: why semicolon after begin is not allowed in postgresql?
Date
Msg-id 5294D9F2.2070005@agliodbs.com
Whole thread Raw
In response to 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 11/25/2013 03:36 PM, David Johnston wrote:
> Doh!
> 
> IF / THEN / ELSE / ENDIF .... (concept, not syntax)
> 
> That also does help to reinforce the point being made here...
> 
> David J.

What point?

PL/pgSQL has been in use for 14 years.  During that entire time, it has
always used a block-based syntax where only the end of the block takes
semicolons; this applies not just to BEGIN ... END, but also to IF ...
END IF, LOOP ... END LOOP, etc.  It's a feature of the language.   One
might as well ask why Python doesn't take semicolons at the end of the
line, or why Perl requires them, or why Java has all those squiggly
brackets.

PostgreSQL is very accepting of new procedural languages; you could
always create your own, with whatever syntax you want.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Extension Templates S03E11
Next
From: Tom Lane
Date:
Subject: Re: Logging WAL when updating hintbit