1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-27 23:21:58 +03:00

This patch adds some missing functions for float8 math operations,

specifically ceil(), floor(), and sign(). There may be other functions
that need to be added, but this is a start. I've included some simple
regression tests.

Neil Conway
This commit is contained in:
Bruce Momjian
2002-10-19 02:08:19 +00:00
parent 5c6a5fe18b
commit bab3d29fba
7 changed files with 119 additions and 19 deletions

View File

@ -5,7 +5,7 @@
*
* 1998 Jan Wieck
*
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.55 2002/10/02 19:21:26 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.56 2002/10/19 02:08:17 momjian Exp $
*
* ----------
*/
@ -425,7 +425,13 @@ numeric_uplus(PG_FUNCTION_ARGS)
PG_RETURN_NUMERIC(res);
}
/* ----------
* numeric_sign() -
*
* returns -1 if the argument is less than 0, 0 if the argument is equal
* to 0, and 1 if the argument is greater than zero.
* ----------
*/
Datum
numeric_sign(PG_FUNCTION_ARGS)
{