Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(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 15:57:42
Message-ID: 15005.1210348662@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-committers
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.

			regards, tom lane

In response to

Responses

pgsql-committers by date

Next:From: Bruce MomjianDate: 2008-05-09 15:58:41
Subject: Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^
Previous:From: Tom LaneDate: 2008-05-09 15:53:07
Subject: pgsql: Give a warning if -s switch is used with a non-custom pgbench

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group