Skip to content

Commit db204b0

Browse files
committed
[PGPRO-7614] Add cosmetic changes and padding
Tags: pg_variables
1 parent c7898fc commit db204b0

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

pg_variables.c

+14-11
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,14 @@ typedef struct tagVariableStatEntry
166166
Variable *variable;
167167
Package *package;
168168
Levels levels;
169-
void **user_fctx; /* pointer to funcctx->user_fctx */
169+
void **user_fctx; /* pointer to funcctx->user_fctx */
170170
} VariableStatEntry;
171171

172172
typedef struct tagPackageStatEntry
173173
{
174174
HASH_SEQ_STATUS *status;
175175
Levels levels;
176-
void **user_fctx; /* pointer to funcctx->user_fctx */
176+
void **user_fctx; /* pointer to funcctx->user_fctx */
177177
} PackageStatEntry;
178178

179179
#ifdef PGPRO_EE
@@ -1391,8 +1391,9 @@ remove_package(PG_FUNCTION_ARGS)
13911391

13921392
package = getPackage(package_name, true);
13931393
/*
1394-
* Need to remove variables before packages because here calls hash_seq_term()
1395-
* which uses "entry->status->hashp->frozen" but memory context of "hashp"
1394+
* Need to remove variables before removing package because
1395+
* remove_variables_package() calls hash_seq_term() which uses
1396+
* "entry->status->hashp->frozen" but memory context of "hashp"
13961397
* for regular variables can be deleted in removePackageInternal().
13971398
*/
13981399
remove_variables_package(&variables_stats, package);
@@ -1488,8 +1489,9 @@ remove_packages(PG_FUNCTION_ARGS)
14881489
PG_RETURN_VOID();
14891490

14901491
/*
1491-
* Need to remove variables before packages because here calls hash_seq_term()
1492-
* which uses "entry->status->hashp->frozen" but memory context of "hashp"
1492+
* Need to remove variables before removing packages because
1493+
* remove_variables_all() calls hash_seq_term() which uses
1494+
* "entry->status->hashp->frozen" but memory context of "hashp"
14931495
* for regular variables can be deleted in removePackageInternal().
14941496
*/
14951497
remove_variables_all(&variables_stats);
@@ -2266,9 +2268,10 @@ removeObject(TransObject *object, TransObjectType type)
22662268
}
22672269

22682270
/*
2269-
* Need to remove variables before state because here calls hash_seq_term()
2270-
* which uses "entry->status->hashp->frozen" but memory context of "hashp"
2271-
* for regular variables can be deleted in removeState()->freeValue().
2271+
* Need to remove variables before removing state because
2272+
* remove_variables_variable() calls hash_seq_term() which uses
2273+
* "entry->status->hashp->frozen" but memory context of "hashp"
2274+
* for regular variables can be deleted in removeState() in freeValue().
22722275
*/
22732276
/* Remove object from hash table */
22742277
hash_search(hash, object->name, HASH_REMOVE, &found);
@@ -2358,8 +2361,8 @@ rollbackSavepoint(TransObject *object, TransObjectType type, bool sub)
23582361
* Package inside autonomous transaction should not be detected
23592362
* as 'object has been changed in upper level' because in this
23602363
* case we will remove state in releaseSavepoint() but this
2361-
* state may be used pgvRestoreContext(). So atxlevel should
2362-
* be 0 in case rollback of autonomous transaction.
2364+
* state may be used in pgvRestoreContext(). So atxlevel should
2365+
* be 0 in case of rollback of autonomous transaction.
23632366
*/
23642367
GetActualState(object)->levels.atxlevel = sub ? getNestLevelATX() : 0;
23652368
#endif

0 commit comments

Comments
 (0)