From: Steve Singer Date: Sat, 28 May 2016 16:32:57 +0000 (-0400) Subject: Fix GETCONFIGOPTIONBYNAME checking for PG9.6+ X-Git-Url: http://git.postgresql.org/gitweb/static/connections.php?a=commitdiff_plain;h=2ea3967803c60347e324fb6586d083123b8161e6;p=slony1-engine.git Fix GETCONFIGOPTIONBYNAME checking for PG9.6+ Also add the define to config.h.in so it actually gets set --- diff --git a/config.h.in b/config.h.in index 198c76a9..e6eee66b 100644 --- a/config.h.in +++ b/config.h.in @@ -74,6 +74,9 @@ #undef SETCONFIGOPTION_7 #undef SETCONFIGOPTION_8 +#undef GETCONFIGOPTIONBYNAME_2 +#undef GETCONFIGOPTIONBYNAME_3 + #undef HAS_LOOKUPEXPLICITNAMESPACE_2 #endif /* SLONY_I_CONFIG_H */ diff --git a/src/backend/slony1_funcs.c b/src/backend/slony1_funcs.c index 4cb36b4b..2d8891b4 100644 --- a/src/backend/slony1_funcs.c +++ b/src/backend/slony1_funcs.c @@ -476,6 +476,8 @@ versionFunc(logTrigger) (PG_FUNCTION_ARGS) olddatestyle = GetConfigOptionByName("DateStyle", NULL); #elif defined (GETCONFIGOPTIONBYNAME_3) olddatestyle = GetConfigOptionByName("DateStyle", NULL, false); +#else +#error "GETCONFIGOPTIONBYNAME_2 or GETCONFIGOPTIONBYNAME_3 must be defined" #endif if (!strstr(olddatestyle, "ISO")) {