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

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: why semicolon after begin is not allowed in postgresql?
Date: 2013-11-26 17:27:14
Message-ID: 5294D9F2.2070005@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-11-26 17:28:01 Re: Logging WAL when updating hintbit
Previous Message Dimitri Fontaine 2013-11-26 17:15:56 Re: Extension Templates S03E11