mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Add system indexes to match all caches.
Make all system indexes unique. Make all cache loads use system indexes. Rename *rel to *relid in inheritance tables. Rename cache names to be clearer.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.54 1999/09/18 19:06:39 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.55 1999/11/22 17:55:59 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -79,6 +79,7 @@
|
||||
|
||||
#include "access/heapam.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/indexing.h"
|
||||
#include "catalog/pg_listener.h"
|
||||
#include "commands/async.h"
|
||||
#include "lib/dllist.h"
|
||||
@@ -464,7 +465,6 @@ AtCommit_Notify()
|
||||
|
||||
if (listenerPID == MyProcPid)
|
||||
{
|
||||
|
||||
/*
|
||||
* Self-notify: no need to bother with table update.
|
||||
* Indeed, we *must not* clear the notification field in
|
||||
@@ -490,7 +490,6 @@ AtCommit_Notify()
|
||||
*/
|
||||
if (kill(listenerPID, SIGUSR2) < 0)
|
||||
{
|
||||
|
||||
/*
|
||||
* Get rid of pg_listener entry if it refers to a PID
|
||||
* that no longer exists. Presumably, that backend
|
||||
@@ -511,6 +510,14 @@ AtCommit_Notify()
|
||||
rTuple = heap_modifytuple(lTuple, lRel,
|
||||
value, nulls, repl);
|
||||
heap_replace(lRel, &lTuple->t_self, rTuple, NULL);
|
||||
if (RelationGetForm(lRel)->relhasindex)
|
||||
{
|
||||
Relation idescs[Num_pg_listener_indices];
|
||||
|
||||
CatalogOpenIndices(Num_pg_listener_indices, Name_pg_listener_indices, idescs);
|
||||
CatalogIndexInsert(idescs, Num_pg_listener_indices, lRel, rTuple);
|
||||
CatalogCloseIndices(Num_pg_listener_indices, idescs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -769,6 +776,14 @@ ProcessIncomingNotify(void)
|
||||
/* Rewrite the tuple with 0 in notification column */
|
||||
rTuple = heap_modifytuple(lTuple, lRel, value, nulls, repl);
|
||||
heap_replace(lRel, &lTuple->t_self, rTuple, NULL);
|
||||
if (RelationGetForm(lRel)->relhasindex)
|
||||
{
|
||||
Relation idescs[Num_pg_listener_indices];
|
||||
|
||||
CatalogOpenIndices(Num_pg_listener_indices, Name_pg_listener_indices, idescs);
|
||||
CatalogIndexInsert(idescs, Num_pg_listener_indices, lRel, rTuple);
|
||||
CatalogCloseIndices(Num_pg_listener_indices, idescs);
|
||||
}
|
||||
}
|
||||
}
|
||||
heap_endscan(sRel);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.46 1999/11/07 23:08:01 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.47 1999/11/22 17:56:00 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -270,7 +270,7 @@ copy_index(Oid OIDOldIndex, Oid OIDNewHeap)
|
||||
FIgetnArgs(finfo) = natts;
|
||||
FIgetProcOid(finfo) = Old_pg_index_Form->indproc;
|
||||
|
||||
pg_proc_Tuple = SearchSysCacheTuple(PROOID,
|
||||
pg_proc_Tuple = SearchSysCacheTuple(PROCOID,
|
||||
ObjectIdGetDatum(Old_pg_index_Form->indproc),
|
||||
0, 0, 0);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.56 1999/11/07 23:08:01 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.57 1999/11/22 17:56:00 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* The PortalExecutorHeapMemory crap needs to be eliminated
|
||||
@@ -438,7 +438,7 @@ PerformAddAttribute(char *relationName,
|
||||
else
|
||||
attnelems = 0;
|
||||
|
||||
typeTuple = SearchSysCacheTuple(TYPNAME,
|
||||
typeTuple = SearchSysCacheTuple(TYPENAME,
|
||||
PointerGetDatum(typename),
|
||||
0, 0, 0);
|
||||
tform = (Form_pg_type) GETSTRUCT(typeTuple);
|
||||
|
||||
@@ -395,7 +395,7 @@ void CommentDatabase(char *database, char *comment) {
|
||||
/*** Now, fetch user information ***/
|
||||
|
||||
username = GetPgUserName();
|
||||
usertuple = SearchSysCacheTuple(USENAME, PointerGetDatum(username),
|
||||
usertuple = SearchSysCacheTuple(USERNAME, PointerGetDatum(username),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(usertuple)) {
|
||||
elog(ERROR, "current user '%s' does not exist", username);
|
||||
@@ -454,7 +454,7 @@ void CommentRewrite(char *rule, char *comment) {
|
||||
|
||||
/*** Next, find the rule's oid ***/
|
||||
|
||||
rewritetuple = SearchSysCacheTuple(REWRITENAME, PointerGetDatum(rule),
|
||||
rewritetuple = SearchSysCacheTuple(RULENAME, PointerGetDatum(rule),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(rewritetuple)) {
|
||||
elog(ERROR, "rule '%s' does not exist", rule);
|
||||
@@ -489,7 +489,7 @@ void CommentType(char *type, char *comment) {
|
||||
|
||||
#ifndef NO_SECURITY
|
||||
user = GetPgUserName();
|
||||
if (!pg_ownercheck(user, type, TYPNAME)) {
|
||||
if (!pg_ownercheck(user, type, TYPENAME)) {
|
||||
elog(ERROR, "you are not permitted to comment on type '%s'",
|
||||
type);
|
||||
}
|
||||
@@ -497,7 +497,7 @@ void CommentType(char *type, char *comment) {
|
||||
|
||||
/*** Next, find the type's oid ***/
|
||||
|
||||
typetuple = SearchSysCacheTuple(TYPNAME, PointerGetDatum(type),
|
||||
typetuple = SearchSysCacheTuple(TYPENAME, PointerGetDatum(type),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(typetuple)) {
|
||||
elog(ERROR, "type '%s' does not exist", type);
|
||||
@@ -604,7 +604,7 @@ void CommentProc(char *function, List *arguments, char *comment) {
|
||||
if (strcmp(argument, "opaque") == 0) {
|
||||
argoids[i] = 0;
|
||||
} else {
|
||||
argtuple = SearchSysCacheTuple(TYPNAME, PointerGetDatum(argument),
|
||||
argtuple = SearchSysCacheTuple(TYPENAME, PointerGetDatum(argument),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(argtuple)) {
|
||||
elog(ERROR, "function argument type '%s' does not exist",
|
||||
@@ -627,7 +627,7 @@ void CommentProc(char *function, List *arguments, char *comment) {
|
||||
|
||||
/*** Now, find the corresponding oid for this procedure ***/
|
||||
|
||||
functuple = SearchSysCacheTuple(PRONAME, PointerGetDatum(function),
|
||||
functuple = SearchSysCacheTuple(PROCNAME, PointerGetDatum(function),
|
||||
Int32GetDatum(argcount),
|
||||
PointerGetDatum(argoids), 0);
|
||||
|
||||
@@ -702,7 +702,7 @@ void CommentOperator(char *opername, List *arguments, char *comment) {
|
||||
|
||||
/*** Attempt to fetch the operator oid ***/
|
||||
|
||||
optuple = SearchSysCacheTupleCopy(OPRNAME, PointerGetDatum(opername),
|
||||
optuple = SearchSysCacheTupleCopy(OPERNAME, PointerGetDatum(opername),
|
||||
ObjectIdGetDatum(leftoid),
|
||||
ObjectIdGetDatum(rightoid),
|
||||
CharGetDatum(oprtype));
|
||||
@@ -716,7 +716,7 @@ void CommentOperator(char *opername, List *arguments, char *comment) {
|
||||
|
||||
#ifndef NO_SECURITY
|
||||
user = GetPgUserName();
|
||||
if (!pg_ownercheck(user, (char *) ObjectIdGetDatum(oid), OPROID)) {
|
||||
if (!pg_ownercheck(user, (char *) ObjectIdGetDatum(oid), OPEROID)) {
|
||||
elog(ERROR, "you are not permitted to comment on operator '%s'",
|
||||
opername);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.90 1999/11/21 04:16:17 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.91 1999/11/22 17:56:00 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -938,7 +938,7 @@ GetOutputFunction(Oid type)
|
||||
{
|
||||
HeapTuple typeTuple;
|
||||
|
||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
||||
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||
ObjectIdGetDatum(type),
|
||||
0, 0, 0);
|
||||
|
||||
@@ -954,7 +954,7 @@ GetTypeElement(Oid type)
|
||||
{
|
||||
HeapTuple typeTuple;
|
||||
|
||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
||||
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||
ObjectIdGetDatum(type),
|
||||
0, 0, 0);
|
||||
|
||||
@@ -970,7 +970,7 @@ GetInputFunction(Oid type)
|
||||
{
|
||||
HeapTuple typeTuple;
|
||||
|
||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
||||
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||
ObjectIdGetDatum(type),
|
||||
0, 0, 0);
|
||||
|
||||
@@ -986,7 +986,7 @@ IsTypeByVal(Oid type)
|
||||
{
|
||||
HeapTuple typeTuple;
|
||||
|
||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
||||
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||
ObjectIdGetDatum(type),
|
||||
0, 0, 0);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.51 1999/11/07 23:08:02 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.52 1999/11/22 17:56:01 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -342,7 +342,7 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
|
||||
* form name, type and constraints
|
||||
*/
|
||||
attributeName = NameStr(attribute->attname);
|
||||
tuple = SearchSysCacheTuple(TYPOID,
|
||||
tuple = SearchSysCacheTuple(TYPEOID,
|
||||
ObjectIdGetDatum(attribute->atttypid),
|
||||
0, 0, 0);
|
||||
Assert(HeapTupleIsValid(tuple));
|
||||
@@ -495,6 +495,16 @@ StoreCatalogInheritance(Oid relationId, List *supers)
|
||||
tuple = heap_formtuple(desc, datum, nullarr);
|
||||
|
||||
heap_insert(relation, tuple);
|
||||
|
||||
if (RelationGetForm(relation)->relhasindex)
|
||||
{
|
||||
Relation idescs[Num_pg_inherits_indices];
|
||||
|
||||
CatalogOpenIndices(Num_pg_inherits_indices, Name_pg_inherits_indices, idescs);
|
||||
CatalogIndexInsert(idescs, Num_pg_inherits_indices, relation, tuple);
|
||||
CatalogCloseIndices(Num_pg_inherits_indices, idescs);
|
||||
}
|
||||
|
||||
pfree(tuple);
|
||||
|
||||
seqNumber += 1;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.43 1999/10/26 03:12:34 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.44 1999/11/22 17:56:01 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -241,7 +241,7 @@ check_permissions(char *command,
|
||||
char path[MAXPGPATH];
|
||||
|
||||
userName = GetPgUserName();
|
||||
utup = SearchSysCacheTuple(USENAME,
|
||||
utup = SearchSysCacheTuple(USERNAME,
|
||||
PointerGetDatum(userName),
|
||||
0, 0, 0);
|
||||
Assert(utup);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.36 1999/10/02 21:33:24 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.37 1999/11/22 17:56:01 momjian Exp $
|
||||
*
|
||||
* DESCRIPTION
|
||||
* The "DefineFoo" routines take the parse tree and pick out the
|
||||
@@ -269,7 +269,7 @@ CreateFunction(ProcedureStmt *stmt, CommandDest dest)
|
||||
Form_pg_language languageStruct;
|
||||
|
||||
/* Lookup the language in the system cache */
|
||||
languageTuple = SearchSysCacheTuple(LANNAME,
|
||||
languageTuple = SearchSysCacheTuple(LANGNAME,
|
||||
PointerGetDatum(languageName),
|
||||
0, 0, 0);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.13 1999/11/07 23:08:02 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.14 1999/11/22 17:56:01 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -310,7 +310,7 @@ ExtendIndex(char *indexRelationName, Expr *predicate, List *rangetable)
|
||||
/* FIgetnArgs(funcInfo) = numberOfAttributes; */
|
||||
FIsetnArgs(funcInfo, numberOfAttributes);
|
||||
|
||||
tuple = SearchSysCacheTuple(PROOID,
|
||||
tuple = SearchSysCacheTuple(PROCOID,
|
||||
ObjectIdGetDatum(indproc),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
@@ -482,7 +482,7 @@ NormIndexAttrs(List *attList, /* list of IndexElem's */
|
||||
/* we want the type so we can set the proper alignment, etc. */
|
||||
if (attribute->typename == NULL)
|
||||
{
|
||||
tuple = SearchSysCacheTuple(TYPOID,
|
||||
tuple = SearchSysCacheTuple(TYPEOID,
|
||||
ObjectIdGetDatum(attform->atttypid),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "access/heapam.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/indexing.h"
|
||||
#include "catalog/pg_language.h"
|
||||
#include "catalog/pg_proc.h"
|
||||
#include "catalog/pg_shadow.h"
|
||||
@@ -75,7 +76,7 @@ CreateProceduralLanguage(CreatePLangStmt *stmt)
|
||||
*/
|
||||
case_translate_language_name(stmt->plname, languageName);
|
||||
|
||||
langTup = SearchSysCacheTuple(LANNAME,
|
||||
langTup = SearchSysCacheTuple(LANGNAME,
|
||||
PointerGetDatum(languageName),
|
||||
0, 0, 0);
|
||||
if (HeapTupleIsValid(langTup))
|
||||
@@ -87,7 +88,7 @@ CreateProceduralLanguage(CreatePLangStmt *stmt)
|
||||
* ----------------
|
||||
*/
|
||||
memset(typev, 0, sizeof(typev));
|
||||
procTup = SearchSysCacheTuple(PRONAME,
|
||||
procTup = SearchSysCacheTuple(PROCNAME,
|
||||
PointerGetDatum(stmt->plhandler),
|
||||
Int32GetDatum(0),
|
||||
PointerGetDatum(typev),
|
||||
@@ -127,6 +128,15 @@ CreateProceduralLanguage(CreatePLangStmt *stmt)
|
||||
|
||||
heap_insert(rel, tup);
|
||||
|
||||
if (RelationGetForm(rel)->relhasindex)
|
||||
{
|
||||
Relation idescs[Num_pg_language_indices];
|
||||
|
||||
CatalogOpenIndices(Num_pg_language_indices, Name_pg_language_indices, idescs);
|
||||
CatalogIndexInsert(idescs, Num_pg_language_indices, rel, tup);
|
||||
CatalogCloseIndices(Num_pg_language_indices, idescs);
|
||||
}
|
||||
|
||||
heap_close(rel, RowExclusiveLock);
|
||||
}
|
||||
|
||||
@@ -161,7 +171,7 @@ DropProceduralLanguage(DropPLangStmt *stmt)
|
||||
|
||||
rel = heap_openr(LanguageRelationName, RowExclusiveLock);
|
||||
|
||||
langTup = SearchSysCacheTupleCopy(LANNAME,
|
||||
langTup = SearchSysCacheTupleCopy(LANGNAME,
|
||||
PointerGetDatum(languageName),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(langTup))
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.39 1999/11/07 23:08:02 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.40 1999/11/22 17:56:02 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -78,7 +78,7 @@ RemoveOperator(char *operatorName, /* operator name */
|
||||
|
||||
relation = heap_openr(OperatorRelationName, RowExclusiveLock);
|
||||
|
||||
tup = SearchSysCacheTupleCopy(OPRNAME,
|
||||
tup = SearchSysCacheTupleCopy(OPERNAME,
|
||||
PointerGetDatum(operatorName),
|
||||
ObjectIdGetDatum(typeId1),
|
||||
ObjectIdGetDatum(typeId2),
|
||||
@@ -90,7 +90,7 @@ RemoveOperator(char *operatorName, /* operator name */
|
||||
userName = GetPgUserName();
|
||||
if (!pg_ownercheck(userName,
|
||||
(char *) ObjectIdGetDatum(tup->t_data->t_oid),
|
||||
OPROID))
|
||||
OPEROID))
|
||||
elog(ERROR, "RemoveOperator: operator '%s': permission denied",
|
||||
operatorName);
|
||||
#endif
|
||||
@@ -259,14 +259,14 @@ RemoveType(char *typeName) /* type name to be removed */
|
||||
|
||||
#ifndef NO_SECURITY
|
||||
userName = GetPgUserName();
|
||||
if (!pg_ownercheck(userName, typeName, TYPNAME))
|
||||
if (!pg_ownercheck(userName, typeName, TYPENAME))
|
||||
elog(ERROR, "RemoveType: type '%s': permission denied",
|
||||
typeName);
|
||||
#endif
|
||||
|
||||
relation = heap_openr(TypeRelationName, RowExclusiveLock);
|
||||
|
||||
tup = SearchSysCacheTuple(TYPNAME,
|
||||
tup = SearchSysCacheTuple(TYPENAME,
|
||||
PointerGetDatum(typeName),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(tup))
|
||||
@@ -285,7 +285,7 @@ RemoveType(char *typeName) /* type name to be removed */
|
||||
|
||||
/* Now, Delete the "array of" that type */
|
||||
shadow_type = makeArrayTypeName(typeName);
|
||||
tup = SearchSysCacheTuple(TYPNAME,
|
||||
tup = SearchSysCacheTuple(TYPENAME,
|
||||
PointerGetDatum(shadow_type),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(tup))
|
||||
@@ -331,7 +331,7 @@ RemoveFunction(char *functionName, /* function name to be removed */
|
||||
argList[i] = 0;
|
||||
else
|
||||
{
|
||||
tup = SearchSysCacheTuple(TYPNAME,
|
||||
tup = SearchSysCacheTuple(TYPENAME,
|
||||
PointerGetDatum(typename),
|
||||
0, 0, 0);
|
||||
|
||||
@@ -351,7 +351,7 @@ RemoveFunction(char *functionName, /* function name to be removed */
|
||||
#endif
|
||||
|
||||
relation = heap_openr(ProcedureRelationName, RowExclusiveLock);
|
||||
tup = SearchSysCacheTuple(PRONAME,
|
||||
tup = SearchSysCacheTuple(PROCNAME,
|
||||
PointerGetDatum(functionName),
|
||||
Int32GetDatum(nargs),
|
||||
PointerGetDatum(argList),
|
||||
|
||||
@@ -144,7 +144,7 @@ CreateTrigger(CreateTrigStmt *stmt)
|
||||
heap_endscan(tgscan);
|
||||
|
||||
MemSet(fargtypes, 0, 8 * sizeof(Oid));
|
||||
tuple = SearchSysCacheTuple(PRONAME,
|
||||
tuple = SearchSysCacheTuple(PROCNAME,
|
||||
PointerGetDatum(stmt->funcname),
|
||||
Int32GetDatum(0),
|
||||
PointerGetDatum(fargtypes),
|
||||
@@ -161,7 +161,7 @@ CreateTrigger(CreateTrigStmt *stmt)
|
||||
{
|
||||
HeapTuple langTup;
|
||||
|
||||
langTup = SearchSysCacheTuple(LANOID,
|
||||
langTup = SearchSysCacheTuple(LANGOID,
|
||||
ObjectIdGetDatum(((Form_pg_proc) GETSTRUCT(tuple))->prolang),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(langTup))
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: user.c,v 1.36 1999/11/21 04:16:16 tgl Exp $
|
||||
* $Id: user.c,v 1.37 1999/11/22 17:56:02 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -261,7 +261,7 @@ AlterUser(AlterUserStmt *stmt, CommandDest dest)
|
||||
pg_shadow_rel = heap_openr(ShadowRelationName, AccessExclusiveLock);
|
||||
pg_shadow_dsc = RelationGetDescr(pg_shadow_rel);
|
||||
|
||||
tuple = SearchSysCacheTuple(USENAME,
|
||||
tuple = SearchSysCacheTuple(USERNAME,
|
||||
PointerGetDatum(stmt->user),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
@@ -374,7 +374,7 @@ RemoveUser(char *user, CommandDest dest)
|
||||
pg_shadow_rel = heap_openr(ShadowRelationName, AccessExclusiveLock);
|
||||
pg_dsc = RelationGetDescr(pg_shadow_rel);
|
||||
|
||||
tuple = SearchSysCacheTuple(USENAME,
|
||||
tuple = SearchSysCacheTuple(USERNAME,
|
||||
PointerGetDatum(user),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.124 1999/11/14 17:27:01 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.125 1999/11/22 17:56:02 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -490,7 +490,7 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
|
||||
else
|
||||
stats->f_cmpgt.fn_addr = NULL;
|
||||
|
||||
typetuple = SearchSysCacheTuple(TYPOID,
|
||||
typetuple = SearchSysCacheTuple(TYPEOID,
|
||||
ObjectIdGetDatum(stats->attr->atttypid),
|
||||
0, 0, 0);
|
||||
if (HeapTupleIsValid(typetuple))
|
||||
@@ -1976,7 +1976,7 @@ vc_scanoneind(Relation indrel, int num_tuples)
|
||||
ru1.ru_utime.tv_sec - ru0.ru_utime.tv_sec);
|
||||
|
||||
if (nitups != num_tuples)
|
||||
elog(NOTICE, "Index %s: NUMBER OF INDEX' TUPLES (%u) IS NOT THE SAME AS HEAP' (%u).\nTry recreating the index.",
|
||||
elog(NOTICE, "Index %s: NUMBER OF INDEX' TUPLES (%u) IS NOT THE SAME AS HEAP' (%u).\n\tTry recreating the index.",
|
||||
RelationGetRelationName(indrel), nitups, num_tuples);
|
||||
|
||||
} /* vc_scanoneind */
|
||||
@@ -2057,7 +2057,7 @@ vc_vaconeind(VPageList vpl, Relation indrel, int num_tuples, int keep_tuples)
|
||||
ru1.ru_utime.tv_sec - ru0.ru_utime.tv_sec);
|
||||
|
||||
if (num_index_tuples != num_tuples + keep_tuples)
|
||||
elog(NOTICE, "Index %s: NUMBER OF INDEX' TUPLES (%u) IS NOT THE SAME AS HEAP' (%u).\nTry recreating the index.",
|
||||
elog(NOTICE, "Index %s: NUMBER OF INDEX' TUPLES (%u) IS NOT THE SAME AS HEAP' (%u).\n\tTry recreating the index.",
|
||||
RelationGetRelationName(indrel), num_index_tuples, num_tuples);
|
||||
|
||||
} /* vc_vaconeind */
|
||||
|
||||
Reference in New Issue
Block a user