src/relpipe-tr-sql.cpp
branchv_0
changeset 15 0ecde5272f8e
parent 13 19580b27ade2
child 19 44db9e1e7c7f
--- a/src/relpipe-tr-sql.cpp	Fri Oct 25 12:33:00 2019 +0200
+++ b/src/relpipe-tr-sql.cpp	Sat Oct 26 17:45:37 2019 +0200
@@ -55,6 +55,8 @@
 		if (std::regex_match(cli.programName(), std::wregex(L"^(.*/)?relpipe-in-sql$"))) {
 			// relpipe-in-sql:
 			std::shared_ptr<writer::RelationalWriter> writer(writer::Factory::create(std::cout));
+			configuration.sqlBeforeRelational = isatty(fileno(stdin)) ? nullptr : &std::wcin;
+			configuration.sqlAfterRelational = nullptr;
 			SqlHandler handler(writer.get(), configuration);
 			handler.endOfPipe();
 		} else {