| From: | Shinya Kato <shinya11(dot)kato(at)gmail(dot)com> |
|---|---|
| To: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
| Cc: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Use IsA() macro instead of nodeTag comparison |
| Date: | 2026-01-09 02:19:14 |
| Message-ID: | CAOzEurRd_6Kkdzx5nnvQ7oSPongPHpPs8kEPykVz1j_b7q3RqQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Jan 9, 2026 at 9:56 AM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>
> > I found a similar issue in define.c. Should we fix it there as well?
> >
> > diff --git a/src/backend/commands/define.c b/src/backend/commands/define.c
> > index 63601a2c0b4..8313431397f 100644
> > --- a/src/backend/commands/define.c
> > +++ b/src/backend/commands/define.c
> > @@ -349,7 +349,7 @@ defGetStringList(DefElem *def)
> > (errcode(ERRCODE_SYNTAX_ERROR),
> > errmsg("%s requires a parameter",
> > def->defname)));
> > - if (nodeTag(def->arg) != T_List)
> > + if (!IsA(def->arg, List))
> > elog(ERROR, "unrecognized node type: %d", (int)
> > nodeTag(def->arg));
> >
> > foreach(cell, (List *) def->arg)
> >
>
> Yep, I did a search with `nodeTag\(.*\)\s+(?:!=|==).*`, and this is the only finding.
Oh, I missed that, sorry. Thanks, LGTM.
--
Best regards,
Shinya Kato
NTT OSS Center
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Japin Li | 2026-01-09 02:31:30 | Re: Pasword expiration warning |
| Previous Message | Neil Chen | 2026-01-09 02:17:55 | Re: Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array |