File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -253,12 +253,6 @@ void table_connection_t::start(bool append)
253253{
254254 assert (m_db_connection);
255255
256- if (!has_schema (table ().schema ())) {
257- throw fmt_error (" Schema '{0}' not available."
258- " Use 'CREATE SCHEMA \" {0}\" ;' to create it." ,
259- table ().schema ());
260- }
261-
262256 for (auto const &ts :
263257 {table ().data_tablespace (), table ().index_tablespace ()}) {
264258 if (!has_tablespace (ts)) {
Original file line number Diff line number Diff line change @@ -455,6 +455,11 @@ flex_table_t &output_flex_t::create_flex_table()
455455 if (lua_isstring (lua_state (), -1 )) {
456456 std::string const schema = lua_tostring (lua_state (), -1 );
457457 check_identifier (schema, " schema field" );
458+ if (!has_schema (schema)) {
459+ throw fmt_error (" Schema '{0}' not available."
460+ " Use 'CREATE SCHEMA \" {0}\" ;' to create it." ,
461+ schema);
462+ }
458463 new_table.set_schema (schema);
459464 }
460465 lua_pop (lua_state (), 1 );
You can’t perform that action at this time.
0 commit comments