Fix GETCONFIGOPTIONBYNAME checking for PG9.6+
authorSteve Singer <ssinger@ca.afilias.info>
Sat, 28 May 2016 16:32:57 +0000 (12:32 -0400)
committerSteve Singer <ssinger@ca.afilias.info>
Mon, 30 May 2016 02:59:23 +0000 (22:59 -0400)
Also add the define to config.h.in so it actually gets set

config.h.in
src/backend/slony1_funcs.c

index 198c76a994baef600f9f42414acf7f546994e0f0..e6eee66b1862071eeda36f2ba9382d5a61df5513 100644 (file)
@@ -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 */
index 4cb36b4bc233b4d878518dda45dc3f0dfb6bc8f0..2d8891b4184151b3dbe1205ffa3265c825425ee2 100644 (file)
@@ -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"))
        {