Re: Fix missing semicolon in pl_gram.y for option_value rule

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: shaobo zhang <zshaoo224(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Fix missing semicolon in pl_gram.y for option_value rule
Date: 2026-06-10 17:03:52
Message-ID: 1405583.1781111032@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(at)eisentraut(dot)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

In response to

Browse pgsql-hackers by date

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