Re: Row pattern recognition

From: 신성준 <shinsj4653(at)gmail(dot)com>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: assam258(at)gmail(dot)com, jian(dot)universality(at)gmail(dot)com, vik(at)postgresfriends(dot)org, pgsql-hackers(at)postgresql(dot)org, zsolt(dot)parragi(at)percona(dot)com, sjjang112233(at)gmail(dot)com, er(at)xs4all(dot)nl, jacob(dot)champion(at)enterprisedb(dot)com, david(dot)g(dot)johnston(at)gmail(dot)com, peter(at)eisentraut(dot)org, li(dot)evan(dot)chao(at)gmail(dot)com
Subject: Re: Row pattern recognition
Date: 2026-07-19 09:03:32
Message-ID: CACdN0M4D8B4YqNS1rRE24usH_Rm5p-YYjKhWGXNMCgHEu6+Mng@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Tatsuo,

> In addition you see #define INITIAL in gram.h?

Yes -- here gram.h has both the enum and the macro:

enum yytokentype { ...; INITIAL = 472; ... };
#define INITIAL 472

The file header says "made by GNU Bison 2.3". That's macOS's system
bison, and it still emits the #define token macros, so INITIAL collides
with flex's #define INITIAL 0 in the scanner. Your 3.8.2 emits only the
enum, which is why you don't see it. 2.3 is the minimum the tree still
accepts (meson.build asks for >= 2.3) and it's what macOS ships, so a
build on that floor hits the warning.

> probably we should consider change "INITIAL" to something like
> "INITIAL_P" to avoid the collision?

That matches the _P convention already used for NULL_P / TRUE_P / IN_P,
so it seemed worth trying. I've attached a small patch that renames the
token to INITIAL_P in kwlist.h and gram.y; the SQL keyword stays
"initial". With it applied, both -Wmacro-redefined warnings are gone and
the build is warning-clean here, still on bison 2.3. The patch is on top
of v49 and named nocfbot-*.txt so cfbot doesn't pick it up. No rush on
this -- it can wait for whenever a cleanup pass fits. Please fold it in
or adjust as you see fit.

Regards,
Seongjun

Attachment Content-Type Size
nocfbot-initial_p-rename.txt text/plain 3.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2026-07-19 09:43:05 Re: Row pattern recognition
Previous Message Andrey Borodin 2026-07-19 08:05:41 Re: Checkpointer write combining