mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Rename oid8 -> oidvector and int28 -> int2vector. Cleanup of *out functions.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.20 1999/11/07 23:07:49 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.21 2000/01/10 16:13:10 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* These functions are stored in pg_amproc. For each operator class
|
||||
@@ -140,7 +140,7 @@ hashoid(Oid key)
|
||||
}
|
||||
|
||||
uint32
|
||||
hashoid8(Oid *key)
|
||||
hashoidvector(Oid *key)
|
||||
{
|
||||
int i;
|
||||
uint32 result = 0;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.28 1999/11/07 23:07:56 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.29 2000/01/10 16:13:10 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* These functions are stored in pg_amproc. For each operator class
|
||||
@@ -94,7 +94,7 @@ btoidcmp(Oid a, Oid b)
|
||||
}
|
||||
|
||||
int32
|
||||
btoid8cmp(Oid *a, Oid *b)
|
||||
btoidvectorcmp(Oid *a, Oid *b)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.74 1999/12/20 10:40:39 wieck Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.75 2000/01/10 16:13:11 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -109,7 +109,7 @@ static struct typinfo Procid[] = {
|
||||
{"dummy", 20, 0, 16, 0, 0},
|
||||
/* { "dt", 20, 0, 4, F_DTIN, F_DTOUT}, */
|
||||
{"int2", 21, 0, 2, F_INT2IN, F_INT2OUT},
|
||||
{"int28", 22, 0, 16, F_INT28IN, F_INT28OUT},
|
||||
{"int2vector", 22, 0, 16, F_INT2VECTORIN, F_INT2VECTOROUT},
|
||||
{"int4", 23, 0, 4, F_INT4IN, F_INT4OUT},
|
||||
{"regproc", 24, 0, 4, F_REGPROCIN, F_REGPROCOUT},
|
||||
{"text", 25, 0, -1, F_TEXTIN, F_TEXTOUT},
|
||||
@@ -117,7 +117,7 @@ static struct typinfo Procid[] = {
|
||||
{"tid", 27, 0, 6, F_TIDIN, F_TIDOUT},
|
||||
{"xid", 28, 0, 5, F_XIDIN, F_XIDOUT},
|
||||
{"iid", 29, 0, 1, F_CIDIN, F_CIDOUT},
|
||||
{"oid8", 30, 0, 32, F_OID8IN, F_OID8OUT},
|
||||
{"oidvector", 30, 0, 32, F_OIDVECTORIN, F_OIDVECTOROUT},
|
||||
{"smgr", 210, 0, 2, F_SMGRIN, F_SMGROUT},
|
||||
{"_int4", 1007, 23, -1, F_ARRAY_IN, F_ARRAY_OUT},
|
||||
{"_aclitem", 1034, 1033, -1, F_ARRAY_IN, F_ARRAY_OUT}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.55 1999/12/30 05:04:55 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.56 2000/01/10 16:13:12 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -763,7 +763,7 @@ ProcedureNameIndexScan(Relation heapRelation,
|
||||
ScanKeyEntryInitialize(&skey[2],
|
||||
(bits16) 0x0,
|
||||
(AttrNumber) 3,
|
||||
(RegProcedure) F_OID8EQ,
|
||||
(RegProcedure) F_OIDVECTOREQ,
|
||||
PointerGetDatum(argTypes));
|
||||
|
||||
idesc = index_openr(ProcedureNameIndex);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.31 1999/11/22 17:56:26 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.32 2000/01/10 16:13:13 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This cruft is the server side of PQfn.
|
||||
@@ -181,7 +181,7 @@ valid_fp_info(Oid func_id, struct fp_info * fip)
|
||||
static void
|
||||
update_fp_info(Oid func_id, struct fp_info * fip)
|
||||
{
|
||||
Oid *argtypes; /* an oid8 */
|
||||
Oid *argtypes; /* an oidvector */
|
||||
Oid rettype;
|
||||
HeapTuple func_htp,
|
||||
type_htp;
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.30 2000/01/10 15:41:26 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.31 2000/01/10 16:13:14 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
/*
|
||||
* OLD COMMENTS
|
||||
* I/O routines:
|
||||
* int2in, int2out, int28in, int28out, int4in, int4out
|
||||
* int2in, int2out, int2vectorin, int2vectorout, int4in, int4out
|
||||
* Conversion routines:
|
||||
* itoi, int2_text, int4_text
|
||||
* Boolean operators:
|
||||
@@ -71,13 +71,13 @@ int2out(int16 sh)
|
||||
}
|
||||
|
||||
/*
|
||||
* int28in - converts "num num ..." to internal form
|
||||
* int2vectorin - converts "num num ..." to internal form
|
||||
*
|
||||
* Note:
|
||||
* Fills any nonexistent digits with NULLs.
|
||||
*/
|
||||
int16 *
|
||||
int28in(char *intString)
|
||||
int2vectorin(char *intString)
|
||||
{
|
||||
int16 *result;
|
||||
int slot;
|
||||
@@ -99,7 +99,7 @@ int28in(char *intString)
|
||||
while (*intString && isspace(*intString))
|
||||
intString++;
|
||||
if (*intString)
|
||||
elog(ERROR,"int28 value has too many values");
|
||||
elog(ERROR,"int2vector value has too many values");
|
||||
while (slot < INDEX_MAX_KEYS)
|
||||
result[slot++] = 0;
|
||||
|
||||
@@ -107,10 +107,10 @@ int28in(char *intString)
|
||||
}
|
||||
|
||||
/*
|
||||
* int28out - converts internal form to "num num ..."
|
||||
* int2vectorout - converts internal form to "num num ..."
|
||||
*/
|
||||
char *
|
||||
int28out(int16 *int2Array)
|
||||
int2vectorout(int16 *int2Array)
|
||||
{
|
||||
int num, maxnum;
|
||||
char *rp;
|
||||
@@ -130,7 +130,7 @@ int28out(int16 *int2Array)
|
||||
break;
|
||||
|
||||
/* assumes sign, 5 digits, ' ' */
|
||||
rp = result = (char *) palloc(maxnum * 7 + 1);
|
||||
rp = result = (char *) palloc((maxnum+1) * 7 + 1);
|
||||
for (num = 0; num <= maxnum; num++)
|
||||
{
|
||||
if (num != 0)
|
||||
@@ -168,7 +168,7 @@ int44in(char *input_string)
|
||||
}
|
||||
|
||||
/*
|
||||
* int28out - converts internal form to "num num ..."
|
||||
* int2vectorout - converts internal form to "num num ..."
|
||||
*/
|
||||
char *
|
||||
int44out(int32 *an_array)
|
||||
|
||||
@@ -519,7 +519,7 @@ int84(int64 *val)
|
||||
|
||||
#if NOT_USED
|
||||
int64 *
|
||||
int28 (int16 val)
|
||||
int2vector (int16 val)
|
||||
{
|
||||
int64 *result;
|
||||
|
||||
@@ -528,7 +528,7 @@ int28 (int16 val)
|
||||
*result = val;
|
||||
|
||||
return result;
|
||||
} /* int28() */
|
||||
} /* int2vector() */
|
||||
|
||||
int16
|
||||
int82(int64 *val)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.31 2000/01/10 15:41:26 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.32 2000/01/10 16:13:14 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -22,13 +22,13 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* oid8in - converts "num num ..." to internal form
|
||||
* oidvectorin - converts "num num ..." to internal form
|
||||
*
|
||||
* Note:
|
||||
* Fills any nonexistent digits with NULL oids.
|
||||
*/
|
||||
Oid *
|
||||
oid8in(char *oidString)
|
||||
oidvectorin(char *oidString)
|
||||
{
|
||||
Oid *result;
|
||||
int slot;
|
||||
@@ -50,7 +50,7 @@ oid8in(char *oidString)
|
||||
while (*oidString && isspace(*oidString))
|
||||
oidString++;
|
||||
if (*oidString)
|
||||
elog(ERROR,"oid8 value has too many values");
|
||||
elog(ERROR,"oidvector value has too many values");
|
||||
while (slot < INDEX_MAX_KEYS)
|
||||
result[slot++] = 0;
|
||||
|
||||
@@ -58,10 +58,10 @@ oid8in(char *oidString)
|
||||
}
|
||||
|
||||
/*
|
||||
* oid8out - converts internal form to "num num ..."
|
||||
* oidvectorout - converts internal form to "num num ..."
|
||||
*/
|
||||
char *
|
||||
oid8out(Oid *oidArray)
|
||||
oidvectorout(Oid *oidArray)
|
||||
{
|
||||
int num, maxnum;
|
||||
char *rp;
|
||||
@@ -81,7 +81,7 @@ oid8out(Oid *oidArray)
|
||||
break;
|
||||
|
||||
/* assumes sign, 10 digits, ' ' */
|
||||
rp = result = (char *) palloc(maxnum * 12 + 1);
|
||||
rp = result = (char *) palloc((maxnum+1) * 12 + 1);
|
||||
for (num = 0; num <= maxnum; num++)
|
||||
{
|
||||
if (num != 0)
|
||||
@@ -127,19 +127,19 @@ oidne(Oid arg1, Oid arg2)
|
||||
}
|
||||
|
||||
bool
|
||||
oid8eq(Oid *arg1, Oid *arg2)
|
||||
oidvectoreq(Oid *arg1, Oid *arg2)
|
||||
{
|
||||
return (bool) (memcmp(arg1, arg2, INDEX_MAX_KEYS * sizeof(Oid)) == 0);
|
||||
}
|
||||
|
||||
bool
|
||||
oid8ne(Oid *arg1, Oid *arg2)
|
||||
oidvectorne(Oid *arg1, Oid *arg2)
|
||||
{
|
||||
return (bool) (memcmp(arg1, arg2, INDEX_MAX_KEYS * sizeof(Oid)) != 0);
|
||||
}
|
||||
|
||||
bool
|
||||
oid8lt(Oid *arg1, Oid *arg2)
|
||||
oidvectorlt(Oid *arg1, Oid *arg2)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -150,7 +150,7 @@ oid8lt(Oid *arg1, Oid *arg2)
|
||||
}
|
||||
|
||||
bool
|
||||
oid8le(Oid *arg1, Oid *arg2)
|
||||
oidvectorle(Oid *arg1, Oid *arg2)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -161,7 +161,7 @@ oid8le(Oid *arg1, Oid *arg2)
|
||||
}
|
||||
|
||||
bool
|
||||
oid8ge(Oid *arg1, Oid *arg2)
|
||||
oidvectorge(Oid *arg1, Oid *arg2)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -172,7 +172,7 @@ oid8ge(Oid *arg1, Oid *arg2)
|
||||
}
|
||||
|
||||
bool
|
||||
oid8gt(Oid *arg1, Oid *arg2)
|
||||
oidvectorgt(Oid *arg1, Oid *arg2)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.47 1999/12/30 05:05:07 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.48 2000/01/10 16:13:14 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -233,7 +233,7 @@ regprocout(RegProcedure proid)
|
||||
* int8typeout - converts int8 type oids to "typname" list
|
||||
*/
|
||||
text *
|
||||
oid8types(Oid *oidArray)
|
||||
oidvectortypes(Oid *oidArray)
|
||||
{
|
||||
HeapTuple typetup;
|
||||
text *result;
|
||||
|
||||
16
src/backend/utils/cache/catcache.c
vendored
16
src/backend/utils/cache/catcache.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.55 1999/12/16 22:19:54 wieck Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.56 2000/01/10 16:13:15 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -70,7 +70,7 @@ GlobalMemory CacheCxt; /* context in which caches are allocated */
|
||||
static long eqproc[] = {
|
||||
F_BOOLEQ, 0l, F_CHAREQ, F_NAMEEQ, 0l,
|
||||
F_INT2EQ, F_KEYFIRSTEQ, F_INT4EQ, 0l, F_TEXTEQ,
|
||||
F_OIDEQ, 0l, 0l, 0l, F_OID8EQ
|
||||
F_OIDEQ, 0l, 0l, 0l, F_OIDVECTOREQ
|
||||
};
|
||||
|
||||
#define EQPROC(SYSTEMTYPEOID) eqproc[(SYSTEMTYPEOID)-16]
|
||||
@@ -191,14 +191,14 @@ CatalogCacheInitializeCache(struct catcache * cache,
|
||||
|
||||
/*
|
||||
* Yoiks. The implementation of the hashing code and the
|
||||
* implementation of int28's are at loggerheads. The right
|
||||
* thing to do is to throw out the implementation of int28's
|
||||
* implementation of int2vector's are at loggerheads. The right
|
||||
* thing to do is to throw out the implementation of int2vector's
|
||||
* altogether; until that happens, we do the right thing here
|
||||
* to guarantee that the hash key generator doesn't try to
|
||||
* dereference an int2 by mistake.
|
||||
*/
|
||||
|
||||
if (tupdesc->attrs[cache->cc_key[i] - 1]->atttypid == INT28OID)
|
||||
if (tupdesc->attrs[cache->cc_key[i] - 1]->atttypid == INT2VECTOROID)
|
||||
cache->cc_klen[i] = sizeof(short);
|
||||
else
|
||||
cache->cc_klen[i] = tupdesc->attrs[cache->cc_key[i] - 1]->attlen;
|
||||
@@ -851,7 +851,7 @@ SearchSelfReferences(struct catcache * cache)
|
||||
{
|
||||
HeapScanDesc sd;
|
||||
MemoryContext oldcxt;
|
||||
|
||||
|
||||
if (!CacheCxt)
|
||||
CacheCxt = CreateGlobalMemory("Cache");
|
||||
rel = heap_open(cache->relationId, AccessShareLock);
|
||||
@@ -872,7 +872,7 @@ SearchSelfReferences(struct catcache * cache)
|
||||
/* bootstrapping this requires preloading a range of rows. bjm */
|
||||
static HeapTuple operatorSelfTuple[MAX_OIDCMP-MIN_OIDCMP+1];
|
||||
Oid lookup_oid = (Oid)cache->cc_skey[0].sk_argument;
|
||||
|
||||
|
||||
if (lookup_oid < MIN_OIDCMP || lookup_oid > MAX_OIDCMP)
|
||||
return (HeapTuple)0;
|
||||
|
||||
@@ -880,7 +880,7 @@ SearchSelfReferences(struct catcache * cache)
|
||||
{
|
||||
HeapScanDesc sd;
|
||||
MemoryContext oldcxt;
|
||||
|
||||
|
||||
if (!CacheCxt)
|
||||
CacheCxt = CreateGlobalMemory("Cache");
|
||||
rel = heap_open(cache->relationId, AccessShareLock);
|
||||
|
||||
Reference in New Issue
Block a user