]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Use IsA() macro in define.c, for sake of consistency.
authorFujii Masao <fujii@postgresql.org>
Fri, 9 Jan 2026 11:24:00 +0000 (20:24 +0900)
committerFujii Masao <fujii@postgresql.org>
Fri, 9 Jan 2026 11:24:00 +0000 (20:24 +0900)
Commit 63d1b1cf7f1 replaced a direct nodeTag() comparison with the IsA()
macro in copy.c, but a similar direct comparison remained in define.c.

This commit replaces that comparison with IsA() for consistency.

Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Shinya Kato <shinya11.kato@gmail.com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwGjWGS89_sTx=sbPm0FQemyQQrfTKm=taUhAJFV5k-9cw@mail.gmail.com

src/backend/commands/define.c

index 63601a2c0b413a6c3718976c37a962f0b4494ba3..8313431397fed5844e1b7d4510b94a05bc603f52 100644 (file)
@@ -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)