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

From Bruce Momjian
Subject Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^
Date
Msg-id 200805091558.m49FwfF08872@momjian.us
Whole thread Raw
In response to Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
Tom Lane wrote:
> 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.

OK, I will work on it then.

--
  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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^
Next
From: adunstan@postgresql.org (Andrew Dunstan)
Date:
Subject: pgsql: Improve logic for finding object files on OBJS lines in contrib