Re: semicolon not required on END statement

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Hussein Patni <security(at)cosbit(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: semicolon not required on END statement
Date: 2004-10-01 03:46:52
Message-ID: 4645.1096602412@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Neil Conway <neilc(at)samurai(dot)com> writes:
> On Fri, 2004-10-01 at 01:11, Hussein Patni wrote:
>> I noticed in plpgsql that a semi colon is not always requiredafter
>> the END statement.

> Yeah, I've noticed this as well (although it doesn't appear to be
> documented). Would we gain anything by enforcing this restriction? IMHO
> not a lot...

We specifically do not require a semicolon at the very end of the
function definition. My recollection is that the plpgsql grammar did
originally enforce that, and we relaxed it because it confused people.
You have to admit that
... END;';
is a bit odd-looking.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Neil Conway 2004-10-01 04:53:28 Re: semicolon not required on END statement
Previous Message Tom Lane 2004-10-01 03:39:01 Re: PLPGSQL and FOUND stange behaviour after EXECUTE