ceiling() and power() (SQL2003)

From: Neil Conway <neilc(at)samurai(dot)com>
To: PostgreSQL-patches (PostgreSQL) <pgsql-patches(at)postgresql(dot)org>
Subject: ceiling() and power() (SQL2003)
Date: 2004-04-23 07:01:26
Message-ID: 09B25E26-94F4-11D8-946F-000A95AB279E@samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

This patch makes the following changes:

(1) Add ceiling() as an alias for ceil() (both double precision and
numeric variants). This is required by SQL2003, so both spellings of
the function name have been documented.

(2) Add power() as an alias for pow(). SQL2003 only defines power()
AFAICS. Rather than documenting two identical spellings of the same
command, I think it makes sense to migrate toward the spelling that is
preferred by the standard. Therefore, I renamed the documentation for
pow() to refer to power().

I didn't remove pow(): that would break far too much existing code, and
there is little harm in keeping around an additional pg_proc entry or
two. I think that keeping pow() but not documenting it should ensure
that new users prefer power() but older applications do not need to be
changed, which is a reasonable compromise between backward
compatibility and forward progress.

Regression tests are included (I believe I updated all the variants of
float8 properly, but please speak up if that is not the case). This
patch bumps the catalog version number.

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

-Neil

Attachment Content-Type Size
ceiling_func-3.patch application/octet-stream 17.5 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Fabien COELHO 2004-04-23 07:35:37 Re: patches in the pipe?
Previous Message Bruce Momjian 2004-04-22 21:55:13 Re: patch in pipe?