Thread: Micro doc patch (plpgsql)

Micro doc patch (plpgsql)

From
"Joachim Wieland"
Date:
Hi,

attached is a micro doc patch. BEGIN in plpgsql is without semicolon.


Joachim

Attachment

Re: Micro doc patch (plpgsql)

From
David Fetter
Date:
On Tue, Dec 26, 2006 at 01:36:07AM +0100, Joachim Wieland wrote:
> Hi,
>
> attached is a micro doc patch. BEGIN in plpgsql is without semicolon.

It doesn't need the semicolon.  PL/PgSQL's BEGIN is different from
SQL's. :)

Cheers,
D
>
>
> Joachim

> diff -ur cvs/pgsql/doc/src/sgml/plpgsql.sgml cvs.build/pgsql/doc/src/sgml/plpgsql.sgml
> --- cvs/pgsql/doc/src/sgml/plpgsql.sgml    2006-11-01 05:09:40.000000000 +0100
> +++ cvs.build/pgsql/doc/src/sgml/plpgsql.sgml    2006-12-25 11:17:04.000000000 +0100
> @@ -1243,7 +1243,7 @@
>       to catch the error, for example:
>
>  <programlisting>
> -BEGIN;
> +BEGIN
>      SELECT * INTO STRICT myrec FROM emp WHERE empname = myname;
>      EXCEPTION
>          WHEN NO_DATA_FOUND THEN

>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster


--
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!

Re: Micro doc patch (plpgsql)

From
"Joachim Wieland"
Date:
On December 26, 5:19 am David Fetter <david@fetter.org> wrote:
> It doesn't need the semicolon.  PL/PgSQL's BEGIN is different from
> SQL's. :)

Exactly. Note that my patch _removes_ the semicolon. If you put it in a
plpgsql function definition as in the example from the docs you get a
syntax error.


> >  -BEGIN;
> >  +BEGIN


Joachim

Re: Micro doc patch (plpgsql)

From
David Fetter
Date:
On Tue, Dec 26, 2006 at 01:10:03PM +0100, Joachim Wieland wrote:
> On December 26, 5:19 am David Fetter <david@fetter.org> wrote:
> > It doesn't need the semicolon.  PL/PgSQL's BEGIN is different from
> > SQL's. :)
>
> Exactly. Note that my patch _removes_ the semicolon. If you put it in a
> plpgsql function definition as in the example from the docs you get a
> syntax error.

Oops.  Sorry about that :)

Cheers,
D
>
>
> > >  -BEGIN;
> > >  +BEGIN
>
>
> Joachim

--
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!

Re: Micro doc patch (plpgsql)

From
Tom Lane
Date:
"Joachim Wieland" <joe@mcknight.de> writes:
> attached is a micro doc patch. BEGIN in plpgsql is without semicolon.

Applied, thanks.

            regards, tom lane