1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +03:00

This adds unary plus capability. No grammar changes, per Tom's request.

Marko Kreen
This commit is contained in:
Bruce Momjian
2001-06-07 00:09:32 +00:00
parent a6697b3614
commit ba17165f55
10 changed files with 102 additions and 13 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.46 2001/03/22 03:59:51 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.47 2001/06/07 00:09:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -563,6 +563,14 @@ int4um(PG_FUNCTION_ARGS)
PG_RETURN_INT32(-arg);
}
Datum
int4up(PG_FUNCTION_ARGS)
{
int32 arg = PG_GETARG_INT32(0);
PG_RETURN_INT32(arg);
}
Datum
int4pl(PG_FUNCTION_ARGS)
{
@ -615,6 +623,14 @@ int2um(PG_FUNCTION_ARGS)
PG_RETURN_INT16(-arg);
}
Datum
int2up(PG_FUNCTION_ARGS)
{
int16 arg = PG_GETARG_INT16(0);
PG_RETURN_INT16(arg);
}
Datum
int2pl(PG_FUNCTION_ARGS)
{