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:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user