Avoid casting away a const

This commit is contained in:
Peter Eisentraut 2019-03-16 10:13:03 +01:00
parent 8e93a516e6
commit 893d6f8a1f
3 changed files with 3 additions and 3 deletions

View File

@ -269,7 +269,7 @@ bool recoveryTargetInclusive = true;
int recoveryTargetAction = RECOVERY_TARGET_ACTION_PAUSE; int recoveryTargetAction = RECOVERY_TARGET_ACTION_PAUSE;
TransactionId recoveryTargetXid; TransactionId recoveryTargetXid;
TimestampTz recoveryTargetTime; TimestampTz recoveryTargetTime;
char *recoveryTargetName; const char *recoveryTargetName;
XLogRecPtr recoveryTargetLSN; XLogRecPtr recoveryTargetLSN;
int recovery_min_apply_delay = 0; int recovery_min_apply_delay = 0;
TimestampTz recoveryDelayUntilTime; TimestampTz recoveryDelayUntilTime;

View File

@ -11434,7 +11434,7 @@ assign_recovery_target_name(const char *newval, void *extra)
if (newval && strcmp(newval, "") != 0) if (newval && strcmp(newval, "") != 0)
{ {
recoveryTarget = RECOVERY_TARGET_NAME; recoveryTarget = RECOVERY_TARGET_NAME;
recoveryTargetName = (char *) newval; recoveryTargetName = newval;
} }
else else
recoveryTarget = RECOVERY_TARGET_UNSET; recoveryTarget = RECOVERY_TARGET_UNSET;

View File

@ -131,7 +131,7 @@ extern char *PrimarySlotName;
/* indirectly set via GUC system */ /* indirectly set via GUC system */
extern TransactionId recoveryTargetXid; extern TransactionId recoveryTargetXid;
extern TimestampTz recoveryTargetTime; extern TimestampTz recoveryTargetTime;
extern char *recoveryTargetName; extern const char *recoveryTargetName;
extern XLogRecPtr recoveryTargetLSN; extern XLogRecPtr recoveryTargetLSN;
extern RecoveryTargetType recoveryTarget; extern RecoveryTargetType recoveryTarget;
extern char *PromoteTriggerFile; extern char *PromoteTriggerFile;