Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfc955b1

Browse files
committed
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.
1 parente30c2d6 commitfc955b1

File tree

75 files changed

+1236
-605
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1236
-605
lines changed

‎doc/src/sgml/libpq++.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@
351351
<synopsis>
352352
int PgConnection::ExecTuplesOk(const char *query)
353353
</synopsis>
354-
Returns TRUE if the command query succeeds and there are tuples to be retrieved.
354+
Returns TRUE if the command query succeeds.
355355
</para>
356356
</listitem>
357357
<listitem>

‎src/backend/access/common/printtup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.50 1999/11/07 23:07:46 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.51 1999/11/22 17:55:52 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -44,7 +44,7 @@ getTypeOutAndElem(Oid type, Oid *typOutput, Oid *typElem)
4444
{
4545
HeapTupletypeTuple;
4646

47-
typeTuple=SearchSysCacheTuple(TYPOID,
47+
typeTuple=SearchSysCacheTuple(TYPEOID,
4848
ObjectIdGetDatum(type),
4949
0,0,0);
5050

‎src/backend/access/common/tupdesc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.56 1999/11/07 23:07:47 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.57 1999/11/22 17:55:52 momjian Exp $
1111
*
1212
* NOTES
1313
* some of the executor utility code such as "ExecTypeFromTL" should be
@@ -309,7 +309,7 @@ TupleDescInitEntry(TupleDesc desc,
309309
*-cim 6/14/90
310310
* ----------------
311311
*/
312-
tuple=SearchSysCacheTuple(TYPOID,
312+
tuple=SearchSysCacheTuple(TYPEOID,
313313
ObjectIdGetDatum(typeid),
314314
0,0,0);
315315
if (!HeapTupleIsValid(tuple))

‎src/backend/access/index/istrat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.37 1999/10/23 03:13:20 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.38 1999/11/22 17:55:53 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -479,7 +479,7 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
479479

480480
if (!IsBootstrapProcessingMode())
481481
{
482-
tuple=SearchSysCacheTuple(OPROID,
482+
tuple=SearchSysCacheTuple(OPEROID,
483483
ObjectIdGetDatum(operatorObjectId),
484484
0,0,0);
485485
}

‎src/backend/access/nbtree/nbtinsert.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.50 1999/08/09 01:39:19 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.51 1999/11/22 17:55:54 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -149,7 +149,7 @@ _bt_doinsert(Relation rel, BTItem btitem, bool index_is_unique, Relation heapRel
149149
buf=_bt_getbuf(rel,blkno,BT_WRITE);
150150
gotol1;/* continue from the begin */
151151
}
152-
elog(ERROR,"Cannot insert a duplicate key intoaunique index");
152+
elog(ERROR,"Cannot insert a duplicate key into unique index %s",RelationGetRelationName(rel));
153153
}
154154
/* htup null so no buffer to release */
155155
/* get next offnum */

‎src/backend/catalog/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for catalog
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.17 1999/03/27 17:25:09 tgl Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.18 1999/11/22 17:55:56 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -38,7 +38,8 @@ LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \
3838
pg_rewrite.h pg_listener.h pg_description.h indexing.h \
3939
)
4040

41-
global1.bki.source:$(GENBKI)$(GLOBALBKI_SRCS)
41+
global1.bki.source:$(GENBKI)$(GLOBALBKI_SRCS)\
42+
$(addprefix ../../include/catalog/, indexing.h)
4243
ifneq ($(PORTNAME), win)
4344
sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(GLOBALBKI_SRCS) > $@ 2>global1.description
4445
else

‎src/backend/catalog/aclchk.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.29 1999/11/07 23:08:00 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.30 1999/11/22 17:55:56 momjian Exp $
1111
*
1212
* NOTES
1313
* See acl.h.
@@ -350,7 +350,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
350350
int32result;
351351
Relationrelation;
352352

353-
tuple=SearchSysCacheTuple(USENAME,
353+
tuple=SearchSysCacheTuple(USERNAME,
354354
PointerGetDatum(usename),
355355
0,0,0);
356356
if (!HeapTupleIsValid(tuple))
@@ -469,7 +469,7 @@ pg_ownercheck(char *usename,
469469
AclIduser_id,
470470
owner_id=0;
471471

472-
tuple=SearchSysCacheTuple(USENAME,
472+
tuple=SearchSysCacheTuple(USERNAME,
473473
PointerGetDatum(usename),
474474
0,0,0);
475475
if (!HeapTupleIsValid(tuple))
@@ -493,13 +493,13 @@ pg_ownercheck(char *usename,
493493
0,0,0);
494494
switch (cacheid)
495495
{
496-
caseOPROID:
496+
caseOPEROID:
497497
if (!HeapTupleIsValid(tuple))
498498
elog(ERROR,"pg_ownercheck: operator %ld not found",
499499
PointerGetDatum(value));
500500
owner_id= ((Form_pg_operator)GETSTRUCT(tuple))->oprowner;
501501
break;
502-
casePRONAME:
502+
casePROCNAME:
503503
if (!HeapTupleIsValid(tuple))
504504
elog(ERROR,"pg_ownercheck: function \"%s\" not found",
505505
value);
@@ -511,7 +511,7 @@ pg_ownercheck(char *usename,
511511
value);
512512
owner_id= ((Form_pg_class)GETSTRUCT(tuple))->relowner;
513513
break;
514-
caseTYPNAME:
514+
caseTYPENAME:
515515
if (!HeapTupleIsValid(tuple))
516516
elog(ERROR,"pg_ownercheck: type \"%s\" not found",
517517
value);
@@ -535,7 +535,7 @@ pg_func_ownercheck(char *usename,
535535
AclIduser_id,
536536
owner_id;
537537

538-
tuple=SearchSysCacheTuple(USENAME,
538+
tuple=SearchSysCacheTuple(USERNAME,
539539
PointerGetDatum(usename),
540540
0,0,0);
541541
if (!HeapTupleIsValid(tuple))
@@ -555,7 +555,7 @@ pg_func_ownercheck(char *usename,
555555
return1;
556556
}
557557

558-
tuple=SearchSysCacheTuple(PRONAME,
558+
tuple=SearchSysCacheTuple(PROCNAME,
559559
PointerGetDatum(funcname),
560560
Int32GetDatum(nargs),
561561
PointerGetDatum(arglist),
@@ -577,7 +577,7 @@ pg_aggr_ownercheck(char *usename,
577577
AclIduser_id,
578578
owner_id;
579579

580-
tuple=SearchSysCacheTuple(USENAME,
580+
tuple=SearchSysCacheTuple(USERNAME,
581581
PointerGetDatum(usename),
582582
0,0,0);
583583
if (!HeapTupleIsValid(tuple))

‎src/backend/catalog/catalog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.25 1999/07/17 20:16:48 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.26 1999/11/22 17:55:56 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -151,7 +151,7 @@ fillatt(TupleDesc tupleDesc)
151151

152152
for (i=0;i<natts;)
153153
{
154-
tuple=SearchSysCacheTuple(TYPOID,
154+
tuple=SearchSysCacheTuple(TYPEOID,
155155
ObjectIdGetDatum((*attributeP)->atttypid),
156156
0,0,0);
157157
if (!HeapTupleIsValid(tuple))

‎src/backend/catalog/heap.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.108 1999/11/16 04:13:55 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.109 1999/11/22 17:55:57 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -964,7 +964,7 @@ RelationRemoveInheritance(Relation relation)
964964
tuple=heap_getnext(scan,0);
965965
if (HeapTupleIsValid(tuple))
966966
{
967-
Oidsubclass= ((Form_pg_inherits)GETSTRUCT(tuple))->inhrel;
967+
Oidsubclass= ((Form_pg_inherits)GETSTRUCT(tuple))->inhrelid;
968968

969969
heap_endscan(scan);
970970
heap_close(catalogRelation,RowExclusiveLock);
@@ -979,7 +979,7 @@ RelationRemoveInheritance(Relation relation)
979979
*so we can trash it. First we remove dead INHERITS tuples.
980980
* ----------------
981981
*/
982-
entry.sk_attno=Anum_pg_inherits_inhrel;
982+
entry.sk_attno=Anum_pg_inherits_inhrelid;
983983

984984
scan=heap_beginscan(catalogRelation,
985985
false,
@@ -1003,7 +1003,7 @@ RelationRemoveInheritance(Relation relation)
10031003
catalogRelation=heap_openr(InheritancePrecidenceListRelationName,
10041004
RowExclusiveLock);
10051005

1006-
entry.sk_attno=Anum_pg_ipl_iplrel;
1006+
entry.sk_attno=Anum_pg_ipl_iplrelid;
10071007

10081008
scan=heap_beginscan(catalogRelation,
10091009
false,
@@ -1157,7 +1157,7 @@ RelationTruncateIndexes(Relation heapRelation)
11571157
{
11581158
funcInfo=&fInfo;
11591159
FIsetnArgs(funcInfo,numberOfAttributes);
1160-
procTuple=SearchSysCacheTuple(PROOID,ObjectIdGetDatum(procId),
1160+
procTuple=SearchSysCacheTuple(PROCOID,ObjectIdGetDatum(procId),
11611161
0,0,0);
11621162
if (!HeapTupleIsValid(procTuple))
11631163
elog(ERROR,"RelationTruncateIndexes: index procedure not found");

‎src/backend/catalog/index.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.96 1999/11/21 20:01:10 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.97 1999/11/22 17:55:57 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -157,7 +157,7 @@ BuildFuncTupleDesc(FuncIndexInfo *funcInfo)
157157
funcname=FIgetname(funcInfo);
158158
nargs=FIgetnArgs(funcInfo);
159159
argtypes=FIgetArglist(funcInfo);
160-
tuple=SearchSysCacheTuple(PRONAME,
160+
tuple=SearchSysCacheTuple(PROCNAME,
161161
PointerGetDatum(funcname),
162162
Int32GetDatum(nargs),
163163
PointerGetDatum(argtypes),
@@ -171,7 +171,7 @@ BuildFuncTupleDesc(FuncIndexInfo *funcInfo)
171171
/*
172172
* Look up the return type in pg_type for the type length.
173173
*/
174-
tuple=SearchSysCacheTuple(TYPOID,
174+
tuple=SearchSysCacheTuple(TYPEOID,
175175
ObjectIdGetDatum(retType),
176176
0,0,0);
177177
if (!HeapTupleIsValid(tuple))
@@ -317,7 +317,7 @@ ConstructTupleDescriptor(Oid heapoid,
317317
{
318318
HeapTupletup;
319319

320-
tup=SearchSysCacheTuple(TYPNAME,
320+
tup=SearchSysCacheTuple(TYPENAME,
321321
PointerGetDatum(IndexKeyType->name),
322322
0,0,0);
323323
if (!HeapTupleIsValid(tup))
@@ -1028,7 +1028,7 @@ index_create(char *heapRelationName,
10281028
{
10291029
HeapTupleproc_tup;
10301030

1031-
proc_tup=SearchSysCacheTuple(PRONAME,
1031+
proc_tup=SearchSysCacheTuple(PROCNAME,
10321032
PointerGetDatum(FIgetname(funcInfo)),
10331033
Int32GetDatum(FIgetnArgs(funcInfo)),
10341034
PointerGetDatum(FIgetArglist(funcInfo)),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp