Re: Small fix for _equalValue() REPOST
От | Fernando Nasser |
---|---|
Тема | Re: Small fix for _equalValue() REPOST |
Дата | |
Msg-id | 3C878A9D.36475683@redhat.com обсуждение исходный текст |
Ответ на | Small fix for _equalValue() (Fernando Nasser <fnasser@redhat.com>) |
Список | pgsql-patches |
Tom Lane wrote: > > This is not the idiomatic way to do it; there is an equalstr() macro > in equalfuncs.c that does this pushup for you. So "return > equalstr(a->val.str, b->val.str)" would be the appropriate fix. > Here it is. Thanks again. -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9Index: src/backend/nodes/equalfuncs.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v retrieving revision 1.114 diff -c -p -r1.114 equalfuncs.c *** src/backend/nodes/equalfuncs.c 2002/03/06 20:34:48 1.114 --- src/backend/nodes/equalfuncs.c 2002/03/07 15:43:28 *************** _equalValue(Value *a, Value *b) *** 1771,1777 **** case T_Float: case T_String: case T_BitString: ! return strcmp(a->val.str, b->val.str) == 0; default: break; } --- 1771,1777 ---- case T_Float: case T_String: case T_BitString: ! return equalstr(a->val.str, b->val.str); default: break; }
В списке pgsql-patches по дате отправления: