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
8b53eaf9
Commit
8b53eaf9
authored
Oct 19, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve comments.
parent
be7c0a92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
src/backend/utils/cache/temprel.c
src/backend/utils/cache/temprel.c
+15
-2
No files found.
src/backend/utils/cache/temprel.c
View file @
8b53eaf9
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/temprel.c,v 1.2
8 2000/10/11 21:28:19 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/temprel.c,v 1.2
9 2000/10/19 23:06:24 tgl
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -91,24 +91,37 @@ create_temp_relation(const char *relname, HeapTuple pg_class_tuple)
...
@@ -91,24 +91,37 @@ create_temp_relation(const char *relname, HeapTuple pg_class_tuple)
void
void
remove_all_temp_relations
(
void
)
remove_all_temp_relations
(
void
)
{
{
/* skip xact start overhead if nothing to do */
if
(
temp_rels
==
NIL
)
return
;
AbortOutOfAnyTransaction
();
AbortOutOfAnyTransaction
();
StartTransactionCommand
();
StartTransactionCommand
();
/*
* The way this works is that each time through the loop, we delete
* the frontmost entry. The DROP will call remove_temp_rel_by_relid()
* as a side effect, thereby removing the entry in the temp_rels list.
* So this is not an infinite loop, even though it looks like one.
*/
while
(
temp_rels
!=
NIL
)
while
(
temp_rels
!=
NIL
)
{
{
char
relname
[
NAMEDATALEN
];
TempTable
*
temp_rel
=
(
TempTable
*
)
lfirst
(
temp_rels
);
TempTable
*
temp_rel
=
(
TempTable
*
)
lfirst
(
temp_rels
);
if
(
temp_rel
->
relkind
!=
RELKIND_INDEX
)
if
(
temp_rel
->
relkind
!=
RELKIND_INDEX
)
{
{
char
relname
[
NAMEDATALEN
];
/* safe from deallocation */
/* safe from deallocation */
strcpy
(
relname
,
temp_rel
->
user_relname
);
strcpy
(
relname
,
temp_rel
->
user_relname
);
heap_drop_with_catalog
(
relname
,
allowSystemTableMods
);
heap_drop_with_catalog
(
relname
,
allowSystemTableMods
);
}
}
else
else
index_drop
(
temp_rel
->
relid
);
index_drop
(
temp_rel
->
relid
);
/* advance cmd counter to make catalog changes visible */
CommandCounterIncrement
();
CommandCounterIncrement
();
}
}
CommitTransactionCommand
();
CommitTransactionCommand
();
}
}
...
...
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