Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb5acf10

Browse files
committed
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
1 parentca051d8 commitb5acf10

File tree

1 file changed

+11
-10
lines changed
  • src/backend/access/transam

1 file changed

+11
-10
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6228,16 +6228,17 @@ GetXLogReceiptTime(TimestampTz *rtime, bool *fromStream)
62286228
* Note that text field supplied is a parameter name and does not require
62296229
* translation
62306230
*/
6231-
#defineRecoveryRequiresIntParameter(param_name,currValue,minValue) \
6232-
do { \
6233-
if ((currValue) < (minValue)) \
6234-
ereport(ERROR, \
6235-
(errcode(ERRCODE_INVALID_PARAMETER_VALUE), \
6236-
errmsg("hot standby is not possible because %s = %d is a lower setting than on the primary server (its value was %d)", \
6237-
param_name, \
6238-
currValue, \
6239-
minValue))); \
6240-
} while(0)
6231+
staticvoid
6232+
RecoveryRequiresIntParameter(constchar*param_name,intcurrValue,intminValue)
6233+
{
6234+
if (currValue<minValue)
6235+
ereport(ERROR,
6236+
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
6237+
errmsg("hot standby is not possible because %s = %d is a lower setting than on the primary server (its value was %d)",
6238+
param_name,
6239+
currValue,
6240+
minValue)));
6241+
}
62416242

62426243
/*
62436244
* Check to see if required parameters are set high enough on this server

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp