Skip to content

Commit eb0bef6

Browse files
author
Zoran Cvetkov
committed
fix runner test data_source_revert
1 parent c6757db commit eb0bef6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

store/postgres/src/relational_queries.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4674,6 +4674,8 @@ impl<'a> QueryFragment<Pg> for CopyEntityBatchQuery<'a> {
46744674
fn walk_ast<'b>(&'b self, mut out: AstPass<'_, 'b, Pg>) -> QueryResult<()> {
46754675
out.unsafe_to_cache_prepared();
46764676

4677+
let not_poi = self.dst.name.as_str() != POI_TABLE;
4678+
46774679
// Construct a query
46784680
// insert into {dst}({columns})
46794681
// select {columns} from {src}
@@ -4694,7 +4696,9 @@ impl<'a> QueryFragment<Pg> for CopyEntityBatchQuery<'a> {
46944696
out.push_sql(", ");
46954697
out.push_sql(CAUSALITY_REGION_COLUMN);
46964698
};
4697-
out.push_sql(", vid");
4699+
if not_poi {
4700+
out.push_sql(", vid");
4701+
}
46984702

46994703
out.push_sql(")\nselect ");
47004704
for column in &self.columns {
@@ -4760,7 +4764,9 @@ impl<'a> QueryFragment<Pg> for CopyEntityBatchQuery<'a> {
47604764
));
47614765
}
47624766
}
4763-
out.push_sql(", vid");
4767+
if not_poi {
4768+
out.push_sql(", vid");
4769+
}
47644770

47654771
out.push_sql(" from ");
47664772
out.push_sql(self.src.qualified_name.as_str());

0 commit comments

Comments
 (0)