1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Implement column aliases on views "CREATE VIEW name (collist)".

Implement TIME WITH TIME ZONE type (timetz internal type).
Remap length() for character strings to CHAR_LENGTH() for SQL92
 and to remove the ambiguity with geometric length() functions.
Keep length() for character strings for backward compatibility.
Shrink stored views by removing internal column name list from visible rte.
Implement min(), max() for time and timetz data types.
Implement conversion of TIME to INTERVAL.
Implement abs(), mod(), fac() for the int8 data type.
Rename some math functions to generic names:
 round(), sqrt(), cbrt(), pow(), etc.
Rename NUMERIC power() function to pow().
Fix int2 factorial to calculate result in int4.
Enhance the Oracle compatibility function translate() to work with string
 arguments (from Edwin Ramirez).
Modify pg_proc system table to remove OID holes.
This commit is contained in:
Thomas G. Lockhart
2000-03-14 23:06:59 +00:00
parent ce543b2121
commit 6456810078
58 changed files with 1495 additions and 1113 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.34 2000/03/07 23:58:38 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.35 2000/03/14 23:06:36 thomas Exp $
*
*-------------------------------------------------------------------------
*/
@ -659,8 +659,8 @@ int42mod(int32 arg1, int32 arg2)
return arg1 % arg2;
}
/*
* int[24]fac - returns arg1!
/* int[24]fac()
* Factorial
*/
int32
int4fac(int32 arg1)
@ -678,7 +678,7 @@ int4fac(int32 arg1)
int32
int2fac(int16 arg1)
{
int16 result;
int32 result;
if (arg1 < 1)
result = 0;
@ -688,6 +688,21 @@ int2fac(int16 arg1)
return result;
}
/* int[24]abs()
* Absolute value
*/
int32
int4abs(int32 arg1)
{
return ((arg1 < 0)? -arg1: arg1);
}
int16
int2abs(int16 arg1)
{
return ((arg1 < 0)? -arg1: arg1);
}
int16
int2larger(int16 arg1, int16 arg2)
{