aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/cache
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/cache')
-rw-r--r--src/backend/utils/cache/catcache.c16
-rw-r--r--src/backend/utils/cache/fcache.c9
-rw-r--r--src/backend/utils/cache/lsyscache.c10
-rw-r--r--src/backend/utils/cache/relcache.c21
-rw-r--r--src/backend/utils/cache/syscache.c18
5 files changed, 40 insertions, 34 deletions
diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c
index 36a617d8ae0..ef9593b2b13 100644
--- a/src/backend/utils/cache/catcache.c
+++ b/src/backend/utils/cache/catcache.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.23 1998/02/23 17:43:19 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.24 1998/02/26 04:37:27 momjian Exp $
*
* Notes:
* XXX This needs to use exception.h to handle recovery when
@@ -677,7 +677,7 @@ InitSysCache(char *relname,
HeapTuple (*iScanfuncP) ())
{
CatCache *cp;
- int i;
+ int i;
MemoryContext oldcxt;
char *indname;
@@ -862,8 +862,8 @@ SearchSysCache(struct catcache * cache,
elt;
elt = DLGetSucc(elt))
{
- bool res;
-
+ bool res;
+
ct = (CatCTup *) DLE_VAL(elt);
/* ----------------
* see if the cached tuple matches our key.
@@ -871,10 +871,10 @@ SearchSysCache(struct catcache * cache,
* ----------------
*/
HeapKeyTest(ct->ct_tup,
- cache->cc_tupdesc,
- cache->cc_nkeys,
- cache->cc_skey,
- res);
+ cache->cc_tupdesc,
+ cache->cc_nkeys,
+ cache->cc_skey,
+ res);
if (res)
break;
}
diff --git a/src/backend/utils/cache/fcache.c b/src/backend/utils/cache/fcache.c
index 485a1d01bae..2a8df51c6a1 100644
--- a/src/backend/utils/cache/fcache.c
+++ b/src/backend/utils/cache/fcache.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.10 1998/01/15 19:45:29 pgsql Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.11 1998/02/26 04:37:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -282,10 +282,13 @@ init_fcache(Oid foid,
- if (retval->language != SQLlanguageId) {
+ if (retval->language != SQLlanguageId)
+ {
fmgr_info(foid, &(retval->func));
retval->nargs = retval->func.fn_nargs;
- } else {
+ }
+ else
+ {
retval->func.fn_addr = (func_ptr) NULL;
}
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index c5f325a2fdb..b56c25e94de 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.12 1998/02/10 16:03:51 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.13 1998/02/26 04:37:30 momjian Exp $
*
* NOTES
* Eventually, the index information should go through here, too.
@@ -67,7 +67,7 @@ op_class(Oid opno, int32 opclass, Oid amopid)
* return the "attname" field from the attribute relation.
*
*/
-char *
+char *
get_attname(Oid relid, AttrNumber attnum)
{
FormData_pg_attribute att_tup;
@@ -161,7 +161,7 @@ get_attisset(Oid relid, char *attname)
* return the "atttypmod" field from the attribute relation.
*
*/
-int16
+int16
get_atttypmod(Oid relid, AttrNumber attnum)
{
FormData_pg_attribute att_tup;
@@ -209,7 +209,7 @@ get_opcode(Oid opno)
*
* Note: return the struct so that it gets copied.
*/
-char *
+char *
get_opname(Oid opno)
{
FormData_pg_operator optup;
@@ -395,7 +395,7 @@ get_relnatts(Oid relid)
* Returns the name of a given relation.
*
*/
-char *
+char *
get_rel_name(Oid relid)
{
FormData_pg_class reltup;
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index f40d5a3fdbc..79056f34d46 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.36 1998/02/23 17:43:25 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.37 1998/02/26 04:37:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -258,11 +258,14 @@ static HeapTuple ScanPgRelation(RelationBuildDescInfo buildinfo);
static HeapTuple scan_pg_rel_seq(RelationBuildDescInfo buildinfo);
static HeapTuple scan_pg_rel_ind(RelationBuildDescInfo buildinfo);
static Relation AllocateRelationDesc(u_int natts, Form_pg_class relp);
-static void RelationBuildTupleDesc(RelationBuildDescInfo buildinfo,
+static void
+RelationBuildTupleDesc(RelationBuildDescInfo buildinfo,
Relation relation, u_int natts);
-static void build_tupdesc_seq(RelationBuildDescInfo buildinfo,
+static void
+build_tupdesc_seq(RelationBuildDescInfo buildinfo,
Relation relation, u_int natts);
-static void build_tupdesc_ind(RelationBuildDescInfo buildinfo,
+static void
+build_tupdesc_ind(RelationBuildDescInfo buildinfo,
Relation relation, u_int natts);
static Relation RelationBuildDesc(RelationBuildDescInfo buildinfo);
static void IndexedAccessMethodInitialize(Relation relation);
@@ -766,11 +769,11 @@ RelationBuildRuleLock(Relation relation)
Anum_pg_rewrite_ev_qual, pg_rewrite_tupdesc,
&isnull);
- ruleaction = PointerGetDatum (textout((struct varlena *) DatumGetPointer (ruleaction)));
- rule_evqual_string = PointerGetDatum (textout((struct varlena *) DatumGetPointer (rule_evqual_string)));
+ ruleaction = PointerGetDatum(textout((struct varlena *) DatumGetPointer(ruleaction)));
+ rule_evqual_string = PointerGetDatum(textout((struct varlena *) DatumGetPointer(rule_evqual_string)));
- rule->actions = (List *) stringToNode(DatumGetPointer (ruleaction));
- rule->qual = (Node *) stringToNode(DatumGetPointer (rule_evqual_string));
+ rule->actions = (List *) stringToNode(DatumGetPointer(ruleaction));
+ rule->qual = (Node *) stringToNode(DatumGetPointer(rule_evqual_string));
rules[numlocks++] = rule;
if (numlocks == maxlocks)
@@ -2017,7 +2020,7 @@ init_irels(void)
for (i = 0; i < am->amstrategies; i++)
fmgr_info(SMD(i).sk_procedure,
&(SMD(i).sk_func));
- SMD(i).sk_nargs = SMD(i).sk_func.fn_nargs;
+ SMD(i).sk_nargs = SMD(i).sk_func.fn_nargs;
/*
diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c
index 6f028de93ac..490a6417c9f 100644
--- a/src/backend/utils/cache/syscache.c
+++ b/src/backend/utils/cache/syscache.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.15 1998/02/25 13:07:50 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.16 1998/02/26 04:37:33 momjian Exp $
*
* NOTES
* These routines allow the parser/planner/executor to perform
@@ -57,7 +57,7 @@ extern bool AMI_OVERRIDE; /* XXX style */
#include "utils/syscache.h"
#include "catalog/indexing.h"
-typedef HeapTuple(*ScanFunc) ();
+typedef HeapTuple (*ScanFunc) ();
/* ----------------
* Warning: cacheinfo[] below is changed, then be sure and
@@ -179,7 +179,7 @@ static struct cachedesc cacheinfo[] = {
0,
0,
0},
- offsetof(TypeTupleFormData, typalign) + sizeof(char),
+ offsetof(TypeTupleFormData, typalign) +sizeof(char),
TypeNameIndex,
TypeNameIndexScan},
{TypeRelationName, /* TYPOID */
@@ -254,7 +254,7 @@ static struct cachedesc cacheinfo[] = {
sizeof(FormData_pg_listener),
NULL,
(ScanFunc) NULL},
- {ShadowRelationName, /* USENAME */
+ {ShadowRelationName, /* USENAME */
1,
{Anum_pg_shadow_usename,
0,
@@ -263,7 +263,7 @@ static struct cachedesc cacheinfo[] = {
sizeof(FormData_pg_shadow),
NULL,
(ScanFunc) NULL},
- {ShadowRelationName, /* USESYSID */
+ {ShadowRelationName, /* USESYSID */
1,
{Anum_pg_shadow_usesysid,
0,
@@ -392,13 +392,13 @@ InitCatalogCache()
* XXX The tuple that is returned is NOT supposed to be pfree'd!
*/
HeapTuple
-SearchSysCacheTuple(int cacheId, /* cache selection code */
+SearchSysCacheTuple(int cacheId,/* cache selection code */
Datum key1,
Datum key2,
Datum key3,
Datum key4)
{
- HeapTuple tp;
+ HeapTuple tp;
if (cacheId < 0 || cacheId >= SysCacheSize)
{
@@ -489,7 +489,7 @@ SearchSysCacheStruct(int cacheId, /* cache selection code */
*
* [callers all assume this returns a (struct varlena *). -ay 10/94]
*/
-void *
+void *
SearchSysCacheGetAttribute(int cacheId,
AttrNumber attributeNumber,
Datum key1,
@@ -591,7 +591,7 @@ SearchSysCacheGetAttribute(int cacheId,
* [identical to get_typdefault, expecting a (struct varlena *) as ret val.
* some day, either of the functions should be removed -ay 10/94]
*/
-void *
+void *
TypeDefaultRetrieve(Oid typId)
{
HeapTuple typeTuple;