mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Clean up some really grotty coding in catcache.c, improve hashing
performance in catcache lookups.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.32 2000/01/26 05:57:14 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.33 2000/02/21 03:36:48 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -144,6 +144,17 @@ int2vectorout(int16 *int2Array)
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* We don't have a complete set of int2vector support routines,
|
||||
* but we need int2vectoreq for catcache indexing.
|
||||
*/
|
||||
bool
|
||||
int2vectoreq(int16 *arg1, int16 *arg2)
|
||||
{
|
||||
return (bool) (memcmp(arg1, arg2, INDEX_MAX_KEYS * sizeof(int16)) == 0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* int44in - converts "num num ..." to internal form
|
||||
*
|
||||
@ -169,7 +180,7 @@ int44in(char *input_string)
|
||||
}
|
||||
|
||||
/*
|
||||
* int2vectorout - converts internal form to "num num ..."
|
||||
* int44out - converts internal form to "num num ..."
|
||||
*/
|
||||
char *
|
||||
int44out(int32 *an_array)
|
||||
@ -489,13 +500,6 @@ int42ge(int32 arg1, int32 arg2)
|
||||
return arg1 >= arg2;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
keyfirsteq(int16 *arg1, int16 arg2)
|
||||
{
|
||||
return *arg1 == arg2;
|
||||
}
|
||||
|
||||
/*
|
||||
* int[24]pl - returns arg1 + arg2
|
||||
* int[24]mi - returns arg1 - arg2
|
||||
|
Reference in New Issue
Block a user