Re: Suspicious strcmp() in src/backend/parser/parse_expr.c
| От | Michael Paquier | 
|---|---|
| Тема | Re: Suspicious strcmp() in src/backend/parser/parse_expr.c | 
| Дата | |
| Msg-id | 20190411021946.GG2728@paquier.xyz обсуждение исходный текст | 
| Ответ на | Re: Suspicious strcmp() in src/backend/parser/parse_expr.c (Tom Lane <tgl@sss.pgh.pa.us>) | 
| Ответы | Re: Suspicious strcmp() in src/backend/parser/parse_expr.c Re: Suspicious strcmp() in src/backend/parser/parse_expr.c | 
| Список | pgsql-bugs | 
On Wed, Apr 10, 2019 at 06:43:32PM -0400, Tom Lane wrote: > Indeed. Considering how much I hate using strcmp's result as a boolean, > you'd think I'd have got that right. Thanks for noticing! Just a note about those strcmp() calls using a boolean as return result in the tree: src/backend/commands/lockcmds.c: (!strcmp(rte->eref->aliasname, "old") || !strcmp(rte->eref->aliasname, "new"))) src/test/modules/test_rls_hooks/test_rls_hooks.c: if (strcmp(RelationGetRelationName(relation), "rls_test_permissive") src/test/modules/test_rls_hooks/test_rls_hooks.c: && strcmp(RelationGetRelationName(relation), "rls_test_both")) src/test/modules/test_rls_hooks/test_rls_hooks.c: if (strcmp(RelationGetRelationName(relation), "rls_test_restrictive") src/test/modules/test_rls_hooks/test_rls_hooks.c: && strcmp(RelationGetRelationName(relation), "rls_test_both")) Would it be worth changing these as well? -- Michael
Вложения
В списке pgsql-bugs по дате отправления: