error codes for ln(), power() - Mailing list pgsql-patches

From Neil Conway
Subject error codes for ln(), power()
Date
Msg-id 1084603429.25578.99.camel@tokyo
Whole thread Raw
Responses Re: error codes for ln(), power()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
SQL2003 mandates that ln() and power() emit particular SQLSTATE error
codes for a few illegal combinations of arguments (in Section 6.27 of my
copy of SQL2003). This patch adds those error codes and changes the
several variants of ln() and power() to emit them as appropriate.

I didn't change log() to emit the same error code as ln() when it is
passed similarly incorrect arguments, on the grounds that the SQLSTATE
code defined by SQL specifically refers to the "natural logarithm". Does
anyone think I should make both log() and ln() return the same SQLSTATE
code, invent a new SQLSTATE for log() errors, and just leave things as
they are? (the latter being my preference...)

I didn't bother adding any regression tests for this behavior, but I can
do so if anyone thinks that's worth doing.

Barring any objections, I intend to apply this patch within 24 hours.

-Neil


Attachment

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_ctl patch to integrate apache's rotatelogs
Next
From: Neil Conway
Date:
Subject: Re: nested transactions