Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
002796b5
Commit
002796b5
authored
Nov 28, 1997
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename heap_destroyr to heap_destroy, heap_destroy to heap_destroy_with_catalog.
parent
c445ba33
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
47 additions
and
47 deletions
+47
-47
src/backend/bootstrap/bootparse.y
src/backend/bootstrap/bootparse.y
+3
-3
src/backend/catalog/heap.c
src/backend/catalog/heap.c
+15
-15
src/backend/commands/cluster.c
src/backend/commands/cluster.c
+4
-4
src/backend/commands/creatinh.c
src/backend/commands/creatinh.c
+3
-3
src/backend/commands/recipe.c
src/backend/commands/recipe.c
+3
-3
src/backend/commands/remove.c
src/backend/commands/remove.c
+2
-2
src/backend/commands/view.c
src/backend/commands/view.c
+2
-2
src/backend/executor/execMain.c
src/backend/executor/execMain.c
+2
-2
src/backend/executor/nodeMaterial.c
src/backend/executor/nodeMaterial.c
+2
-2
src/backend/executor/nodeTee.c
src/backend/executor/nodeTee.c
+4
-4
src/backend/storage/large_object/inv_api.c
src/backend/storage/large_object/inv_api.c
+3
-3
src/include/catalog/heap.h
src/include/catalog/heap.h
+4
-4
No files found.
src/backend/bootstrap/bootparse.y
View file @
002796b5
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.
8 1997/11/28 04:39:25
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.
9 1997/11/28 17:26:43
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -178,10 +178,10 @@ CreateStmt:
{
Oid id;
TupleDesc tupdesc;
/* extern Oid heap_create_
and
_catalog();*/
/* extern Oid heap_create_
with
_catalog();*/
tupdesc = CreateTupleDesc(numattr,attrtypes);
id = heap_create_
and
_catalog(LexIDStr($3), tupdesc);
id = heap_create_
with
_catalog(LexIDStr($3), tupdesc);
if (!Quiet)
printf("CREATED relation %s with OID %d\n",
LexIDStr($3), id);
...
...
src/backend/catalog/heap.c
View file @
002796b5
...
...
@@ -7,16 +7,16 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.3
8 1997/11/28 04:39:34
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.3
9 1997/11/28 17:26:51
momjian Exp $
*
* INTERFACE ROUTINES
* heap_create() - Create an uncataloged heap relation
* heap_create_
and
_catalog() - Create a cataloged relation
* heap_destroy() - Removes named relation from catalogs
* heap_create_
with
_catalog() - Create a cataloged relation
* heap_destroy
_with_catalog
() - Removes named relation from catalogs
*
* NOTES
* this code taken from access/heap/create.c, which contains
* the old heap_create_
and
_catalogr, amcreate, and amdestroy.
* the old heap_create_
with
_catalogr, amcreate, and amdestroy.
* those routines will soon call these routines using the function
* manager,
* just like the poorly named "NewXXX" routines do. The
...
...
@@ -332,7 +332,7 @@ heap_create(char *name,
/* ----------------------------------------------------------------
* heap_create_
and
_catalog - Create a cataloged relation
* heap_create_
with
_catalog - Create a cataloged relation
*
* this is done in 6 steps:
*
...
...
@@ -343,7 +343,7 @@ heap_create(char *name,
* preforms a scan to ensure that no relation with the
* same name already exists.
*
* 3) heap_create_
and
_catalogr() is called to create the new relation
* 3) heap_create_
with
_catalogr() is called to create the new relation
* on disk.
*
* 4) TypeDefine() is called to define a new type corresponding
...
...
@@ -376,7 +376,7 @@ heap_create(char *name,
* create new relation
* insert new relation into attribute catalog
*
* Should coordinate with heap_create_
and
_catalogr(). Either
* Should coordinate with heap_create_
with
_catalogr(). Either
* it should not be called or there should be a way to prevent
* the relation from being removed at the end of the
* transaction if it is successful ('u'/'r' may be enough).
...
...
@@ -739,13 +739,13 @@ addNewRelationType(char *typeName, Oid new_rel_oid)
}
/* --------------------------------
* heap_create_
and
_catalog
* heap_create_
with
_catalog
*
* creates a new cataloged relation. see comments above.
* --------------------------------
*/
Oid
heap_create_
and
_catalog
(
char
relname
[],
heap_create_
with
_catalog
(
char
relname
[],
TupleDesc
tupdesc
)
{
Relation
pg_class_desc
;
...
...
@@ -830,7 +830,7 @@ heap_create_and_catalog(char relname[],
/* ----------------------------------------------------------------
* heap_destroy - removes all record of named relation from catalogs
* heap_destroy
_with_catalog
- removes all record of named relation from catalogs
*
* 1) open relation, check for existence, etc.
* 2) remove inheritance information
...
...
@@ -1246,12 +1246,12 @@ DeletePgTypeTuple(Relation rdesc)
}
/* --------------------------------
* heap_destroy
* heap_destroy
_with_catalog
*
* --------------------------------
*/
void
heap_destroy
(
char
*
relname
)
heap_destroy
_with_catalog
(
char
*
relname
)
{
Relation
rdesc
;
Oid
rid
;
...
...
@@ -1358,13 +1358,13 @@ heap_destroy(char *relname)
}
/*
* heap_destroy
r
* heap_destroy
* destroy and close temporary relations
*
*/
void
heap_destroy
r
(
Relation
rdesc
)
heap_destroy
(
Relation
rdesc
)
{
ReleaseRelationBuffers
(
rdesc
);
if
(
!
(
rdesc
->
rd_istemp
)
||
!
(
rdesc
->
rd_tmpunlinked
))
...
...
@@ -1475,7 +1475,7 @@ DestroyTempRels(void)
rdesc
=
tempRels
->
rels
[
i
];
/* rdesc may be NULL if it has been removed from the list already */
if
(
rdesc
)
heap_destroy
r
(
rdesc
);
heap_destroy
(
rdesc
);
}
free
(
tempRels
->
rels
);
free
(
tempRels
);
...
...
src/backend/commands/cluster.c
View file @
002796b5
...
...
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.1
8 1997/11/28 04:39:43
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.1
9 1997/11/28 17:26:55
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -175,7 +175,7 @@ cluster(char oldrelname[], char oldindexname[])
/* Destroy old heap (along with its index) and rename new. */
heap_destroy
(
oldrelname
);
heap_destroy
_with_catalog
(
oldrelname
);
renamerel
(
NewHeapName
,
saveoldrelname
);
TypeRename
(
NewHeapName
,
saveoldrelname
);
...
...
@@ -209,13 +209,13 @@ copy_heap(Oid OIDOldHeap)
OldHeapDesc
=
RelationGetTupleDescriptor
(
OldHeap
);
/*
* Need to make a copy of the tuple descriptor, heap_create_
and
_catalog
* Need to make a copy of the tuple descriptor, heap_create_
with
_catalog
* modifies it.
*/
tupdesc
=
CreateTupleDescCopy
(
OldHeapDesc
);
OIDNewHeap
=
heap_create_
and
_catalog
(
NewName
,
tupdesc
);
OIDNewHeap
=
heap_create_
with
_catalog
(
NewName
,
tupdesc
);
if
(
!
OidIsValid
(
OIDNewHeap
))
elog
(
WARN
,
"clusterheap: cannot create temporary heap relation
\n
"
);
...
...
src/backend/commands/creatinh.c
View file @
002796b5
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.2
0 1997/11/28 04:39:48
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.2
1 1997/11/28 17:27:04
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -137,7 +137,7 @@ DefineRelation(CreateStmt *stmt)
}
}
relationId
=
heap_create_
and
_catalog
(
relname
,
descriptor
);
relationId
=
heap_create_
with
_catalog
(
relname
,
descriptor
);
StoreCatalogInheritance
(
relationId
,
inheritList
);
}
...
...
@@ -157,7 +157,7 @@ void
RemoveRelation
(
char
*
name
)
{
AssertArg
(
name
);
heap_destroy
(
name
);
heap_destroy
_with_catalog
(
name
);
}
...
...
src/backend/commands/recipe.c
View file @
002796b5
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.1
4 1997/11/28 04:39:53
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.1
5 1997/11/28 17:27:08
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1047,7 +1047,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
len
=
length
(
q
->
qtrees
[
0
]
->
targetList
);
tupdesc
=
rel
->
rd_att
;
relid
=
heap_create_
and
_catalog
(
relid
=
heap_create_
with
_catalog
(
child
->
nodeElem
->
outTypes
->
val
[
0
],
tupdesc
);
}
else
...
...
@@ -1072,7 +1072,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
}
else
{
relid
=
heap_create_
and
_catalog
(
relid
=
heap_create_
with
_catalog
(
child
->
nodeElem
->
outTypes
->
val
[
0
],
tupdesc
);
}
}
...
...
src/backend/commands/remove.c
View file @
002796b5
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.1
7 1997/11/25 21:59:03
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.1
8 1997/11/28 17:27:10
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -241,7 +241,7 @@ AttributeAndRelationRemove(Oid typeOid)
char
*
name
;
name
=
(((
Form_pg_class
)
GETSTRUCT
(
tup
))
->
relname
).
data
;
heap_destroy
(
name
);
heap_destroy
_with_catalog
(
name
);
}
}
heap_endscan
(
sdesc
);
...
...
src/backend/commands/view.c
View file @
002796b5
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.1
6 1997/11/25 21:59:12
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.1
7 1997/11/28 17:27:13
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -314,6 +314,6 @@ RemoveView(char *viewName)
/*
* now remove the relation.
*/
heap_destroy
(
viewName
);
heap_destroy
_with_catalog
(
viewName
);
pfree
(
rname
);
}
src/backend/executor/execMain.c
View file @
002796b5
...
...
@@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.3
4 1997/11/28 04:40:08
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.3
5 1997/11/28 17:27:20
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -572,7 +572,7 @@ InitPlan(CmdType operation, Query *parseTree, Plan *plan, EState *estate)
/* fixup to prevent zero-length columns in create */
setVarAttrLenForCreateTable
(
tupdesc
,
targetList
,
rangeTable
);
intoRelationId
=
heap_create_
and
_catalog
(
intoName
,
tupdesc
);
intoRelationId
=
heap_create_
with
_catalog
(
intoName
,
tupdesc
);
#ifdef NOT_USED
/* it's copy ... */
resetVarAttrLenForCreateTable
(
tupdesc
);
#endif
...
...
src/backend/executor/nodeMaterial.c
View file @
002796b5
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.1
0 1997/11/20 23:21:32
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.1
1 1997/11/28 17:27:25
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -319,7 +319,7 @@ ExecEndMaterial(Material *node)
matstate
=
node
->
matstate
;
tempRelation
=
matstate
->
mat_TempRelation
;
heap_destroy
r
(
tempRelation
);
heap_destroy
(
tempRelation
);
/* ----------------
* close the temp relation and shut down the scan.
...
...
src/backend/executor/nodeTee.c
View file @
002796b5
...
...
@@ -15,7 +15,7 @@
* ExecEndTee
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.1
2 1997/11/28 04:40:12
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.1
3 1997/11/28 17:27:31
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -168,7 +168,7 @@ ExecInitTee(Tee *node, EState *currentEstate, Plan *parent)
bufferRel
=
heap_openr
(
teeState
->
tee_bufferRelname
);
else
bufferRel
=
heap_open
(
heap_create_
and
_catalog
(
teeState
->
tee_bufferRelname
,
tupType
));
heap_create_
with
_catalog
(
teeState
->
tee_bufferRelname
,
tupType
));
}
else
{
...
...
@@ -177,7 +177,7 @@ ExecInitTee(Tee *node, EState *currentEstate, Plan *parent)
newoid
());
/* bufferRel = ExecCreatR(len, tupType, _TEMP_RELATION_ID); */
bufferRel
=
heap_open
(
heap_create_
and
_catalog
(
teeState
->
tee_bufferRelname
,
tupType
));
heap_create_
with
_catalog
(
teeState
->
tee_bufferRelname
,
tupType
));
}
teeState
->
tee_bufferRel
=
bufferRel
;
...
...
@@ -519,7 +519,7 @@ ExecEndTee(Tee *node, Plan *parent)
bufferRel
=
teeState
->
tee_bufferRel
;
if
(
bufferRel
)
{
heap_destroy
r
(
bufferRel
);
heap_destroy
(
bufferRel
);
teeState
->
tee_bufferRel
=
NULL
;
if
(
teeState
->
tee_mcxt
)
{
...
...
src/backend/storage/large_object/inv_api.c
View file @
002796b5
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.2
3 1997/11/28 04:40:28
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.2
4 1997/11/28 17:27:50
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -139,7 +139,7 @@ inv_create(int flags)
* be located on whatever storage manager the user requested.
*/
heap_create_
and
_catalog
(
objname
,
tupdesc
);
heap_create_
with
_catalog
(
objname
,
tupdesc
);
/* make the relation visible in this transaction */
CommandCounterIncrement
();
...
...
@@ -283,7 +283,7 @@ inv_destroy(Oid lobjId)
if
(
!
RelationIsValid
(
r
)
||
r
->
rd_rel
->
relkind
==
RELKIND_INDEX
)
return
-
1
;
heap_destroy
(
r
->
rd_rel
->
relname
.
data
);
heap_destroy
_with_catalog
(
r
->
rd_rel
->
relname
.
data
);
return
1
;
}
...
...
src/include/catalog/heap.h
View file @
002796b5
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: heap.h,v 1.
9 1997/11/28 04:40:40
momjian Exp $
* $Id: heap.h,v 1.
10 1997/11/28 17:28:02
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -18,10 +18,10 @@
extern
Relation
heap_create
(
char
*
relname
,
TupleDesc
att
);
extern
Oid
heap_create_
and
_catalog
(
char
relname
[],
TupleDesc
tupdesc
);
heap_create_
with
_catalog
(
char
relname
[],
TupleDesc
tupdesc
);
extern
void
heap_destroy
(
char
relname
[]);
extern
void
heap_destroy
r
(
Relation
r
);
extern
void
heap_destroy
_with_catalog
(
char
relname
[]);
extern
void
heap_destroy
(
Relation
r
);
extern
void
InitTempRelList
(
void
);
extern
void
DestroyTempRels
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment