Re: [HACKERS] pl/pgsql: END verbosity [patch]

2005-07-02 Thread Neil Conway
Pavel Stehule wrote: this patch allows optional using label with END and END LOOP. Ending label has only informational value, but can enhance readability large block and enhance likeness with Oracle. Reviewed and applied -- thanks for the patch. -Neil ---(end of broad

Re: [HACKERS] pl/pgsql: END verbosity [patch]

2005-07-01 Thread Neil Conway
Pavel Stehule wrote: this patch allows optional using label with END and END LOOP. Ending label has only informational value, but can enhance readability large block and enhance likeness with Oracle. <>LOOP ... ... END LOOP<>; Attached is a revised version of this patch. Changes / comments

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-26 Thread Pavel Stehule
On Mon, 27 Jun 2005, Neil Conway wrote: > Peter Eisentraut wrote: > > It is required by the SQL standard. > > No, it isn't -- PL/PgSQL is not defined by the SQL standard. I guess > you're referring to SQL/PSM, but that has only a passing resemblance to > PL/PgSQL. Implementing SQL/PSM in some f

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-26 Thread Peter Eisentraut
Neil Conway wrote: > No, it isn't -- PL/PgSQL is not defined by the SQL standard. I guess > you're referring to SQL/PSM, but that has only a passing resemblance > to PL/PgSQL. Implementing SQL/PSM in some form would definitely be > worth doing (especially now that MySQL have), but I haven't seen an

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-26 Thread Neil Conway
Peter Eisentraut wrote: It is required by the SQL standard. No, it isn't -- PL/PgSQL is not defined by the SQL standard. I guess you're referring to SQL/PSM, but that has only a passing resemblance to PL/PgSQL. Implementing SQL/PSM in some form would definitely be worth doing (especially now

[HACKERS] pl/pgsql: END verbosity [patch]

2005-06-26 Thread Pavel Stehule
Hello this patch allows optional using label with END and END LOOP. Ending label has only informational value, but can enhance readability large block and enhance likeness with Oracle. <>LOOP ... ... END LOOP<>; Regards Pavel Stehule diff -c -r --new-file pgsql/doc/src/sgml/plpgsql.sgml pgs

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-25 Thread Peter Eisentraut
Am Mittwoch, 22. Juni 2005 04:17 schrieb Neil Conway: > In PL/PgSQL, "END LOOP" is used to terminate loop blocks, and "END IF" > is used to terminate IF blocks. This is needlessly verbose: It is required by the SQL standard. ---(end of broadcast)---

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-23 Thread Neil Conway
Jan Wieck wrote: But what if they decide to allow LOOP -- ... IF condition THEN EXIT; END LOOP; at some point? There you'd get ambiguity. ISTM this would be ambiguous in any case: IF condition1 THEN foo; IF condition2 THEN bar; END IF; -Neil

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-23 Thread Robert Treat
On Wednesday 22 June 2005 11:41, Neil Conway wrote: > Andrew Dunstan wrote: > > But this doesn't make it easier to use - users don't just include those > > who write it. The antecedent language of these, Ada, from which this > > syntax comes, was explicitly designed to be reader-friendly as opposed

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-23 Thread Jan Wieck
On 6/22/2005 1:29 AM, Neil Conway wrote: Tom Lane wrote: The long-term point in my mind is that removing syntactical redundancy always reduces the ability to detect errors or report errors acccurately Lexical scoping is unambiguous in a language like PL/PgSQL. Since it is simple to determine

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-22 Thread Merlin Moncure
> > 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 b

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-22 Thread Pavel Stehule
On Tue, 21 Jun 2005, Andrew Dunstan wrote: > 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 mak

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-22 Thread Alvaro Herrera
On Wed, Jun 22, 2005 at 09:23:17AM -0700, Steve Atkins wrote: > On Thu, Jun 23, 2005 at 01:41:49AM +1000, Neil Conway wrote: > > Andrew Dunstan wrote: > > >But this doesn't make it easier to use - users don't just include those who > > >write it. The antecedent language of these, Ada, from which th

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-22 Thread Steve Atkins
On Thu, Jun 23, 2005 at 01:41:49AM +1000, Neil Conway wrote: > Andrew Dunstan wrote: > >But this doesn't make it easier to use - users don't just include those who > >write it. The antecedent language of these, Ada, from which this syntax > >comes, was explicitly designed to be reader-friendly as o

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-22 Thread Neil Conway
Andrew Dunstan wrote: But this doesn't make it easier to use - users don't just include those who write it. The antecedent language of these, Ada, from which this syntax comes, was explicitly designed to be reader-friendly as opposed to writer-friendly, and this is a part of that. IMHO it is ju

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-22 Thread Andrew Dunstan
Neil Conway said: > Andrew Dunstan wrote: >> I'm unkeen. I see no technical advantage - it's just a matter of >> taste. > > There is no "technical advantage" to case insensitive keywords, or > dollar quoting, or a variety of other programming language features > that don't change functionality but

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-21 Thread Neil Conway
Tom Lane wrote: The long-term point in my mind is that removing syntactical redundancy always reduces the ability to detect errors or report errors acccurately Lexical scoping is unambiguous in a language like PL/PgSQL. Since it is simple to determine whether a given END matches an IF, LOOP, o

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-21 Thread Neil Conway
Andrew Dunstan wrote: I'm unkeen. I see no technical advantage - it's just a matter of taste. There is no "technical advantage" to case insensitive keywords, or dollar quoting, or a variety of other programming language features that don't change functionality but exist to make using the prog

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-21 Thread Tom Lane
"Andrew Dunstan" <[EMAIL PROTECTED]> writes: > Neil Conway said: >> Any objections? > I'm unkeen. I see no technical advantage - it's just a matter of taste. We > advertise that plpgsql is similar to plsql - we should not do anything to > make that less so IMNSHO. Terseness is not always good, red

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-21 Thread Andrew Dunstan
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 an

Re: [HACKERS] pl/pgsql: END verbosity

2005-06-21 Thread Josh Berkus
Neil, > 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 >

[HACKERS] pl/pgsql: END verbosity

2005-06-21 Thread Neil Conway
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'