Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^
От | Bruce Momjian |
---|---|
Тема | Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^ |
Дата | |
Msg-id | 200805082234.m48MYK328302@momjian.us обсуждение исходный текст |
Ответ на | Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^ (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than
an error, and have 0 ^
|
Список | pgsql-committers |
Tom Lane wrote: > momjian@postgresql.org (Bruce Momjian) writes: > > Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^ 0.0 > > return 1, rather than error. > > This is wrongly described, and the implementation is still not correct > either, because it should throw an error for negative exponents. > Would you please *read* that wikipedia page you keep citing? > http://en.wikipedia.org/wiki/Exponentiation#Powers_of_zero I think this is fixed in the version I just committed: test=> select 0 ^ (-1); ERROR: invalid argument for power function test=> select 0 ^ (-1.0); ERROR: invalid argument for power function -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
В списке pgsql-committers по дате отправления: