[Fwd: Re: ruleutils with pretty-print option]
От | Andreas Pflug |
---|---|
Тема | [Fwd: Re: ruleutils with pretty-print option] |
Дата | |
Msg-id | 3F28E366.3080800@pse-consulting.de обсуждение исходный текст |
Ответы |
Re: [Fwd: Re: ruleutils with pretty-print option]
|
Список | pgsql-patches |
Now the patch is *really* appended :-) Tom Lane wrote: > >Applied with some editorializing. In particular, I don't believe the >original did the right thing with (a - (b - c)). > > > Oops, missed that case... But now, we have (a + ( b + c)) again. A patch that removes parentheses for + and * is appended. Regards, Andfdsa Index: backend/utils/adt/ruleutils.c =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/backend/utils/adt/ruleutils.c,v retrieving revision 1.147 diff -c -r1.147 ruleutils.c *** backend/utils/adt/ruleutils.c 30 Jul 2003 22:56:23 -0000 1.147 --- backend/utils/adt/ruleutils.c 31 Jul 2003 09:32:15 -0000 *************** *** 2547,2552 **** --- 2547,2559 ---- if (node == (Node *) lfirst(((OpExpr *) parentNode)->args)) return true; + /* + * Exception: for * and +, ordering doesn't matter + */ + if ((*op == '+' && *parentOp == '+') || + (*op == '*' && *parentOp == '*')) + return true; + return false; } /* else do the same stuff as for T_SubLink et al. */
В списке pgsql-patches по дате отправления: