mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 00:03:57 -04:00 
			
		
		
		
	rename macro isTempOrToastNamespace to isTempOrTempToastNamespace
Done for clarity
This commit is contained in:
		
							parent
							
								
									5d16332e96
								
							
						
					
					
						commit
						73fe87503f
					
				| @ -629,7 +629,7 @@ RangeVarAdjustRelationPersistence(RangeVar *newRelation, Oid nspid) | |||||||
| 	switch (newRelation->relpersistence) | 	switch (newRelation->relpersistence) | ||||||
| 	{ | 	{ | ||||||
| 		case RELPERSISTENCE_TEMP: | 		case RELPERSISTENCE_TEMP: | ||||||
| 			if (!isTempOrToastNamespace(nspid)) | 			if (!isTempOrTempToastNamespace(nspid)) | ||||||
| 			{ | 			{ | ||||||
| 				if (isAnyTempNamespace(nspid)) | 				if (isAnyTempNamespace(nspid)) | ||||||
| 					ereport(ERROR, | 					ereport(ERROR, | ||||||
| @ -642,7 +642,7 @@ RangeVarAdjustRelationPersistence(RangeVar *newRelation, Oid nspid) | |||||||
| 			} | 			} | ||||||
| 			break; | 			break; | ||||||
| 		case RELPERSISTENCE_PERMANENT: | 		case RELPERSISTENCE_PERMANENT: | ||||||
| 			if (isTempOrToastNamespace(nspid)) | 			if (isTempOrTempToastNamespace(nspid)) | ||||||
| 				newRelation->relpersistence = RELPERSISTENCE_TEMP; | 				newRelation->relpersistence = RELPERSISTENCE_TEMP; | ||||||
| 			else if (isAnyTempNamespace(nspid)) | 			else if (isAnyTempNamespace(nspid)) | ||||||
| 				ereport(ERROR, | 				ereport(ERROR, | ||||||
| @ -2992,11 +2992,11 @@ isTempToastNamespace(Oid namespaceId) | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  * isTempOrToastNamespace - is the given namespace my temporary-table |  * isTempOrTempToastNamespace - is the given namespace my temporary-table | ||||||
|  *		namespace or my temporary-toast-table namespace? |  *		namespace or my temporary-toast-table namespace? | ||||||
|  */ |  */ | ||||||
| bool | bool | ||||||
| isTempOrToastNamespace(Oid namespaceId) | isTempOrTempToastNamespace(Oid namespaceId) | ||||||
| { | { | ||||||
| 	if (OidIsValid(myTempNamespace) && | 	if (OidIsValid(myTempNamespace) && | ||||||
| 	 (myTempNamespace == namespaceId || myTempToastNamespace == namespaceId)) | 	 (myTempNamespace == namespaceId || myTempToastNamespace == namespaceId)) | ||||||
| @ -3036,7 +3036,7 @@ bool | |||||||
| isOtherTempNamespace(Oid namespaceId) | isOtherTempNamespace(Oid namespaceId) | ||||||
| { | { | ||||||
| 	/* If it's my own temp namespace, say "false" */ | 	/* If it's my own temp namespace, say "false" */ | ||||||
| 	if (isTempOrToastNamespace(namespaceId)) | 	if (isTempOrTempToastNamespace(namespaceId)) | ||||||
| 		return false; | 		return false; | ||||||
| 	/* Else, if it's any temp namespace, say "true" */ | 	/* Else, if it's any temp namespace, say "true" */ | ||||||
| 	return isAnyTempNamespace(namespaceId); | 	return isAnyTempNamespace(namespaceId); | ||||||
|  | |||||||
| @ -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 | 	 * Toast tables for regular relations go in pg_toast; those for temp | ||||||
| 	 * relations go into the per-backend temp-toast-table namespace. | 	 * relations go into the per-backend temp-toast-table namespace. | ||||||
| 	 */ | 	 */ | ||||||
| 	if (isTempOrToastNamespace(rel->rd_rel->relnamespace)) | 	if (isTempOrTempToastNamespace(rel->rd_rel->relnamespace)) | ||||||
| 		namespaceid = GetTempToastNamespace(); | 		namespaceid = GetTempToastNamespace(); | ||||||
| 	else | 	else | ||||||
| 		namespaceid = PG_TOAST_NAMESPACE; | 		namespaceid = PG_TOAST_NAMESPACE; | ||||||
|  | |||||||
| @ -836,7 +836,7 @@ pg_relation_filepath(PG_FUNCTION_ARGS) | |||||||
| 			backend = InvalidBackendId; | 			backend = InvalidBackendId; | ||||||
| 			break; | 			break; | ||||||
| 		case RELPERSISTENCE_TEMP: | 		case RELPERSISTENCE_TEMP: | ||||||
| 			if (isTempOrToastNamespace(relform->relnamespace)) | 			if (isTempOrTempToastNamespace(relform->relnamespace)) | ||||||
| 				backend = MyBackendId; | 				backend = MyBackendId; | ||||||
| 			else | 			else | ||||||
| 			{ | 			{ | ||||||
|  | |||||||
							
								
								
									
										4
									
								
								src/backend/utils/cache/relcache.c
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								src/backend/utils/cache/relcache.c
									
									
									
									
										vendored
									
									
								
							| @ -913,7 +913,7 @@ RelationBuildDesc(Oid targetRelId, bool insertIt) | |||||||
| 			relation->rd_islocaltemp = false; | 			relation->rd_islocaltemp = false; | ||||||
| 			break; | 			break; | ||||||
| 		case RELPERSISTENCE_TEMP: | 		case RELPERSISTENCE_TEMP: | ||||||
| 			if (isTempOrToastNamespace(relation->rd_rel->relnamespace)) | 			if (isTempOrTempToastNamespace(relation->rd_rel->relnamespace)) | ||||||
| 			{ | 			{ | ||||||
| 				relation->rd_backend = MyBackendId; | 				relation->rd_backend = MyBackendId; | ||||||
| 				relation->rd_islocaltemp = true; | 				relation->rd_islocaltemp = true; | ||||||
| @ -2811,7 +2811,7 @@ RelationBuildLocalRelation(const char *relname, | |||||||
| 			rel->rd_islocaltemp = false; | 			rel->rd_islocaltemp = false; | ||||||
| 			break; | 			break; | ||||||
| 		case RELPERSISTENCE_TEMP: | 		case RELPERSISTENCE_TEMP: | ||||||
| 			Assert(isTempOrToastNamespace(relnamespace)); | 			Assert(isTempOrTempToastNamespace(relnamespace)); | ||||||
| 			rel->rd_backend = MyBackendId; | 			rel->rd_backend = MyBackendId; | ||||||
| 			rel->rd_islocaltemp = true; | 			rel->rd_islocaltemp = true; | ||||||
| 			break; | 			break; | ||||||
|  | |||||||
| @ -121,7 +121,7 @@ extern char *NameListToQuotedString(List *names); | |||||||
| 
 | 
 | ||||||
| extern bool isTempNamespace(Oid namespaceId); | extern bool isTempNamespace(Oid namespaceId); | ||||||
| extern bool isTempToastNamespace(Oid namespaceId); | extern bool isTempToastNamespace(Oid namespaceId); | ||||||
| extern bool isTempOrToastNamespace(Oid namespaceId); | extern bool isTempOrTempToastNamespace(Oid namespaceId); | ||||||
| extern bool isAnyTempNamespace(Oid namespaceId); | extern bool isAnyTempNamespace(Oid namespaceId); | ||||||
| extern bool isOtherTempNamespace(Oid namespaceId); | extern bool isOtherTempNamespace(Oid namespaceId); | ||||||
| extern int	GetTempNamespaceBackendId(Oid namespaceId); | extern int	GetTempNamespaceBackendId(Oid namespaceId); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user