From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix pg_get_ruledef() so that negative numeric constants are |
Date: | 2008-06-06 17:59:53 |
Message-ID: | 20080606175953.9186375602C@cvs.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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_1_STABLE
Modified Files:
--------------
pgsql/src/backend/utils/adt:
ruleutils.c (r1.207.2.8 -> r1.207.2.9)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c?r1=1.207.2.8&r2=1.207.2.9)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-06-06 18:00:01 | pgsql: Fix pg_get_ruledef() so that negative numeric constants are |
Previous Message | Tom Lane | 2008-06-06 17:59:45 | pgsql: Fix pg_get_ruledef() so that negative numeric constants are |