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

From Mike Blackwell
Subject Re: why semicolon after begin is not allowed in postgresql?
Date
Msg-id CANPAkgt-AXXYjndixorLy7dd+jz9g+d95YL9kQijjM-=y3EZHA@mail.gmail.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
I believe the section you are reading refers to the BEGIN keyword in the procedural language plpgsql, not the SQL 'BEGIN' command.  The issue stems from confusing two distinct languages both of which, along with several more procedural languages, are documented in the same manual.

__________________________________________________________________________________
Mike Blackwell | Technical Analyst, Distribution Services/Rollout Management | RR Donnelley
1750 Wallace Ave | St Charles, IL 60174-3401
Office: 630.313.7818
Mike.Blackwell@rrd.com
http://www.rrdonnelley.com




On Fri, Nov 22, 2013 at 4:24 PM, AK <alkuzo@gmail.com> wrote:
I am reading the following in the documentation: "Tip: A common mistake is to
write a semicolon immediately after BEGIN. This is incorrect and will result
in a syntax error."

So, "common mistake" means semicolons after BEGIN seem consistent to many
people - it seems consistent to me as well. If PostgreSql allowed them, we
would have one less rule to memorize, shorter documentation, less mistakes
and so on. In other words, without this limitation PostgreSql would be
slightly more useful, right?

What am I missing? Why do we need this rule? How is it making PostgreSql
better?



--
View this message in context: http://postgresql.1045698.n5.nabble.com/why-semicolon-after-begin-is-not-allowed-in-postgresql-tp5779905.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: [GENERAL] pg_upgrade ?deficiency
Next
From: Adrian Klaver
Date:
Subject: Re: why semicolon after begin is not allowed in postgresql?