Replace a macro by a function
Using a macro is ugly and not justified here. Discussion: https://www.postgresql.org/message-id/flat/4ad69a4c-cc9b-0dfe-0352-8b1b0cd36c7b@2ndquadrant.com
This commit is contained in:
parent
ca051d8b10
commit
b5acf10cfc
@ -6228,16 +6228,17 @@ GetXLogReceiptTime(TimestampTz *rtime, bool *fromStream)
|
|||||||
* Note that text field supplied is a parameter name and does not require
|
* Note that text field supplied is a parameter name and does not require
|
||||||
* translation
|
* translation
|
||||||
*/
|
*/
|
||||||
#define RecoveryRequiresIntParameter(param_name, currValue, minValue) \
|
static void
|
||||||
do { \
|
RecoveryRequiresIntParameter(const char *param_name, int currValue, int minValue)
|
||||||
if ((currValue) < (minValue)) \
|
{
|
||||||
ereport(ERROR, \
|
if (currValue < minValue)
|
||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE), \
|
ereport(ERROR,
|
||||||
errmsg("hot standby is not possible because %s = %d is a lower setting than on the primary server (its value was %d)", \
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
param_name, \
|
errmsg("hot standby is not possible because %s = %d is a lower setting than on the primary server (its value was %d)",
|
||||||
currValue, \
|
param_name,
|
||||||
minValue))); \
|
currValue,
|
||||||
} while(0)
|
minValue)));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check to see if required parameters are set high enough on this server
|
* Check to see if required parameters are set high enough on this server
|
||||||
|
Loading…
x
Reference in New Issue
Block a user