Skip to content

Commit c3c69dd

Browse files
committed
Flex output: Remove code that alters table in append mode
This code was basically copied over from the pgsql output. It is a half-measure that can detect some needed changes in your database tables when you change the config after import. But this was never tested properly and what is implemented is not enough to make this a useful feature. So lets get rid of it.
1 parent 440ee07 commit c3c69dd

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

src/flex-table.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -167,25 +167,6 @@ void table_connection_t::start(bool append)
167167
table().has_geom_column() ? flex_table_t::table_type::interim
168168
: flex_table_t::table_type::permanent,
169169
table().full_name()));
170-
} else {
171-
//check the columns against those in the existing table
172-
auto const res = m_db_connection->query(
173-
PGRES_TUPLES_OK,
174-
"SELECT * FROM {} LIMIT 0"_format(table().full_name()));
175-
176-
for (auto const &column : table()) {
177-
if (res.get_column_number(column.name()) < 0) {
178-
log_info("Adding new column '{}' to '{}'", column.name(),
179-
table().name());
180-
m_db_connection->exec(
181-
"ALTER TABLE {} ADD COLUMN \"{}\" {}"_format(
182-
table().full_name(), column.name(),
183-
column.sql_type_name()));
184-
}
185-
// Note: we do not verify the type or delete unused columns
186-
}
187-
188-
//TODO: change the type of the geometry column if needed - this can only change to a more permissive type
189170
}
190171

191172
prepare();

0 commit comments

Comments
 (0)