回复:Fix missing semicolon in pl_gram.y for option_value rule

Поиск
Список
Период
Сортировка
Искать

回复:Fix missing semicolon in pl_gram.y for option_value rule

От:
"webbohan" <webbohan@qq.com>
Дата:
Hello,
  The "decl_is_for" syntax block has the same issue.
It can be modified together.

------------------ 原始邮件 ------------------
发件人: "shaobo zhang" <zshaoo224@gmail.com>;
发送时间: 2026年6月5日(星期五) 下午3:01
收件人: "pgsql-hackers"<pgsql-hackers@lists.postgresql.org>;
主题: Fix missing semicolon in pl_gram.y for option_value rule

The option_value grammar rule in src/pl/plpgsql/src/pl_gram.y was
missing a terminating semicolon, which is inconsistent with the style
used by other rules in the file. While Bison does not require
semicolons to terminate grammar rules, adding one here improves
consistency  and readability.

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

От:
Chao Li <li.evan.chao@gmail.com>
Дата:


> On Jun 5, 2026, at 15:01, shaobo zhang  wrote:
> 
> The option_value grammar rule in src/pl/plpgsql/src/pl_gram.y was
> missing a terminating semicolon, which is inconsistent with the style
> used by other rules in the file. While Bison does not require
> semicolons to terminate grammar rules, adding one here improves
> consistency  and readability.
> 

I would not call this a “fix” as it doesn’t fix anything not working today. It is actually a grammar-style cleanup. Since the code being changed is 12 years old, I think this patch is a candidate for v20.

Would you please add it to the CommitFest so that it can be noticed after v20 opens?

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/






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

От:
shaobo zhang <zshaoo224@gmail.com>
Дата:
Hi,

  Thank you for the review!

  You're right — this is a grammar-style cleanup rather than a fix, since
  the existing code works fine without the semicolon. I've reworded the
  commit message accordingly to make that clear, and attached it as v2.

  I'll add it to the CommitFest as you suggested so it can be picked up
  after v20 opens.

  Best regards,
  shaobo zhang

Chao Li  于2026年6月9日周二 13:52写道:
>
>
>
> > On Jun 5, 2026, at 15:01, shaobo zhang  wrote:
> >
> > The option_value grammar rule in src/pl/plpgsql/src/pl_gram.y was
> > missing a terminating semicolon, which is inconsistent with the style
> > used by other rules in the file. While Bison does not require
> > semicolons to terminate grammar rules, adding one here improves
> > consistency  and readability.
> > 
>
> I would not call this a “fix” as it doesn’t fix anything not working today. It is actually a grammar-style cleanup. Since the code being changed is 12 years old, I think this patch is a candidate for v20.
>
> Would you please add it to the CommitFest so that it can be noticed after v20 opens?
>
> Best regards,
> --
> Chao Li (Evan)
> HighGo Software Co., Ltd.
> https://www.highgo.com/
>
>
>
>


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

От:
shaobo zhang <zshaoo224@gmail.com>
Дата:
Вложения:
Oops, I forgot to attach the patch in my previous reply. Attaching v2 now.

Best regards,
shaobo zhang

shaobo zhang  于2026年6月9日周二 14:41写道:
>
> Hi,
>
>   Thank you for the review!
>
>   You're right — this is a grammar-style cleanup rather than a fix, since
>   the existing code works fine without the semicolon. I've reworded the
>   commit message accordingly to make that clear, and attached it as v2.
>
>   I'll add it to the CommitFest as you suggested so it can be picked up
>   after v20 opens.
>
>   Best regards,
>   shaobo zhang
>
> Chao Li  于2026年6月9日周二 13:52写道:
> >
> >
> >
> > > On Jun 5, 2026, at 15:01, shaobo zhang  wrote:
> > >
> > > The option_value grammar rule in src/pl/plpgsql/src/pl_gram.y was
> > > missing a terminating semicolon, which is inconsistent with the style
> > > used by other rules in the file. While Bison does not require
> > > semicolons to terminate grammar rules, adding one here improves
> > > consistency  and readability.
> > > 
> >
> > I would not call this a “fix” as it doesn’t fix anything not working today. It is actually a grammar-style cleanup. Since the code being changed is 12 years old, I think this patch is a candidate for v20.
> >
> > Would you please add it to the CommitFest so that it can be noticed after v20 opens?
> >
> > Best regards,
> > --
> > Chao Li (Evan)
> > HighGo Software Co., Ltd.
> > https://www.highgo.com/
> >
> >
> >
> >

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

От:
shaobo zhang <zshaoo224@gmail.com>
Дата:
>
> On Tue, Jun 09, 2026 at 12:51:47PM +0800, Chao Li wrote:
> > I would not call this a “fix” as it doesn’t fix anything not working
> > today. It is actually a grammar-style cleanup. Since the code being
> > changed is 12 years old, I think this patch is a candidate for v20.
>
> Why do we even need to care about that?
> --
> Michael

Agreed, it's purely cosmetic. If there's no interest in this cleanup,
I'm fine to withdraw it. Thanks both for looking.


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

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
shaobo zhang  writes:
>> Why do we even need to care about that?
>> --
>> Michael

> Agreed, it's purely cosmetic. If there's no interest in this cleanup,
> I'm fine to withdraw it. Thanks both for looking.

My inner neatnik likes consistency, so in the abstract I'd rather have
the semicolon present.  But I agree with Michael that it's not worth
the overhead to do this sort of fix retail.  (BTW I've got little
confidence that there aren't other places needing the same fix.)

What I'd really like is an equivalent of pgindent for bison files,
so that we could enforce this sort of style rule automatically.
But I suppose that's more work than it's worth, too.  Unless someone
knows of an existing tool?

			regards, tom lane


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

От:
Peter Eisentraut <peter@eisentraut.org>
Дата:
On 09.06.26 19:03, Tom Lane wrote:
> shaobo zhang  writes:
>>> Why do we even need to care about that?
>>> --
>>> Michael
> 
>> Agreed, it's purely cosmetic. If there's no interest in this cleanup,
>> I'm fine to withdraw it. Thanks both for looking.
> 
> My inner neatnik likes consistency, so in the abstract I'd rather have
> the semicolon present.  But I agree with Michael that it's not worth
> the overhead to do this sort of fix retail.  (BTW I've got little
> confidence that there aren't other places needing the same fix.)
> 
> What I'd really like is an equivalent of pgindent for bison files,
> so that we could enforce this sort of style rule automatically.
> But I suppose that's more work than it's worth, too.  Unless someone
> knows of an existing tool?

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?



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

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Peter Eisentraut  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


[PATCH] Updated redhat.svg to modern logo, Updated suse.png to suse.svg following the correct color and guidelines from openSuse

От:
Pritt Balagopal <pritt1999@gmail.com>
Дата:
Вложения:
The Red Hat logo was pretty old, so it has been updated to the modern
one following the guidelines presented in:
https://www.redhat.com/en/about/brand/standards/logo

The SUSE logo has also been updated to .svg instead of .png for better
clarity on high pixel density screens following the openSUSE trademark
guidelines: https://en.opensuse.org/openSUSE:Trademark_guidelines

Interestingly enough, the SUSE enterprise itself defines a different
set of guidelines and a logo with a different shade of green:
https://brand.suse.com/suse-logo#suse-logo

I decided to go with the logo that is most similar to the previous
icon. If that should not be the case, please let me know.
-- 
Regards,
Pritt

Re: [PATCH] Updated redhat.svg to modern logo, Updated suse.png to suse.svg following the correct color and guidelines from openSuse

От:
Magnus Hagander <magnus@hagander.net>
Дата:
Вложения:


On Wed, 5 Aug 2026 at 10:49, Pritt Balagopal <pritt1999@gmail.com> wrote:
The Red Hat logo was pretty old, so it has been updated to the modern
one following the guidelines presented in:
https://www.redhat.com/en/about/brand/standards/logo

The SUSE logo has also been updated to .svg instead of .png for better
clarity on high pixel density screens following the openSUSE trademark
guidelines: https://en.opensuse.org/openSUSE:Trademark_guidelines

Interestingly enough, the SUSE enterprise itself defines a different
set of guidelines and a logo with a different shade of green:
https://brand.suse.com/suse-logo#suse-logo

I decided to go with the logo that is most similar to the previous
icon. If that should not be the case, please let me know.

Yeah, I can barely tell the difference. 

I've applied the update. Thanks!

--
FAQ