From de1bd805fc6728433814d2ba4c43d40127e577aa Mon Sep 17 00:00:00 2001 From: An Tao Date: Thu, 1 Sep 2022 00:30:16 +0800 Subject: [PATCH] Add a precompilation macro in the pg pipeline test code (#1368) --- orm_lib/tests/pipeline_test.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/orm_lib/tests/pipeline_test.cpp b/orm_lib/tests/pipeline_test.cpp index d7ffd732..889b0387 100644 --- a/orm_lib/tests/pipeline_test.cpp +++ b/orm_lib/tests/pipeline_test.cpp @@ -235,6 +235,7 @@ int main(int argc, char **argv) std::promise p1; std::future f1 = p1.get_future(); app().setThreadNum(1); +#if LIBPQ_SUPPORTS_BATCH_MODE app().createDbClient( // "postgresql", // dbType "127.0.0.1", // host @@ -250,7 +251,7 @@ int main(int argc, char **argv) 10, // timeout true // autobatch ); - +#endif std::thread thr([&]() { app().getLoop()->queueInLoop([&]() { p1.set_value(); }); app().run();