From: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
---|---|
To: | Neil Conway <neilc(at)samurai(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pl/pgsql: END verbosity |
Date: | 2005-06-23 17:06:42 |
Message-ID: | 42BAEC22.1040609@Yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
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 whether a given END matches an IF, LOOP, or BEGIN, I
> don't see how it would reduce our "ability to detect errors or report
> errors accurately".
>
>> Consider for example the possibility that Oracle's next release adds
>> some new frammish that can't be duplicated because we chose not to
>> distinguish various forms of "END xxx" ...
>
> As lexical scoping is still unambiguous, we could actually add a K_LOOP
> / K_IF token to the input stream, if that would make you happier :) (Of
> course I'm not suggesting this -- the point is that as far as the parser
> is concerned, we should have precisely the same information for
> disambiguating the input as we used to have.)
>
> BTW, I notice that Oracle actually allows:
>
> <<label>>
> LOOP
> -- ...
> END LOOP label;
But what if they decide to allow
LOOP
-- ...
IF condition THEN
EXIT;
END LOOP;
at some point? There you'd get ambiguity.
Jan
>
> whereas we don't allow the optional label following END LOOP. Which goes
> to my general point: this frammish has existed in PL/SQL for a while,
> but it's not as if people are clamoring for us to implement it. I would
> wager that most people care about having *equivalent* features to
> PL/SQL, not exactly identical syntax. For example, the lack of
> autonomous transactions is something people have asked for in the past,
> because it *does* make porting PL/SQL applications more difficult. I
> can't see anyone losing any sleep because we are slightly more relaxed
> about the input we accept.
>
> -Neil
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-06-23 17:06:46 | Re: The contrib hit list |
Previous Message | Jim C. Nasby | 2005-06-23 17:06:24 | Re: [HACKERS] [PATCHES] Removing Kerberos 4 |
From | Date | Subject | |
---|---|---|---|
Next Message | Jim C. Nasby | 2005-06-23 17:16:01 | Re: [PATCHES] O_DIRECT for WAL writes |
Previous Message | Tom Lane | 2005-06-23 15:15:39 | Re: PL/pgSQL Debugger Support |