From 981f55a5573a338068d53385e5155bbb7af2905f Mon Sep 17 00:00:00 2001 From: Dennis Felsing Date: Tue, 7 Nov 2023 17:21:10 +0000 Subject: [PATCH] Fix standalone sqlsmith --- postgres.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postgres.cc b/postgres.cc index c9137cf..4b6f64c 100644 --- a/postgres.cc +++ b/postgres.cc @@ -198,7 +198,7 @@ schema_pqxx::schema_pqxx(std::string &conninfo, bool no_catalog, bool dump_state tables.push_back(table(w.quote_name(obj["name"].get()), w.quote_name(schema), - w.quote_name(db), + db.empty() ? db : w.quote_name(db), ((obj["table_type"].get() == "BASE TABLE") ? true : false))); } } else { @@ -231,7 +231,7 @@ schema_pqxx::schema_pqxx(std::string &conninfo, bool no_catalog, bool dump_state tables.push_back(table(w.quote_name(name), w.quote_name(schema), - w.quote_name(db), + db.empty() ? db : w.quote_name(db), ((table_type == "BASE TABLE") ? true : false))); if (dump_state) {