Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 25a7a7f

Browse files
committed
Clean up grotty references to CacheCxt (externs inside functions,
duplicate global declarations, no points for style at all!)
1 parent aa38705 commit 25a7a7f

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

src/backend/catalog/heap.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.126 2000/05/19 03:22:31 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.127 2000/05/20 23:11:29 tgl Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -62,6 +62,7 @@
6262
#include "storage/smgr.h"
6363
#include "tcop/tcopprot.h"
6464
#include "utils/builtins.h"
65+
#include "utils/catcache.h"
6566
#include "utils/portal.h"
6667
#include "utils/relcache.h"
6768
#include "utils/syscache.h"
@@ -184,18 +185,16 @@ heap_create(char *relname,
184185
bool istemp,
185186
bool storage_create)
186187
{
188+
static unsigned int uniqueId = 0;
189+
187190
int i;
188191
Oid relid;
189192
Relation rel;
190193
int len;
191194
bool nailme = false;
192195
int natts = tupDesc->natts;
193-
static unsigned int uniqueId = 0;
194-
195-
extern GlobalMemory CacheCxt;
196196
MemoryContext oldcxt;
197197

198-
199198
/* ----------------
200199
* sanity checks
201200
* ----------------

src/backend/catalog/index.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.109 2000/05/19 03:22:31 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.110 2000/05/20 23:11:28 tgl Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -41,6 +41,7 @@
4141
#include "parser/parse_func.h"
4242
#include "storage/smgr.h"
4343
#include "utils/builtins.h"
44+
#include "utils/catcache.h"
4445
#include "utils/relcache.h"
4546
#include "utils/syscache.h"
4647
#include "utils/temprel.h"
@@ -432,7 +433,6 @@ AccessMethodObjectIdGetForm(Oid accessMethodObjectId)
432433
static void
433434
ConstructIndexReldesc(Relation indexRelation, Oid amoid)
434435
{
435-
extern GlobalMemory CacheCxt;
436436
MemoryContext oldcxt;
437437

438438
/* ----------------
@@ -880,7 +880,6 @@ InitIndexStrategy(int numatts,
880880
uint16 amsupport;
881881
Oid attrelid;
882882
Size strsize;
883-
extern GlobalMemory CacheCxt;
884883

885884
/* ----------------
886885
* get information from the index relation descriptor

src/backend/utils/cache/temprel.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/temprel.c,v 1.21 2000/04/12 17:15:54 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/temprel.c,v 1.22 2000/05/20 23:11:29 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -28,9 +28,9 @@
2828
#include "access/xact.h"
2929
#include "catalog/heap.h"
3030
#include "catalog/index.h"
31+
#include "utils/catcache.h"
3132
#include "utils/temprel.h"
3233

33-
GlobalMemory CacheCxt;
3434

3535
/* ----------------
3636
* global variables

0 commit comments

Comments
 (0)