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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^
Date: 2008-05-09 21:32:26
Message-ID: 200805092132.m49LWQs08097@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)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, error wording updated, attached, and applied.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/rtmp/diff text/x-diff 2.9 KB

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message User Doj 2008-05-09 22:04:08 pg-toolbox - pg-toolbox: Imported Sources
Previous Message Bruce Momjian 2008-05-09 21:31:23 pgsql: Adjust power() error messages to be more descriptive.