Skip to content

Commit 086104f

Browse files
committed
store: fix namespace reference when loading indexes from table
1 parent a20f295 commit 086104f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

store/postgres/src/relational/prune.rs

+6
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ impl TablePair {
5656
if catalog::table_exists(conn, dst_nsp.as_str(), &dst.name)? {
5757
writeln!(query, "truncate table {};", dst.qualified_name)?;
5858
} else {
59+
let mut list = IndexList {
60+
indexes: HashMap::new(),
61+
};
62+
let indexes = load_indexes_from_table(conn, &src, src_nsp.as_str())?;
63+
list.indexes.insert(src.name.to_string(), indexes);
64+
5965
// In case of pruning we don't do delayed creation of indexes,
6066
// as the asumption is that there is not that much data inserted.
6167
dst.as_ddl(schema, catalog, Some(&list), &mut query)?;

0 commit comments

Comments
 (0)