Re: BUG #8317: ROUND(double*1/2) != ROUND(1/2*double)

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: BUG #8317: ROUND(double*1/2) != ROUND(1/2*double)
Дата
Msg-id 1375219056.72045.YahooMailNeo@web162903.mail.bf1.yahoo.com
обсуждение исходный текст
Ответ на Re: BUG #8317: ROUND(double*1/2) != ROUND(1/2*double)  (Rémi Cura <remi.cura@gmail.com>)
Список pgsql-bugs
R=E9mi Cura <remi.cura@gmail.com> wrote:=0A=0A> According to the doc=0A> ( =
http://www.postgresql.org/docs/9.2/static/sql-syntax-lexical.html#SQL-SYNTA=
X-OPERATORS ),=0A> multiplication has precedence on division. (I supposed i=
t implicitely)=0A=0AThe correct link is:=0A=0Ahttp://www.postgresql.org/doc=
s/9.2/static/sql-syntax-lexical.html#SQL-PRECEDENCE-TABLE=0A=0AAnd it shows=
 multiplication, division, and modulo as having equal=0Aprecedence, with le=
ft-to-right associativity.=0A=0A> So anyway the query is parsed as ( 1/ (2*=
3.2)) and ( 3.2*1) / 2 ),=0A=0ANo, it is ((1 / 2) * 3.2) and ((3.2 * 1) / 2=
).=0A=0AThose evaluate to (0 * 3.2) and (3.2 / 2), respectively.=0A=0A--=0A=
Kevin Grittner=0AEDB: http://www.enterprisedb.com=0AThe Enterprise PostgreS=
QL Company

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

Предыдущее
От: Warwick Chapman
Дата:
Сообщение: Re: PostgreSQL and OpenVZ
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #8345: PostGre SQL database is crashing