1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-23 14:01:44 +03:00

Add ceiling() as an alias for ceil(), and power() as an alias for pow().

Regression tests and documentation have both been updated.

SQL2003 requires that both ceiling() and ceil() be present, so I have
documented both spellings. SQL2003 doesn't mention pow() as far as I
can see, so I decided to replace pow() with power() in the documentation:
there is little reason to encourage the continued usage of a function
that isn't compliant with the standard, given a standard-compliant
alternative.

RELEASE NOTES: should state that pow() is considered deprecated
(although I don't see the need to ever remove it.)
This commit is contained in:
Neil Conway
2004-04-23 20:32:20 +00:00
parent 7a66015e98
commit fc7fd50182
10 changed files with 139 additions and 17 deletions

View File

@ -1,5 +1,5 @@
<!--
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.197 2004/04/10 18:02:59 momjian Exp $
$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.198 2004/04/23 20:32:19 neilc Exp $
PostgreSQL documentation
-->
@ -587,6 +587,14 @@ PostgreSQL documentation
<entry><literal>-42</literal></entry>
</row>
<row>
<entry><literal><function>ceiling</function>(<type>dp</type> or <type>numeric</type>)</literal></entry>
<entry>(same as input)</entry>
<entry>smallest integer not less than argument (alias for <function>ceil</function>)</entry>
<entry><literal>ceiling(-95.3)</literal></entry>
<entry><literal>-95</literal></entry>
</row>
<row>
<entry><literal><function>degrees</function>(<type>dp</type>)</literal></entry>
<entry><type>dp</type></entry>
@ -654,20 +662,20 @@ PostgreSQL documentation
</row>
<row>
<entry><literal><function>pow</function>(<parameter>a</parameter> <type>dp</type>,
<entry><literal><function>power</function>(<parameter>a</parameter> <type>dp</type>,
<parameter>b</parameter> <type>dp</type>)</literal></entry>
<entry><type>dp</type></entry>
<entry><parameter>a</> raised to the power of <parameter>b</parameter></entry>
<entry><literal>pow(9.0, 3.0)</literal></entry>
<entry><literal>power(9.0, 3.0)</literal></entry>
<entry><literal>729</literal></entry>
</row>
<row>
<entry><literal><function>pow</function>(<parameter>a</parameter> <type>numeric</type>,
<entry><literal><function>power</function>(<parameter>a</parameter> <type>numeric</type>,
<parameter>b</parameter> <type>numeric</type>)</literal></entry>
<entry><type>numeric</type></entry>
<entry><parameter>a</> raised to the power of <parameter>b</parameter></entry>
<entry><literal>pow(9.0, 3.0)</literal></entry>
<entry><literal>power(9.0, 3.0)</literal></entry>
<entry><literal>729</literal></entry>
</row>