Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^
Дата
Msg-id 15005.1210348662@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^  (Bruce Momjian <bruce@momjian.us>)
Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-committers
Bruce Momjian <bruce@momjian.us> writes:
>> b) If VB is 0 (zero) and VE is negative, then an exception condition is
>> raised: data exception � invalid argument for power function.

> Well, this indicates we shouldn't return "zero raised to a negative
> power is undefined", but rather the power error we are giving now, or
> are you saying we should return the "power" error code but an error
> message mentioning zero?

The spec says what the SQLSTATE code should be.   We have always felt
free to word the message text more specifically than that, though.

            regards, tom lane

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Give a warning if -s switch is used with a non-custom pgbench
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^