pgsql: Fix pg_get_ruledef() so that negative numeric constants are

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Fix pg_get_ruledef() so that negative numeric constants are
Дата
Msg-id 20080606175937.B959B75602C@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Fix pg_get_ruledef() so that negative numeric constants are parenthesized.
This is needed because :: casting binds more tightly than minus, so for
example -1::integer is not the same as (-1)::integer, and there are cases
where the difference is important.  In particular this caused a failure
in SELECT DISTINCT ... ORDER BY ... where expressions that should have
matched were seen as different by the parser; but I suspect that there
could be other cases where failure to parenthesize leads to subtler
semantic differences in reloaded rules.  Per report from Alexandr Popov.

Tags:
----
REL8_3_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        ruleutils.c (r1.269.2.1 -> r1.269.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c?r1=1.269.2.1&r2=1.269.2.2)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix pg_get_ruledef() so that negative numeric constants are
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix pg_get_ruledef() so that negative numeric constants are