Re: Fix missing semicolon in pl_gram.y for option_value rule - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fix missing semicolon in pl_gram.y for option_value rule
Date
Msg-id 1405583.1781111032@sss.pgh.pa.us
Whole thread
In response to Re: Fix missing semicolon in pl_gram.y for option_value rule  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> writes:
> The release notes of bison 3.0 say

>    Missing semicolons at the end of actions are no longer added (as announced
>    in the release 2.5).

> But apparently that is not in fact happening?

I might be wrong, but I think that is saying that bison will no
longer add a semicolon at the end of the C code for an action.
If you do this:

diff --git a/src/pl/plpgsql/src/pl_gram.y b/src/pl/plpgsql/src/pl_gram.y
index 5009e59a78f..238c8ca80f1 100644
--- a/src/pl/plpgsql/src/pl_gram.y
+++ b/src/pl/plpgsql/src/pl_gram.y
@@ -415,8 +415,9 @@ option_value : T_WORD
                }
             | unreserved_keyword
                {
-                   $$ = pstrdup($1);
+                   $$ = pstrdup($1)
                }
+    ;

 opt_semi       :
                | ';'

it doesn't compile.  I don't have a pre-3.0 bison to compare to
though.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: need clarification about hash_bytes() non-determinitstic behaviour between Little Endian and Big Endian
Next
From: Bertrand Drouvot
Date:
Subject: Re: t/035_standby_logical_decoding.pl might fail on attempt to read wrong timeline