Re: pl/pgsql: END verbosity - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: pl/pgsql: END verbosity
Date
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3415C2B72@Herge.rcsinc.local
Whole thread Raw
In response to pl/pgsql: END verbosity  (Neil Conway <neilc@samurai.com>)
List pgsql-hackers
> > Neil Conway said:
> > > In PL/PgSQL, "END LOOP" is used to terminate loop blocks, and "END
IF"
> > > is used to terminate IF blocks. This is needlessly verbose: we
could
> > > simply accept "END" in both cases without syntactic ambiguity. I'd
> like
> > >  to make this change, so that END can be used to terminate any
kind of
> > > block. There's no need to remove support for the present syntax,
of
> > > course, so there's no backward compatibility concern. Oracle's
PL/SQL
> > > does require "END IF" and "END LOOP", but folks interested in
maximum
> > > compatibility can always use those forms if they like.
> > >
>
> Hello,
>
> I prefer actual syntax too, Neil. The reason isn't compatibility with
> Oracle, but better readibility - it's mean more work with finishing
code
> but less with debugging

COBOL, which is a kissing-cousin of pl/sql, allows this.  You can have a
line terminator (a period) or a specialized block terminator.  Based on
my experience here I would suggest not allowing a choice.  It's a famous
source of bugs.

Merlin


pgsql-hackers by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: [PATCHES] Removing Kerberos 4
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] Removing Kerberos 4