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
73fe8750
Commit
73fe8750
authored
Aug 25, 2014
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename macro isTempOrToastNamespace to isTempOrTempToastNamespace
Done for clarity
parent
5d16332e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
src/backend/catalog/namespace.c
src/backend/catalog/namespace.c
+5
-5
src/backend/catalog/toasting.c
src/backend/catalog/toasting.c
+1
-1
src/backend/utils/adt/dbsize.c
src/backend/utils/adt/dbsize.c
+1
-1
src/backend/utils/cache/relcache.c
src/backend/utils/cache/relcache.c
+2
-2
src/include/catalog/namespace.h
src/include/catalog/namespace.h
+1
-1
No files found.
src/backend/catalog/namespace.c
View file @
73fe8750
...
...
@@ -629,7 +629,7 @@ RangeVarAdjustRelationPersistence(RangeVar *newRelation, Oid nspid)
switch
(
newRelation
->
relpersistence
)
{
case
RELPERSISTENCE_TEMP
:
if
(
!
isTempOrToastNamespace
(
nspid
))
if
(
!
isTempOrT
empT
oastNamespace
(
nspid
))
{
if
(
isAnyTempNamespace
(
nspid
))
ereport
(
ERROR
,
...
...
@@ -642,7 +642,7 @@ RangeVarAdjustRelationPersistence(RangeVar *newRelation, Oid nspid)
}
break
;
case
RELPERSISTENCE_PERMANENT
:
if
(
isTempOrToastNamespace
(
nspid
))
if
(
isTempOrT
empT
oastNamespace
(
nspid
))
newRelation
->
relpersistence
=
RELPERSISTENCE_TEMP
;
else
if
(
isAnyTempNamespace
(
nspid
))
ereport
(
ERROR
,
...
...
@@ -2992,11 +2992,11 @@ isTempToastNamespace(Oid namespaceId)
}
/*
* isTempOrToastNamespace - is the given namespace my temporary-table
* isTempOrT
empT
oastNamespace - is the given namespace my temporary-table
* namespace or my temporary-toast-table namespace?
*/
bool
isTempOrToastNamespace
(
Oid
namespaceId
)
isTempOrT
empT
oastNamespace
(
Oid
namespaceId
)
{
if
(
OidIsValid
(
myTempNamespace
)
&&
(
myTempNamespace
==
namespaceId
||
myTempToastNamespace
==
namespaceId
))
...
...
@@ -3036,7 +3036,7 @@ bool
isOtherTempNamespace
(
Oid
namespaceId
)
{
/* If it's my own temp namespace, say "false" */
if
(
isTempOrToastNamespace
(
namespaceId
))
if
(
isTempOrT
empT
oastNamespace
(
namespaceId
))
return
false
;
/* Else, if it's any temp namespace, say "true" */
return
isAnyTempNamespace
(
namespaceId
);
...
...
src/backend/catalog/toasting.c
View file @
73fe8750
...
...
@@ -254,7 +254,7 @@ create_toast_table(Relation rel, Oid toastOid, Oid toastIndexOid,
* Toast tables for regular relations go in pg_toast; those for temp
* relations go into the per-backend temp-toast-table namespace.
*/
if
(
isTempOrToastNamespace
(
rel
->
rd_rel
->
relnamespace
))
if
(
isTempOrT
empT
oastNamespace
(
rel
->
rd_rel
->
relnamespace
))
namespaceid
=
GetTempToastNamespace
();
else
namespaceid
=
PG_TOAST_NAMESPACE
;
...
...
src/backend/utils/adt/dbsize.c
View file @
73fe8750
...
...
@@ -836,7 +836,7 @@ pg_relation_filepath(PG_FUNCTION_ARGS)
backend
=
InvalidBackendId
;
break
;
case
RELPERSISTENCE_TEMP
:
if
(
isTempOrToastNamespace
(
relform
->
relnamespace
))
if
(
isTempOrT
empT
oastNamespace
(
relform
->
relnamespace
))
backend
=
MyBackendId
;
else
{
...
...
src/backend/utils/cache/relcache.c
View file @
73fe8750
...
...
@@ -913,7 +913,7 @@ RelationBuildDesc(Oid targetRelId, bool insertIt)
relation
->
rd_islocaltemp
=
false
;
break
;
case
RELPERSISTENCE_TEMP
:
if
(
isTempOrToastNamespace
(
relation
->
rd_rel
->
relnamespace
))
if
(
isTempOrT
empT
oastNamespace
(
relation
->
rd_rel
->
relnamespace
))
{
relation
->
rd_backend
=
MyBackendId
;
relation
->
rd_islocaltemp
=
true
;
...
...
@@ -2811,7 +2811,7 @@ RelationBuildLocalRelation(const char *relname,
rel
->
rd_islocaltemp
=
false
;
break
;
case
RELPERSISTENCE_TEMP
:
Assert
(
isTempOrToastNamespace
(
relnamespace
));
Assert
(
isTempOrT
empT
oastNamespace
(
relnamespace
));
rel
->
rd_backend
=
MyBackendId
;
rel
->
rd_islocaltemp
=
true
;
break
;
...
...
src/include/catalog/namespace.h
View file @
73fe8750
...
...
@@ -121,7 +121,7 @@ extern char *NameListToQuotedString(List *names);
extern
bool
isTempNamespace
(
Oid
namespaceId
);
extern
bool
isTempToastNamespace
(
Oid
namespaceId
);
extern
bool
isTempOrToastNamespace
(
Oid
namespaceId
);
extern
bool
isTempOrT
empT
oastNamespace
(
Oid
namespaceId
);
extern
bool
isAnyTempNamespace
(
Oid
namespaceId
);
extern
bool
isOtherTempNamespace
(
Oid
namespaceId
);
extern
int
GetTempNamespaceBackendId
(
Oid
namespaceId
);
...
...
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