mirror of
https://github.com/postgres/postgres.git
synced 2025-05-15 00:02:24 -04:00
Move fixed value to struct initializer
This commit is contained in:
parent
d67ad2ab90
commit
79c8372d2d
@ -79,6 +79,9 @@ static dshash_parameters principal_key_dsh_params = {
|
||||
.entry_size = sizeof(TDEPrincipalKey),
|
||||
.compare_function = dshash_memcmp,
|
||||
.hash_function = dshash_memhash,
|
||||
#if PG_VERSION_NUM >= 170000
|
||||
.copy_function = dshash_memcpy,
|
||||
#endif
|
||||
};
|
||||
|
||||
static TdePrincipalKeylocalState principalKeyLocalState;
|
||||
@ -189,9 +192,6 @@ initialize_objects_in_dsa_area(dsa_area *dsa, void *raw_dsa_area)
|
||||
sharedState->rawDsaArea = raw_dsa_area;
|
||||
sharedState->hashTrancheId = LWLockNewTrancheId();
|
||||
principal_key_dsh_params.tranche_id = sharedState->hashTrancheId;
|
||||
#if PG_VERSION_NUM >= 170000
|
||||
principal_key_dsh_params.copy_function = dshash_memcpy;
|
||||
#endif
|
||||
dsh = dshash_create(dsa, &principal_key_dsh_params, 0);
|
||||
sharedState->hashHandle = dshash_get_hash_table_handle(dsh);
|
||||
dshash_detach(dsh);
|
||||
|
Loading…
x
Reference in New Issue
Block a user