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:
parent
e30c2d67ef
commit
fc955b14ea
doc/src/sgml
src
backend
access
catalog
commands
async.ccluster.ccommand.ccomment.ccopy.ccreatinh.cdbcommands.cdefine.cindexcmds.cproclang.cremove.ctrigger.cuser.cvacuum.c
executor
optimizer
parser
rewrite
tcop
utils
bin/pg_dump
include
catalog
utils
pl
@ -351,7 +351,7 @@
|
|||||||
<synopsis>
|
<synopsis>
|
||||||
int PgConnection::ExecTuplesOk(const char *query)
|
int PgConnection::ExecTuplesOk(const char *query)
|
||||||
</synopsis>
|
</synopsis>
|
||||||
Returns TRUE if the command query succeeds and there are tuples to be retrieved.
|
Returns TRUE if the command query succeeds.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.50 1999/11/07 23:07:46 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.51 1999/11/22 17:55:52 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -44,7 +44,7 @@ getTypeOutAndElem(Oid type, Oid *typOutput, Oid *typElem)
|
|||||||
{
|
{
|
||||||
HeapTuple typeTuple;
|
HeapTuple typeTuple;
|
||||||
|
|
||||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(type),
|
ObjectIdGetDatum(type),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.56 1999/11/07 23:07:47 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.57 1999/11/22 17:55:52 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* some of the executor utility code such as "ExecTypeFromTL" should be
|
* some of the executor utility code such as "ExecTypeFromTL" should be
|
||||||
@ -309,7 +309,7 @@ TupleDescInitEntry(TupleDesc desc,
|
|||||||
* -cim 6/14/90
|
* -cim 6/14/90
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
tuple = SearchSysCacheTuple(TYPOID,
|
tuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(typeid),
|
ObjectIdGetDatum(typeid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tuple))
|
if (!HeapTupleIsValid(tuple))
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.37 1999/10/23 03:13:20 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.38 1999/11/22 17:55:53 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -479,7 +479,7 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
|
|||||||
|
|
||||||
if (!IsBootstrapProcessingMode())
|
if (!IsBootstrapProcessingMode())
|
||||||
{
|
{
|
||||||
tuple = SearchSysCacheTuple(OPROID,
|
tuple = SearchSysCacheTuple(OPEROID,
|
||||||
ObjectIdGetDatum(operatorObjectId),
|
ObjectIdGetDatum(operatorObjectId),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.50 1999/08/09 01:39:19 vadim Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.51 1999/11/22 17:55:54 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -149,7 +149,7 @@ l1:
|
|||||||
buf = _bt_getbuf(rel, blkno, BT_WRITE);
|
buf = _bt_getbuf(rel, blkno, BT_WRITE);
|
||||||
goto l1;/* continue from the begin */
|
goto l1;/* continue from the begin */
|
||||||
}
|
}
|
||||||
elog(ERROR, "Cannot insert a duplicate key into a unique index");
|
elog(ERROR, "Cannot insert a duplicate key into unique index %s", RelationGetRelationName(rel));
|
||||||
}
|
}
|
||||||
/* htup null so no buffer to release */
|
/* htup null so no buffer to release */
|
||||||
/* get next offnum */
|
/* get next offnum */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# Makefile for catalog
|
# Makefile for catalog
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.17 1999/03/27 17:25:09 tgl Exp $
|
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.18 1999/11/22 17:55:56 momjian Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -38,7 +38,8 @@ LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \
|
|||||||
pg_rewrite.h pg_listener.h pg_description.h indexing.h \
|
pg_rewrite.h pg_listener.h pg_description.h indexing.h \
|
||||||
)
|
)
|
||||||
|
|
||||||
global1.bki.source: $(GENBKI) $(GLOBALBKI_SRCS)
|
global1.bki.source: $(GENBKI) $(GLOBALBKI_SRCS) \
|
||||||
|
$(addprefix ../../include/catalog/, indexing.h)
|
||||||
ifneq ($(PORTNAME), win)
|
ifneq ($(PORTNAME), win)
|
||||||
sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(GLOBALBKI_SRCS) > $@ 2>global1.description
|
sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(GLOBALBKI_SRCS) > $@ 2>global1.description
|
||||||
else
|
else
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.29 1999/11/07 23:08:00 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.30 1999/11/22 17:55:56 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* See acl.h.
|
* See acl.h.
|
||||||
@ -350,7 +350,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
|
|||||||
int32 result;
|
int32 result;
|
||||||
Relation relation;
|
Relation relation;
|
||||||
|
|
||||||
tuple = SearchSysCacheTuple(USENAME,
|
tuple = SearchSysCacheTuple(USERNAME,
|
||||||
PointerGetDatum(usename),
|
PointerGetDatum(usename),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tuple))
|
if (!HeapTupleIsValid(tuple))
|
||||||
@ -469,7 +469,7 @@ pg_ownercheck(char *usename,
|
|||||||
AclId user_id,
|
AclId user_id,
|
||||||
owner_id = 0;
|
owner_id = 0;
|
||||||
|
|
||||||
tuple = SearchSysCacheTuple(USENAME,
|
tuple = SearchSysCacheTuple(USERNAME,
|
||||||
PointerGetDatum(usename),
|
PointerGetDatum(usename),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tuple))
|
if (!HeapTupleIsValid(tuple))
|
||||||
@ -493,13 +493,13 @@ pg_ownercheck(char *usename,
|
|||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
switch (cacheid)
|
switch (cacheid)
|
||||||
{
|
{
|
||||||
case OPROID:
|
case OPEROID:
|
||||||
if (!HeapTupleIsValid(tuple))
|
if (!HeapTupleIsValid(tuple))
|
||||||
elog(ERROR, "pg_ownercheck: operator %ld not found",
|
elog(ERROR, "pg_ownercheck: operator %ld not found",
|
||||||
PointerGetDatum(value));
|
PointerGetDatum(value));
|
||||||
owner_id = ((Form_pg_operator) GETSTRUCT(tuple))->oprowner;
|
owner_id = ((Form_pg_operator) GETSTRUCT(tuple))->oprowner;
|
||||||
break;
|
break;
|
||||||
case PRONAME:
|
case PROCNAME:
|
||||||
if (!HeapTupleIsValid(tuple))
|
if (!HeapTupleIsValid(tuple))
|
||||||
elog(ERROR, "pg_ownercheck: function \"%s\" not found",
|
elog(ERROR, "pg_ownercheck: function \"%s\" not found",
|
||||||
value);
|
value);
|
||||||
@ -511,7 +511,7 @@ pg_ownercheck(char *usename,
|
|||||||
value);
|
value);
|
||||||
owner_id = ((Form_pg_class) GETSTRUCT(tuple))->relowner;
|
owner_id = ((Form_pg_class) GETSTRUCT(tuple))->relowner;
|
||||||
break;
|
break;
|
||||||
case TYPNAME:
|
case TYPENAME:
|
||||||
if (!HeapTupleIsValid(tuple))
|
if (!HeapTupleIsValid(tuple))
|
||||||
elog(ERROR, "pg_ownercheck: type \"%s\" not found",
|
elog(ERROR, "pg_ownercheck: type \"%s\" not found",
|
||||||
value);
|
value);
|
||||||
@ -535,7 +535,7 @@ pg_func_ownercheck(char *usename,
|
|||||||
AclId user_id,
|
AclId user_id,
|
||||||
owner_id;
|
owner_id;
|
||||||
|
|
||||||
tuple = SearchSysCacheTuple(USENAME,
|
tuple = SearchSysCacheTuple(USERNAME,
|
||||||
PointerGetDatum(usename),
|
PointerGetDatum(usename),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tuple))
|
if (!HeapTupleIsValid(tuple))
|
||||||
@ -555,7 +555,7 @@ pg_func_ownercheck(char *usename,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
tuple = SearchSysCacheTuple(PRONAME,
|
tuple = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(funcname),
|
PointerGetDatum(funcname),
|
||||||
Int32GetDatum(nargs),
|
Int32GetDatum(nargs),
|
||||||
PointerGetDatum(arglist),
|
PointerGetDatum(arglist),
|
||||||
@ -577,7 +577,7 @@ pg_aggr_ownercheck(char *usename,
|
|||||||
AclId user_id,
|
AclId user_id,
|
||||||
owner_id;
|
owner_id;
|
||||||
|
|
||||||
tuple = SearchSysCacheTuple(USENAME,
|
tuple = SearchSysCacheTuple(USERNAME,
|
||||||
PointerGetDatum(usename),
|
PointerGetDatum(usename),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tuple))
|
if (!HeapTupleIsValid(tuple))
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.25 1999/07/17 20:16:48 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.26 1999/11/22 17:55:56 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -151,7 +151,7 @@ fillatt(TupleDesc tupleDesc)
|
|||||||
|
|
||||||
for (i = 0; i < natts;)
|
for (i = 0; i < natts;)
|
||||||
{
|
{
|
||||||
tuple = SearchSysCacheTuple(TYPOID,
|
tuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum((*attributeP)->atttypid),
|
ObjectIdGetDatum((*attributeP)->atttypid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tuple))
|
if (!HeapTupleIsValid(tuple))
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.108 1999/11/16 04:13:55 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.109 1999/11/22 17:55:57 momjian Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* INTERFACE ROUTINES
|
* INTERFACE ROUTINES
|
||||||
@ -964,7 +964,7 @@ RelationRemoveInheritance(Relation relation)
|
|||||||
tuple = heap_getnext(scan, 0);
|
tuple = heap_getnext(scan, 0);
|
||||||
if (HeapTupleIsValid(tuple))
|
if (HeapTupleIsValid(tuple))
|
||||||
{
|
{
|
||||||
Oid subclass = ((Form_pg_inherits) GETSTRUCT(tuple))->inhrel;
|
Oid subclass = ((Form_pg_inherits) GETSTRUCT(tuple))->inhrelid;
|
||||||
|
|
||||||
heap_endscan(scan);
|
heap_endscan(scan);
|
||||||
heap_close(catalogRelation, RowExclusiveLock);
|
heap_close(catalogRelation, RowExclusiveLock);
|
||||||
@ -979,7 +979,7 @@ RelationRemoveInheritance(Relation relation)
|
|||||||
* so we can trash it. First we remove dead INHERITS tuples.
|
* so we can trash it. First we remove dead INHERITS tuples.
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
entry.sk_attno = Anum_pg_inherits_inhrel;
|
entry.sk_attno = Anum_pg_inherits_inhrelid;
|
||||||
|
|
||||||
scan = heap_beginscan(catalogRelation,
|
scan = heap_beginscan(catalogRelation,
|
||||||
false,
|
false,
|
||||||
@ -1003,7 +1003,7 @@ RelationRemoveInheritance(Relation relation)
|
|||||||
catalogRelation = heap_openr(InheritancePrecidenceListRelationName,
|
catalogRelation = heap_openr(InheritancePrecidenceListRelationName,
|
||||||
RowExclusiveLock);
|
RowExclusiveLock);
|
||||||
|
|
||||||
entry.sk_attno = Anum_pg_ipl_iplrel;
|
entry.sk_attno = Anum_pg_ipl_iplrelid;
|
||||||
|
|
||||||
scan = heap_beginscan(catalogRelation,
|
scan = heap_beginscan(catalogRelation,
|
||||||
false,
|
false,
|
||||||
@ -1157,7 +1157,7 @@ RelationTruncateIndexes(Relation heapRelation)
|
|||||||
{
|
{
|
||||||
funcInfo = &fInfo;
|
funcInfo = &fInfo;
|
||||||
FIsetnArgs(funcInfo, numberOfAttributes);
|
FIsetnArgs(funcInfo, numberOfAttributes);
|
||||||
procTuple = SearchSysCacheTuple(PROOID, ObjectIdGetDatum(procId),
|
procTuple = SearchSysCacheTuple(PROCOID, ObjectIdGetDatum(procId),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(procTuple))
|
if (!HeapTupleIsValid(procTuple))
|
||||||
elog(ERROR, "RelationTruncateIndexes: index procedure not found");
|
elog(ERROR, "RelationTruncateIndexes: index procedure not found");
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.96 1999/11/21 20:01:10 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.97 1999/11/22 17:55:57 momjian Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* INTERFACE ROUTINES
|
* INTERFACE ROUTINES
|
||||||
@ -157,7 +157,7 @@ BuildFuncTupleDesc(FuncIndexInfo *funcInfo)
|
|||||||
funcname = FIgetname(funcInfo);
|
funcname = FIgetname(funcInfo);
|
||||||
nargs = FIgetnArgs(funcInfo);
|
nargs = FIgetnArgs(funcInfo);
|
||||||
argtypes = FIgetArglist(funcInfo);
|
argtypes = FIgetArglist(funcInfo);
|
||||||
tuple = SearchSysCacheTuple(PRONAME,
|
tuple = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(funcname),
|
PointerGetDatum(funcname),
|
||||||
Int32GetDatum(nargs),
|
Int32GetDatum(nargs),
|
||||||
PointerGetDatum(argtypes),
|
PointerGetDatum(argtypes),
|
||||||
@ -171,7 +171,7 @@ BuildFuncTupleDesc(FuncIndexInfo *funcInfo)
|
|||||||
/*
|
/*
|
||||||
* Look up the return type in pg_type for the type length.
|
* Look up the return type in pg_type for the type length.
|
||||||
*/
|
*/
|
||||||
tuple = SearchSysCacheTuple(TYPOID,
|
tuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(retType),
|
ObjectIdGetDatum(retType),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tuple))
|
if (!HeapTupleIsValid(tuple))
|
||||||
@ -317,7 +317,7 @@ ConstructTupleDescriptor(Oid heapoid,
|
|||||||
{
|
{
|
||||||
HeapTuple tup;
|
HeapTuple tup;
|
||||||
|
|
||||||
tup = SearchSysCacheTuple(TYPNAME,
|
tup = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(IndexKeyType->name),
|
PointerGetDatum(IndexKeyType->name),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tup))
|
if (!HeapTupleIsValid(tup))
|
||||||
@ -1028,7 +1028,7 @@ index_create(char *heapRelationName,
|
|||||||
{
|
{
|
||||||
HeapTuple proc_tup;
|
HeapTuple proc_tup;
|
||||||
|
|
||||||
proc_tup = SearchSysCacheTuple(PRONAME,
|
proc_tup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(FIgetname(funcInfo)),
|
PointerGetDatum(FIgetname(funcInfo)),
|
||||||
Int32GetDatum(FIgetnArgs(funcInfo)),
|
Int32GetDatum(FIgetnArgs(funcInfo)),
|
||||||
PointerGetDatum(FIgetArglist(funcInfo)),
|
PointerGetDatum(FIgetArglist(funcInfo)),
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.50 1999/11/01 04:00:56 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.51 1999/11/22 17:55:57 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -26,34 +26,49 @@
|
|||||||
#include "utils/syscache.h"
|
#include "utils/syscache.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Names of indices on the following system catalogs:
|
* Names of indices - they match all system caches
|
||||||
*
|
|
||||||
* pg_attribute
|
|
||||||
* pg_proc
|
|
||||||
* pg_type
|
|
||||||
* pg_naming
|
|
||||||
* pg_class
|
|
||||||
* pg_attrdef
|
|
||||||
* pg_relcheck
|
|
||||||
* pg_trigger
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *Name_pg_amop_indices[Num_pg_amop_indices] = {AccessMethodOpidIndex,
|
char *Name_pg_aggregate_indices[Num_pg_aggregate_indices] =
|
||||||
AccessMethodStrategyIndex};
|
{AggregateNameTypeIndex};
|
||||||
char *Name_pg_attr_indices[Num_pg_attr_indices] = {AttributeNameIndex,
|
char *Name_pg_am_indices[Num_pg_am_indices] =
|
||||||
AttributeNumIndex, AttributeRelidIndex};
|
{AmNameIndex};
|
||||||
char *Name_pg_index_indices[Num_pg_index_indices] = {IndexRelidIndex};
|
char *Name_pg_amop_indices[Num_pg_amop_indices] =
|
||||||
char *Name_pg_proc_indices[Num_pg_proc_indices] = {ProcedureNameIndex,
|
{AccessMethodOpidIndex, AccessMethodStrategyIndex};
|
||||||
ProcedureOidIndex};
|
char *Name_pg_attr_indices[Num_pg_attr_indices] =
|
||||||
char *Name_pg_type_indices[Num_pg_type_indices] = {TypeNameIndex,
|
{AttributeRelidNameIndex, AttributeRelidNumIndex};
|
||||||
TypeOidIndex};
|
char *Name_pg_attrdef_indices[Num_pg_attrdef_indices] =
|
||||||
char *Name_pg_class_indices[Num_pg_class_indices] = {ClassNameIndex,
|
{AttrDefaultIndex};
|
||||||
ClassOidIndex};
|
char *Name_pg_class_indices[Num_pg_class_indices] =
|
||||||
char *Name_pg_attrdef_indices[Num_pg_attrdef_indices] = {AttrDefaultIndex};
|
{ClassNameIndex, ClassOidIndex};
|
||||||
char *Name_pg_relcheck_indices[Num_pg_relcheck_indices] = {RelCheckIndex};
|
char *Name_pg_group_indices[Num_pg_group_indices] =
|
||||||
char *Name_pg_trigger_indices[Num_pg_trigger_indices] = {TriggerRelidIndex,
|
{GroupNameIndex, GroupSysidIndex};
|
||||||
TriggerConstrNameIndex, TriggerConstrRelidIndex};
|
char *Name_pg_index_indices[Num_pg_index_indices] =
|
||||||
char *Name_pg_description_indices[Num_pg_description_indices] = {DescriptionObjIndex};
|
{IndexRelidIndex};
|
||||||
|
char *Name_pg_inherits_indices[Num_pg_inherits_indices] =
|
||||||
|
{InheritsRelidSeqnoIndex};
|
||||||
|
char *Name_pg_language_indices[Num_pg_language_indices] =
|
||||||
|
{LanguageOidIndex, LanguageNameIndex};
|
||||||
|
char *Name_pg_listener_indices[Num_pg_listener_indices] =
|
||||||
|
{ListenerRelnamePidIndex};
|
||||||
|
char *Name_pg_opclass_indices[Num_pg_opclass_indices] =
|
||||||
|
{OpclassNameIndex, OpclassDeftypeIndex};
|
||||||
|
char *Name_pg_operator_indices[Num_pg_operator_indices] =
|
||||||
|
{OperatorOidIndex, OperatorNameIndex};
|
||||||
|
char *Name_pg_proc_indices[Num_pg_proc_indices] =
|
||||||
|
{ProcedureOidIndex, ProcedureNameIndex};
|
||||||
|
char *Name_pg_relcheck_indices[Num_pg_relcheck_indices] =
|
||||||
|
{RelCheckIndex};
|
||||||
|
char *Name_pg_rewrite_indices[Num_pg_rewrite_indices] =
|
||||||
|
{RewriteOidIndex, RewriteRulenameIndex};
|
||||||
|
char *Name_pg_shadow_indices[Num_pg_shadow_indices] =
|
||||||
|
{ShadowNameIndex, ShadowSysidIndex};
|
||||||
|
char *Name_pg_trigger_indices[Num_pg_trigger_indices] =
|
||||||
|
{TriggerRelidIndex, TriggerConstrNameIndex, TriggerConstrRelidIndex};
|
||||||
|
char *Name_pg_type_indices[Num_pg_type_indices] =
|
||||||
|
{TypeNameIndex, TypeOidIndex};
|
||||||
|
char *Name_pg_description_indices[Num_pg_description_indices] =
|
||||||
|
{DescriptionObjIndex};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -264,6 +279,56 @@ CatalogIndexFetchTuple(Relation heapRelation,
|
|||||||
* (that is, functional or normal) and what arguments the cache lookup
|
* (that is, functional or normal) and what arguments the cache lookup
|
||||||
* requires. Each routine returns the heap tuple that qualifies.
|
* requires. Each routine returns the heap tuple that qualifies.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
AggregateNameTypeIndexScan(Relation heapRelation, char *aggName, Oid aggType)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[2];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_NAMEEQ,
|
||||||
|
PointerGetDatum(aggName));
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[1],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 2,
|
||||||
|
(RegProcedure) F_OIDEQ,
|
||||||
|
ObjectIdGetDatum(aggType));
|
||||||
|
|
||||||
|
idesc = index_openr(AggregateNameTypeIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 2);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
AmNameIndexScan(Relation heapRelation, char *amName)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[1];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_NAMEEQ,
|
||||||
|
PointerGetDatum(amName));
|
||||||
|
|
||||||
|
idesc = index_openr(AmNameIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
HeapTuple
|
HeapTuple
|
||||||
AccessMethodOpidIndexScan(Relation heapRelation,
|
AccessMethodOpidIndexScan(Relation heapRelation,
|
||||||
Oid claid,
|
Oid claid,
|
||||||
@ -335,9 +400,10 @@ AccessMethodStrategyIndexScan(Relation heapRelation,
|
|||||||
|
|
||||||
return tuple;
|
return tuple;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HeapTuple
|
HeapTuple
|
||||||
AttributeNameIndexScan(Relation heapRelation,
|
AttributeRelidNameIndexScan(Relation heapRelation,
|
||||||
Oid relid,
|
Oid relid,
|
||||||
char *attname)
|
char *attname)
|
||||||
{
|
{
|
||||||
@ -357,7 +423,7 @@ AttributeNameIndexScan(Relation heapRelation,
|
|||||||
(RegProcedure) F_NAMEEQ,
|
(RegProcedure) F_NAMEEQ,
|
||||||
NameGetDatum(attname));
|
NameGetDatum(attname));
|
||||||
|
|
||||||
idesc = index_openr(AttributeNameIndex);
|
idesc = index_openr(AttributeRelidNameIndex);
|
||||||
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 2);
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 2);
|
||||||
|
|
||||||
index_close(idesc);
|
index_close(idesc);
|
||||||
@ -367,7 +433,7 @@ AttributeNameIndexScan(Relation heapRelation,
|
|||||||
|
|
||||||
|
|
||||||
HeapTuple
|
HeapTuple
|
||||||
AttributeNumIndexScan(Relation heapRelation,
|
AttributeRelidNumIndexScan(Relation heapRelation,
|
||||||
Oid relid,
|
Oid relid,
|
||||||
AttrNumber attnum)
|
AttrNumber attnum)
|
||||||
{
|
{
|
||||||
@ -387,7 +453,7 @@ AttributeNumIndexScan(Relation heapRelation,
|
|||||||
(RegProcedure) F_INT2EQ,
|
(RegProcedure) F_INT2EQ,
|
||||||
Int16GetDatum(attnum));
|
Int16GetDatum(attnum));
|
||||||
|
|
||||||
idesc = index_openr(AttributeNumIndex);
|
idesc = index_openr(AttributeRelidNumIndex);
|
||||||
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 2);
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 2);
|
||||||
|
|
||||||
index_close(idesc);
|
index_close(idesc);
|
||||||
@ -395,6 +461,92 @@ AttributeNumIndexScan(Relation heapRelation,
|
|||||||
return tuple;
|
return tuple;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
OpclassDeftypeIndexScan(Relation heapRelation, Oid defType)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[1];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_OIDEQ,
|
||||||
|
ObjectIdGetDatum(defType));
|
||||||
|
|
||||||
|
idesc = index_openr(OpclassDeftypeIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
OpclassNameIndexScan(Relation heapRelation, char *opcName)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[1];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_NAMEEQ,
|
||||||
|
PointerGetDatum(opcName));
|
||||||
|
|
||||||
|
idesc = index_openr(OpclassNameIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
GroupNameIndexScan(Relation heapRelation, char *groName)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[1];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_NAMEEQ,
|
||||||
|
PointerGetDatum(groName));
|
||||||
|
|
||||||
|
idesc = index_openr(GroupNameIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
GroupSysidIndexScan(Relation heapRelation, int4 sysId)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[1];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_INT4EQ,
|
||||||
|
Int32GetDatum(sysId));
|
||||||
|
|
||||||
|
idesc = index_openr(GroupSysidIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
HeapTuple
|
HeapTuple
|
||||||
IndexRelidIndexScan(Relation heapRelation, Oid relid)
|
IndexRelidIndexScan(Relation heapRelation, Oid relid)
|
||||||
{
|
{
|
||||||
@ -417,9 +569,59 @@ IndexRelidIndexScan(Relation heapRelation, Oid relid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
InheritsRelidSeqnoIndexScan(Relation heapRelation,
|
||||||
|
Oid relid,
|
||||||
|
int4 seqno)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[2];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_OIDEQ,
|
||||||
|
ObjectIdGetDatum(relid));
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[1],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 2,
|
||||||
|
(RegProcedure) F_INT4EQ,
|
||||||
|
Int32GetDatum(seqno));
|
||||||
|
|
||||||
|
idesc = index_openr(InheritsRelidSeqnoIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 2);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
HeapTuple
|
HeapTuple
|
||||||
ProcedureOidIndexScan(Relation heapRelation, Oid procId)
|
LanguageNameIndexScan(Relation heapRelation, char *lanName)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[1];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_NAMEEQ,
|
||||||
|
PointerGetDatum(lanName));
|
||||||
|
|
||||||
|
idesc = index_openr(LanguageNameIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
LanguageOidIndexScan(Relation heapRelation, Oid lanId)
|
||||||
{
|
{
|
||||||
Relation idesc;
|
Relation idesc;
|
||||||
ScanKeyData skey[1];
|
ScanKeyData skey[1];
|
||||||
@ -429,9 +631,102 @@ ProcedureOidIndexScan(Relation heapRelation, Oid procId)
|
|||||||
(bits16) 0x0,
|
(bits16) 0x0,
|
||||||
(AttrNumber) 1,
|
(AttrNumber) 1,
|
||||||
(RegProcedure) F_OIDEQ,
|
(RegProcedure) F_OIDEQ,
|
||||||
ObjectIdGetDatum(procId));
|
ObjectIdGetDatum(lanId));
|
||||||
|
|
||||||
idesc = index_openr(ProcedureOidIndex);
|
idesc = index_openr(LanguageOidIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
ListenerRelnamePidIndexScan(Relation heapRelation, char *relName, int4 pid)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[2];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_NAMEEQ,
|
||||||
|
PointerGetDatum(relName));
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[1],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 2,
|
||||||
|
(RegProcedure) F_INT4EQ,
|
||||||
|
Int32GetDatum(pid));
|
||||||
|
|
||||||
|
idesc = index_openr(ListenerRelnamePidIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 2);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
OperatorNameIndexScan(Relation heapRelation,
|
||||||
|
char *oprName,
|
||||||
|
Oid oprLeft,
|
||||||
|
Oid oprRight,
|
||||||
|
char oprKind)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[4];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_NAMEEQ,
|
||||||
|
PointerGetDatum(oprName));
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[1],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 2,
|
||||||
|
(RegProcedure) F_OIDEQ,
|
||||||
|
ObjectIdGetDatum(oprLeft));
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[2],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 3,
|
||||||
|
(RegProcedure) F_OIDEQ,
|
||||||
|
ObjectIdGetDatum(oprRight));
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[3],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 4,
|
||||||
|
(RegProcedure) F_CHAREQ,
|
||||||
|
CharGetDatum(oprKind));
|
||||||
|
|
||||||
|
idesc = index_openr(OperatorNameIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 4);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
OperatorOidIndexScan(Relation heapRelation, Oid oprId)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[1];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_OIDEQ,
|
||||||
|
ObjectIdGetDatum(oprId));
|
||||||
|
|
||||||
|
idesc = index_openr(OperatorOidIndex);
|
||||||
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
||||||
|
|
||||||
index_close(idesc);
|
index_close(idesc);
|
||||||
@ -478,7 +773,7 @@ ProcedureNameIndexScan(Relation heapRelation,
|
|||||||
|
|
||||||
|
|
||||||
HeapTuple
|
HeapTuple
|
||||||
TypeOidIndexScan(Relation heapRelation, Oid typeId)
|
ProcedureOidIndexScan(Relation heapRelation, Oid procId)
|
||||||
{
|
{
|
||||||
Relation idesc;
|
Relation idesc;
|
||||||
ScanKeyData skey[1];
|
ScanKeyData skey[1];
|
||||||
@ -488,31 +783,9 @@ TypeOidIndexScan(Relation heapRelation, Oid typeId)
|
|||||||
(bits16) 0x0,
|
(bits16) 0x0,
|
||||||
(AttrNumber) 1,
|
(AttrNumber) 1,
|
||||||
(RegProcedure) F_OIDEQ,
|
(RegProcedure) F_OIDEQ,
|
||||||
ObjectIdGetDatum(typeId));
|
ObjectIdGetDatum(procId));
|
||||||
|
|
||||||
idesc = index_openr(TypeOidIndex);
|
idesc = index_openr(ProcedureOidIndex);
|
||||||
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
|
||||||
|
|
||||||
index_close(idesc);
|
|
||||||
|
|
||||||
return tuple;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
HeapTuple
|
|
||||||
TypeNameIndexScan(Relation heapRelation, char *typeName)
|
|
||||||
{
|
|
||||||
Relation idesc;
|
|
||||||
ScanKeyData skey[1];
|
|
||||||
HeapTuple tuple;
|
|
||||||
|
|
||||||
ScanKeyEntryInitialize(&skey[0],
|
|
||||||
(bits16) 0x0,
|
|
||||||
(AttrNumber) 1,
|
|
||||||
(RegProcedure) F_NAMEEQ,
|
|
||||||
PointerGetDatum(typeName));
|
|
||||||
|
|
||||||
idesc = index_openr(TypeNameIndex);
|
|
||||||
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
||||||
|
|
||||||
index_close(idesc);
|
index_close(idesc);
|
||||||
@ -562,3 +835,134 @@ ClassOidIndexScan(Relation heapRelation, Oid relId)
|
|||||||
|
|
||||||
return tuple;
|
return tuple;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
RewriteRulenameIndexScan(Relation heapRelation, char *ruleName)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[1];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_NAMEEQ,
|
||||||
|
PointerGetDatum(ruleName));
|
||||||
|
|
||||||
|
idesc = index_openr(RewriteRulenameIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
RewriteOidIndexScan(Relation heapRelation, Oid rewriteId)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[1];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_OIDEQ,
|
||||||
|
ObjectIdGetDatum(rewriteId));
|
||||||
|
|
||||||
|
idesc = index_openr(RewriteOidIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
TypeNameIndexScan(Relation heapRelation, char *typeName)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[1];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_NAMEEQ,
|
||||||
|
PointerGetDatum(typeName));
|
||||||
|
|
||||||
|
idesc = index_openr(TypeNameIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
TypeOidIndexScan(Relation heapRelation, Oid typeId)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[1];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_OIDEQ,
|
||||||
|
ObjectIdGetDatum(typeId));
|
||||||
|
|
||||||
|
idesc = index_openr(TypeOidIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
ShadowNameIndexScan(Relation heapRelation, char *useName)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[1];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_NAMEEQ,
|
||||||
|
PointerGetDatum(useName));
|
||||||
|
|
||||||
|
idesc = index_openr(ShadowNameIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HeapTuple
|
||||||
|
ShadowSysidIndexScan(Relation heapRelation, int4 sysId)
|
||||||
|
{
|
||||||
|
Relation idesc;
|
||||||
|
ScanKeyData skey[1];
|
||||||
|
HeapTuple tuple;
|
||||||
|
|
||||||
|
ScanKeyEntryInitialize(&skey[0],
|
||||||
|
(bits16) 0x0,
|
||||||
|
(AttrNumber) 1,
|
||||||
|
(RegProcedure) F_INT4EQ,
|
||||||
|
Int32GetDatum(sysId));
|
||||||
|
|
||||||
|
idesc = index_openr(ShadowSysidIndex);
|
||||||
|
tuple = CatalogIndexFetchTuple(heapRelation, idesc, skey, 1);
|
||||||
|
|
||||||
|
index_close(idesc);
|
||||||
|
return tuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.25 1999/09/18 19:06:33 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.26 1999/11/22 17:55:58 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include "access/heapam.h"
|
#include "access/heapam.h"
|
||||||
#include "catalog/catname.h"
|
#include "catalog/catname.h"
|
||||||
|
#include "catalog/indexing.h"
|
||||||
#include "catalog/pg_aggregate.h"
|
#include "catalog/pg_aggregate.h"
|
||||||
#include "catalog/pg_proc.h"
|
#include "catalog/pg_proc.h"
|
||||||
#include "catalog/pg_type.h"
|
#include "catalog/pg_type.h"
|
||||||
@ -83,7 +84,7 @@ AggregateCreate(char *aggName,
|
|||||||
if (!aggtransfn1Name && !aggtransfn2Name)
|
if (!aggtransfn1Name && !aggtransfn2Name)
|
||||||
elog(ERROR, "AggregateCreate: aggregate must have at least one transition function");
|
elog(ERROR, "AggregateCreate: aggregate must have at least one transition function");
|
||||||
|
|
||||||
tup = SearchSysCacheTuple(TYPNAME,
|
tup = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(aggbasetypeName),
|
PointerGetDatum(aggbasetypeName),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tup))
|
if (!HeapTupleIsValid(tup))
|
||||||
@ -92,7 +93,7 @@ AggregateCreate(char *aggName,
|
|||||||
|
|
||||||
if (aggtransfn1Name)
|
if (aggtransfn1Name)
|
||||||
{
|
{
|
||||||
tup = SearchSysCacheTuple(TYPNAME,
|
tup = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(aggtransfn1typeName),
|
PointerGetDatum(aggtransfn1typeName),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tup))
|
if (!HeapTupleIsValid(tup))
|
||||||
@ -102,7 +103,7 @@ AggregateCreate(char *aggName,
|
|||||||
|
|
||||||
fnArgs[0] = xret1;
|
fnArgs[0] = xret1;
|
||||||
fnArgs[1] = xbase;
|
fnArgs[1] = xbase;
|
||||||
tup = SearchSysCacheTuple(PRONAME,
|
tup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(aggtransfn1Name),
|
PointerGetDatum(aggtransfn1Name),
|
||||||
Int32GetDatum(2),
|
Int32GetDatum(2),
|
||||||
PointerGetDatum(fnArgs),
|
PointerGetDatum(fnArgs),
|
||||||
@ -122,7 +123,7 @@ AggregateCreate(char *aggName,
|
|||||||
|
|
||||||
if (aggtransfn2Name)
|
if (aggtransfn2Name)
|
||||||
{
|
{
|
||||||
tup = SearchSysCacheTuple(TYPNAME,
|
tup = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(aggtransfn2typeName),
|
PointerGetDatum(aggtransfn2typeName),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tup))
|
if (!HeapTupleIsValid(tup))
|
||||||
@ -132,7 +133,7 @@ AggregateCreate(char *aggName,
|
|||||||
|
|
||||||
fnArgs[0] = xret2;
|
fnArgs[0] = xret2;
|
||||||
fnArgs[1] = 0;
|
fnArgs[1] = 0;
|
||||||
tup = SearchSysCacheTuple(PRONAME,
|
tup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(aggtransfn2Name),
|
PointerGetDatum(aggtransfn2Name),
|
||||||
Int32GetDatum(1),
|
Int32GetDatum(1),
|
||||||
PointerGetDatum(fnArgs),
|
PointerGetDatum(fnArgs),
|
||||||
@ -168,7 +169,7 @@ AggregateCreate(char *aggName,
|
|||||||
{
|
{
|
||||||
fnArgs[0] = xret1;
|
fnArgs[0] = xret1;
|
||||||
fnArgs[1] = xret2;
|
fnArgs[1] = xret2;
|
||||||
tup = SearchSysCacheTuple(PRONAME,
|
tup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(aggfinalfnName),
|
PointerGetDatum(aggfinalfnName),
|
||||||
Int32GetDatum(2),
|
Int32GetDatum(2),
|
||||||
PointerGetDatum(fnArgs),
|
PointerGetDatum(fnArgs),
|
||||||
@ -242,6 +243,16 @@ AggregateCreate(char *aggName,
|
|||||||
elog(ERROR, "AggregateCreate: heap_formtuple failed");
|
elog(ERROR, "AggregateCreate: heap_formtuple failed");
|
||||||
if (!OidIsValid(heap_insert(aggdesc, tup)))
|
if (!OidIsValid(heap_insert(aggdesc, tup)))
|
||||||
elog(ERROR, "AggregateCreate: heap_insert failed");
|
elog(ERROR, "AggregateCreate: heap_insert failed");
|
||||||
|
|
||||||
|
if (RelationGetForm(aggdesc)->relhasindex)
|
||||||
|
{
|
||||||
|
Relation idescs[Num_pg_aggregate_indices];
|
||||||
|
|
||||||
|
CatalogOpenIndices(Num_pg_aggregate_indices, Name_pg_aggregate_indices, idescs);
|
||||||
|
CatalogIndexInsert(idescs, Num_pg_aggregate_indices, aggdesc, tup);
|
||||||
|
CatalogCloseIndices(Num_pg_aggregate_indices, idescs);
|
||||||
|
}
|
||||||
|
|
||||||
heap_close(aggdesc, RowExclusiveLock);
|
heap_close(aggdesc, RowExclusiveLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,7 +312,7 @@ AggNameGetInitVal(char *aggName, Oid basetype, int xfuncno, bool *isNull)
|
|||||||
|
|
||||||
heap_close(aggRel, AccessShareLock);
|
heap_close(aggRel, AccessShareLock);
|
||||||
|
|
||||||
tup = SearchSysCacheTuple(TYPOID,
|
tup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(transtype),
|
ObjectIdGetDatum(transtype),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tup))
|
if (!HeapTupleIsValid(tup))
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.42 1999/09/18 19:06:33 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.43 1999/11/22 17:55:58 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* these routines moved here from commands/define.c and somewhat cleaned up.
|
* these routines moved here from commands/define.c and somewhat cleaned up.
|
||||||
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "access/heapam.h"
|
#include "access/heapam.h"
|
||||||
#include "catalog/catname.h"
|
#include "catalog/catname.h"
|
||||||
|
#include "catalog/indexing.h"
|
||||||
#include "catalog/pg_operator.h"
|
#include "catalog/pg_operator.h"
|
||||||
#include "catalog/pg_proc.h"
|
#include "catalog/pg_proc.h"
|
||||||
#include "catalog/pg_type.h"
|
#include "catalog/pg_type.h"
|
||||||
@ -292,6 +293,15 @@ OperatorShellMakeWithOpenRelation(Relation pg_operator_desc,
|
|||||||
heap_insert(pg_operator_desc, tup);
|
heap_insert(pg_operator_desc, tup);
|
||||||
operatorObjectId = tup->t_data->t_oid;
|
operatorObjectId = tup->t_data->t_oid;
|
||||||
|
|
||||||
|
if (RelationGetForm(pg_operator_desc)->relhasindex)
|
||||||
|
{
|
||||||
|
Relation idescs[Num_pg_operator_indices];
|
||||||
|
|
||||||
|
CatalogOpenIndices(Num_pg_operator_indices, Name_pg_operator_indices, idescs);
|
||||||
|
CatalogIndexInsert(idescs, Num_pg_operator_indices, pg_operator_desc, tup);
|
||||||
|
CatalogCloseIndices(Num_pg_operator_indices, idescs);
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* free the tuple and return the operator oid
|
* free the tuple and return the operator oid
|
||||||
* ----------------
|
* ----------------
|
||||||
@ -563,7 +573,7 @@ OperatorDef(char *operatorName,
|
|||||||
typeId[1] = rightTypeId;
|
typeId[1] = rightTypeId;
|
||||||
nargs = 2;
|
nargs = 2;
|
||||||
}
|
}
|
||||||
tup = SearchSysCacheTuple(PRONAME,
|
tup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(procedureName),
|
PointerGetDatum(procedureName),
|
||||||
Int32GetDatum(nargs),
|
Int32GetDatum(nargs),
|
||||||
PointerGetDatum(typeId),
|
PointerGetDatum(typeId),
|
||||||
@ -588,7 +598,7 @@ OperatorDef(char *operatorName,
|
|||||||
typeId[2] = INT2OID; /* attribute number */
|
typeId[2] = INT2OID; /* attribute number */
|
||||||
typeId[3] = 0; /* value - can be any type */
|
typeId[3] = 0; /* value - can be any type */
|
||||||
typeId[4] = INT4OID; /* flags - left or right selectivity */
|
typeId[4] = INT4OID; /* flags - left or right selectivity */
|
||||||
tup = SearchSysCacheTuple(PRONAME,
|
tup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(restrictionName),
|
PointerGetDatum(restrictionName),
|
||||||
Int32GetDatum(5),
|
Int32GetDatum(5),
|
||||||
PointerGetDatum(typeId),
|
PointerGetDatum(typeId),
|
||||||
@ -614,7 +624,7 @@ OperatorDef(char *operatorName,
|
|||||||
typeId[3] = OIDOID; /* relation OID 2 */
|
typeId[3] = OIDOID; /* relation OID 2 */
|
||||||
typeId[4] = INT2OID; /* attribute number 2 */
|
typeId[4] = INT2OID; /* attribute number 2 */
|
||||||
|
|
||||||
tup = SearchSysCacheTuple(PRONAME,
|
tup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(joinName),
|
PointerGetDatum(joinName),
|
||||||
Int32GetDatum(5),
|
Int32GetDatum(5),
|
||||||
PointerGetDatum(typeId),
|
PointerGetDatum(typeId),
|
||||||
@ -759,7 +769,6 @@ OperatorDef(char *operatorName,
|
|||||||
/*
|
/*
|
||||||
* If we are adding to an operator shell, get its t_self
|
* If we are adding to an operator shell, get its t_self
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (operatorObjectId)
|
if (operatorObjectId)
|
||||||
{
|
{
|
||||||
opKey[0].sk_argument = PointerGetDatum(operatorName);
|
opKey[0].sk_argument = PointerGetDatum(operatorName);
|
||||||
@ -797,6 +806,16 @@ OperatorDef(char *operatorName,
|
|||||||
|
|
||||||
heap_insert(pg_operator_desc, tup);
|
heap_insert(pg_operator_desc, tup);
|
||||||
operatorObjectId = tup->t_data->t_oid;
|
operatorObjectId = tup->t_data->t_oid;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RelationGetForm(pg_operator_desc)->relhasindex)
|
||||||
|
{
|
||||||
|
Relation idescs[Num_pg_operator_indices];
|
||||||
|
|
||||||
|
CatalogOpenIndices(Num_pg_operator_indices, Name_pg_operator_indices, idescs);
|
||||||
|
CatalogIndexInsert(idescs, Num_pg_operator_indices, pg_operator_desc, tup);
|
||||||
|
CatalogCloseIndices(Num_pg_operator_indices, idescs);
|
||||||
}
|
}
|
||||||
|
|
||||||
heap_close(pg_operator_desc, RowExclusiveLock);
|
heap_close(pg_operator_desc, RowExclusiveLock);
|
||||||
@ -904,7 +923,15 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
|
|||||||
setheapoverride(true);
|
setheapoverride(true);
|
||||||
heap_replace(pg_operator_desc, &tup->t_self, tup, NULL);
|
heap_replace(pg_operator_desc, &tup->t_self, tup, NULL);
|
||||||
setheapoverride(false);
|
setheapoverride(false);
|
||||||
|
|
||||||
|
if (RelationGetForm(pg_operator_desc)->relhasindex)
|
||||||
|
{
|
||||||
|
Relation idescs[Num_pg_operator_indices];
|
||||||
|
|
||||||
|
CatalogOpenIndices(Num_pg_operator_indices, Name_pg_operator_indices, idescs);
|
||||||
|
CatalogIndexInsert(idescs, Num_pg_operator_indices, pg_operator_desc, tup);
|
||||||
|
CatalogCloseIndices(Num_pg_operator_indices, idescs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
heap_endscan(pg_operator_scan);
|
heap_endscan(pg_operator_scan);
|
||||||
@ -931,6 +958,15 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
|
|||||||
heap_replace(pg_operator_desc, &tup->t_self, tup, NULL);
|
heap_replace(pg_operator_desc, &tup->t_self, tup, NULL);
|
||||||
setheapoverride(false);
|
setheapoverride(false);
|
||||||
|
|
||||||
|
if (RelationGetForm(pg_operator_desc)->relhasindex)
|
||||||
|
{
|
||||||
|
Relation idescs[Num_pg_operator_indices];
|
||||||
|
|
||||||
|
CatalogOpenIndices(Num_pg_operator_indices, Name_pg_operator_indices, idescs);
|
||||||
|
CatalogIndexInsert(idescs, Num_pg_operator_indices, pg_operator_desc, tup);
|
||||||
|
CatalogCloseIndices(Num_pg_operator_indices, idescs);
|
||||||
|
}
|
||||||
|
|
||||||
values[Anum_pg_operator_oprcom - 1] = (Datum) NULL;
|
values[Anum_pg_operator_oprcom - 1] = (Datum) NULL;
|
||||||
replaces[Anum_pg_operator_oprcom - 1] = ' ';
|
replaces[Anum_pg_operator_oprcom - 1] = ' ';
|
||||||
}
|
}
|
||||||
@ -961,10 +997,20 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
|
|||||||
setheapoverride(true);
|
setheapoverride(true);
|
||||||
heap_replace(pg_operator_desc, &tup->t_self, tup, NULL);
|
heap_replace(pg_operator_desc, &tup->t_self, tup, NULL);
|
||||||
setheapoverride(false);
|
setheapoverride(false);
|
||||||
|
|
||||||
|
if (RelationGetForm(pg_operator_desc)->relhasindex)
|
||||||
|
{
|
||||||
|
Relation idescs[Num_pg_operator_indices];
|
||||||
|
|
||||||
|
CatalogOpenIndices(Num_pg_operator_indices, Name_pg_operator_indices, idescs);
|
||||||
|
CatalogIndexInsert(idescs, Num_pg_operator_indices, pg_operator_desc, tup);
|
||||||
|
CatalogCloseIndices(Num_pg_operator_indices, idescs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
heap_endscan(pg_operator_scan);
|
heap_endscan(pg_operator_scan);
|
||||||
|
|
||||||
|
|
||||||
heap_close(pg_operator_desc, RowExclusiveLock);
|
heap_close(pg_operator_desc, RowExclusiveLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.35 1999/09/30 10:31:42 wieck Exp $
|
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.36 1999/11/22 17:55:58 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -109,7 +109,7 @@ ProcedureCreate(char *procedureName,
|
|||||||
typev[parameterCount++] = toid;
|
typev[parameterCount++] = toid;
|
||||||
}
|
}
|
||||||
|
|
||||||
tup = SearchSysCacheTuple(PRONAME,
|
tup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(procedureName),
|
PointerGetDatum(procedureName),
|
||||||
UInt16GetDatum(parameterCount),
|
UInt16GetDatum(parameterCount),
|
||||||
PointerGetDatum(typev),
|
PointerGetDatum(typev),
|
||||||
@ -157,7 +157,7 @@ ProcedureCreate(char *procedureName,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tup = SearchSysCacheTuple(LANNAME,
|
tup = SearchSysCacheTuple(LANGNAME,
|
||||||
PointerGetDatum(languageName),
|
PointerGetDatum(languageName),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.41 1999/09/18 19:06:34 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.42 1999/11/22 17:55:58 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -395,7 +395,7 @@ TypeCreate(char *typeName,
|
|||||||
*/
|
*/
|
||||||
MemSet(argList, 0, 8 * sizeof(Oid));
|
MemSet(argList, 0, 8 * sizeof(Oid));
|
||||||
|
|
||||||
tup = SearchSysCacheTuple(PRONAME,
|
tup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(procname),
|
PointerGetDatum(procname),
|
||||||
Int32GetDatum(1),
|
Int32GetDatum(1),
|
||||||
PointerGetDatum(argList),
|
PointerGetDatum(argList),
|
||||||
@ -425,7 +425,7 @@ TypeCreate(char *typeName,
|
|||||||
nargs = 3;
|
nargs = 3;
|
||||||
argList[2] = INT4OID;
|
argList[2] = INT4OID;
|
||||||
}
|
}
|
||||||
tup = SearchSysCacheTuple(PRONAME,
|
tup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(procname),
|
PointerGetDatum(procname),
|
||||||
Int32GetDatum(nargs),
|
Int32GetDatum(nargs),
|
||||||
PointerGetDatum(argList),
|
PointerGetDatum(argList),
|
||||||
@ -536,7 +536,7 @@ TypeRename(char *oldTypeName, char *newTypeName)
|
|||||||
|
|
||||||
pg_type_desc = heap_openr(TypeRelationName, RowExclusiveLock);
|
pg_type_desc = heap_openr(TypeRelationName, RowExclusiveLock);
|
||||||
|
|
||||||
oldtup = SearchSysCacheTupleCopy(TYPNAME,
|
oldtup = SearchSysCacheTupleCopy(TYPENAME,
|
||||||
PointerGetDatum(oldTypeName),
|
PointerGetDatum(oldTypeName),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
@ -546,7 +546,7 @@ TypeRename(char *oldTypeName, char *newTypeName)
|
|||||||
elog(ERROR, "TypeRename: type %s not defined", oldTypeName);
|
elog(ERROR, "TypeRename: type %s not defined", oldTypeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
newtup = SearchSysCacheTuple(TYPNAME,
|
newtup = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(newTypeName),
|
PointerGetDatum(newTypeName),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(newtup))
|
if (HeapTupleIsValid(newtup))
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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 "access/heapam.h"
|
||||||
#include "catalog/catname.h"
|
#include "catalog/catname.h"
|
||||||
|
#include "catalog/indexing.h"
|
||||||
#include "catalog/pg_listener.h"
|
#include "catalog/pg_listener.h"
|
||||||
#include "commands/async.h"
|
#include "commands/async.h"
|
||||||
#include "lib/dllist.h"
|
#include "lib/dllist.h"
|
||||||
@ -464,7 +465,6 @@ AtCommit_Notify()
|
|||||||
|
|
||||||
if (listenerPID == MyProcPid)
|
if (listenerPID == MyProcPid)
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Self-notify: no need to bother with table update.
|
* Self-notify: no need to bother with table update.
|
||||||
* Indeed, we *must not* clear the notification field in
|
* Indeed, we *must not* clear the notification field in
|
||||||
@ -490,7 +490,6 @@ AtCommit_Notify()
|
|||||||
*/
|
*/
|
||||||
if (kill(listenerPID, SIGUSR2) < 0)
|
if (kill(listenerPID, SIGUSR2) < 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get rid of pg_listener entry if it refers to a PID
|
* Get rid of pg_listener entry if it refers to a PID
|
||||||
* that no longer exists. Presumably, that backend
|
* that no longer exists. Presumably, that backend
|
||||||
@ -511,6 +510,14 @@ AtCommit_Notify()
|
|||||||
rTuple = heap_modifytuple(lTuple, lRel,
|
rTuple = heap_modifytuple(lTuple, lRel,
|
||||||
value, nulls, repl);
|
value, nulls, repl);
|
||||||
heap_replace(lRel, &lTuple->t_self, rTuple, NULL);
|
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 */
|
/* Rewrite the tuple with 0 in notification column */
|
||||||
rTuple = heap_modifytuple(lTuple, lRel, value, nulls, repl);
|
rTuple = heap_modifytuple(lTuple, lRel, value, nulls, repl);
|
||||||
heap_replace(lRel, &lTuple->t_self, rTuple, NULL);
|
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);
|
heap_endscan(sRel);
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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;
|
FIgetnArgs(finfo) = natts;
|
||||||
FIgetProcOid(finfo) = Old_pg_index_Form->indproc;
|
FIgetProcOid(finfo) = Old_pg_index_Form->indproc;
|
||||||
|
|
||||||
pg_proc_Tuple = SearchSysCacheTuple(PROOID,
|
pg_proc_Tuple = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(Old_pg_index_Form->indproc),
|
ObjectIdGetDatum(Old_pg_index_Form->indproc),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* NOTES
|
||||||
* The PortalExecutorHeapMemory crap needs to be eliminated
|
* The PortalExecutorHeapMemory crap needs to be eliminated
|
||||||
@ -438,7 +438,7 @@ PerformAddAttribute(char *relationName,
|
|||||||
else
|
else
|
||||||
attnelems = 0;
|
attnelems = 0;
|
||||||
|
|
||||||
typeTuple = SearchSysCacheTuple(TYPNAME,
|
typeTuple = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(typename),
|
PointerGetDatum(typename),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
tform = (Form_pg_type) GETSTRUCT(typeTuple);
|
tform = (Form_pg_type) GETSTRUCT(typeTuple);
|
||||||
|
@ -395,7 +395,7 @@ void CommentDatabase(char *database, char *comment) {
|
|||||||
/*** Now, fetch user information ***/
|
/*** Now, fetch user information ***/
|
||||||
|
|
||||||
username = GetPgUserName();
|
username = GetPgUserName();
|
||||||
usertuple = SearchSysCacheTuple(USENAME, PointerGetDatum(username),
|
usertuple = SearchSysCacheTuple(USERNAME, PointerGetDatum(username),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(usertuple)) {
|
if (!HeapTupleIsValid(usertuple)) {
|
||||||
elog(ERROR, "current user '%s' does not exist", username);
|
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 ***/
|
/*** Next, find the rule's oid ***/
|
||||||
|
|
||||||
rewritetuple = SearchSysCacheTuple(REWRITENAME, PointerGetDatum(rule),
|
rewritetuple = SearchSysCacheTuple(RULENAME, PointerGetDatum(rule),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(rewritetuple)) {
|
if (!HeapTupleIsValid(rewritetuple)) {
|
||||||
elog(ERROR, "rule '%s' does not exist", rule);
|
elog(ERROR, "rule '%s' does not exist", rule);
|
||||||
@ -489,7 +489,7 @@ void CommentType(char *type, char *comment) {
|
|||||||
|
|
||||||
#ifndef NO_SECURITY
|
#ifndef NO_SECURITY
|
||||||
user = GetPgUserName();
|
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'",
|
elog(ERROR, "you are not permitted to comment on type '%s'",
|
||||||
type);
|
type);
|
||||||
}
|
}
|
||||||
@ -497,7 +497,7 @@ void CommentType(char *type, char *comment) {
|
|||||||
|
|
||||||
/*** Next, find the type's oid ***/
|
/*** Next, find the type's oid ***/
|
||||||
|
|
||||||
typetuple = SearchSysCacheTuple(TYPNAME, PointerGetDatum(type),
|
typetuple = SearchSysCacheTuple(TYPENAME, PointerGetDatum(type),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typetuple)) {
|
if (!HeapTupleIsValid(typetuple)) {
|
||||||
elog(ERROR, "type '%s' does not exist", type);
|
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) {
|
if (strcmp(argument, "opaque") == 0) {
|
||||||
argoids[i] = 0;
|
argoids[i] = 0;
|
||||||
} else {
|
} else {
|
||||||
argtuple = SearchSysCacheTuple(TYPNAME, PointerGetDatum(argument),
|
argtuple = SearchSysCacheTuple(TYPENAME, PointerGetDatum(argument),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(argtuple)) {
|
if (!HeapTupleIsValid(argtuple)) {
|
||||||
elog(ERROR, "function argument type '%s' does not exist",
|
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 ***/
|
/*** Now, find the corresponding oid for this procedure ***/
|
||||||
|
|
||||||
functuple = SearchSysCacheTuple(PRONAME, PointerGetDatum(function),
|
functuple = SearchSysCacheTuple(PROCNAME, PointerGetDatum(function),
|
||||||
Int32GetDatum(argcount),
|
Int32GetDatum(argcount),
|
||||||
PointerGetDatum(argoids), 0);
|
PointerGetDatum(argoids), 0);
|
||||||
|
|
||||||
@ -702,7 +702,7 @@ void CommentOperator(char *opername, List *arguments, char *comment) {
|
|||||||
|
|
||||||
/*** Attempt to fetch the operator oid ***/
|
/*** Attempt to fetch the operator oid ***/
|
||||||
|
|
||||||
optuple = SearchSysCacheTupleCopy(OPRNAME, PointerGetDatum(opername),
|
optuple = SearchSysCacheTupleCopy(OPERNAME, PointerGetDatum(opername),
|
||||||
ObjectIdGetDatum(leftoid),
|
ObjectIdGetDatum(leftoid),
|
||||||
ObjectIdGetDatum(rightoid),
|
ObjectIdGetDatum(rightoid),
|
||||||
CharGetDatum(oprtype));
|
CharGetDatum(oprtype));
|
||||||
@ -716,7 +716,7 @@ void CommentOperator(char *opername, List *arguments, char *comment) {
|
|||||||
|
|
||||||
#ifndef NO_SECURITY
|
#ifndef NO_SECURITY
|
||||||
user = GetPgUserName();
|
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'",
|
elog(ERROR, "you are not permitted to comment on operator '%s'",
|
||||||
opername);
|
opername);
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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;
|
HeapTuple typeTuple;
|
||||||
|
|
||||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(type),
|
ObjectIdGetDatum(type),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
@ -954,7 +954,7 @@ GetTypeElement(Oid type)
|
|||||||
{
|
{
|
||||||
HeapTuple typeTuple;
|
HeapTuple typeTuple;
|
||||||
|
|
||||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(type),
|
ObjectIdGetDatum(type),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
@ -970,7 +970,7 @@ GetInputFunction(Oid type)
|
|||||||
{
|
{
|
||||||
HeapTuple typeTuple;
|
HeapTuple typeTuple;
|
||||||
|
|
||||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(type),
|
ObjectIdGetDatum(type),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
@ -986,7 +986,7 @@ IsTypeByVal(Oid type)
|
|||||||
{
|
{
|
||||||
HeapTuple typeTuple;
|
HeapTuple typeTuple;
|
||||||
|
|
||||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(type),
|
ObjectIdGetDatum(type),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* form name, type and constraints
|
||||||
*/
|
*/
|
||||||
attributeName = NameStr(attribute->attname);
|
attributeName = NameStr(attribute->attname);
|
||||||
tuple = SearchSysCacheTuple(TYPOID,
|
tuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(attribute->atttypid),
|
ObjectIdGetDatum(attribute->atttypid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
Assert(HeapTupleIsValid(tuple));
|
Assert(HeapTupleIsValid(tuple));
|
||||||
@ -495,6 +495,16 @@ StoreCatalogInheritance(Oid relationId, List *supers)
|
|||||||
tuple = heap_formtuple(desc, datum, nullarr);
|
tuple = heap_formtuple(desc, datum, nullarr);
|
||||||
|
|
||||||
heap_insert(relation, tuple);
|
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);
|
pfree(tuple);
|
||||||
|
|
||||||
seqNumber += 1;
|
seqNumber += 1;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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];
|
char path[MAXPGPATH];
|
||||||
|
|
||||||
userName = GetPgUserName();
|
userName = GetPgUserName();
|
||||||
utup = SearchSysCacheTuple(USENAME,
|
utup = SearchSysCacheTuple(USERNAME,
|
||||||
PointerGetDatum(userName),
|
PointerGetDatum(userName),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
Assert(utup);
|
Assert(utup);
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* DESCRIPTION
|
||||||
* The "DefineFoo" routines take the parse tree and pick out the
|
* The "DefineFoo" routines take the parse tree and pick out the
|
||||||
@ -269,7 +269,7 @@ CreateFunction(ProcedureStmt *stmt, CommandDest dest)
|
|||||||
Form_pg_language languageStruct;
|
Form_pg_language languageStruct;
|
||||||
|
|
||||||
/* Lookup the language in the system cache */
|
/* Lookup the language in the system cache */
|
||||||
languageTuple = SearchSysCacheTuple(LANNAME,
|
languageTuple = SearchSysCacheTuple(LANGNAME,
|
||||||
PointerGetDatum(languageName),
|
PointerGetDatum(languageName),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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; */
|
/* FIgetnArgs(funcInfo) = numberOfAttributes; */
|
||||||
FIsetnArgs(funcInfo, numberOfAttributes);
|
FIsetnArgs(funcInfo, numberOfAttributes);
|
||||||
|
|
||||||
tuple = SearchSysCacheTuple(PROOID,
|
tuple = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(indproc),
|
ObjectIdGetDatum(indproc),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tuple))
|
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. */
|
/* we want the type so we can set the proper alignment, etc. */
|
||||||
if (attribute->typename == NULL)
|
if (attribute->typename == NULL)
|
||||||
{
|
{
|
||||||
tuple = SearchSysCacheTuple(TYPOID,
|
tuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(attform->atttypid),
|
ObjectIdGetDatum(attform->atttypid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tuple))
|
if (!HeapTupleIsValid(tuple))
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include "access/heapam.h"
|
#include "access/heapam.h"
|
||||||
#include "catalog/catname.h"
|
#include "catalog/catname.h"
|
||||||
|
#include "catalog/indexing.h"
|
||||||
#include "catalog/pg_language.h"
|
#include "catalog/pg_language.h"
|
||||||
#include "catalog/pg_proc.h"
|
#include "catalog/pg_proc.h"
|
||||||
#include "catalog/pg_shadow.h"
|
#include "catalog/pg_shadow.h"
|
||||||
@ -75,7 +76,7 @@ CreateProceduralLanguage(CreatePLangStmt *stmt)
|
|||||||
*/
|
*/
|
||||||
case_translate_language_name(stmt->plname, languageName);
|
case_translate_language_name(stmt->plname, languageName);
|
||||||
|
|
||||||
langTup = SearchSysCacheTuple(LANNAME,
|
langTup = SearchSysCacheTuple(LANGNAME,
|
||||||
PointerGetDatum(languageName),
|
PointerGetDatum(languageName),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(langTup))
|
if (HeapTupleIsValid(langTup))
|
||||||
@ -87,7 +88,7 @@ CreateProceduralLanguage(CreatePLangStmt *stmt)
|
|||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
memset(typev, 0, sizeof(typev));
|
memset(typev, 0, sizeof(typev));
|
||||||
procTup = SearchSysCacheTuple(PRONAME,
|
procTup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(stmt->plhandler),
|
PointerGetDatum(stmt->plhandler),
|
||||||
Int32GetDatum(0),
|
Int32GetDatum(0),
|
||||||
PointerGetDatum(typev),
|
PointerGetDatum(typev),
|
||||||
@ -127,6 +128,15 @@ CreateProceduralLanguage(CreatePLangStmt *stmt)
|
|||||||
|
|
||||||
heap_insert(rel, tup);
|
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);
|
heap_close(rel, RowExclusiveLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +171,7 @@ DropProceduralLanguage(DropPLangStmt *stmt)
|
|||||||
|
|
||||||
rel = heap_openr(LanguageRelationName, RowExclusiveLock);
|
rel = heap_openr(LanguageRelationName, RowExclusiveLock);
|
||||||
|
|
||||||
langTup = SearchSysCacheTupleCopy(LANNAME,
|
langTup = SearchSysCacheTupleCopy(LANGNAME,
|
||||||
PointerGetDatum(languageName),
|
PointerGetDatum(languageName),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(langTup))
|
if (!HeapTupleIsValid(langTup))
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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);
|
relation = heap_openr(OperatorRelationName, RowExclusiveLock);
|
||||||
|
|
||||||
tup = SearchSysCacheTupleCopy(OPRNAME,
|
tup = SearchSysCacheTupleCopy(OPERNAME,
|
||||||
PointerGetDatum(operatorName),
|
PointerGetDatum(operatorName),
|
||||||
ObjectIdGetDatum(typeId1),
|
ObjectIdGetDatum(typeId1),
|
||||||
ObjectIdGetDatum(typeId2),
|
ObjectIdGetDatum(typeId2),
|
||||||
@ -90,7 +90,7 @@ RemoveOperator(char *operatorName, /* operator name */
|
|||||||
userName = GetPgUserName();
|
userName = GetPgUserName();
|
||||||
if (!pg_ownercheck(userName,
|
if (!pg_ownercheck(userName,
|
||||||
(char *) ObjectIdGetDatum(tup->t_data->t_oid),
|
(char *) ObjectIdGetDatum(tup->t_data->t_oid),
|
||||||
OPROID))
|
OPEROID))
|
||||||
elog(ERROR, "RemoveOperator: operator '%s': permission denied",
|
elog(ERROR, "RemoveOperator: operator '%s': permission denied",
|
||||||
operatorName);
|
operatorName);
|
||||||
#endif
|
#endif
|
||||||
@ -259,14 +259,14 @@ RemoveType(char *typeName) /* type name to be removed */
|
|||||||
|
|
||||||
#ifndef NO_SECURITY
|
#ifndef NO_SECURITY
|
||||||
userName = GetPgUserName();
|
userName = GetPgUserName();
|
||||||
if (!pg_ownercheck(userName, typeName, TYPNAME))
|
if (!pg_ownercheck(userName, typeName, TYPENAME))
|
||||||
elog(ERROR, "RemoveType: type '%s': permission denied",
|
elog(ERROR, "RemoveType: type '%s': permission denied",
|
||||||
typeName);
|
typeName);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
relation = heap_openr(TypeRelationName, RowExclusiveLock);
|
relation = heap_openr(TypeRelationName, RowExclusiveLock);
|
||||||
|
|
||||||
tup = SearchSysCacheTuple(TYPNAME,
|
tup = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(typeName),
|
PointerGetDatum(typeName),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tup))
|
if (!HeapTupleIsValid(tup))
|
||||||
@ -285,7 +285,7 @@ RemoveType(char *typeName) /* type name to be removed */
|
|||||||
|
|
||||||
/* Now, Delete the "array of" that type */
|
/* Now, Delete the "array of" that type */
|
||||||
shadow_type = makeArrayTypeName(typeName);
|
shadow_type = makeArrayTypeName(typeName);
|
||||||
tup = SearchSysCacheTuple(TYPNAME,
|
tup = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(shadow_type),
|
PointerGetDatum(shadow_type),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tup))
|
if (!HeapTupleIsValid(tup))
|
||||||
@ -331,7 +331,7 @@ RemoveFunction(char *functionName, /* function name to be removed */
|
|||||||
argList[i] = 0;
|
argList[i] = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tup = SearchSysCacheTuple(TYPNAME,
|
tup = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(typename),
|
PointerGetDatum(typename),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
@ -351,7 +351,7 @@ RemoveFunction(char *functionName, /* function name to be removed */
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
relation = heap_openr(ProcedureRelationName, RowExclusiveLock);
|
relation = heap_openr(ProcedureRelationName, RowExclusiveLock);
|
||||||
tup = SearchSysCacheTuple(PRONAME,
|
tup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(functionName),
|
PointerGetDatum(functionName),
|
||||||
Int32GetDatum(nargs),
|
Int32GetDatum(nargs),
|
||||||
PointerGetDatum(argList),
|
PointerGetDatum(argList),
|
||||||
|
@ -144,7 +144,7 @@ CreateTrigger(CreateTrigStmt *stmt)
|
|||||||
heap_endscan(tgscan);
|
heap_endscan(tgscan);
|
||||||
|
|
||||||
MemSet(fargtypes, 0, 8 * sizeof(Oid));
|
MemSet(fargtypes, 0, 8 * sizeof(Oid));
|
||||||
tuple = SearchSysCacheTuple(PRONAME,
|
tuple = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(stmt->funcname),
|
PointerGetDatum(stmt->funcname),
|
||||||
Int32GetDatum(0),
|
Int32GetDatum(0),
|
||||||
PointerGetDatum(fargtypes),
|
PointerGetDatum(fargtypes),
|
||||||
@ -161,7 +161,7 @@ CreateTrigger(CreateTrigStmt *stmt)
|
|||||||
{
|
{
|
||||||
HeapTuple langTup;
|
HeapTuple langTup;
|
||||||
|
|
||||||
langTup = SearchSysCacheTuple(LANOID,
|
langTup = SearchSysCacheTuple(LANGOID,
|
||||||
ObjectIdGetDatum(((Form_pg_proc) GETSTRUCT(tuple))->prolang),
|
ObjectIdGetDatum(((Form_pg_proc) GETSTRUCT(tuple))->prolang),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(langTup))
|
if (!HeapTupleIsValid(langTup))
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* 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_rel = heap_openr(ShadowRelationName, AccessExclusiveLock);
|
||||||
pg_shadow_dsc = RelationGetDescr(pg_shadow_rel);
|
pg_shadow_dsc = RelationGetDescr(pg_shadow_rel);
|
||||||
|
|
||||||
tuple = SearchSysCacheTuple(USENAME,
|
tuple = SearchSysCacheTuple(USERNAME,
|
||||||
PointerGetDatum(stmt->user),
|
PointerGetDatum(stmt->user),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tuple))
|
if (!HeapTupleIsValid(tuple))
|
||||||
@ -374,7 +374,7 @@ RemoveUser(char *user, CommandDest dest)
|
|||||||
pg_shadow_rel = heap_openr(ShadowRelationName, AccessExclusiveLock);
|
pg_shadow_rel = heap_openr(ShadowRelationName, AccessExclusiveLock);
|
||||||
pg_dsc = RelationGetDescr(pg_shadow_rel);
|
pg_dsc = RelationGetDescr(pg_shadow_rel);
|
||||||
|
|
||||||
tuple = SearchSysCacheTuple(USENAME,
|
tuple = SearchSysCacheTuple(USERNAME,
|
||||||
PointerGetDatum(user),
|
PointerGetDatum(user),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tuple))
|
if (!HeapTupleIsValid(tuple))
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
else
|
||||||
stats->f_cmpgt.fn_addr = NULL;
|
stats->f_cmpgt.fn_addr = NULL;
|
||||||
|
|
||||||
typetuple = SearchSysCacheTuple(TYPOID,
|
typetuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(stats->attr->atttypid),
|
ObjectIdGetDatum(stats->attr->atttypid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(typetuple))
|
if (HeapTupleIsValid(typetuple))
|
||||||
@ -1976,7 +1976,7 @@ vc_scanoneind(Relation indrel, int num_tuples)
|
|||||||
ru1.ru_utime.tv_sec - ru0.ru_utime.tv_sec);
|
ru1.ru_utime.tv_sec - ru0.ru_utime.tv_sec);
|
||||||
|
|
||||||
if (nitups != num_tuples)
|
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);
|
RelationGetRelationName(indrel), nitups, num_tuples);
|
||||||
|
|
||||||
} /* vc_scanoneind */
|
} /* 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);
|
ru1.ru_utime.tv_sec - ru0.ru_utime.tv_sec);
|
||||||
|
|
||||||
if (num_index_tuples != num_tuples + keep_tuples)
|
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);
|
RelationGetRelationName(indrel), num_index_tuples, num_tuples);
|
||||||
|
|
||||||
} /* vc_vaconeind */
|
} /* vc_vaconeind */
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.31 1999/10/17 18:00:29 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.32 1999/11/22 17:56:03 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -159,7 +159,7 @@ MJFormSkipQual(List *qualList, char *replaceopname)
|
|||||||
* whoever marked the "=" operator mergejoinable was a loser.
|
* whoever marked the "=" operator mergejoinable was a loser.
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
optup = SearchSysCacheTuple(OPRNAME,
|
optup = SearchSysCacheTuple(OPERNAME,
|
||||||
PointerGetDatum(replaceopname),
|
PointerGetDatum(replaceopname),
|
||||||
ObjectIdGetDatum(oprleft),
|
ObjectIdGetDatum(oprleft),
|
||||||
ObjectIdGetDatum(oprright),
|
ObjectIdGetDatum(oprright),
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* spi.c
|
* spi.c
|
||||||
* Server Programming Interface
|
* Server Programming Interface
|
||||||
*
|
*
|
||||||
* $Id: spi.c,v 1.41 1999/11/07 23:08:06 momjian Exp $
|
* $Id: spi.c,v 1.42 1999/11/22 17:56:05 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -449,7 +449,7 @@ SPI_gettype(TupleDesc tupdesc, int fnumber)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(tupdesc->attrs[fnumber - 1]->atttypid),
|
ObjectIdGetDatum(tupdesc->attrs[fnumber - 1]->atttypid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/_deadcode/Attic/xfunc.c,v 1.10 1999/09/21 20:58:13 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/_deadcode/Attic/xfunc.c,v 1.11 1999/11/22 17:56:10 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -494,7 +494,7 @@ xfunc_func_expense(LispValue node, LispValue args)
|
|||||||
funcid = get_funcid((Func) node);
|
funcid = get_funcid((Func) node);
|
||||||
|
|
||||||
/* look up tuple in cache */
|
/* look up tuple in cache */
|
||||||
tupl = SearchSysCacheTuple(PROOID,
|
tupl = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(funcid),
|
ObjectIdGetDatum(funcid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tupl))
|
if (!HeapTupleIsValid(tupl))
|
||||||
@ -609,7 +609,7 @@ xfunc_width(LispValue clause)
|
|||||||
else if (IsA(clause, Var))
|
else if (IsA(clause, Var))
|
||||||
{
|
{
|
||||||
/* base case: width is width of this attribute */
|
/* base case: width is width of this attribute */
|
||||||
tupl = SearchSysCacheTuple(TYPOID,
|
tupl = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(get_vartype((Var) clause)),
|
ObjectIdGetDatum(get_vartype((Var) clause)),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tupl))
|
if (!HeapTupleIsValid(tupl))
|
||||||
@ -672,7 +672,7 @@ xfunc_width(LispValue clause)
|
|||||||
* * get function associated with this Oper, and treat this as * a
|
* * get function associated with this Oper, and treat this as * a
|
||||||
* Func
|
* Func
|
||||||
*/
|
*/
|
||||||
tupl = SearchSysCacheTuple(OPROID,
|
tupl = SearchSysCacheTuple(OPEROID,
|
||||||
ObjectIdGetDatum(get_opno((Oper) get_op(clause))),
|
ObjectIdGetDatum(get_opno((Oper) get_op(clause))),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tupl))
|
if (!HeapTupleIsValid(tupl))
|
||||||
@ -1303,7 +1303,7 @@ xfunc_func_width(RegProcedure funcid, LispValue args)
|
|||||||
|
|
||||||
/* lookup function and find its return type */
|
/* lookup function and find its return type */
|
||||||
Assert(RegProcedureIsValid(funcid));
|
Assert(RegProcedureIsValid(funcid));
|
||||||
tupl = SearchSysCacheTuple(PROOID,
|
tupl = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(funcid),
|
ObjectIdGetDatum(funcid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tupl))
|
if (!HeapTupleIsValid(tupl))
|
||||||
@ -1321,7 +1321,7 @@ xfunc_func_width(RegProcedure funcid, LispValue args)
|
|||||||
else
|
else
|
||||||
/* function returns a base type */
|
/* function returns a base type */
|
||||||
{
|
{
|
||||||
tupl = SearchSysCacheTuple(TYPOID,
|
tupl = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(proc->prorettype),
|
ObjectIdGetDatum(proc->prorettype),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tupl))
|
if (!HeapTupleIsValid(tupl))
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.72 1999/09/18 19:06:54 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.73 1999/11/22 17:56:07 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1893,7 +1893,7 @@ prefix_quals(Var *leftop, Oid expr_op,
|
|||||||
*/
|
*/
|
||||||
if (pstatus == Prefix_Exact)
|
if (pstatus == Prefix_Exact)
|
||||||
{
|
{
|
||||||
optup = SearchSysCacheTuple(OPRNAME,
|
optup = SearchSysCacheTuple(OPERNAME,
|
||||||
PointerGetDatum("="),
|
PointerGetDatum("="),
|
||||||
ObjectIdGetDatum(datatype),
|
ObjectIdGetDatum(datatype),
|
||||||
ObjectIdGetDatum(datatype),
|
ObjectIdGetDatum(datatype),
|
||||||
@ -1919,7 +1919,7 @@ prefix_quals(Var *leftop, Oid expr_op,
|
|||||||
*
|
*
|
||||||
* We can always say "x >= prefix".
|
* We can always say "x >= prefix".
|
||||||
*/
|
*/
|
||||||
optup = SearchSysCacheTuple(OPRNAME,
|
optup = SearchSysCacheTuple(OPERNAME,
|
||||||
PointerGetDatum(">="),
|
PointerGetDatum(">="),
|
||||||
ObjectIdGetDatum(datatype),
|
ObjectIdGetDatum(datatype),
|
||||||
ObjectIdGetDatum(datatype),
|
ObjectIdGetDatum(datatype),
|
||||||
@ -1947,7 +1947,7 @@ prefix_quals(Var *leftop, Oid expr_op,
|
|||||||
prefix[prefixlen] = '\377';
|
prefix[prefixlen] = '\377';
|
||||||
prefix[prefixlen+1] = '\0';
|
prefix[prefixlen+1] = '\0';
|
||||||
|
|
||||||
optup = SearchSysCacheTuple(OPRNAME,
|
optup = SearchSysCacheTuple(OPERNAME,
|
||||||
PointerGetDatum("<="),
|
PointerGetDatum("<="),
|
||||||
ObjectIdGetDatum(datatype),
|
ObjectIdGetDatum(datatype),
|
||||||
ObjectIdGetDatum(datatype),
|
ObjectIdGetDatum(datatype),
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.54 1999/10/07 04:23:08 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.55 1999/11/22 17:56:17 momjian Exp $
|
||||||
*
|
*
|
||||||
* HISTORY
|
* HISTORY
|
||||||
* AUTHOR DATE MAJOR EVENT
|
* AUTHOR DATE MAJOR EVENT
|
||||||
@ -902,7 +902,7 @@ eval_const_expressions_mutator (Node *node, void *context)
|
|||||||
result_typeid = func->functype;
|
result_typeid = func->functype;
|
||||||
}
|
}
|
||||||
/* Someday lsyscache.c might provide a function for this */
|
/* Someday lsyscache.c might provide a function for this */
|
||||||
func_tuple = SearchSysCacheTuple(PROOID,
|
func_tuple = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(funcid),
|
ObjectIdGetDatum(funcid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(func_tuple))
|
if (!HeapTupleIsValid(func_tuple))
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.39 1999/11/21 23:25:47 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.40 1999/11/22 17:56:17 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -372,7 +372,7 @@ find_inheritance_children(Oid inhparent)
|
|||||||
scan = heap_beginscan(relation, 0, SnapshotNow, 1, key);
|
scan = heap_beginscan(relation, 0, SnapshotNow, 1, key);
|
||||||
while (HeapTupleIsValid(inheritsTuple = heap_getnext(scan, 0)))
|
while (HeapTupleIsValid(inheritsTuple = heap_getnext(scan, 0)))
|
||||||
{
|
{
|
||||||
inhrelid = ((Form_pg_inherits) GETSTRUCT(inheritsTuple))->inhrel;
|
inhrelid = ((Form_pg_inherits) GETSTRUCT(inheritsTuple))->inhrelid;
|
||||||
list = lappendi(list, inhrelid);
|
list = lappendi(list, inhrelid);
|
||||||
}
|
}
|
||||||
heap_endscan(scan);
|
heap_endscan(scan);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.24 1999/10/02 23:29:12 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.25 1999/11/22 17:56:20 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -175,7 +175,7 @@ can_coerce_type(int nargs, Oid *input_typeids, Oid *func_typeids)
|
|||||||
* look for a single-argument function named with the
|
* look for a single-argument function named with the
|
||||||
* target type name
|
* target type name
|
||||||
*/
|
*/
|
||||||
ftup = SearchSysCacheTuple(PRONAME,
|
ftup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(typeidTypeName(func_typeids[i])),
|
PointerGetDatum(typeidTypeName(func_typeids[i])),
|
||||||
Int32GetDatum(1),
|
Int32GetDatum(1),
|
||||||
PointerGetDatum(oid_array),
|
PointerGetDatum(oid_array),
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.61 1999/11/07 23:08:10 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.62 1999/11/22 17:56:21 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -403,7 +403,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
|
|||||||
* just pass through the argument itself. (make this clearer
|
* just pass through the argument itself. (make this clearer
|
||||||
* with some extra brackets - thomas 1998-12-05)
|
* with some extra brackets - thomas 1998-12-05)
|
||||||
*/
|
*/
|
||||||
if ((HeapTupleIsValid(tp = SearchSysCacheTuple(TYPNAME,
|
if ((HeapTupleIsValid(tp = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(funcname),
|
PointerGetDatum(funcname),
|
||||||
0, 0, 0)))
|
0, 0, 0)))
|
||||||
&& IS_BINARY_COMPATIBLE(typeTypeId(tp), basetype))
|
&& IS_BINARY_COMPATIBLE(typeTypeId(tp), basetype))
|
||||||
@ -923,7 +923,7 @@ func_get_detail(char *funcname,
|
|||||||
Form_pg_proc pform;
|
Form_pg_proc pform;
|
||||||
|
|
||||||
/* attempt to find with arguments exactly as specified... */
|
/* attempt to find with arguments exactly as specified... */
|
||||||
ftup = SearchSysCacheTuple(PRONAME,
|
ftup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(funcname),
|
PointerGetDatum(funcname),
|
||||||
Int32GetDatum(nargs),
|
Int32GetDatum(nargs),
|
||||||
PointerGetDatum(oid_array),
|
PointerGetDatum(oid_array),
|
||||||
@ -953,7 +953,7 @@ func_get_detail(char *funcname,
|
|||||||
if (ncandidates == 1)
|
if (ncandidates == 1)
|
||||||
{
|
{
|
||||||
*true_typeids = current_function_typeids->args;
|
*true_typeids = current_function_typeids->args;
|
||||||
ftup = SearchSysCacheTuple(PRONAME,
|
ftup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(funcname),
|
PointerGetDatum(funcname),
|
||||||
Int32GetDatum(nargs),
|
Int32GetDatum(nargs),
|
||||||
PointerGetDatum(*true_typeids),
|
PointerGetDatum(*true_typeids),
|
||||||
@ -982,7 +982,7 @@ func_get_detail(char *funcname,
|
|||||||
/* found something, so use the first one... */
|
/* found something, so use the first one... */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ftup = SearchSysCacheTuple(PRONAME,
|
ftup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(funcname),
|
PointerGetDatum(funcname),
|
||||||
Int32GetDatum(nargs),
|
Int32GetDatum(nargs),
|
||||||
PointerGetDatum(*true_typeids),
|
PointerGetDatum(*true_typeids),
|
||||||
@ -1111,7 +1111,7 @@ find_inheritors(Oid relid, Oid **supervec)
|
|||||||
*/
|
*/
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
ScanKeyEntryInitialize(&skey, 0x0, Anum_pg_inherits_inhrel,
|
ScanKeyEntryInitialize(&skey, 0x0, Anum_pg_inherits_inhrelid,
|
||||||
F_OIDEQ,
|
F_OIDEQ,
|
||||||
ObjectIdGetDatum(relid));
|
ObjectIdGetDatum(relid));
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.32 1999/11/01 05:06:21 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.33 1999/11/22 17:56:21 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -251,7 +251,7 @@ transformArraySubscripts(ParseState *pstate,
|
|||||||
/* Get the type tuple for the array */
|
/* Get the type tuple for the array */
|
||||||
typearray = exprType(arrayBase);
|
typearray = exprType(arrayBase);
|
||||||
|
|
||||||
type_tuple = SearchSysCacheTuple(TYPOID,
|
type_tuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(typearray),
|
ObjectIdGetDatum(typearray),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(type_tuple))
|
if (!HeapTupleIsValid(type_tuple))
|
||||||
@ -265,7 +265,7 @@ transformArraySubscripts(ParseState *pstate,
|
|||||||
type_struct_array->typname);
|
type_struct_array->typname);
|
||||||
|
|
||||||
/* Get the type tuple for the array element type */
|
/* Get the type tuple for the array element type */
|
||||||
type_tuple = SearchSysCacheTuple(TYPOID,
|
type_tuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(typeelement),
|
ObjectIdGetDatum(typeelement),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(type_tuple))
|
if (!HeapTupleIsValid(type_tuple))
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.32 1999/09/18 19:07:12 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.33 1999/11/22 17:56:21 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -395,7 +395,7 @@ oper_exact(char *op, Oid arg1, Oid arg2)
|
|||||||
else if ((arg2 == UNKNOWNOID) && (arg1 != InvalidOid))
|
else if ((arg2 == UNKNOWNOID) && (arg1 != InvalidOid))
|
||||||
arg2 = arg1;
|
arg2 = arg1;
|
||||||
|
|
||||||
tup = SearchSysCacheTuple(OPRNAME,
|
tup = SearchSysCacheTuple(OPERNAME,
|
||||||
PointerGetDatum(op),
|
PointerGetDatum(op),
|
||||||
ObjectIdGetDatum(arg1),
|
ObjectIdGetDatum(arg1),
|
||||||
ObjectIdGetDatum(arg2),
|
ObjectIdGetDatum(arg2),
|
||||||
@ -434,7 +434,7 @@ oper_inexact(char *op, Oid arg1, Oid arg2)
|
|||||||
/* Or found exactly one? Then proceed... */
|
/* Or found exactly one? Then proceed... */
|
||||||
else if (ncandidates == 1)
|
else if (ncandidates == 1)
|
||||||
{
|
{
|
||||||
tup = SearchSysCacheTuple(OPRNAME,
|
tup = SearchSysCacheTuple(OPERNAME,
|
||||||
PointerGetDatum(op),
|
PointerGetDatum(op),
|
||||||
ObjectIdGetDatum(candidates->args[0]),
|
ObjectIdGetDatum(candidates->args[0]),
|
||||||
ObjectIdGetDatum(candidates->args[1]),
|
ObjectIdGetDatum(candidates->args[1]),
|
||||||
@ -450,7 +450,7 @@ oper_inexact(char *op, Oid arg1, Oid arg2)
|
|||||||
targetOids = oper_select_candidate(2, inputOids, candidates);
|
targetOids = oper_select_candidate(2, inputOids, candidates);
|
||||||
if (targetOids != NULL)
|
if (targetOids != NULL)
|
||||||
{
|
{
|
||||||
tup = SearchSysCacheTuple(OPRNAME,
|
tup = SearchSysCacheTuple(OPERNAME,
|
||||||
PointerGetDatum(op),
|
PointerGetDatum(op),
|
||||||
ObjectIdGetDatum(targetOids[0]),
|
ObjectIdGetDatum(targetOids[0]),
|
||||||
ObjectIdGetDatum(targetOids[1]),
|
ObjectIdGetDatum(targetOids[1]),
|
||||||
@ -558,7 +558,7 @@ right_oper(char *op, Oid arg)
|
|||||||
int ncandidates;
|
int ncandidates;
|
||||||
Oid *targetOid;
|
Oid *targetOid;
|
||||||
|
|
||||||
tup = SearchSysCacheTuple(OPRNAME,
|
tup = SearchSysCacheTuple(OPERNAME,
|
||||||
PointerGetDatum(op),
|
PointerGetDatum(op),
|
||||||
ObjectIdGetDatum(arg),
|
ObjectIdGetDatum(arg),
|
||||||
ObjectIdGetDatum(InvalidOid),
|
ObjectIdGetDatum(InvalidOid),
|
||||||
@ -574,7 +574,7 @@ right_oper(char *op, Oid arg)
|
|||||||
}
|
}
|
||||||
else if (ncandidates == 1)
|
else if (ncandidates == 1)
|
||||||
{
|
{
|
||||||
tup = SearchSysCacheTuple(OPRNAME,
|
tup = SearchSysCacheTuple(OPERNAME,
|
||||||
PointerGetDatum(op),
|
PointerGetDatum(op),
|
||||||
ObjectIdGetDatum(candidates->args[0]),
|
ObjectIdGetDatum(candidates->args[0]),
|
||||||
ObjectIdGetDatum(InvalidOid),
|
ObjectIdGetDatum(InvalidOid),
|
||||||
@ -587,7 +587,7 @@ right_oper(char *op, Oid arg)
|
|||||||
|
|
||||||
if (targetOid != NULL)
|
if (targetOid != NULL)
|
||||||
{
|
{
|
||||||
tup = SearchSysCacheTuple(OPRNAME,
|
tup = SearchSysCacheTuple(OPERNAME,
|
||||||
PointerGetDatum(op),
|
PointerGetDatum(op),
|
||||||
ObjectIdGetDatum(InvalidOid),
|
ObjectIdGetDatum(InvalidOid),
|
||||||
ObjectIdGetDatum(*targetOid),
|
ObjectIdGetDatum(*targetOid),
|
||||||
@ -618,7 +618,7 @@ left_oper(char *op, Oid arg)
|
|||||||
int ncandidates;
|
int ncandidates;
|
||||||
Oid *targetOid;
|
Oid *targetOid;
|
||||||
|
|
||||||
tup = SearchSysCacheTuple(OPRNAME,
|
tup = SearchSysCacheTuple(OPERNAME,
|
||||||
PointerGetDatum(op),
|
PointerGetDatum(op),
|
||||||
ObjectIdGetDatum(InvalidOid),
|
ObjectIdGetDatum(InvalidOid),
|
||||||
ObjectIdGetDatum(arg),
|
ObjectIdGetDatum(arg),
|
||||||
@ -634,7 +634,7 @@ left_oper(char *op, Oid arg)
|
|||||||
}
|
}
|
||||||
else if (ncandidates == 1)
|
else if (ncandidates == 1)
|
||||||
{
|
{
|
||||||
tup = SearchSysCacheTuple(OPRNAME,
|
tup = SearchSysCacheTuple(OPERNAME,
|
||||||
PointerGetDatum(op),
|
PointerGetDatum(op),
|
||||||
ObjectIdGetDatum(InvalidOid),
|
ObjectIdGetDatum(InvalidOid),
|
||||||
ObjectIdGetDatum(candidates->args[0]),
|
ObjectIdGetDatum(candidates->args[0]),
|
||||||
@ -646,7 +646,7 @@ left_oper(char *op, Oid arg)
|
|||||||
targetOid = oper_select_candidate(1, &arg, candidates);
|
targetOid = oper_select_candidate(1, &arg, candidates);
|
||||||
if (targetOid != NULL)
|
if (targetOid != NULL)
|
||||||
{
|
{
|
||||||
tup = SearchSysCacheTuple(OPRNAME,
|
tup = SearchSysCacheTuple(OPERNAME,
|
||||||
PointerGetDatum(op),
|
PointerGetDatum(op),
|
||||||
ObjectIdGetDatum(InvalidOid),
|
ObjectIdGetDatum(InvalidOid),
|
||||||
ObjectIdGetDatum(*targetOid),
|
ObjectIdGetDatum(*targetOid),
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.48 1999/11/07 23:08:11 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.49 1999/11/22 17:56:21 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -329,7 +329,7 @@ SizeTargetExpr(ParseState *pstate,
|
|||||||
oid_array[i] = InvalidOid;
|
oid_array[i] = InvalidOid;
|
||||||
|
|
||||||
/* attempt to find with arguments exactly as specified... */
|
/* attempt to find with arguments exactly as specified... */
|
||||||
ftup = SearchSysCacheTuple(PRONAME,
|
ftup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum(funcname),
|
PointerGetDatum(funcname),
|
||||||
Int32GetDatum(2),
|
Int32GetDatum(2),
|
||||||
PointerGetDatum(oid_array),
|
PointerGetDatum(oid_array),
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.26 1999/11/07 23:08:11 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.27 1999/11/22 17:56:21 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -27,7 +27,7 @@
|
|||||||
bool
|
bool
|
||||||
typeidIsValid(Oid id)
|
typeidIsValid(Oid id)
|
||||||
{
|
{
|
||||||
return (SearchSysCacheTuple(TYPOID,
|
return (SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(id),
|
ObjectIdGetDatum(id),
|
||||||
0, 0, 0) != NULL);
|
0, 0, 0) != NULL);
|
||||||
}
|
}
|
||||||
@ -39,7 +39,7 @@ typeidTypeName(Oid id)
|
|||||||
HeapTuple tup;
|
HeapTuple tup;
|
||||||
Form_pg_type typetuple;
|
Form_pg_type typetuple;
|
||||||
|
|
||||||
if (!(tup = SearchSysCacheTuple(TYPOID,
|
if (!(tup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(id),
|
ObjectIdGetDatum(id),
|
||||||
0, 0, 0)))
|
0, 0, 0)))
|
||||||
{
|
{
|
||||||
@ -56,7 +56,7 @@ typeidType(Oid id)
|
|||||||
{
|
{
|
||||||
HeapTuple tup;
|
HeapTuple tup;
|
||||||
|
|
||||||
if (!(tup = SearchSysCacheTuple(TYPOID,
|
if (!(tup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(id),
|
ObjectIdGetDatum(id),
|
||||||
0, 0, 0)))
|
0, 0, 0)))
|
||||||
{
|
{
|
||||||
@ -75,7 +75,7 @@ typenameType(char *s)
|
|||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
elog(ERROR, "type(): Null type");
|
elog(ERROR, "type(): Null type");
|
||||||
|
|
||||||
if (!(tup = SearchSysCacheTuple(TYPNAME,
|
if (!(tup = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(s),
|
PointerGetDatum(s),
|
||||||
0, 0, 0)))
|
0, 0, 0)))
|
||||||
elog(ERROR, "Unable to locate type name '%s' in catalog", s);
|
elog(ERROR, "Unable to locate type name '%s' in catalog", s);
|
||||||
@ -154,7 +154,7 @@ typeidOutfunc(Oid type_id)
|
|||||||
Form_pg_type type;
|
Form_pg_type type;
|
||||||
Oid outfunc;
|
Oid outfunc;
|
||||||
|
|
||||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(type_id),
|
ObjectIdGetDatum(type_id),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typeTuple))
|
if (!HeapTupleIsValid(typeTuple))
|
||||||
@ -173,7 +173,7 @@ typeidTypeRelid(Oid type_id)
|
|||||||
HeapTuple typeTuple;
|
HeapTuple typeTuple;
|
||||||
Form_pg_type type;
|
Form_pg_type type;
|
||||||
|
|
||||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(type_id),
|
ObjectIdGetDatum(type_id),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typeTuple))
|
if (!HeapTupleIsValid(typeTuple))
|
||||||
@ -212,7 +212,7 @@ GetArrayElementType(Oid typearray)
|
|||||||
HeapTuple type_tuple;
|
HeapTuple type_tuple;
|
||||||
Form_pg_type type_struct_array;
|
Form_pg_type type_struct_array;
|
||||||
|
|
||||||
type_tuple = SearchSysCacheTuple(TYPOID,
|
type_tuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(typearray),
|
ObjectIdGetDatum(typearray),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.24 1999/11/07 23:08:12 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.25 1999/11/22 17:56:23 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -170,7 +170,7 @@ checkLockPerms(List *locks, Query *parsetree, int rt_index)
|
|||||||
*/
|
*/
|
||||||
rte = (RangeTblEntry *) nth(rt_index - 1, parsetree->rtable);
|
rte = (RangeTblEntry *) nth(rt_index - 1, parsetree->rtable);
|
||||||
ev_rel = heap_openr(rte->relname, AccessShareLock);
|
ev_rel = heap_openr(rte->relname, AccessShareLock);
|
||||||
usertup = SearchSysCacheTuple(USESYSID,
|
usertup = SearchSysCacheTuple(USERSYSID,
|
||||||
ObjectIdGetDatum(ev_rel->rd_rel->relowner),
|
ObjectIdGetDatum(ev_rel->rd_rel->relowner),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(usertup))
|
if (!HeapTupleIsValid(usertup))
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.32 1999/11/18 13:56:27 wieck Exp $
|
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.33 1999/11/22 17:56:23 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -34,7 +34,7 @@ RewriteGetRuleEventRel(char *rulename)
|
|||||||
HeapTuple htup;
|
HeapTuple htup;
|
||||||
Oid eventrel;
|
Oid eventrel;
|
||||||
|
|
||||||
htup = SearchSysCacheTuple(REWRITENAME,
|
htup = SearchSysCacheTuple(RULENAME,
|
||||||
PointerGetDatum(rulename),
|
PointerGetDatum(rulename),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(htup))
|
if (!HeapTupleIsValid(htup))
|
||||||
@ -83,7 +83,7 @@ RemoveRewriteRule(char *ruleName)
|
|||||||
/*
|
/*
|
||||||
* Scan the RuleRelation ('pg_rewrite') until we find a tuple
|
* Scan the RuleRelation ('pg_rewrite') until we find a tuple
|
||||||
*/
|
*/
|
||||||
tuple = SearchSysCacheTupleCopy(REWRITENAME,
|
tuple = SearchSysCacheTupleCopy(RULENAME,
|
||||||
PointerGetDatum(ruleName),
|
PointerGetDatum(ruleName),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.37 1999/09/18 19:07:20 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.38 1999/11/22 17:56:23 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -42,7 +42,7 @@ RuleIdGetActionInfo(Oid ruleoid, bool *instead_flag, Query **parseTrees)
|
|||||||
|
|
||||||
ruleRelation = heap_openr(RewriteRelationName, AccessShareLock);
|
ruleRelation = heap_openr(RewriteRelationName, AccessShareLock);
|
||||||
ruleTupdesc = RelationGetDescr(ruleRelation);
|
ruleTupdesc = RelationGetDescr(ruleRelation);
|
||||||
ruletuple = SearchSysCacheTuple(RULOID,
|
ruletuple = SearchSysCacheTuple(RULEOID,
|
||||||
ObjectIdGetDatum(ruleoid),
|
ObjectIdGetDatum(ruleoid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (ruletuple == NULL)
|
if (ruletuple == NULL)
|
||||||
@ -81,7 +81,7 @@ IsDefinedRewriteRule(char *ruleName)
|
|||||||
{
|
{
|
||||||
HeapTuple tuple;
|
HeapTuple tuple;
|
||||||
|
|
||||||
tuple = SearchSysCacheTuple(REWRITENAME,
|
tuple = SearchSysCacheTuple(RULENAME,
|
||||||
PointerGetDatum(ruleName),
|
PointerGetDatum(ruleName),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
return HeapTupleIsValid(tuple);
|
return HeapTupleIsValid(tuple);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.30 1999/07/22 02:40:07 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.31 1999/11/22 17:56:26 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* This cruft is the server side of PQfn.
|
* This cruft is the server side of PQfn.
|
||||||
@ -202,7 +202,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
|
|||||||
MemSet((char *) fip, 0, (int) sizeof(struct fp_info));
|
MemSet((char *) fip, 0, (int) sizeof(struct fp_info));
|
||||||
fip->funcid = InvalidOid;
|
fip->funcid = InvalidOid;
|
||||||
|
|
||||||
func_htp = SearchSysCacheTuple(PROOID,
|
func_htp = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(func_id),
|
ObjectIdGetDatum(func_id),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(func_htp))
|
if (!HeapTupleIsValid(func_htp))
|
||||||
@ -219,7 +219,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
|
|||||||
{
|
{
|
||||||
if (OidIsValid(argtypes[i]))
|
if (OidIsValid(argtypes[i]))
|
||||||
{
|
{
|
||||||
type_htp = SearchSysCacheTuple(TYPOID,
|
type_htp = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(argtypes[i]),
|
ObjectIdGetDatum(argtypes[i]),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(type_htp))
|
if (!HeapTupleIsValid(type_htp))
|
||||||
@ -235,7 +235,7 @@ update_fp_info(Oid func_id, struct fp_info * fip)
|
|||||||
|
|
||||||
if (OidIsValid(rettype))
|
if (OidIsValid(rettype))
|
||||||
{
|
{
|
||||||
type_htp = SearchSysCacheTuple(TYPOID,
|
type_htp = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(rettype),
|
ObjectIdGetDatum(rettype),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(type_htp))
|
if (!HeapTupleIsValid(type_htp))
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.41 1999/10/18 03:32:29 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.42 1999/11/22 17:56:28 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -170,7 +170,7 @@ aclparse(char *s, AclItem *aip, unsigned *modechg)
|
|||||||
switch (aip->ai_idtype)
|
switch (aip->ai_idtype)
|
||||||
{
|
{
|
||||||
case ACL_IDTYPE_UID:
|
case ACL_IDTYPE_UID:
|
||||||
htup = SearchSysCacheTuple(USENAME,
|
htup = SearchSysCacheTuple(USERNAME,
|
||||||
PointerGetDatum(name),
|
PointerGetDatum(name),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(htup))
|
if (!HeapTupleIsValid(htup))
|
||||||
@ -281,7 +281,7 @@ aclitemout(AclItem *aip)
|
|||||||
switch (aip->ai_idtype)
|
switch (aip->ai_idtype)
|
||||||
{
|
{
|
||||||
case ACL_IDTYPE_UID:
|
case ACL_IDTYPE_UID:
|
||||||
htup = SearchSysCacheTuple(USESYSID,
|
htup = SearchSysCacheTuple(USERSYSID,
|
||||||
ObjectIdGetDatum(aip->ai_id),
|
ObjectIdGetDatum(aip->ai_id),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(htup))
|
if (!HeapTupleIsValid(htup))
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.48 1999/07/19 07:07:25 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.49 1999/11/22 17:56:29 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1470,7 +1470,7 @@ system_cache_lookup(Oid element_type,
|
|||||||
HeapTuple typeTuple;
|
HeapTuple typeTuple;
|
||||||
Form_pg_type typeStruct;
|
Form_pg_type typeStruct;
|
||||||
|
|
||||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(element_type),
|
ObjectIdGetDatum(element_type),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.44 1999/11/07 23:08:24 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.45 1999/11/22 17:56:29 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -54,7 +54,7 @@ regprocin(char *pro_name_or_oid)
|
|||||||
if (pro_name_or_oid[0] >= '0' &&
|
if (pro_name_or_oid[0] >= '0' &&
|
||||||
pro_name_or_oid[0] <= '9')
|
pro_name_or_oid[0] <= '9')
|
||||||
{
|
{
|
||||||
proctup = SearchSysCacheTuple(PROOID,
|
proctup = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(oidin(pro_name_or_oid)),
|
ObjectIdGetDatum(oidin(pro_name_or_oid)),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(proctup))
|
if (HeapTupleIsValid(proctup))
|
||||||
@ -165,7 +165,7 @@ regprocout(RegProcedure proid)
|
|||||||
|
|
||||||
if (!IsBootstrapProcessingMode())
|
if (!IsBootstrapProcessingMode())
|
||||||
{
|
{
|
||||||
proctup = SearchSysCacheTuple(PROOID,
|
proctup = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(proid),
|
ObjectIdGetDatum(proid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
@ -254,7 +254,7 @@ oid8types(Oid *oidArray)
|
|||||||
{
|
{
|
||||||
if (*sp != InvalidOid)
|
if (*sp != InvalidOid)
|
||||||
{
|
{
|
||||||
typetup = SearchSysCacheTuple(TYPOID,
|
typetup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(*sp),
|
ObjectIdGetDatum(*sp),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(typetup))
|
if (HeapTupleIsValid(typetup))
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* 1999 Jan Wieck
|
* 1999 Jan Wieck
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.2 1999/10/08 12:00:08 wieck Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.3 1999/11/22 17:56:29 momjian Exp $
|
||||||
*
|
*
|
||||||
* ----------
|
* ----------
|
||||||
*/
|
*/
|
||||||
@ -1073,7 +1073,7 @@ ri_AttributesEqual(Oid typeid, Datum oldvalue, Datum newvalue)
|
|||||||
elog(FATAL, "error in RI operator cache");
|
elog(FATAL, "error in RI operator cache");
|
||||||
|
|
||||||
/* ----------
|
/* ----------
|
||||||
* If not found, lookup the OPRNAME system cache for it
|
* If not found, lookup the OPERNAME system cache for it
|
||||||
* and remember that info.
|
* and remember that info.
|
||||||
* ----------
|
* ----------
|
||||||
*/
|
*/
|
||||||
@ -1082,7 +1082,7 @@ ri_AttributesEqual(Oid typeid, Datum oldvalue, Datum newvalue)
|
|||||||
HeapTuple opr_tup;
|
HeapTuple opr_tup;
|
||||||
Form_pg_operator opr_struct;
|
Form_pg_operator opr_struct;
|
||||||
|
|
||||||
opr_tup = SearchSysCacheTuple(OPRNAME,
|
opr_tup = SearchSysCacheTuple(OPERNAME,
|
||||||
PointerGetDatum("="),
|
PointerGetDatum("="),
|
||||||
ObjectIdGetDatum(typeid),
|
ObjectIdGetDatum(typeid),
|
||||||
ObjectIdGetDatum(typeid),
|
ObjectIdGetDatum(typeid),
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* out of it's tuple
|
* out of it's tuple
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.31 1999/11/15 02:00:05 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.32 1999/11/22 17:56:30 momjian Exp $
|
||||||
*
|
*
|
||||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||||
*
|
*
|
||||||
@ -484,7 +484,7 @@ pg_get_indexdef(Oid indexrelid)
|
|||||||
HeapTuple proctup;
|
HeapTuple proctup;
|
||||||
Form_pg_proc procStruct;
|
Form_pg_proc procStruct;
|
||||||
|
|
||||||
proctup = SearchSysCacheTuple(PROOID,
|
proctup = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(idxrec->indproc), 0, 0, 0);
|
ObjectIdGetDatum(idxrec->indproc), 0, 0, 0);
|
||||||
if (!HeapTupleIsValid(proctup))
|
if (!HeapTupleIsValid(proctup))
|
||||||
elog(ERROR, "cache lookup for proc %u failed", idxrec->indproc);
|
elog(ERROR, "cache lookup for proc %u failed", idxrec->indproc);
|
||||||
@ -567,7 +567,7 @@ pg_get_userbyid(int32 uid)
|
|||||||
* Get the pg_shadow entry and print the result
|
* Get the pg_shadow entry and print the result
|
||||||
* ----------
|
* ----------
|
||||||
*/
|
*/
|
||||||
usertup = SearchSysCacheTuple(USESYSID,
|
usertup = SearchSysCacheTuple(USERSYSID,
|
||||||
ObjectIdGetDatum(uid), 0, 0, 0);
|
ObjectIdGetDatum(uid), 0, 0, 0);
|
||||||
if (HeapTupleIsValid(usertup))
|
if (HeapTupleIsValid(usertup))
|
||||||
{
|
{
|
||||||
@ -1282,7 +1282,7 @@ get_rule_expr(Node *node, deparse_context *context)
|
|||||||
HeapTuple tp;
|
HeapTuple tp;
|
||||||
Form_pg_operator optup;
|
Form_pg_operator optup;
|
||||||
|
|
||||||
tp = SearchSysCacheTuple(OPROID,
|
tp = SearchSysCacheTuple(OPEROID,
|
||||||
ObjectIdGetDatum(opno),
|
ObjectIdGetDatum(opno),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
Assert(HeapTupleIsValid(tp));
|
Assert(HeapTupleIsValid(tp));
|
||||||
@ -1439,7 +1439,7 @@ get_func_expr(Expr *expr, deparse_context *context)
|
|||||||
* Get the functions pg_proc tuple
|
* Get the functions pg_proc tuple
|
||||||
* ----------
|
* ----------
|
||||||
*/
|
*/
|
||||||
proctup = SearchSysCacheTuple(PROOID,
|
proctup = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(func->funcid),
|
ObjectIdGetDatum(func->funcid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(proctup))
|
if (!HeapTupleIsValid(proctup))
|
||||||
@ -1524,7 +1524,7 @@ get_tle_expr(TargetEntry *tle, deparse_context *context)
|
|||||||
* Get the functions pg_proc tuple
|
* Get the functions pg_proc tuple
|
||||||
* ----------
|
* ----------
|
||||||
*/
|
*/
|
||||||
tup = SearchSysCacheTuple(PROOID,
|
tup = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(func->funcid), 0, 0, 0);
|
ObjectIdGetDatum(func->funcid), 0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tup))
|
if (!HeapTupleIsValid(tup))
|
||||||
elog(ERROR, "cache lookup for proc %u failed", func->funcid);
|
elog(ERROR, "cache lookup for proc %u failed", func->funcid);
|
||||||
@ -1548,7 +1548,7 @@ get_tle_expr(TargetEntry *tle, deparse_context *context)
|
|||||||
* Furthermore, the name of the function must be the same
|
* Furthermore, the name of the function must be the same
|
||||||
* as the argument/result type name.
|
* as the argument/result type name.
|
||||||
*/
|
*/
|
||||||
tup = SearchSysCacheTuple(TYPOID,
|
tup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(procStruct->prorettype),
|
ObjectIdGetDatum(procStruct->prorettype),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tup))
|
if (!HeapTupleIsValid(tup))
|
||||||
@ -1607,7 +1607,7 @@ get_const_expr(Const *constval, deparse_context *context)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
typetup = SearchSysCacheTuple(TYPOID,
|
typetup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(constval->consttype),
|
ObjectIdGetDatum(constval->consttype),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typetup))
|
if (!HeapTupleIsValid(typetup))
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.41 1999/09/18 19:07:49 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.42 1999/11/22 17:56:30 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -510,7 +510,7 @@ convert_to_scale(Datum value, Oid typid,
|
|||||||
|
|
||||||
MemSet(oid_array, 0, MAXFARGS * sizeof(Oid));
|
MemSet(oid_array, 0, MAXFARGS * sizeof(Oid));
|
||||||
oid_array[0] = typid;
|
oid_array[0] = typid;
|
||||||
ftup = SearchSysCacheTuple(PRONAME,
|
ftup = SearchSysCacheTuple(PROCNAME,
|
||||||
PointerGetDatum("float8"),
|
PointerGetDatum("float8"),
|
||||||
Int32GetDatum(1),
|
Int32GetDatum(1),
|
||||||
PointerGetDatum(oid_array),
|
PointerGetDatum(oid_array),
|
||||||
@ -622,7 +622,7 @@ getattstatistics(Oid relid, AttrNumber attnum, Oid typid, int32 typmod,
|
|||||||
*commonfrac = ((Form_pg_statistic) GETSTRUCT(tuple))->stacommonfrac;
|
*commonfrac = ((Form_pg_statistic) GETSTRUCT(tuple))->stacommonfrac;
|
||||||
|
|
||||||
/* Get the type input proc for the column datatype */
|
/* Get the type input proc for the column datatype */
|
||||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(typid),
|
ObjectIdGetDatum(typid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (! HeapTupleIsValid(typeTuple))
|
if (! HeapTupleIsValid(typeTuple))
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.26 1999/09/18 19:07:49 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.27 1999/11/22 17:56:30 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -72,7 +72,7 @@ SetDefine(char *querystr, char *typename)
|
|||||||
* until you start the next command.)
|
* until you start the next command.)
|
||||||
*/
|
*/
|
||||||
CommandCounterIncrement();
|
CommandCounterIncrement();
|
||||||
tup = SearchSysCacheTuple(PROOID,
|
tup = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(setoid),
|
ObjectIdGetDatum(setoid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(tup))
|
if (!HeapTupleIsValid(tup))
|
||||||
@ -102,7 +102,7 @@ SetDefine(char *querystr, char *typename)
|
|||||||
/* change the pg_proc tuple */
|
/* change the pg_proc tuple */
|
||||||
procrel = heap_openr(ProcedureRelationName, RowExclusiveLock);
|
procrel = heap_openr(ProcedureRelationName, RowExclusiveLock);
|
||||||
|
|
||||||
tup = SearchSysCacheTuple(PROOID,
|
tup = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(setoid),
|
ObjectIdGetDatum(setoid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(tup))
|
if (HeapTupleIsValid(tup))
|
||||||
|
125
src/backend/utils/cache/catcache.c
vendored
125
src/backend/utils/cache/catcache.c
vendored
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.53 1999/11/21 01:58:22 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.54 1999/11/22 17:56:31 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -15,6 +15,7 @@
|
|||||||
#include "access/genam.h"
|
#include "access/genam.h"
|
||||||
#include "access/heapam.h"
|
#include "access/heapam.h"
|
||||||
#include "access/valid.h"
|
#include "access/valid.h"
|
||||||
|
#include "catalog/pg_operator.h"
|
||||||
#include "catalog/pg_type.h"
|
#include "catalog/pg_type.h"
|
||||||
#include "catalog/catname.h"
|
#include "catalog/catname.h"
|
||||||
#include "catalog/indexing.h"
|
#include "catalog/indexing.h"
|
||||||
@ -711,7 +712,6 @@ InitSysCache(char *relname,
|
|||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We can only do this optimization because the number of hash
|
* We can only do this optimization because the number of hash
|
||||||
* buckets never changes. Without it, we call malloc() too much.
|
* buckets never changes. Without it, we call malloc() too much.
|
||||||
@ -811,9 +811,10 @@ InitSysCache(char *relname,
|
|||||||
/* --------------------------------
|
/* --------------------------------
|
||||||
* SearchSelfReferences
|
* SearchSelfReferences
|
||||||
*
|
*
|
||||||
* This call searches a self referencing information,
|
* This call searches for self-referencing information,
|
||||||
*
|
* which causes infinite recursion in the system catalog cache.
|
||||||
* which causes a cycle in system catalog cache
|
* This code short-circuits the normal index lookup for cache loads
|
||||||
|
* in those cases and replaces it with a heap scan.
|
||||||
*
|
*
|
||||||
* cache should already be initailized
|
* cache should already be initailized
|
||||||
* --------------------------------
|
* --------------------------------
|
||||||
@ -823,45 +824,81 @@ SearchSelfReferences(struct catcache * cache)
|
|||||||
{
|
{
|
||||||
HeapTuple ntp;
|
HeapTuple ntp;
|
||||||
Relation rel;
|
Relation rel;
|
||||||
static Oid indexSelfOid = 0;
|
|
||||||
static HeapTuple indexSelfTuple = 0;
|
|
||||||
|
|
||||||
if (cache->id != INDEXRELID)
|
if (cache->id == INDEXRELID)
|
||||||
|
{
|
||||||
|
static Oid indexSelfOid = InvalidOid;
|
||||||
|
static HeapTuple indexSelfTuple = NULL;
|
||||||
|
|
||||||
|
if (!OidIsValid(indexSelfOid))
|
||||||
|
{
|
||||||
|
/* Find oid of pg_index_indexrelid_index */
|
||||||
|
rel = heap_openr(RelationRelationName, AccessShareLock);
|
||||||
|
ntp = ClassNameIndexScan(rel, IndexRelidIndex);
|
||||||
|
if (!HeapTupleIsValid(ntp))
|
||||||
|
elog(ERROR, "SearchSelfReferences: %s not found in %s",
|
||||||
|
IndexRelidIndex, RelationRelationName);
|
||||||
|
indexSelfOid = ntp->t_data->t_oid;
|
||||||
|
pfree(ntp);
|
||||||
|
heap_close(rel, AccessShareLock);
|
||||||
|
}
|
||||||
|
/* Looking for something other than pg_index_indexrelid_index? */
|
||||||
|
if ((Oid)cache->cc_skey[0].sk_argument != indexSelfOid)
|
||||||
|
return (HeapTuple)0;
|
||||||
|
|
||||||
|
/* Do we need to load our private copy of the tuple? */
|
||||||
|
if (!HeapTupleIsValid(indexSelfTuple))
|
||||||
|
{
|
||||||
|
HeapScanDesc sd;
|
||||||
|
MemoryContext oldcxt;
|
||||||
|
|
||||||
|
if (!CacheCxt)
|
||||||
|
CacheCxt = CreateGlobalMemory("Cache");
|
||||||
|
rel = heap_open(cache->relationId, AccessShareLock);
|
||||||
|
sd = heap_beginscan(rel, false, SnapshotNow, 1, cache->cc_skey);
|
||||||
|
ntp = heap_getnext(sd, 0);
|
||||||
|
if (!HeapTupleIsValid(ntp))
|
||||||
|
elog(ERROR, "SearchSelfReferences: tuple not found");
|
||||||
|
oldcxt = MemoryContextSwitchTo((MemoryContext) CacheCxt);
|
||||||
|
indexSelfTuple = heap_copytuple(ntp);
|
||||||
|
MemoryContextSwitchTo(oldcxt);
|
||||||
|
heap_endscan(sd);
|
||||||
|
heap_close(rel, AccessShareLock);
|
||||||
|
}
|
||||||
|
return indexSelfTuple;
|
||||||
|
}
|
||||||
|
else if (cache->id == OPEROID)
|
||||||
|
{
|
||||||
|
/* 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;
|
||||||
|
|
||||||
|
if (!HeapTupleIsValid(operatorSelfTuple[lookup_oid-MIN_OIDCMP]))
|
||||||
|
{
|
||||||
|
HeapScanDesc sd;
|
||||||
|
MemoryContext oldcxt;
|
||||||
|
|
||||||
|
if (!CacheCxt)
|
||||||
|
CacheCxt = CreateGlobalMemory("Cache");
|
||||||
|
rel = heap_open(cache->relationId, AccessShareLock);
|
||||||
|
sd = heap_beginscan(rel, false, SnapshotNow, 1, cache->cc_skey);
|
||||||
|
ntp = heap_getnext(sd, 0);
|
||||||
|
if (!HeapTupleIsValid(ntp))
|
||||||
|
elog(ERROR, "SearchSelfReferences: tuple not found");
|
||||||
|
oldcxt = MemoryContextSwitchTo((MemoryContext) CacheCxt);
|
||||||
|
operatorSelfTuple[lookup_oid-MIN_OIDCMP] = heap_copytuple(ntp);
|
||||||
|
MemoryContextSwitchTo(oldcxt);
|
||||||
|
heap_endscan(sd);
|
||||||
|
heap_close(rel, AccessShareLock);
|
||||||
|
}
|
||||||
|
return operatorSelfTuple[lookup_oid-MIN_OIDCMP];
|
||||||
|
}
|
||||||
|
else
|
||||||
return (HeapTuple)0;
|
return (HeapTuple)0;
|
||||||
|
|
||||||
if (!indexSelfOid)
|
|
||||||
{
|
|
||||||
rel = heap_openr(RelationRelationName, AccessShareLock);
|
|
||||||
ntp = ClassNameIndexScan(rel, IndexRelidIndex);
|
|
||||||
if (!HeapTupleIsValid(ntp))
|
|
||||||
elog(ERROR, "SearchSelfRefernces: %s not found in %s",
|
|
||||||
IndexRelidIndex, RelationRelationName);
|
|
||||||
indexSelfOid = ntp->t_data->t_oid;
|
|
||||||
pfree(ntp);
|
|
||||||
heap_close(rel, AccessShareLock);
|
|
||||||
}
|
|
||||||
if ((Oid)cache->cc_skey[0].sk_argument != indexSelfOid)
|
|
||||||
return (HeapTuple)0;
|
|
||||||
if (!indexSelfTuple)
|
|
||||||
{
|
|
||||||
HeapScanDesc sd;
|
|
||||||
MemoryContext oldcxt;
|
|
||||||
|
|
||||||
if (!CacheCxt)
|
|
||||||
CacheCxt = CreateGlobalMemory("Cache");
|
|
||||||
rel = heap_open(cache->relationId, AccessShareLock);
|
|
||||||
sd = heap_beginscan(rel, false, SnapshotNow, 1, cache->cc_skey);
|
|
||||||
ntp = heap_getnext(sd, 0);
|
|
||||||
if (!HeapTupleIsValid(ntp))
|
|
||||||
elog(ERROR, "SearchSelfRefernces: tuple not found");
|
|
||||||
oldcxt = MemoryContextSwitchTo((MemoryContext) CacheCxt);
|
|
||||||
indexSelfTuple = heap_copytuple(ntp);
|
|
||||||
MemoryContextSwitchTo(oldcxt);
|
|
||||||
heap_endscan(sd);
|
|
||||||
heap_close(rel, AccessShareLock);
|
|
||||||
}
|
|
||||||
|
|
||||||
return indexSelfTuple;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------
|
/* --------------------------------
|
||||||
@ -907,10 +944,8 @@ SearchSysCache(struct catcache * cache,
|
|||||||
/*
|
/*
|
||||||
* resolve self referencing informtion
|
* resolve self referencing informtion
|
||||||
*/
|
*/
|
||||||
if (ntp = SearchSelfReferences(cache), ntp)
|
if ((ntp = SearchSelfReferences(cache)))
|
||||||
{
|
return heap_copytuple(ntp);
|
||||||
return heap_copytuple(ntp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* find the hash bucket in which to look for the tuple
|
* find the hash bucket in which to look for the tuple
|
||||||
|
10
src/backend/utils/cache/fcache.c
vendored
10
src/backend/utils/cache/fcache.c
vendored
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.26 1999/07/17 20:18:01 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.27 1999/11/22 17:56:32 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -53,7 +53,7 @@ GetDynamicFuncArgType(Var *arg, ExprContext *econtext)
|
|||||||
relname = (char *) getrelname(rtid, econtext->ecxt_range_table);
|
relname = (char *) getrelname(rtid, econtext->ecxt_range_table);
|
||||||
|
|
||||||
|
|
||||||
tup = SearchSysCacheTuple(TYPNAME,
|
tup = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(relname),
|
PointerGetDatum(relname),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!tup)
|
if (!tup)
|
||||||
@ -89,7 +89,7 @@ init_fcache(Oid foid,
|
|||||||
if (!use_syscache)
|
if (!use_syscache)
|
||||||
elog(ERROR, "what the ????, init the fcache without the catalogs?");
|
elog(ERROR, "what the ????, init the fcache without the catalogs?");
|
||||||
|
|
||||||
procedureTuple = SearchSysCacheTuple(PROOID,
|
procedureTuple = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(foid),
|
ObjectIdGetDatum(foid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ init_fcache(Oid foid,
|
|||||||
* to "null" so we just return it.
|
* to "null" so we just return it.
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(procedureStruct->prorettype),
|
ObjectIdGetDatum(procedureStruct->prorettype),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ init_fcache(Oid foid,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
tmp = (text *)
|
tmp = (text *)
|
||||||
SearchSysCacheGetAttribute(PROOID,
|
SearchSysCacheGetAttribute(PROCOID,
|
||||||
Anum_pg_proc_probin,
|
Anum_pg_proc_probin,
|
||||||
ObjectIdGetDatum(foid),
|
ObjectIdGetDatum(foid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
34
src/backend/utils/cache/lsyscache.c
vendored
34
src/backend/utils/cache/lsyscache.c
vendored
@ -6,7 +6,7 @@
|
|||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.35 1999/11/07 23:08:26 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.36 1999/11/22 17:56:32 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Eventually, the index information should go through here, too.
|
* Eventually, the index information should go through here, too.
|
||||||
@ -263,7 +263,7 @@ get_opcode(Oid opno)
|
|||||||
{
|
{
|
||||||
HeapTuple tp;
|
HeapTuple tp;
|
||||||
|
|
||||||
tp = SearchSysCacheTuple(OPROID,
|
tp = SearchSysCacheTuple(OPEROID,
|
||||||
ObjectIdGetDatum(opno),
|
ObjectIdGetDatum(opno),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(tp))
|
if (HeapTupleIsValid(tp))
|
||||||
@ -286,7 +286,7 @@ get_opname(Oid opno)
|
|||||||
{
|
{
|
||||||
HeapTuple tp;
|
HeapTuple tp;
|
||||||
|
|
||||||
tp = SearchSysCacheTuple(OPROID,
|
tp = SearchSysCacheTuple(OPEROID,
|
||||||
ObjectIdGetDatum(opno),
|
ObjectIdGetDatum(opno),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(tp))
|
if (HeapTupleIsValid(tp))
|
||||||
@ -310,7 +310,7 @@ op_mergejoinable(Oid opno, Oid ltype, Oid rtype, Oid *leftOp, Oid *rightOp)
|
|||||||
{
|
{
|
||||||
HeapTuple tp;
|
HeapTuple tp;
|
||||||
|
|
||||||
tp = SearchSysCacheTuple(OPROID,
|
tp = SearchSysCacheTuple(OPEROID,
|
||||||
ObjectIdGetDatum(opno),
|
ObjectIdGetDatum(opno),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(tp))
|
if (HeapTupleIsValid(tp))
|
||||||
@ -342,7 +342,7 @@ op_hashjoinable(Oid opno, Oid ltype, Oid rtype)
|
|||||||
{
|
{
|
||||||
HeapTuple tp;
|
HeapTuple tp;
|
||||||
|
|
||||||
tp = SearchSysCacheTuple(OPROID,
|
tp = SearchSysCacheTuple(OPEROID,
|
||||||
ObjectIdGetDatum(opno),
|
ObjectIdGetDatum(opno),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(tp))
|
if (HeapTupleIsValid(tp))
|
||||||
@ -362,7 +362,7 @@ get_operator_tuple(Oid opno)
|
|||||||
{
|
{
|
||||||
HeapTuple optup;
|
HeapTuple optup;
|
||||||
|
|
||||||
if ((optup = SearchSysCacheTuple(OPROID,
|
if ((optup = SearchSysCacheTuple(OPEROID,
|
||||||
ObjectIdGetDatum(opno),
|
ObjectIdGetDatum(opno),
|
||||||
0, 0, 0)))
|
0, 0, 0)))
|
||||||
return optup;
|
return optup;
|
||||||
@ -381,7 +381,7 @@ get_commutator(Oid opno)
|
|||||||
{
|
{
|
||||||
HeapTuple tp;
|
HeapTuple tp;
|
||||||
|
|
||||||
tp = SearchSysCacheTuple(OPROID,
|
tp = SearchSysCacheTuple(OPEROID,
|
||||||
ObjectIdGetDatum(opno),
|
ObjectIdGetDatum(opno),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(tp))
|
if (HeapTupleIsValid(tp))
|
||||||
@ -404,7 +404,7 @@ get_negator(Oid opno)
|
|||||||
{
|
{
|
||||||
HeapTuple tp;
|
HeapTuple tp;
|
||||||
|
|
||||||
tp = SearchSysCacheTuple(OPROID,
|
tp = SearchSysCacheTuple(OPEROID,
|
||||||
ObjectIdGetDatum(opno),
|
ObjectIdGetDatum(opno),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(tp))
|
if (HeapTupleIsValid(tp))
|
||||||
@ -427,7 +427,7 @@ get_oprrest(Oid opno)
|
|||||||
{
|
{
|
||||||
HeapTuple tp;
|
HeapTuple tp;
|
||||||
|
|
||||||
tp = SearchSysCacheTuple(OPROID,
|
tp = SearchSysCacheTuple(OPEROID,
|
||||||
ObjectIdGetDatum(opno),
|
ObjectIdGetDatum(opno),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(tp))
|
if (HeapTupleIsValid(tp))
|
||||||
@ -450,7 +450,7 @@ get_oprjoin(Oid opno)
|
|||||||
{
|
{
|
||||||
HeapTuple tp;
|
HeapTuple tp;
|
||||||
|
|
||||||
tp = SearchSysCacheTuple(OPROID,
|
tp = SearchSysCacheTuple(OPEROID,
|
||||||
ObjectIdGetDatum(opno),
|
ObjectIdGetDatum(opno),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(tp))
|
if (HeapTupleIsValid(tp))
|
||||||
@ -474,7 +474,7 @@ get_func_rettype(Oid funcid)
|
|||||||
HeapTuple func_tuple;
|
HeapTuple func_tuple;
|
||||||
Oid funcrettype;
|
Oid funcrettype;
|
||||||
|
|
||||||
func_tuple = SearchSysCacheTuple(PROOID,
|
func_tuple = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(funcid),
|
ObjectIdGetDatum(funcid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
@ -548,7 +548,7 @@ get_typlen(Oid typid)
|
|||||||
{
|
{
|
||||||
HeapTuple tp;
|
HeapTuple tp;
|
||||||
|
|
||||||
tp = SearchSysCacheTuple(TYPOID,
|
tp = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(typid),
|
ObjectIdGetDatum(typid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(tp))
|
if (HeapTupleIsValid(tp))
|
||||||
@ -572,7 +572,7 @@ get_typbyval(Oid typid)
|
|||||||
{
|
{
|
||||||
HeapTuple tp;
|
HeapTuple tp;
|
||||||
|
|
||||||
tp = SearchSysCacheTuple(TYPOID,
|
tp = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(typid),
|
ObjectIdGetDatum(typid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(tp))
|
if (HeapTupleIsValid(tp))
|
||||||
@ -590,7 +590,7 @@ get_typalign(Oid typid)
|
|||||||
{
|
{
|
||||||
HeapTuple tp;
|
HeapTuple tp;
|
||||||
|
|
||||||
tp = SearchSysCacheTuple(TYPOID,
|
tp = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(typid),
|
ObjectIdGetDatum(typid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(tp))
|
if (HeapTupleIsValid(tp))
|
||||||
@ -628,7 +628,7 @@ get_typdefault(Oid typid)
|
|||||||
* First, see if there is a non-null typdefault field (usually there isn't)
|
* First, see if there is a non-null typdefault field (usually there isn't)
|
||||||
*/
|
*/
|
||||||
typDefault = (struct varlena *)
|
typDefault = (struct varlena *)
|
||||||
SearchSysCacheGetAttribute(TYPOID,
|
SearchSysCacheGetAttribute(TYPEOID,
|
||||||
Anum_pg_type_typdefault,
|
Anum_pg_type_typdefault,
|
||||||
ObjectIdGetDatum(typid),
|
ObjectIdGetDatum(typid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
@ -645,7 +645,7 @@ get_typdefault(Oid typid)
|
|||||||
* just did --- but at present this path isn't taken often enough to
|
* just did --- but at present this path isn't taken often enough to
|
||||||
* make it worth fixing.
|
* make it worth fixing.
|
||||||
*/
|
*/
|
||||||
typeTuple = SearchSysCacheTuple(TYPOID,
|
typeTuple = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(typid),
|
ObjectIdGetDatum(typid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
||||||
@ -727,7 +727,7 @@ get_typtype(Oid typid)
|
|||||||
{
|
{
|
||||||
HeapTuple tp;
|
HeapTuple tp;
|
||||||
|
|
||||||
tp = SearchSysCacheTuple(TYPOID,
|
tp = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(typid),
|
ObjectIdGetDatum(typid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (HeapTupleIsValid(tp))
|
if (HeapTupleIsValid(tp))
|
||||||
|
6
src/backend/utils/cache/relcache.c
vendored
6
src/backend/utils/cache/relcache.c
vendored
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.80 1999/11/21 01:58:22 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.81 1999/11/22 17:56:32 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -524,7 +524,7 @@ build_tupdesc_ind(RelationBuildDescInfo buildinfo,
|
|||||||
|
|
||||||
for (i = 1; i <= relation->rd_rel->relnatts; i++)
|
for (i = 1; i <= relation->rd_rel->relnatts; i++)
|
||||||
{
|
{
|
||||||
atttup = (HeapTuple) AttributeNumIndexScan(attrel,
|
atttup = (HeapTuple) AttributeRelidNumIndexScan(attrel,
|
||||||
RelationGetRelid(relation), i);
|
RelationGetRelid(relation), i);
|
||||||
|
|
||||||
if (!HeapTupleIsValid(atttup))
|
if (!HeapTupleIsValid(atttup))
|
||||||
@ -2085,7 +2085,7 @@ write_irels(void)
|
|||||||
SetProcessingMode(BootstrapProcessing);
|
SetProcessingMode(BootstrapProcessing);
|
||||||
|
|
||||||
bi.infotype = INFO_RELNAME;
|
bi.infotype = INFO_RELNAME;
|
||||||
bi.i.info_name = AttributeNumIndex;
|
bi.i.info_name = AttributeRelidNumIndex;
|
||||||
irel[0] = RelationBuildDesc(bi, NULL);
|
irel[0] = RelationBuildDesc(bi, NULL);
|
||||||
irel[0]->rd_isnailed = true;
|
irel[0]->rd_isnailed = true;
|
||||||
|
|
||||||
|
341
src/backend/utils/cache/syscache.c
vendored
341
src/backend/utils/cache/syscache.c
vendored
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.40 1999/11/18 13:56:29 wieck Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.41 1999/11/22 17:56:32 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* These routines allow the parser/planner/executor to perform
|
* These routines allow the parser/planner/executor to perform
|
||||||
@ -45,12 +45,63 @@ extern bool AMI_OVERRIDE; /* XXX style */
|
|||||||
|
|
||||||
typedef HeapTuple (*ScanFunc) ();
|
typedef HeapTuple (*ScanFunc) ();
|
||||||
|
|
||||||
/* ----------------
|
|
||||||
* Warning: cacheinfo[] below is changed, then be sure and
|
/*---------------------------------------------------------------------------
|
||||||
* update the magic constants in syscache.h!
|
|
||||||
* ----------------
|
Adding system caches:
|
||||||
*/
|
|
||||||
|
Add your new cache to the list in include/utils/syscache.h. Keep
|
||||||
|
the list sorted alphabetically and adjust the cache numbers
|
||||||
|
accordingly.
|
||||||
|
|
||||||
|
Add your entry to the cacheinfo[] array below. All cache lists are
|
||||||
|
alphabetical, so add it in the proper place. Specify the relation
|
||||||
|
name, number of arguments, argument names, size of tuple, index lookup
|
||||||
|
function, and index name.
|
||||||
|
|
||||||
|
In include/catalog/indexing.h, add a define for the number of indexes
|
||||||
|
in the relation, add a define for the index name, add an extern
|
||||||
|
array to hold the index names, define the index lookup function
|
||||||
|
prototype, and use DECLARE_UNIQUE_INDEX to define the index. Cache
|
||||||
|
lookups return only one row, so the index should be unique.
|
||||||
|
|
||||||
|
In backend/catalog/indexing.c, initialize the relation array with
|
||||||
|
the index names for the relation, and create the index lookup function.
|
||||||
|
Pick one that takes similar arguments and use that one, but keep the
|
||||||
|
function names in the same order as the cache list for clarity.
|
||||||
|
|
||||||
|
Finally, any place your relation gets heap_insert() or
|
||||||
|
heap_replace calls, include code to do a CatalogIndexInsert() to update
|
||||||
|
the system indexes. The heap_* calls do not update indexes.
|
||||||
|
|
||||||
|
bjm 1999/11/22
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
static struct cachedesc cacheinfo[] = {
|
static struct cachedesc cacheinfo[] = {
|
||||||
|
{AggregateRelationName, /* AGGNAME */
|
||||||
|
2,
|
||||||
|
{
|
||||||
|
Anum_pg_aggregate_aggname,
|
||||||
|
Anum_pg_aggregate_aggbasetype,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
offsetof(FormData_pg_aggregate, agginitval1),
|
||||||
|
AggregateNameTypeIndex,
|
||||||
|
AggregateNameTypeIndexScan},
|
||||||
|
{AccessMethodRelationName, /* AMNAME */
|
||||||
|
1,
|
||||||
|
{
|
||||||
|
Anum_pg_am_amname,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
sizeof(FormData_pg_am),
|
||||||
|
AmNameIndex,
|
||||||
|
AmNameIndexScan},
|
||||||
{AccessMethodOperatorRelationName, /* AMOPOPID */
|
{AccessMethodOperatorRelationName, /* AMOPOPID */
|
||||||
3,
|
3,
|
||||||
{
|
{
|
||||||
@ -61,7 +112,7 @@ static struct cachedesc cacheinfo[] = {
|
|||||||
},
|
},
|
||||||
sizeof(FormData_pg_amop),
|
sizeof(FormData_pg_amop),
|
||||||
AccessMethodOpidIndex,
|
AccessMethodOpidIndex,
|
||||||
(ScanFunc) AccessMethodOpidIndexScan},
|
AccessMethodOpidIndexScan},
|
||||||
{AccessMethodOperatorRelationName, /* AMOPSTRATEGY */
|
{AccessMethodOperatorRelationName, /* AMOPSTRATEGY */
|
||||||
3,
|
3,
|
||||||
{
|
{
|
||||||
@ -82,8 +133,8 @@ static struct cachedesc cacheinfo[] = {
|
|||||||
0
|
0
|
||||||
},
|
},
|
||||||
ATTRIBUTE_TUPLE_SIZE,
|
ATTRIBUTE_TUPLE_SIZE,
|
||||||
AttributeNameIndex,
|
AttributeRelidNameIndex,
|
||||||
(ScanFunc) AttributeNameIndexScan},
|
AttributeRelidNameIndexScan},
|
||||||
{AttributeRelationName, /* ATTNUM */
|
{AttributeRelationName, /* ATTNUM */
|
||||||
2,
|
2,
|
||||||
{
|
{
|
||||||
@ -93,8 +144,52 @@ static struct cachedesc cacheinfo[] = {
|
|||||||
0
|
0
|
||||||
},
|
},
|
||||||
ATTRIBUTE_TUPLE_SIZE,
|
ATTRIBUTE_TUPLE_SIZE,
|
||||||
AttributeNumIndex,
|
AttributeRelidNumIndex,
|
||||||
(ScanFunc) AttributeNumIndexScan},
|
(ScanFunc) AttributeRelidNumIndexScan},
|
||||||
|
{OperatorClassRelationName, /* CLADEFTYPE */
|
||||||
|
1,
|
||||||
|
{
|
||||||
|
Anum_pg_opclass_opcdeftype,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
sizeof(FormData_pg_opclass),
|
||||||
|
OpclassDeftypeIndex,
|
||||||
|
OpclassDeftypeIndexScan},
|
||||||
|
{OperatorClassRelationName, /* CLANAME */
|
||||||
|
1,
|
||||||
|
{
|
||||||
|
Anum_pg_opclass_opcname,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
sizeof(FormData_pg_opclass),
|
||||||
|
OpclassNameIndex,
|
||||||
|
OpclassNameIndexScan},
|
||||||
|
{GroupRelationName, /* GRONAME */
|
||||||
|
1,
|
||||||
|
{
|
||||||
|
Anum_pg_group_groname,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
offsetof(FormData_pg_group, grolist[0]),
|
||||||
|
GroupNameIndex,
|
||||||
|
GroupNameIndexScan},
|
||||||
|
{GroupRelationName, /* GROSYSID */
|
||||||
|
1,
|
||||||
|
{
|
||||||
|
Anum_pg_group_grosysid,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
offsetof(FormData_pg_group, grolist[0]),
|
||||||
|
GroupSysidIndex,
|
||||||
|
GroupSysidIndexScan},
|
||||||
{IndexRelationName, /* INDEXRELID */
|
{IndexRelationName, /* INDEXRELID */
|
||||||
1,
|
1,
|
||||||
{
|
{
|
||||||
@ -105,8 +200,19 @@ static struct cachedesc cacheinfo[] = {
|
|||||||
},
|
},
|
||||||
offsetof(FormData_pg_index, indpred),
|
offsetof(FormData_pg_index, indpred),
|
||||||
IndexRelidIndex,
|
IndexRelidIndex,
|
||||||
(ScanFunc) IndexRelidIndexScan},
|
IndexRelidIndexScan},
|
||||||
{LanguageRelationName, /* LANNAME */
|
{InheritsRelationName, /* INHRELID */
|
||||||
|
2,
|
||||||
|
{
|
||||||
|
Anum_pg_inherits_inhrelid,
|
||||||
|
Anum_pg_inherits_inhseqno,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
sizeof(FormData_pg_inherits),
|
||||||
|
InheritsRelidSeqnoIndex,
|
||||||
|
InheritsRelidSeqnoIndexScan},
|
||||||
|
{LanguageRelationName, /* LANGNAME */
|
||||||
1,
|
1,
|
||||||
{
|
{
|
||||||
Anum_pg_language_lanname,
|
Anum_pg_language_lanname,
|
||||||
@ -115,9 +221,31 @@ static struct cachedesc cacheinfo[] = {
|
|||||||
0
|
0
|
||||||
},
|
},
|
||||||
offsetof(FormData_pg_language, lancompiler),
|
offsetof(FormData_pg_language, lancompiler),
|
||||||
NULL,
|
LanguageNameIndex,
|
||||||
NULL},
|
LanguageNameIndexScan},
|
||||||
{OperatorRelationName, /* OPRNAME */
|
{LanguageRelationName, /* LANGOID */
|
||||||
|
1,
|
||||||
|
{
|
||||||
|
ObjectIdAttributeNumber,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
offsetof(FormData_pg_language, lancompiler),
|
||||||
|
LanguageOidIndex,
|
||||||
|
LanguageOidIndexScan},
|
||||||
|
{ListenerRelationName, /* LISTENREL */
|
||||||
|
2,
|
||||||
|
{
|
||||||
|
Anum_pg_listener_relname,
|
||||||
|
Anum_pg_listener_pid,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
sizeof(FormData_pg_listener),
|
||||||
|
ListenerRelnamePidIndex,
|
||||||
|
ListenerRelnamePidIndexScan},
|
||||||
|
{OperatorRelationName, /* OPERNAME */
|
||||||
4,
|
4,
|
||||||
{
|
{
|
||||||
Anum_pg_operator_oprname,
|
Anum_pg_operator_oprname,
|
||||||
@ -126,9 +254,9 @@ static struct cachedesc cacheinfo[] = {
|
|||||||
Anum_pg_operator_oprkind
|
Anum_pg_operator_oprkind
|
||||||
},
|
},
|
||||||
sizeof(FormData_pg_operator),
|
sizeof(FormData_pg_operator),
|
||||||
NULL,
|
OperatorNameIndex,
|
||||||
NULL},
|
(ScanFunc) OperatorNameIndexScan},
|
||||||
{OperatorRelationName, /* OPROID */
|
{OperatorRelationName, /* OPEROID */
|
||||||
1,
|
1,
|
||||||
{
|
{
|
||||||
ObjectIdAttributeNumber,
|
ObjectIdAttributeNumber,
|
||||||
@ -137,9 +265,9 @@ static struct cachedesc cacheinfo[] = {
|
|||||||
0
|
0
|
||||||
},
|
},
|
||||||
sizeof(FormData_pg_operator),
|
sizeof(FormData_pg_operator),
|
||||||
NULL,
|
OperatorOidIndex,
|
||||||
(ScanFunc) NULL},
|
OperatorOidIndexScan},
|
||||||
{ProcedureRelationName, /* PRONAME */
|
{ProcedureRelationName, /* PROCNAME */
|
||||||
3,
|
3,
|
||||||
{
|
{
|
||||||
Anum_pg_proc_proname,
|
Anum_pg_proc_proname,
|
||||||
@ -150,7 +278,7 @@ static struct cachedesc cacheinfo[] = {
|
|||||||
offsetof(FormData_pg_proc, prosrc),
|
offsetof(FormData_pg_proc, prosrc),
|
||||||
ProcedureNameIndex,
|
ProcedureNameIndex,
|
||||||
(ScanFunc) ProcedureNameIndexScan},
|
(ScanFunc) ProcedureNameIndexScan},
|
||||||
{ProcedureRelationName, /* PROOID */
|
{ProcedureRelationName, /* PROCOID */
|
||||||
1,
|
1,
|
||||||
{
|
{
|
||||||
ObjectIdAttributeNumber,
|
ObjectIdAttributeNumber,
|
||||||
@ -160,7 +288,7 @@ static struct cachedesc cacheinfo[] = {
|
|||||||
},
|
},
|
||||||
offsetof(FormData_pg_proc, prosrc),
|
offsetof(FormData_pg_proc, prosrc),
|
||||||
ProcedureOidIndex,
|
ProcedureOidIndex,
|
||||||
(ScanFunc) ProcedureOidIndexScan},
|
ProcedureOidIndexScan},
|
||||||
{RelationRelationName, /* RELNAME */
|
{RelationRelationName, /* RELNAME */
|
||||||
1,
|
1,
|
||||||
{
|
{
|
||||||
@ -171,7 +299,7 @@ static struct cachedesc cacheinfo[] = {
|
|||||||
},
|
},
|
||||||
CLASS_TUPLE_SIZE,
|
CLASS_TUPLE_SIZE,
|
||||||
ClassNameIndex,
|
ClassNameIndex,
|
||||||
(ScanFunc) ClassNameIndexScan},
|
ClassNameIndexScan},
|
||||||
{RelationRelationName, /* RELOID */
|
{RelationRelationName, /* RELOID */
|
||||||
1,
|
1,
|
||||||
{
|
{
|
||||||
@ -182,8 +310,30 @@ static struct cachedesc cacheinfo[] = {
|
|||||||
},
|
},
|
||||||
CLASS_TUPLE_SIZE,
|
CLASS_TUPLE_SIZE,
|
||||||
ClassOidIndex,
|
ClassOidIndex,
|
||||||
(ScanFunc) ClassOidIndexScan},
|
ClassOidIndexScan},
|
||||||
{TypeRelationName, /* TYPNAME */
|
{RewriteRelationName, /* REWRITENAME */
|
||||||
|
1,
|
||||||
|
{
|
||||||
|
Anum_pg_rewrite_rulename,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
offsetof(FormData_pg_rewrite, ev_qual),
|
||||||
|
RewriteRulenameIndex,
|
||||||
|
RewriteRulenameIndexScan},
|
||||||
|
{RewriteRelationName, /* RULEOID */
|
||||||
|
1,
|
||||||
|
{
|
||||||
|
ObjectIdAttributeNumber,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
},
|
||||||
|
offsetof(FormData_pg_rewrite, ev_qual),
|
||||||
|
RewriteOidIndex,
|
||||||
|
RewriteOidIndexScan},
|
||||||
|
{TypeRelationName, /* TYPENAME */
|
||||||
1,
|
1,
|
||||||
{
|
{
|
||||||
Anum_pg_type_typname,
|
Anum_pg_type_typname,
|
||||||
@ -194,7 +344,7 @@ static struct cachedesc cacheinfo[] = {
|
|||||||
offsetof(FormData_pg_type, typalign) +sizeof(char),
|
offsetof(FormData_pg_type, typalign) +sizeof(char),
|
||||||
TypeNameIndex,
|
TypeNameIndex,
|
||||||
TypeNameIndexScan},
|
TypeNameIndexScan},
|
||||||
{TypeRelationName, /* TYPOID */
|
{TypeRelationName, /* TYPEOID */
|
||||||
1,
|
1,
|
||||||
{
|
{
|
||||||
ObjectIdAttributeNumber,
|
ObjectIdAttributeNumber,
|
||||||
@ -205,73 +355,7 @@ static struct cachedesc cacheinfo[] = {
|
|||||||
offsetof(FormData_pg_type, typalign) +sizeof(char),
|
offsetof(FormData_pg_type, typalign) +sizeof(char),
|
||||||
TypeOidIndex,
|
TypeOidIndex,
|
||||||
TypeOidIndexScan},
|
TypeOidIndexScan},
|
||||||
{AccessMethodRelationName, /* AMNAME */
|
{ShadowRelationName, /* USERNAME */
|
||||||
1,
|
|
||||||
{
|
|
||||||
Anum_pg_am_amname,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
sizeof(FormData_pg_am),
|
|
||||||
NULL,
|
|
||||||
NULL},
|
|
||||||
{OperatorClassRelationName, /* CLANAME */
|
|
||||||
1,
|
|
||||||
{
|
|
||||||
Anum_pg_opclass_opcname,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
sizeof(FormData_pg_opclass),
|
|
||||||
NULL,
|
|
||||||
NULL},
|
|
||||||
{InheritsRelationName, /* INHRELID */
|
|
||||||
2,
|
|
||||||
{
|
|
||||||
Anum_pg_inherits_inhrel,
|
|
||||||
Anum_pg_inherits_inhseqno,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
sizeof(FormData_pg_inherits),
|
|
||||||
NULL,
|
|
||||||
(ScanFunc) NULL},
|
|
||||||
{RewriteRelationName, /* RULOID */
|
|
||||||
1,
|
|
||||||
{
|
|
||||||
ObjectIdAttributeNumber,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
offsetof(FormData_pg_rewrite, ev_qual),
|
|
||||||
NULL,
|
|
||||||
(ScanFunc) NULL},
|
|
||||||
{AggregateRelationName, /* AGGNAME */
|
|
||||||
2,
|
|
||||||
{
|
|
||||||
Anum_pg_aggregate_aggname,
|
|
||||||
Anum_pg_aggregate_aggbasetype,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
offsetof(FormData_pg_aggregate, agginitval1),
|
|
||||||
NULL,
|
|
||||||
(ScanFunc) NULL},
|
|
||||||
{ListenerRelationName, /* LISTENREL */
|
|
||||||
2,
|
|
||||||
{
|
|
||||||
Anum_pg_listener_relname,
|
|
||||||
Anum_pg_listener_pid,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
sizeof(FormData_pg_listener),
|
|
||||||
NULL,
|
|
||||||
(ScanFunc) NULL},
|
|
||||||
{ShadowRelationName, /* USENAME */
|
|
||||||
1,
|
1,
|
||||||
{
|
{
|
||||||
Anum_pg_shadow_usename,
|
Anum_pg_shadow_usename,
|
||||||
@ -280,9 +364,10 @@ static struct cachedesc cacheinfo[] = {
|
|||||||
0
|
0
|
||||||
},
|
},
|
||||||
sizeof(FormData_pg_shadow),
|
sizeof(FormData_pg_shadow),
|
||||||
NULL,
|
NULL,NULL
|
||||||
(ScanFunc) NULL},
|
/* ShadowNameIndex,
|
||||||
{ShadowRelationName, /* USESYSID */
|
ShadowNameIndexScan*/},
|
||||||
|
{ShadowRelationName, /* USERSYSID */
|
||||||
1,
|
1,
|
||||||
{
|
{
|
||||||
Anum_pg_shadow_usesysid,
|
Anum_pg_shadow_usesysid,
|
||||||
@ -291,63 +376,9 @@ static struct cachedesc cacheinfo[] = {
|
|||||||
0
|
0
|
||||||
},
|
},
|
||||||
sizeof(FormData_pg_shadow),
|
sizeof(FormData_pg_shadow),
|
||||||
NULL,
|
NULL,NULL
|
||||||
(ScanFunc) NULL},
|
/* ShadowSysidIndex,
|
||||||
{GroupRelationName, /* GRONAME */
|
ShadowSysidIndexScan*/}
|
||||||
1,
|
|
||||||
{
|
|
||||||
Anum_pg_group_groname,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
offsetof(FormData_pg_group, grolist[0]),
|
|
||||||
NULL,
|
|
||||||
(ScanFunc) NULL},
|
|
||||||
{GroupRelationName, /* GROSYSID */
|
|
||||||
1,
|
|
||||||
{
|
|
||||||
Anum_pg_group_grosysid,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
offsetof(FormData_pg_group, grolist[0]),
|
|
||||||
NULL,
|
|
||||||
(ScanFunc) NULL},
|
|
||||||
{RewriteRelationName, /* REWRITENAME */
|
|
||||||
1,
|
|
||||||
{
|
|
||||||
Anum_pg_rewrite_rulename,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
offsetof(FormData_pg_rewrite, ev_qual),
|
|
||||||
NULL,
|
|
||||||
(ScanFunc) NULL},
|
|
||||||
{OperatorClassRelationName, /* CLADEFTYPE */
|
|
||||||
1,
|
|
||||||
{
|
|
||||||
Anum_pg_opclass_opcdeftype,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
sizeof(FormData_pg_opclass),
|
|
||||||
NULL,
|
|
||||||
(ScanFunc) NULL},
|
|
||||||
{LanguageRelationName, /* LANOID */
|
|
||||||
1,
|
|
||||||
{
|
|
||||||
ObjectIdAttributeNumber,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
},
|
|
||||||
offsetof(FormData_pg_language, lancompiler),
|
|
||||||
NULL,
|
|
||||||
NULL}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct catcache *SysCache[lengthof(cacheinfo)];
|
static struct catcache *SysCache[lengthof(cacheinfo)];
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.36 1999/11/07 23:08:27 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.37 1999/11/22 17:56:33 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -67,7 +67,7 @@ fmgr_dynamic(Oid procedureId, int *pronargs)
|
|||||||
*/
|
*/
|
||||||
rel = heap_openr(ProcedureRelationName, AccessShareLock);
|
rel = heap_openr(ProcedureRelationName, AccessShareLock);
|
||||||
|
|
||||||
procedureTuple = SearchSysCacheTuple(PROOID,
|
procedureTuple = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(procedureId),
|
ObjectIdGetDatum(procedureId),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(procedureTuple))
|
if (!HeapTupleIsValid(procedureTuple))
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.32 1999/07/17 20:18:04 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.33 1999/11/22 17:56:33 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -217,7 +217,7 @@ fmgr_info(Oid procedureId, FmgrInfo *finfo)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
procedureTuple = SearchSysCacheTuple(PROOID,
|
procedureTuple = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(procedureId),
|
ObjectIdGetDatum(procedureId),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(procedureTuple))
|
if (!HeapTupleIsValid(procedureTuple))
|
||||||
@ -270,7 +270,7 @@ fmgr_info(Oid procedureId, FmgrInfo *finfo)
|
|||||||
* this is the case, we return a NULL function pointer and
|
* this is the case, we return a NULL function pointer and
|
||||||
* the number of arguments from the procedure.
|
* the number of arguments from the procedure.
|
||||||
*/
|
*/
|
||||||
languageTuple = SearchSysCacheTuple(LANOID,
|
languageTuple = SearchSysCacheTuple(LANGOID,
|
||||||
ObjectIdGetDatum(procedureStruct->prolang),
|
ObjectIdGetDatum(procedureStruct->prolang),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(languageTuple))
|
if (!HeapTupleIsValid(languageTuple))
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.35 1999/10/06 21:58:10 vadim Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.36 1999/11/22 17:56:34 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -453,7 +453,7 @@ SetUserId()
|
|||||||
}
|
}
|
||||||
|
|
||||||
userName = GetPgUserName();
|
userName = GetPgUserName();
|
||||||
userTup = SearchSysCacheTuple(USENAME,
|
userTup = SearchSysCacheTuple(USERNAME,
|
||||||
PointerGetDatum(userName),
|
PointerGetDatum(userName),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(userTup))
|
if (!HeapTupleIsValid(userTup))
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/superuser.c,v 1.10 1999/07/16 05:23:27 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/misc/superuser.c,v 1.11 1999/11/22 17:56:35 momjian Exp $
|
||||||
*
|
*
|
||||||
* DESCRIPTION
|
* DESCRIPTION
|
||||||
* See superuser().
|
* See superuser().
|
||||||
@ -30,7 +30,7 @@ superuser(void)
|
|||||||
|
|
||||||
HeapTuple utup;
|
HeapTuple utup;
|
||||||
|
|
||||||
utup = SearchSysCacheTuple(USENAME,
|
utup = SearchSysCacheTuple(USERNAME,
|
||||||
PointerGetDatum(UserName),
|
PointerGetDatum(UserName),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
Assert(utup != NULL);
|
Assert(utup != NULL);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.34 1999/10/23 03:13:26 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.35 1999/11/22 17:56:36 momjian Exp $
|
||||||
*
|
*
|
||||||
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
|
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
|
||||||
*
|
*
|
||||||
@ -118,7 +118,7 @@ findParentsByOid(TableInfo *tblinfo, int numTables,
|
|||||||
numParents = 0;
|
numParents = 0;
|
||||||
for (i = 0; i < numInherits; i++)
|
for (i = 0; i < numInherits; i++)
|
||||||
{
|
{
|
||||||
if (strcmp(inhinfo[i].inhrel, oid) == 0)
|
if (strcmp(inhinfo[i].inhrelid, oid) == 0)
|
||||||
numParents++;
|
numParents++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ findParentsByOid(TableInfo *tblinfo, int numTables,
|
|||||||
j = 0;
|
j = 0;
|
||||||
for (i = 0; i < numInherits; i++)
|
for (i = 0; i < numInherits; i++)
|
||||||
{
|
{
|
||||||
if (strcmp(inhinfo[i].inhrel, oid) == 0)
|
if (strcmp(inhinfo[i].inhrelid, oid) == 0)
|
||||||
{
|
{
|
||||||
parentInd = findTableByOid(tblinfo, numTables,
|
parentInd = findTableByOid(tblinfo, numTables,
|
||||||
inhinfo[i].inhparent);
|
inhinfo[i].inhparent);
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.123 1999/10/23 03:13:26 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.124 1999/11/22 17:56:36 momjian Exp $
|
||||||
*
|
*
|
||||||
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
|
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
|
||||||
*
|
*
|
||||||
@ -1096,8 +1096,8 @@ clearInhInfo(InhInfo *inh, int numInherits)
|
|||||||
return;
|
return;
|
||||||
for (i = 0; i < numInherits; ++i)
|
for (i = 0; i < numInherits; ++i)
|
||||||
{
|
{
|
||||||
if (inh[i].inhrel)
|
if (inh[i].inhrelid)
|
||||||
free(inh[i].inhrel);
|
free(inh[i].inhrelid);
|
||||||
if (inh[i].inhparent)
|
if (inh[i].inhparent)
|
||||||
free(inh[i].inhparent);
|
free(inh[i].inhparent);
|
||||||
}
|
}
|
||||||
@ -1478,7 +1478,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
|
|||||||
|
|
||||||
sprintf(query, "SELECT rcname from pg_relcheck, pg_inherits as i "
|
sprintf(query, "SELECT rcname from pg_relcheck, pg_inherits as i "
|
||||||
"where rcrelid = '%s'::oid "
|
"where rcrelid = '%s'::oid "
|
||||||
" and rcrelid = i.inhrel"
|
" and rcrelid = i.inhrelid"
|
||||||
" and exists "
|
" and exists "
|
||||||
" (select * from pg_relcheck as c "
|
" (select * from pg_relcheck as c "
|
||||||
" where c.rcname = pg_relcheck.rcname "
|
" where c.rcname = pg_relcheck.rcname "
|
||||||
@ -1523,7 +1523,7 @@ getTables(int *numTables, FuncInfo *finfo, int numFuncs)
|
|||||||
"where rcrelid = '%s'::oid "
|
"where rcrelid = '%s'::oid "
|
||||||
" and not exists "
|
" and not exists "
|
||||||
" (select * from pg_relcheck as c, pg_inherits as i "
|
" (select * from pg_relcheck as c, pg_inherits as i "
|
||||||
" where i.inhrel = pg_relcheck.rcrelid "
|
" where i.inhrelid = pg_relcheck.rcrelid "
|
||||||
" and c.rcname = pg_relcheck.rcname "
|
" and c.rcname = pg_relcheck.rcname "
|
||||||
" and c.rcsrc = pg_relcheck.rcsrc "
|
" and c.rcsrc = pg_relcheck.rcsrc "
|
||||||
" and c.rcrelid = i.inhparent) ",
|
" and c.rcrelid = i.inhparent) ",
|
||||||
@ -1738,12 +1738,12 @@ getInherits(int *numInherits)
|
|||||||
char query[MAX_QUERY_SIZE];
|
char query[MAX_QUERY_SIZE];
|
||||||
InhInfo *inhinfo;
|
InhInfo *inhinfo;
|
||||||
|
|
||||||
int i_inhrel;
|
int i_inhrelid;
|
||||||
int i_inhparent;
|
int i_inhparent;
|
||||||
|
|
||||||
/* find all the inheritance information */
|
/* find all the inheritance information */
|
||||||
|
|
||||||
sprintf(query, "SELECT inhrel, inhparent from pg_inherits");
|
sprintf(query, "SELECT inhrelid, inhparent from pg_inherits");
|
||||||
|
|
||||||
res = PQexec(g_conn, query);
|
res = PQexec(g_conn, query);
|
||||||
if (!res ||
|
if (!res ||
|
||||||
@ -1759,12 +1759,12 @@ getInherits(int *numInherits)
|
|||||||
|
|
||||||
inhinfo = (InhInfo *) malloc(ntups * sizeof(InhInfo));
|
inhinfo = (InhInfo *) malloc(ntups * sizeof(InhInfo));
|
||||||
|
|
||||||
i_inhrel = PQfnumber(res, "inhrel");
|
i_inhrelid = PQfnumber(res, "inhrelid");
|
||||||
i_inhparent = PQfnumber(res, "inhparent");
|
i_inhparent = PQfnumber(res, "inhparent");
|
||||||
|
|
||||||
for (i = 0; i < ntups; i++)
|
for (i = 0; i < ntups; i++)
|
||||||
{
|
{
|
||||||
inhinfo[i].inhrel = strdup(PQgetvalue(res, i, i_inhrel));
|
inhinfo[i].inhrelid = strdup(PQgetvalue(res, i, i_inhrelid));
|
||||||
inhinfo[i].inhparent = strdup(PQgetvalue(res, i, i_inhparent));
|
inhinfo[i].inhparent = strdup(PQgetvalue(res, i, i_inhparent));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: pg_dump.h,v 1.40 1999/10/23 03:13:26 tgl Exp $
|
* $Id: pg_dump.h,v 1.41 1999/11/22 17:56:36 momjian Exp $
|
||||||
*
|
*
|
||||||
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
|
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
|
||||||
*
|
*
|
||||||
@ -105,7 +105,7 @@ typedef struct _tableInfo
|
|||||||
|
|
||||||
typedef struct _inhInfo
|
typedef struct _inhInfo
|
||||||
{
|
{
|
||||||
char *inhrel;
|
char *inhrelid;
|
||||||
char *inhparent;
|
char *inhparent;
|
||||||
} InhInfo;
|
} InhInfo;
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: catversion.h,v 1.2 1999/11/04 08:01:06 inoue Exp $
|
* $Id: catversion.h,v 1.3 1999/11/22 17:56:37 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -51,6 +51,6 @@
|
|||||||
* catalog changes on the same day...)
|
* catalog changes on the same day...)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CATALOG_VERSION_NO 199911041
|
#define CATALOG_VERSION_NO 199911221
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: indexing.h,v 1.28 1999/11/04 08:01:06 inoue Exp $
|
* $Id: indexing.h,v 1.29 1999/11/22 17:56:37 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -19,16 +19,26 @@
|
|||||||
/*
|
/*
|
||||||
* Some definitions for indices on pg_attribute
|
* Some definitions for indices on pg_attribute
|
||||||
*/
|
*/
|
||||||
|
#define Num_pg_aggregate_indices 1
|
||||||
|
#define Num_pg_am_indices 1
|
||||||
#define Num_pg_amop_indices 2
|
#define Num_pg_amop_indices 2
|
||||||
#define Num_pg_attr_indices 3
|
#define Num_pg_attr_indices 2
|
||||||
#define Num_pg_index_indices 1
|
|
||||||
#define Num_pg_proc_indices 2
|
|
||||||
#define Num_pg_type_indices 2
|
|
||||||
#define Num_pg_class_indices 2
|
|
||||||
#define Num_pg_attrdef_indices 1
|
#define Num_pg_attrdef_indices 1
|
||||||
#define Num_pg_relcheck_indices 1
|
#define Num_pg_class_indices 2
|
||||||
#define Num_pg_trigger_indices 3
|
|
||||||
#define Num_pg_description_indices 1
|
#define Num_pg_description_indices 1
|
||||||
|
#define Num_pg_group_indices 2
|
||||||
|
#define Num_pg_index_indices 1
|
||||||
|
#define Num_pg_inherits_indices 1
|
||||||
|
#define Num_pg_language_indices 2
|
||||||
|
#define Num_pg_listener_indices 1
|
||||||
|
#define Num_pg_opclass_indices 2
|
||||||
|
#define Num_pg_operator_indices 2
|
||||||
|
#define Num_pg_proc_indices 2
|
||||||
|
#define Num_pg_relcheck_indices 1
|
||||||
|
#define Num_pg_rewrite_indices 2
|
||||||
|
#define Num_pg_shadow_indices 2
|
||||||
|
#define Num_pg_trigger_indices 3
|
||||||
|
#define Num_pg_type_indices 2
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -36,33 +46,58 @@
|
|||||||
*/
|
*/
|
||||||
#define AccessMethodOpidIndex "pg_amop_opid_index"
|
#define AccessMethodOpidIndex "pg_amop_opid_index"
|
||||||
#define AccessMethodStrategyIndex "pg_amop_strategy_index"
|
#define AccessMethodStrategyIndex "pg_amop_strategy_index"
|
||||||
#define AttributeNameIndex "pg_attribute_relid_attnam_index"
|
#define AggregateNameTypeIndex "pg_aggregate_name_type_index"
|
||||||
#define AttributeNumIndex "pg_attribute_relid_attnum_index"
|
#define AmNameIndex "pg_am_name_index"
|
||||||
#define IndexRelidIndex "pg_index_indexrelid_index"
|
|
||||||
#define AttributeRelidIndex "pg_attribute_attrelid_index"
|
|
||||||
#define ProcedureOidIndex "pg_proc_oid_index"
|
|
||||||
#define ProcedureNameIndex "pg_proc_proname_narg_type_index"
|
|
||||||
#define TypeOidIndex "pg_type_oid_index"
|
|
||||||
#define TypeNameIndex "pg_type_typname_index"
|
|
||||||
#define ClassOidIndex "pg_class_oid_index"
|
|
||||||
#define ClassNameIndex "pg_class_relname_index"
|
|
||||||
#define AttrDefaultIndex "pg_attrdef_adrelid_index"
|
#define AttrDefaultIndex "pg_attrdef_adrelid_index"
|
||||||
|
#define AttributeRelidNameIndex "pg_attribute_relid_attnam_index"
|
||||||
|
#define AttributeRelidNumIndex "pg_attribute_relid_attnum_index"
|
||||||
|
#define ClassNameIndex "pg_class_relname_index"
|
||||||
|
#define ClassOidIndex "pg_class_oid_index"
|
||||||
|
#define DescriptionObjIndex "pg_description_objoid_index"
|
||||||
|
#define GroupNameIndex "pg_group_name_index"
|
||||||
|
#define GroupSysidIndex "pg_group_sysid_index"
|
||||||
|
#define IndexRelidIndex "pg_index_indexrelid_index"
|
||||||
|
#define InheritsRelidSeqnoIndex "pg_inherits_relid_seqno_index"
|
||||||
|
#define LanguageNameIndex "pg_language_name_index"
|
||||||
|
#define LanguageOidIndex "pg_language_oid_index"
|
||||||
|
#define ListenerRelnamePidIndex "pg_listener_relname_pid_index"
|
||||||
|
#define OpclassDeftypeIndex "pg_opclass_deftype_index"
|
||||||
|
#define OpclassNameIndex "pg_opclass_name_index"
|
||||||
|
#define OperatorNameIndex "pg_operator_oprname_l_r_k_index"
|
||||||
|
#define OperatorOidIndex "pg_operator_oid_index"
|
||||||
|
#define ProcedureNameIndex "pg_proc_proname_narg_type_index"
|
||||||
|
#define ProcedureOidIndex "pg_proc_oid_index"
|
||||||
#define RelCheckIndex "pg_relcheck_rcrelid_index"
|
#define RelCheckIndex "pg_relcheck_rcrelid_index"
|
||||||
#define TriggerRelidIndex "pg_trigger_tgrelid_index"
|
#define RewriteOidIndex "pg_rewrite_oid_index"
|
||||||
|
#define RewriteRulenameIndex "pg_rewrite_rulename_index"
|
||||||
|
#define ShadowNameIndex "pg_shadow_name_index"
|
||||||
|
#define ShadowSysidIndex "pg_shadow_sysid_index"
|
||||||
#define TriggerConstrNameIndex "pg_trigger_tgconstrname_index"
|
#define TriggerConstrNameIndex "pg_trigger_tgconstrname_index"
|
||||||
#define TriggerConstrRelidIndex "pg_trigger_tgconstrrelid_index"
|
#define TriggerConstrRelidIndex "pg_trigger_tgconstrrelid_index"
|
||||||
#define DescriptionObjIndex "pg_description_objoid_index"
|
#define TriggerRelidIndex "pg_trigger_tgrelid_index"
|
||||||
|
#define TypeNameIndex "pg_type_typname_index"
|
||||||
|
#define TypeOidIndex "pg_type_oid_index"
|
||||||
|
|
||||||
|
extern char *Name_pg_aggregate_indices[];
|
||||||
|
extern char *Name_pg_am_indices[];
|
||||||
extern char *Name_pg_amop_indices[];
|
extern char *Name_pg_amop_indices[];
|
||||||
extern char *Name_pg_attr_indices[];
|
extern char *Name_pg_attr_indices[];
|
||||||
extern char *Name_pg_index_indices[];
|
|
||||||
extern char *Name_pg_proc_indices[];
|
|
||||||
extern char *Name_pg_type_indices[];
|
|
||||||
extern char *Name_pg_class_indices[];
|
|
||||||
extern char *Name_pg_attrdef_indices[];
|
extern char *Name_pg_attrdef_indices[];
|
||||||
extern char *Name_pg_relcheck_indices[];
|
extern char *Name_pg_class_indices[];
|
||||||
extern char *Name_pg_trigger_indices[];
|
|
||||||
extern char *Name_pg_description_indices[];
|
extern char *Name_pg_description_indices[];
|
||||||
|
extern char *Name_pg_group_indices[];
|
||||||
|
extern char *Name_pg_index_indices[];
|
||||||
|
extern char *Name_pg_inherits_indices[];
|
||||||
|
extern char *Name_pg_language_indices[];
|
||||||
|
extern char *Name_pg_listener_indices[];
|
||||||
|
extern char *Name_pg_opclass_indices[];
|
||||||
|
extern char *Name_pg_operator_indices[];
|
||||||
|
extern char *Name_pg_proc_indices[];
|
||||||
|
extern char *Name_pg_relcheck_indices[];
|
||||||
|
extern char *Name_pg_rewrite_indices[];
|
||||||
|
extern char *Name_pg_shadow_indices[];
|
||||||
|
extern char *Name_pg_trigger_indices[];
|
||||||
|
extern char *Name_pg_type_indices[];
|
||||||
|
|
||||||
|
|
||||||
extern char *IndexedCatalogNames[];
|
extern char *IndexedCatalogNames[];
|
||||||
@ -84,18 +119,39 @@ extern HeapTuple AccessMethodOpidIndexScan(Relation heapRelation,
|
|||||||
Oid claid, Oid opopr, Oid opid);
|
Oid claid, Oid opopr, Oid opid);
|
||||||
extern HeapTuple AccessMethodStrategyIndexScan(Relation heapRelation,
|
extern HeapTuple AccessMethodStrategyIndexScan(Relation heapRelation,
|
||||||
Oid opid, Oid claid, int2 opstrategy);
|
Oid opid, Oid claid, int2 opstrategy);
|
||||||
extern HeapTuple AttributeNameIndexScan(Relation heapRelation,
|
extern HeapTuple AggregateNameTypeIndexScan(Relation heapRelation,
|
||||||
|
char *aggName, Oid aggType);
|
||||||
|
extern HeapTuple AmNameIndexScan(Relation heapRelation, char *amName);
|
||||||
|
extern HeapTuple AttributeRelidNameIndexScan(Relation heapRelation,
|
||||||
Oid relid, char *attname);
|
Oid relid, char *attname);
|
||||||
extern HeapTuple AttributeNumIndexScan(Relation heapRelation,
|
extern HeapTuple AttributeRelidNumIndexScan(Relation heapRelation,
|
||||||
Oid relid, AttrNumber attnum);
|
Oid relid, AttrNumber attnum);
|
||||||
extern HeapTuple IndexRelidIndexScan(Relation heapRelation, Oid relid);
|
extern HeapTuple ClassNameIndexScan(Relation heapRelation, char *relName);
|
||||||
extern HeapTuple ProcedureOidIndexScan(Relation heapRelation, Oid procId);
|
|
||||||
extern HeapTuple ProcedureNameIndexScan(Relation heapRelation,
|
|
||||||
char *procName, int2 nargs, Oid *argTypes);
|
|
||||||
extern HeapTuple TypeOidIndexScan(Relation heapRelation, Oid typeId);
|
|
||||||
extern HeapTuple TypeNameIndexScan(Relation heapRelation, char *typeName);
|
|
||||||
extern HeapTuple ClassNameIndexScan(Relation heapRelation, char *relName);
|
extern HeapTuple ClassNameIndexScan(Relation heapRelation, char *relName);
|
||||||
extern HeapTuple ClassOidIndexScan(Relation heapRelation, Oid relId);
|
extern HeapTuple ClassOidIndexScan(Relation heapRelation, Oid relId);
|
||||||
|
extern HeapTuple GroupNameIndexScan(Relation heapRelation, char *groName);
|
||||||
|
extern HeapTuple GroupSysidIndexScan(Relation heapRelation, int4 sysId);
|
||||||
|
extern HeapTuple IndexRelidIndexScan(Relation heapRelation, Oid relid);
|
||||||
|
extern HeapTuple InheritsRelidSeqnoIndexScan(Relation heapRelation, Oid relid,
|
||||||
|
int4 seqno);
|
||||||
|
extern HeapTuple LanguageNameIndexScan(Relation heapRelation, char *lanName);
|
||||||
|
extern HeapTuple LanguageOidIndexScan(Relation heapRelation, Oid lanId);
|
||||||
|
extern HeapTuple ListenerRelnamePidIndexScan(Relation heapRelation, char *relName, int4 pid);
|
||||||
|
extern HeapTuple OpclassDeftypeIndexScan(Relation heapRelation, Oid defType);
|
||||||
|
extern HeapTuple OpclassNameIndexScan(Relation heapRelation, char *opcName);
|
||||||
|
extern HeapTuple OperatorNameIndexScan(Relation heapRelation,
|
||||||
|
char *oprName, Oid oprLeft, Oid oprRight, char oprKind);
|
||||||
|
extern HeapTuple OperatorOidIndexScan(Relation heapRelation, Oid oprId);
|
||||||
|
extern HeapTuple ProcedureNameIndexScan(Relation heapRelation,
|
||||||
|
char *procName, int2 nargs, Oid *argTypes);
|
||||||
|
extern HeapTuple ProcedureOidIndexScan(Relation heapRelation, Oid procId);
|
||||||
|
extern HeapTuple RewriteOidIndexScan(Relation heapRelation, Oid rewriteId);
|
||||||
|
extern HeapTuple RewriteRulenameIndexScan(Relation heapRelation,
|
||||||
|
char *ruleName);
|
||||||
|
extern HeapTuple ShadowNameIndexScan(Relation heapRelation, char *useName);
|
||||||
|
extern HeapTuple ShadowSysidIndexScan(Relation heapRelation, int4 sysId);
|
||||||
|
extern HeapTuple TypeNameIndexScan(Relation heapRelation, char *typeName);
|
||||||
|
extern HeapTuple TypeOidIndexScan(Relation heapRelation, Oid typeId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -107,33 +163,44 @@ extern HeapTuple ClassOidIndexScan(Relation heapRelation, Oid relId);
|
|||||||
* The keyword is DECLARE_INDEX every thing after that is just like in a
|
* The keyword is DECLARE_INDEX every thing after that is just like in a
|
||||||
* normal specification of the 'define index' POSTQUEL command.
|
* normal specification of the 'define index' POSTQUEL command.
|
||||||
*/
|
*/
|
||||||
DECLARE_INDEX(pg_amop_opid_index on pg_amop using btree(amopclaid oid_ops, amopopr oid_ops, amopid oid_ops));
|
|
||||||
DECLARE_INDEX(pg_amop_strategy_index on pg_amop using btree(amopid oid_ops, amopclaid oid_ops, amopstrategy int2_ops));
|
|
||||||
|
|
||||||
DECLARE_INDEX(pg_attribute_relid_attnam_index on pg_attribute using btree(attrelid oid_ops, attname name_ops));
|
|
||||||
DECLARE_INDEX(pg_attribute_relid_attnum_index on pg_attribute using btree(attrelid oid_ops, attnum int2_ops));
|
|
||||||
DECLARE_INDEX(pg_attribute_attrelid_index on pg_attribute using btree(attrelid oid_ops));
|
|
||||||
|
|
||||||
DECLARE_INDEX(pg_index_indexrelid_index on pg_index using btree(indexrelid oid_ops));
|
|
||||||
|
|
||||||
DECLARE_INDEX(pg_proc_oid_index on pg_proc using btree(oid oid_ops));
|
|
||||||
DECLARE_INDEX(pg_proc_proname_narg_type_index on pg_proc using btree(proname name_ops, pronargs int2_ops, proargtypes oid8_ops));
|
|
||||||
|
|
||||||
DECLARE_UNIQUE_INDEX(pg_type_oid_index on pg_type using btree(oid oid_ops));
|
|
||||||
DECLARE_UNIQUE_INDEX(pg_type_typname_index on pg_type using btree(typname name_ops));
|
|
||||||
|
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_aggregate_name_type_index on pg_aggregate using btree(aggname name_ops, aggbasetype oid_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_am_name_index on pg_am using btree(amname name_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_amop_opid_index on pg_amop using btree(amopclaid oid_ops, amopopr oid_ops, amopid oid_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_amop_strategy_index on pg_amop using btree(amopid oid_ops, amopclaid oid_ops, amopstrategy int2_ops));
|
||||||
|
/* This following index is not used for a cache and is not unique */
|
||||||
|
DECLARE_INDEX(pg_attrdef_adrelid_index on pg_attrdef using btree(adrelid oid_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_attribute_relid_attnam_index on pg_attribute using btree(attrelid oid_ops, attname name_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_attribute_relid_attnum_index on pg_attribute using btree(attrelid oid_ops, attnum int2_ops));
|
||||||
DECLARE_UNIQUE_INDEX(pg_class_oid_index on pg_class using btree(oid oid_ops));
|
DECLARE_UNIQUE_INDEX(pg_class_oid_index on pg_class using btree(oid oid_ops));
|
||||||
DECLARE_UNIQUE_INDEX(pg_class_relname_index on pg_class using btree(relname name_ops));
|
DECLARE_UNIQUE_INDEX(pg_class_relname_index on pg_class using btree(relname name_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_description_objoid_index on pg_description using btree(objoid oid_ops));
|
||||||
DECLARE_INDEX(pg_attrdef_adrelid_index on pg_attrdef using btree(adrelid oid_ops));
|
DECLARE_UNIQUE_INDEX(pg_group_name_index on pg_group using btree(groname name_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_group_sysid_index on pg_group using btree(grosysid int4_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_index_indexrelid_index on pg_index using btree(indexrelid oid_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_inherits_relid_seqno_index on pg_inherits using btree(inhrelid oid_ops, inhseqno int4_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_language_name_index on pg_language using btree(lanname name_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_language_oid_index on pg_language using btree(oid oid_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_listener_relname_pid_index on pg_listener using btree(relname name_ops, listenerpid int4_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_opclass_deftype_index on pg_opclass using btree(opcdeftype oid_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_opclass_name_index on pg_opclass using btree(opcname name_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_operator_oid_index on pg_operator using btree(oid oid_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_operator_oprname_l_r_k_index on pg_operator using btree(oprname name_ops, oprleft oid_ops, oprright oid_ops, oprkind char_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_proc_oid_index on pg_proc using btree(oid oid_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_proc_proname_narg_type_index on pg_proc using btree(proname name_ops, pronargs int2_ops, proargtypes oid8_ops));
|
||||||
|
/* This following index is not used for a cache and is not unique */
|
||||||
DECLARE_INDEX(pg_relcheck_rcrelid_index on pg_relcheck using btree(rcrelid oid_ops));
|
DECLARE_INDEX(pg_relcheck_rcrelid_index on pg_relcheck using btree(rcrelid oid_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_rewrite_oid_index on pg_rewrite using btree(oid oid_ops));
|
||||||
DECLARE_INDEX(pg_trigger_tgrelid_index on pg_trigger using btree(tgrelid oid_ops));
|
DECLARE_UNIQUE_INDEX(pg_rewrite_rulename_index on pg_rewrite using btree(rulename name_ops));
|
||||||
|
/*
|
||||||
|
xDECLARE_UNIQUE_INDEX(pg_shadow_name_index on pg_shadow using btree(usename name_ops));
|
||||||
|
xDECLARE_UNIQUE_INDEX(pg_shadow_sysid_index on pg_shadow using btree(usesysid int4_ops));
|
||||||
|
*/
|
||||||
DECLARE_INDEX(pg_trigger_tgconstrname_index on pg_trigger using btree(tgconstrname name_ops));
|
DECLARE_INDEX(pg_trigger_tgconstrname_index on pg_trigger using btree(tgconstrname name_ops));
|
||||||
DECLARE_INDEX(pg_trigger_tgconstrrelid_index on pg_trigger using btree(tgconstrrelid oid_ops));
|
DECLARE_INDEX(pg_trigger_tgconstrrelid_index on pg_trigger using btree(tgconstrrelid oid_ops));
|
||||||
|
DECLARE_INDEX(pg_trigger_tgrelid_index on pg_trigger using btree(tgrelid oid_ops));
|
||||||
DECLARE_INDEX(pg_description_objoid_index on pg_description using btree(objoid oid_ops));
|
DECLARE_UNIQUE_INDEX(pg_type_oid_index on pg_type using btree(oid oid_ops));
|
||||||
|
DECLARE_UNIQUE_INDEX(pg_type_typname_index on pg_type using btree(typname name_ops));
|
||||||
|
|
||||||
/* now build indices in the initialization scripts */
|
/* now build indices in the initialization scripts */
|
||||||
BUILD_INDICES
|
BUILD_INDICES
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: pg_inheritproc.h,v 1.6 1999/02/13 23:21:10 momjian Exp $
|
* $Id: pg_inheritproc.h,v 1.7 1999/11/22 17:56:37 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* the genbki.sh script reads this file and generates .bki
|
* the genbki.sh script reads this file and generates .bki
|
||||||
@ -33,8 +33,8 @@
|
|||||||
CATALOG(pg_inheritproc)
|
CATALOG(pg_inheritproc)
|
||||||
{
|
{
|
||||||
NameData inhproname;
|
NameData inhproname;
|
||||||
Oid inhargrel;
|
Oid inhargrelid;
|
||||||
Oid inhdefrel;
|
Oid inhdefrelid;
|
||||||
Oid inhproc;
|
Oid inhproc;
|
||||||
} FormData_pg_inheritproc;
|
} FormData_pg_inheritproc;
|
||||||
|
|
||||||
@ -51,8 +51,8 @@ typedef FormData_pg_inheritproc *Form_pg_inheritproc;
|
|||||||
*/
|
*/
|
||||||
#define Natts_pg_inheritproc 4
|
#define Natts_pg_inheritproc 4
|
||||||
#define Anum_pg_inheritproc_inhproname 1
|
#define Anum_pg_inheritproc_inhproname 1
|
||||||
#define Anum_pg_inheritproc_inhargrel 2
|
#define Anum_pg_inheritproc_inhargrelid 2
|
||||||
#define Anum_pg_inheritproc_inhdefrel 3
|
#define Anum_pg_inheritproc_inhdefrelid 3
|
||||||
#define Anum_pg_inheritproc_inhproc 4
|
#define Anum_pg_inheritproc_inhproc 4
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: pg_inherits.h,v 1.7 1999/02/13 23:21:10 momjian Exp $
|
* $Id: pg_inherits.h,v 1.8 1999/11/22 17:56:37 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* the genbki.sh script reads this file and generates .bki
|
* the genbki.sh script reads this file and generates .bki
|
||||||
@ -32,7 +32,7 @@
|
|||||||
*/
|
*/
|
||||||
CATALOG(pg_inherits)
|
CATALOG(pg_inherits)
|
||||||
{
|
{
|
||||||
Oid inhrel;
|
Oid inhrelid;
|
||||||
Oid inhparent;
|
Oid inhparent;
|
||||||
int4 inhseqno;
|
int4 inhseqno;
|
||||||
} FormData_pg_inherits;
|
} FormData_pg_inherits;
|
||||||
@ -49,7 +49,7 @@ typedef FormData_pg_inherits *Form_pg_inherits;
|
|||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
#define Natts_pg_inherits 3
|
#define Natts_pg_inherits 3
|
||||||
#define Anum_pg_inherits_inhrel 1
|
#define Anum_pg_inherits_inhrelid 1
|
||||||
#define Anum_pg_inherits_inhparent 2
|
#define Anum_pg_inherits_inhparent 2
|
||||||
#define Anum_pg_inherits_inhseqno 3
|
#define Anum_pg_inherits_inhseqno 3
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: pg_ipl.h,v 1.6 1999/02/13 23:21:10 momjian Exp $
|
* $Id: pg_ipl.h,v 1.7 1999/11/22 17:56:37 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* the genbki.sh script reads this file and generates .bki
|
* the genbki.sh script reads this file and generates .bki
|
||||||
@ -32,7 +32,7 @@
|
|||||||
*/
|
*/
|
||||||
CATALOG(pg_ipl)
|
CATALOG(pg_ipl)
|
||||||
{
|
{
|
||||||
Oid iplrel;
|
Oid iplrelid;
|
||||||
Oid iplipl;
|
Oid iplipl;
|
||||||
int4 iplseqno;
|
int4 iplseqno;
|
||||||
} FormData_pg_ipl;
|
} FormData_pg_ipl;
|
||||||
@ -49,7 +49,7 @@ typedef FormData_pg_ipl *Form_pg_ipl;
|
|||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
#define Natts_pg_ipl 3
|
#define Natts_pg_ipl 3
|
||||||
#define Anum_pg_ipl_iplrel 1
|
#define Anum_pg_ipl_iplrelid 1
|
||||||
#define Anum_pg_ipl_iplipl 2
|
#define Anum_pg_ipl_iplipl 2
|
||||||
#define Anum_pg_ipl_iplseqno 3
|
#define Anum_pg_ipl_iplseqno 3
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: pg_opclass.h,v 1.20 1999/09/29 21:13:30 wieck Exp $
|
* $Id: pg_opclass.h,v 1.21 1999/11/22 17:56:37 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* the genbki.sh script reads this file and generates .bki
|
* the genbki.sh script reads this file and generates .bki
|
||||||
@ -68,9 +68,11 @@ DATA(insert OID = 422 ( box_ops 603 ));
|
|||||||
DESCR("");
|
DESCR("");
|
||||||
DATA(insert OID = 423 ( float8_ops 701 ));
|
DATA(insert OID = 423 ( float8_ops 701 ));
|
||||||
DESCR("");
|
DESCR("");
|
||||||
DATA(insert OID = 424 ( int24_ops 0 ));
|
/* Technically, deftype is wrong, but it must be unique for index, bjm */
|
||||||
|
DATA(insert OID = 424 ( int24_ops 424 ));
|
||||||
DESCR("");
|
DESCR("");
|
||||||
DATA(insert OID = 425 ( int42_ops 0 ));
|
/* Technically, deftype is wrong, but it must be unique for index, bjm */
|
||||||
|
DATA(insert OID = 425 ( int42_ops 425 ));
|
||||||
DESCR("");
|
DESCR("");
|
||||||
DATA(insert OID = 426 ( int4_ops 23 ));
|
DATA(insert OID = 426 ( int4_ops 23 ));
|
||||||
DESCR("");
|
DESCR("");
|
||||||
@ -85,7 +87,8 @@ DATA(insert OID = 431 ( text_ops 25 ));
|
|||||||
DESCR("");
|
DESCR("");
|
||||||
DATA(insert OID = 432 ( abstime_ops 702 ));
|
DATA(insert OID = 432 ( abstime_ops 702 ));
|
||||||
DESCR("");
|
DESCR("");
|
||||||
DATA(insert OID = 433 ( bigbox_ops 603 ));
|
/* Technically, deftype is wrong, but it must be unique for index, bjm */
|
||||||
|
DATA(insert OID = 433 ( bigbox_ops 433 ));
|
||||||
DESCR("");
|
DESCR("");
|
||||||
DATA(insert OID = 434 ( poly_ops 604 ));
|
DATA(insert OID = 434 ( poly_ops 604 ));
|
||||||
DESCR("");
|
DESCR("");
|
||||||
@ -109,13 +112,13 @@ DATA(insert OID = 1312 ( datetime_ops 1184 ));
|
|||||||
DESCR("");
|
DESCR("");
|
||||||
DATA(insert OID = 1313 ( timespan_ops 1186 ));
|
DATA(insert OID = 1313 ( timespan_ops 1186 ));
|
||||||
DESCR("");
|
DESCR("");
|
||||||
DATA(insert OID = 810 ( macaddr_ops 829 ));
|
DATA(insert OID = 810 ( macaddr_ops 829 ));
|
||||||
DESCR("");
|
DESCR("");
|
||||||
DATA(insert OID = 935 ( network_ops 869 ));
|
DATA(insert OID = 935 ( inet_ops 869 ));
|
||||||
DESCR("");
|
DESCR("");
|
||||||
DATA(insert OID = 652 ( network_ops 650 ));
|
DATA(insert OID = 652 ( cidr_ops 650 ));
|
||||||
DESCR("");
|
DESCR("");
|
||||||
DATA(insert OID = 1768 ( numeric_ops 1700 ));
|
DATA(insert OID = 1768 ( numeric_ops 1700 ));
|
||||||
DESCR("");
|
DESCR("");
|
||||||
|
|
||||||
#endif /* PG_OPCLASS_H */
|
#endif /* PG_OPCLASS_H */
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: pg_operator.h,v 1.60 1999/10/11 06:28:29 inoue Exp $
|
* $Id: pg_operator.h,v 1.61 1999/11/22 17:56:37 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* the genbki.sh script reads this file and generates .bki
|
* the genbki.sh script reads this file and generates .bki
|
||||||
@ -274,7 +274,13 @@ DATA(insert OID = 1283 ( ";" PGUID 0 l t f 0 701 701 0 0 0 0 dlog1 - - ));
|
|||||||
DATA(insert OID = 1284 ( "|" PGUID 0 l t f 0 704 702 0 0 0 0 intervalstart - - ));
|
DATA(insert OID = 1284 ( "|" PGUID 0 l t f 0 704 702 0 0 0 0 intervalstart - - ));
|
||||||
DATA(insert OID = 606 ( "<#>" PGUID 0 b t f 702 702 704 0 0 0 0 mktinterval - - ));
|
DATA(insert OID = 606 ( "<#>" PGUID 0 b t f 702 702 704 0 0 0 0 mktinterval - - ));
|
||||||
DATA(insert OID = 607 ( "=" PGUID 0 b t t 26 26 16 607 608 609 609 oideq eqsel eqjoinsel ));
|
DATA(insert OID = 607 ( "=" PGUID 0 b t t 26 26 16 607 608 609 609 oideq eqsel eqjoinsel ));
|
||||||
|
#define MIN_OIDCMP 607 /* used by cache code */
|
||||||
DATA(insert OID = 608 ( "<>" PGUID 0 b t f 26 26 16 608 607 0 0 oidne neqsel neqjoinsel ));
|
DATA(insert OID = 608 ( "<>" PGUID 0 b t f 26 26 16 608 607 0 0 oidne neqsel neqjoinsel ));
|
||||||
|
DATA(insert OID = 609 ( "<" PGUID 0 b t f 26 26 16 610 612 0 0 int4lt intltsel intltjoinsel ));
|
||||||
|
DATA(insert OID = 610 ( ">" PGUID 0 b t f 26 26 16 609 611 0 0 int4gt intgtsel intgtjoinsel ));
|
||||||
|
DATA(insert OID = 611 ( "<=" PGUID 0 b t f 26 26 16 612 610 0 0 int4le intltsel intltjoinsel ));
|
||||||
|
DATA(insert OID = 612 ( ">=" PGUID 0 b t f 26 26 16 611 609 0 0 int4ge intgtsel intgtjoinsel ));
|
||||||
|
#define MAX_OIDCMP 612 /* used by cache code */
|
||||||
|
|
||||||
DATA(insert OID = 644 ( "<>" PGUID 0 b t f 30 30 16 644 649 0 0 oid8ne neqsel neqjoinsel ));
|
DATA(insert OID = 644 ( "<>" PGUID 0 b t f 30 30 16 644 649 0 0 oid8ne neqsel neqjoinsel ));
|
||||||
DATA(insert OID = 645 ( "<" PGUID 0 b t f 30 30 16 646 648 0 0 oid8lt intltsel intltjoinsel ));
|
DATA(insert OID = 645 ( "<" PGUID 0 b t f 30 30 16 646 648 0 0 oid8lt intltsel intltjoinsel ));
|
||||||
@ -283,11 +289,6 @@ DATA(insert OID = 647 ( "<=" PGUID 0 b t f 30 30 16 648 646 0 0 oid8l
|
|||||||
DATA(insert OID = 648 ( ">=" PGUID 0 b t f 30 30 16 647 645 0 0 oid8ge intgtsel intgtjoinsel ));
|
DATA(insert OID = 648 ( ">=" PGUID 0 b t f 30 30 16 647 645 0 0 oid8ge intgtsel intgtjoinsel ));
|
||||||
DATA(insert OID = 649 ( "=" PGUID 0 b t t 30 30 16 649 644 645 645 oid8eq eqsel eqjoinsel ));
|
DATA(insert OID = 649 ( "=" PGUID 0 b t t 30 30 16 649 644 645 645 oid8eq eqsel eqjoinsel ));
|
||||||
|
|
||||||
DATA(insert OID = 609 ( "<" PGUID 0 b t f 26 26 16 610 612 0 0 int4lt intltsel intltjoinsel ));
|
|
||||||
DATA(insert OID = 610 ( ">" PGUID 0 b t f 26 26 16 609 611 0 0 int4gt intgtsel intgtjoinsel ));
|
|
||||||
DATA(insert OID = 611 ( "<=" PGUID 0 b t f 26 26 16 612 610 0 0 int4le intltsel intltjoinsel ));
|
|
||||||
DATA(insert OID = 612 ( ">=" PGUID 0 b t f 26 26 16 611 609 0 0 int4ge intgtsel intgtjoinsel ));
|
|
||||||
|
|
||||||
DATA(insert OID = 613 ( "<->" PGUID 0 b t f 600 628 701 0 0 0 0 dist_pl - - ));
|
DATA(insert OID = 613 ( "<->" PGUID 0 b t f 600 628 701 0 0 0 0 dist_pl - - ));
|
||||||
DATA(insert OID = 614 ( "<->" PGUID 0 b t f 600 601 701 0 0 0 0 dist_ps - - ));
|
DATA(insert OID = 614 ( "<->" PGUID 0 b t f 600 601 701 0 0 0 0 dist_ps - - ));
|
||||||
DATA(insert OID = 615 ( "<->" PGUID 0 b t f 600 603 701 0 0 0 0 dist_pb - - ));
|
DATA(insert OID = 615 ( "<->" PGUID 0 b t f 600 603 701 0 0 0 0 dist_pb - - ));
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: syscache.h,v 1.20 1999/11/01 02:29:27 momjian Exp $
|
* $Id: syscache.h,v 1.21 1999/11/22 17:56:38 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -27,39 +27,36 @@
|
|||||||
*
|
*
|
||||||
* The order of these must match the order
|
* The order of these must match the order
|
||||||
* they are entered into the structure cacheinfo[] in syscache.c
|
* they are entered into the structure cacheinfo[] in syscache.c
|
||||||
* The best thing to do is to add yours at the END, because some
|
* Keep them in alphabeticall order.
|
||||||
* code assumes that certain caches are at certain places in this
|
|
||||||
* array.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define AMOPOPID 0
|
#define AGGNAME 0
|
||||||
#define AMOPSTRATEGY 1
|
#define AMNAME 1
|
||||||
#define ATTNAME 2
|
#define AMOPOPID 2
|
||||||
#define ATTNUM 3
|
#define AMOPSTRATEGY 3
|
||||||
#define INDEXRELID 4
|
#define ATTNAME 4
|
||||||
#define LANNAME 5
|
#define ATTNUM 5
|
||||||
#define OPRNAME 6
|
#define CLADEFTYPE 6
|
||||||
#define OPROID 7
|
#define CLANAME 7
|
||||||
#define PRONAME 8
|
#define GRONAME 8
|
||||||
#define PROOID 9
|
#define GROSYSID 9
|
||||||
#define RELNAME 10
|
#define INDEXRELID 10
|
||||||
#define RELOID 11
|
#define INHRELID 11
|
||||||
#define TYPNAME 12
|
#define LANGNAME 12
|
||||||
#define TYPOID 13
|
#define LANGOID 13
|
||||||
#define AMNAME 14
|
#define LISTENREL 14
|
||||||
#define CLANAME 15
|
#define OPERNAME 15
|
||||||
/* #define INDRELIDKEY 16 */
|
#define OPEROID 16
|
||||||
#define INHRELID 16
|
#define PROCNAME 17
|
||||||
#define RULOID 17
|
#define PROCOID 18
|
||||||
#define AGGNAME 18
|
#define RELNAME 19
|
||||||
#define LISTENREL 19
|
#define RELOID 20
|
||||||
#define USENAME 20
|
#define RULENAME 21
|
||||||
#define USESYSID 21
|
#define RULEOID 22
|
||||||
#define GRONAME 22
|
#define TYPENAME 23
|
||||||
#define GROSYSID 23
|
#define TYPEOID 24
|
||||||
#define REWRITENAME 24
|
#define USERNAME 25
|
||||||
#define CLADEFTYPE 25
|
#define USERSYSID 26
|
||||||
#define LANOID 26
|
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* struct cachedesc: information needed for a call to InitSysCache()
|
* struct cachedesc: information needed for a call to InitSysCache()
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* procedural language
|
* procedural language
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.12 1999/11/07 23:08:34 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.13 1999/11/22 17:56:39 momjian Exp $
|
||||||
*
|
*
|
||||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||||
*
|
*
|
||||||
@ -132,7 +132,7 @@ plpgsql_compile(Oid fn_oid, int functype)
|
|||||||
* Lookup the pg_proc tuple by Oid
|
* Lookup the pg_proc tuple by Oid
|
||||||
* ----------
|
* ----------
|
||||||
*/
|
*/
|
||||||
procTup = SearchSysCacheTuple(PROOID,
|
procTup = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(fn_oid),
|
ObjectIdGetDatum(fn_oid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(procTup))
|
if (!HeapTupleIsValid(procTup))
|
||||||
@ -174,7 +174,7 @@ plpgsql_compile(Oid fn_oid, int functype)
|
|||||||
* Lookup the functions return type
|
* Lookup the functions return type
|
||||||
* ----------
|
* ----------
|
||||||
*/
|
*/
|
||||||
typeTup = SearchSysCacheTuple(TYPOID,
|
typeTup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(procStruct->prorettype), 0, 0, 0);
|
ObjectIdGetDatum(procStruct->prorettype), 0, 0, 0);
|
||||||
|
|
||||||
if (!HeapTupleIsValid(typeTup))
|
if (!HeapTupleIsValid(typeTup))
|
||||||
@ -205,7 +205,7 @@ plpgsql_compile(Oid fn_oid, int functype)
|
|||||||
* Get the parameters type
|
* Get the parameters type
|
||||||
* ----------
|
* ----------
|
||||||
*/
|
*/
|
||||||
typeTup = SearchSysCacheTuple(TYPOID,
|
typeTup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(procStruct->proargtypes[i]), 0, 0, 0);
|
ObjectIdGetDatum(procStruct->proargtypes[i]), 0, 0, 0);
|
||||||
|
|
||||||
if (!HeapTupleIsValid(typeTup))
|
if (!HeapTupleIsValid(typeTup))
|
||||||
@ -601,7 +601,7 @@ plpgsql_parse_word(char *word)
|
|||||||
* ----------
|
* ----------
|
||||||
*/
|
*/
|
||||||
typeXlated = xlateSqlType(cp);
|
typeXlated = xlateSqlType(cp);
|
||||||
typeTup = SearchSysCacheTuple(TYPNAME,
|
typeTup = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(typeXlated), 0, 0, 0);
|
PointerGetDatum(typeXlated), 0, 0, 0);
|
||||||
if (HeapTupleIsValid(typeTup))
|
if (HeapTupleIsValid(typeTup))
|
||||||
{
|
{
|
||||||
@ -924,7 +924,7 @@ plpgsql_parse_wordtype(char *word)
|
|||||||
* ----------
|
* ----------
|
||||||
*/
|
*/
|
||||||
typeXlated = xlateSqlType(cp);
|
typeXlated = xlateSqlType(cp);
|
||||||
typeTup = SearchSysCacheTuple(TYPNAME,
|
typeTup = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(typeXlated), 0, 0, 0);
|
PointerGetDatum(typeXlated), 0, 0, 0);
|
||||||
if (HeapTupleIsValid(typeTup))
|
if (HeapTupleIsValid(typeTup))
|
||||||
{
|
{
|
||||||
@ -1067,7 +1067,7 @@ plpgsql_parse_dblwordtype(char *string)
|
|||||||
}
|
}
|
||||||
attrStruct = (Form_pg_attribute) GETSTRUCT(attrtup);
|
attrStruct = (Form_pg_attribute) GETSTRUCT(attrtup);
|
||||||
|
|
||||||
typetup = SearchSysCacheTuple(TYPOID,
|
typetup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(attrStruct->atttypid), 0, 0, 0);
|
ObjectIdGetDatum(attrStruct->atttypid), 0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typetup))
|
if (!HeapTupleIsValid(typetup))
|
||||||
{
|
{
|
||||||
@ -1143,7 +1143,7 @@ plpgsql_parse_wordrowtype(char *string)
|
|||||||
* Fetch the tables pg_type tuple too
|
* Fetch the tables pg_type tuple too
|
||||||
* ----------
|
* ----------
|
||||||
*/
|
*/
|
||||||
typetup = SearchSysCacheTuple(TYPNAME,
|
typetup = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(word1), 0, 0, 0);
|
PointerGetDatum(word1), 0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typetup))
|
if (!HeapTupleIsValid(typetup))
|
||||||
{
|
{
|
||||||
@ -1182,7 +1182,7 @@ plpgsql_parse_wordrowtype(char *string)
|
|||||||
}
|
}
|
||||||
attrStruct = (Form_pg_attribute) GETSTRUCT(attrtup);
|
attrStruct = (Form_pg_attribute) GETSTRUCT(attrtup);
|
||||||
|
|
||||||
typetup = SearchSysCacheTuple(TYPOID,
|
typetup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(attrStruct->atttypid), 0, 0, 0);
|
ObjectIdGetDatum(attrStruct->atttypid), 0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typetup))
|
if (!HeapTupleIsValid(typetup))
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* procedural language
|
* procedural language
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.14 1999/11/07 23:08:35 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.15 1999/11/22 17:56:40 momjian Exp $
|
||||||
*
|
*
|
||||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||||
*
|
*
|
||||||
@ -1553,7 +1553,7 @@ exec_stmt_raise(PLpgSQL_execstate * estate, PLpgSQL_stmt_raise * stmt)
|
|||||||
extval = "<NULL>";
|
extval = "<NULL>";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
typetup = SearchSysCacheTuple(TYPOID,
|
typetup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(var->datatype->typoid), 0, 0, 0);
|
ObjectIdGetDatum(var->datatype->typoid), 0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typetup))
|
if (!HeapTupleIsValid(typetup))
|
||||||
elog(ERROR, "cache lookup for type %u failed (1)", var->datatype->typoid);
|
elog(ERROR, "cache lookup for type %u failed (1)", var->datatype->typoid);
|
||||||
@ -1958,7 +1958,7 @@ exec_assign_value(PLpgSQL_execstate * estate,
|
|||||||
*/
|
*/
|
||||||
atttype = SPI_gettypeid(rec->tupdesc, i + 1);
|
atttype = SPI_gettypeid(rec->tupdesc, i + 1);
|
||||||
atttypmod = rec->tupdesc->attrs[i]->atttypmod;
|
atttypmod = rec->tupdesc->attrs[i]->atttypmod;
|
||||||
typetup = SearchSysCacheTuple(TYPOID,
|
typetup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(atttype), 0, 0, 0);
|
ObjectIdGetDatum(atttype), 0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typetup))
|
if (!HeapTupleIsValid(typetup))
|
||||||
elog(ERROR, "cache lookup for type %u failed", atttype);
|
elog(ERROR, "cache lookup for type %u failed", atttype);
|
||||||
@ -2389,7 +2389,7 @@ exec_cast_value(Datum value, Oid valtype,
|
|||||||
FmgrInfo finfo_output;
|
FmgrInfo finfo_output;
|
||||||
char *extval;
|
char *extval;
|
||||||
|
|
||||||
typetup = SearchSysCacheTuple(TYPOID,
|
typetup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(valtype), 0, 0, 0);
|
ObjectIdGetDatum(valtype), 0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typetup))
|
if (!HeapTupleIsValid(typetup))
|
||||||
elog(ERROR, "cache lookup for type %u failed", valtype);
|
elog(ERROR, "cache lookup for type %u failed", valtype);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* procedural language (PL)
|
* procedural language (PL)
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.14 1999/11/07 23:08:36 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.15 1999/11/22 17:56:41 momjian Exp $
|
||||||
*
|
*
|
||||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||||
*
|
*
|
||||||
@ -467,7 +467,7 @@ pltcl_func_handler(FmgrInfo *proinfo,
|
|||||||
/************************************************************
|
/************************************************************
|
||||||
* Lookup the pg_proc tuple by Oid
|
* Lookup the pg_proc tuple by Oid
|
||||||
************************************************************/
|
************************************************************/
|
||||||
procTup = SearchSysCacheTuple(PROOID,
|
procTup = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(proinfo->fn_oid),
|
ObjectIdGetDatum(proinfo->fn_oid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(procTup))
|
if (!HeapTupleIsValid(procTup))
|
||||||
@ -482,7 +482,7 @@ pltcl_func_handler(FmgrInfo *proinfo,
|
|||||||
* Get the required information for input conversion of the
|
* Get the required information for input conversion of the
|
||||||
* return value.
|
* return value.
|
||||||
************************************************************/
|
************************************************************/
|
||||||
typeTup = SearchSysCacheTuple(TYPOID,
|
typeTup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(procStruct->prorettype),
|
ObjectIdGetDatum(procStruct->prorettype),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typeTup))
|
if (!HeapTupleIsValid(typeTup))
|
||||||
@ -512,7 +512,7 @@ pltcl_func_handler(FmgrInfo *proinfo,
|
|||||||
proc_internal_args[0] = '\0';
|
proc_internal_args[0] = '\0';
|
||||||
for (i = 0; i < proinfo->fn_nargs; i++)
|
for (i = 0; i < proinfo->fn_nargs; i++)
|
||||||
{
|
{
|
||||||
typeTup = SearchSysCacheTuple(TYPOID,
|
typeTup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(procStruct->proargtypes[i]),
|
ObjectIdGetDatum(procStruct->proargtypes[i]),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typeTup))
|
if (!HeapTupleIsValid(typeTup))
|
||||||
@ -798,7 +798,7 @@ pltcl_trigger_handler(FmgrInfo *proinfo)
|
|||||||
/************************************************************
|
/************************************************************
|
||||||
* Lookup the pg_proc tuple by Oid
|
* Lookup the pg_proc tuple by Oid
|
||||||
************************************************************/
|
************************************************************/
|
||||||
procTup = SearchSysCacheTuple(PROOID,
|
procTup = SearchSysCacheTuple(PROCOID,
|
||||||
ObjectIdGetDatum(proinfo->fn_oid),
|
ObjectIdGetDatum(proinfo->fn_oid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(procTup))
|
if (!HeapTupleIsValid(procTup))
|
||||||
@ -1120,7 +1120,7 @@ pltcl_trigger_handler(FmgrInfo *proinfo)
|
|||||||
* Lookup the attribute type in the syscache
|
* Lookup the attribute type in the syscache
|
||||||
* for the input function
|
* for the input function
|
||||||
************************************************************/
|
************************************************************/
|
||||||
typeTup = SearchSysCacheTuple(TYPOID,
|
typeTup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(tupdesc->attrs[attnum - 1]->atttypid),
|
ObjectIdGetDatum(tupdesc->attrs[attnum - 1]->atttypid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typeTup))
|
if (!HeapTupleIsValid(typeTup))
|
||||||
@ -1592,7 +1592,7 @@ pltcl_SPI_prepare(ClientData cdata, Tcl_Interp *interp,
|
|||||||
************************************************************/
|
************************************************************/
|
||||||
for (i = 0; i < nargs; i++)
|
for (i = 0; i < nargs; i++)
|
||||||
{
|
{
|
||||||
typeTup = SearchSysCacheTuple(TYPNAME,
|
typeTup = SearchSysCacheTuple(TYPENAME,
|
||||||
PointerGetDatum(args[i]),
|
PointerGetDatum(args[i]),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typeTup))
|
if (!HeapTupleIsValid(typeTup))
|
||||||
@ -2137,7 +2137,7 @@ pltcl_set_tuple_values(Tcl_Interp *interp, char *arrayname,
|
|||||||
* Lookup the attribute type in the syscache
|
* Lookup the attribute type in the syscache
|
||||||
* for the output function
|
* for the output function
|
||||||
************************************************************/
|
************************************************************/
|
||||||
typeTup = SearchSysCacheTuple(TYPOID,
|
typeTup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(tupdesc->attrs[i]->atttypid),
|
ObjectIdGetDatum(tupdesc->attrs[i]->atttypid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typeTup))
|
if (!HeapTupleIsValid(typeTup))
|
||||||
@ -2210,7 +2210,7 @@ pltcl_build_tuple_argument(HeapTuple tuple, TupleDesc tupdesc,
|
|||||||
* Lookup the attribute type in the syscache
|
* Lookup the attribute type in the syscache
|
||||||
* for the output function
|
* for the output function
|
||||||
************************************************************/
|
************************************************************/
|
||||||
typeTup = SearchSysCacheTuple(TYPOID,
|
typeTup = SearchSysCacheTuple(TYPEOID,
|
||||||
ObjectIdGetDatum(tupdesc->attrs[i]->atttypid),
|
ObjectIdGetDatum(tupdesc->attrs[i]->atttypid),
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
if (!HeapTupleIsValid(typeTup))
|
if (!HeapTupleIsValid(typeTup))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user