From: | Adrian Klaver <aklaver(at)comcast(dot)net> |
---|---|
To: | "Leif B(dot) Kristensen" <leif(at)solumslekt(dot)org> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Creating a function with single quotes |
Date: | 2009-02-20 14:37:28 |
Message-ID: | 200902200637.28217.aklaver@comcast.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Friday 20 February 2009 6:29:43 am Leif B. Kristensen wrote:
> On Friday 20. February 2009, Adrian Klaver wrote:
> >Actually you need both semicolons. One after the RETURN statement and
> > one after the END statement
> >See below for full details:
> >http://www.postgresql.org/docs/8.3/interactive/plpgsql-structure.html
>
> I see the documentation, but empirically you don't need the semicolon
> after the END.
>
> About twenty years ago I wrote a lot of Turbo Pascal code, and IIRC
> semicolon after an END was allowed but considered bad style.
Learned something new. I went and reread the docs and found:
"Each declaration and each statement within a block is terminated by a
semicolon. A block that appears within another block must have a semicolon
after END, as shown above; however the final END that concludes a function body
does not require a semicolon."
I have always seen them terminated with a semicolon and did that assuming thing.
--
Adrian Klaver
aklaver(at)comcast(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Leif B. Kristensen | 2009-02-20 15:02:15 | Re: Creating a function with single quotes |
Previous Message | Shawn Tayler | 2009-02-20 14:30:38 | Re: Fwd: Re: Creating a function with single quotes |