mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Make OIDs optional, per discussions in pghackers. WITH OIDS is still the
default, but OIDS are removed from many system catalogs that don't need them. Some interesting side effects: TOAST pointers are 20 bytes not 32 now; pg_description has a three-column key instead of one. Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey has some usefulness; pg_dump dumps comments on indexes, rules, and triggers in a valid order. initdb forced.
This commit is contained in:
24
src/backend/utils/cache/syscache.c
vendored
24
src/backend/utils/cache/syscache.c
vendored
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.63 2001/06/18 03:35:07 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.64 2001/08/10 18:57:37 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* These routines allow the parser/planner/executor to perform
|
||||
@ -485,6 +485,28 @@ SearchSysCacheCopy(int cacheId,
|
||||
return newtuple;
|
||||
}
|
||||
|
||||
/*
|
||||
* SearchSysCacheExists
|
||||
*
|
||||
* A convenience routine that just probes to see if a tuple can be found.
|
||||
* No lock is retained on the syscache entry.
|
||||
*/
|
||||
bool
|
||||
SearchSysCacheExists(int cacheId,
|
||||
Datum key1,
|
||||
Datum key2,
|
||||
Datum key3,
|
||||
Datum key4)
|
||||
{
|
||||
HeapTuple tuple;
|
||||
|
||||
tuple = SearchSysCache(cacheId, key1, key2, key3, key4);
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
return false;
|
||||
ReleaseSysCache(tuple);
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* GetSysCacheOid
|
||||
*
|
||||
|
Reference in New Issue
Block a user