Skip to content

Commit 73fe875

Browse files
committed
rename macro isTempOrToastNamespace to isTempOrTempToastNamespace
Done for clarity
1 parent 5d16332 commit 73fe875

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/backend/catalog/namespace.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ RangeVarAdjustRelationPersistence(RangeVar *newRelation, Oid nspid)
629629
switch (newRelation->relpersistence)
630630
{
631631
case RELPERSISTENCE_TEMP:
632-
if (!isTempOrToastNamespace(nspid))
632+
if (!isTempOrTempToastNamespace(nspid))
633633
{
634634
if (isAnyTempNamespace(nspid))
635635
ereport(ERROR,
@@ -642,7 +642,7 @@ RangeVarAdjustRelationPersistence(RangeVar *newRelation, Oid nspid)
642642
}
643643
break;
644644
case RELPERSISTENCE_PERMANENT:
645-
if (isTempOrToastNamespace(nspid))
645+
if (isTempOrTempToastNamespace(nspid))
646646
newRelation->relpersistence = RELPERSISTENCE_TEMP;
647647
else if (isAnyTempNamespace(nspid))
648648
ereport(ERROR,
@@ -2992,11 +2992,11 @@ isTempToastNamespace(Oid namespaceId)
29922992
}
29932993

29942994
/*
2995-
* isTempOrToastNamespace - is the given namespace my temporary-table
2995+
* isTempOrTempToastNamespace - is the given namespace my temporary-table
29962996
* namespace or my temporary-toast-table namespace?
29972997
*/
29982998
bool
2999-
isTempOrToastNamespace(Oid namespaceId)
2999+
isTempOrTempToastNamespace(Oid namespaceId)
30003000
{
30013001
if (OidIsValid(myTempNamespace) &&
30023002
(myTempNamespace == namespaceId || myTempToastNamespace == namespaceId))
@@ -3036,7 +3036,7 @@ bool
30363036
isOtherTempNamespace(Oid namespaceId)
30373037
{
30383038
/* If it's my own temp namespace, say "false" */
3039-
if (isTempOrToastNamespace(namespaceId))
3039+
if (isTempOrTempToastNamespace(namespaceId))
30403040
return false;
30413041
/* Else, if it's any temp namespace, say "true" */
30423042
return isAnyTempNamespace(namespaceId);

src/backend/catalog/toasting.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ create_toast_table(Relation rel, Oid toastOid, Oid toastIndexOid,
254254
* Toast tables for regular relations go in pg_toast; those for temp
255255
* relations go into the per-backend temp-toast-table namespace.
256256
*/
257-
if (isTempOrToastNamespace(rel->rd_rel->relnamespace))
257+
if (isTempOrTempToastNamespace(rel->rd_rel->relnamespace))
258258
namespaceid = GetTempToastNamespace();
259259
else
260260
namespaceid = PG_TOAST_NAMESPACE;

src/backend/utils/adt/dbsize.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ pg_relation_filepath(PG_FUNCTION_ARGS)
836836
backend = InvalidBackendId;
837837
break;
838838
case RELPERSISTENCE_TEMP:
839-
if (isTempOrToastNamespace(relform->relnamespace))
839+
if (isTempOrTempToastNamespace(relform->relnamespace))
840840
backend = MyBackendId;
841841
else
842842
{

src/backend/utils/cache/relcache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ RelationBuildDesc(Oid targetRelId, bool insertIt)
913913
relation->rd_islocaltemp = false;
914914
break;
915915
case RELPERSISTENCE_TEMP:
916-
if (isTempOrToastNamespace(relation->rd_rel->relnamespace))
916+
if (isTempOrTempToastNamespace(relation->rd_rel->relnamespace))
917917
{
918918
relation->rd_backend = MyBackendId;
919919
relation->rd_islocaltemp = true;
@@ -2811,7 +2811,7 @@ RelationBuildLocalRelation(const char *relname,
28112811
rel->rd_islocaltemp = false;
28122812
break;
28132813
case RELPERSISTENCE_TEMP:
2814-
Assert(isTempOrToastNamespace(relnamespace));
2814+
Assert(isTempOrTempToastNamespace(relnamespace));
28152815
rel->rd_backend = MyBackendId;
28162816
rel->rd_islocaltemp = true;
28172817
break;

src/include/catalog/namespace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ extern char *NameListToQuotedString(List *names);
121121

122122
extern bool isTempNamespace(Oid namespaceId);
123123
extern bool isTempToastNamespace(Oid namespaceId);
124-
extern bool isTempOrToastNamespace(Oid namespaceId);
124+
extern bool isTempOrTempToastNamespace(Oid namespaceId);
125125
extern bool isAnyTempNamespace(Oid namespaceId);
126126
extern bool isOtherTempNamespace(Oid namespaceId);
127127
extern int GetTempNamespaceBackendId(Oid namespaceId);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy