Re: [HACKERS] operator_precedence_warning vs make installcheck

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] operator_precedence_warning vs make installcheck
Дата
Msg-id 12908.1487134545@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [HACKERS] operator_precedence_warning vs make installcheck  (Jeff Janes <jeff.janes@gmail.com>)
Ответы Re: [HACKERS] operator_precedence_warning vs make installcheck  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Jeff Janes <jeff.janes@gmail.com> writes:
> make installcheck fails against a server running with
> operator_precedence_warning = on.

> The difference is in update.out, and consists of an error-locating carat
> getting moved over by one position.  I've attached the regression diff.

> I don't know why the setting of this GUC causes the carat to move around,
> that seems odd.

The reason is that with operator_precedence_warning = on, there's an
explicit raw-parse-tree node for the parenthesis pair, which otherwise
there is not, so that exprLocation reports a different result for the
location of the subexpression.

We could possibly prevent the difference by having exprLocation look
through such nodes.  I'm not sure offhand if there are cases where
that would be worse than before.  We've definitely made some other
hacks to hide the difference between operator_precedence_warning on
and off.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Sum aggregate calculation for single precsion real
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Provide list of subscriptions and publications inpsql's completion