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

From: Mike Blackwell <mike(dot)blackwell(at)rrd(dot)com>
To: AK <alkuzo(at)gmail(dot)com>
Cc: PgHacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: why semicolon after begin is not allowed in postgresql?
Date: 2013-11-22 22:34:18
Message-ID: CANPAkgt-AXXYjndixorLy7dd+jz9g+d95YL9kQijjM-=y3EZHA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)Blackwell(at)rrd(dot)com
http://www.rrdonnelley.com

<http://www.rrdonnelley.com/>
* <Mike(dot)Blackwell(at)rrd(dot)com>*

On Fri, Nov 22, 2013 at 4:24 PM, AK <alkuzo(at)gmail(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Adrian Klaver 2013-11-22 22:34:22 Re: why semicolon after begin is not allowed in postgresql?
Previous Message Kevin Grittner 2013-11-22 22:28:02 Re: [GENERAL] pg_upgrade ?deficiency