@@ -2541,8 +2541,6 @@ impl<'a> QueryFragment<Pg> for InsertQuery<'a> {
25412541 let out = & mut out;
25422542 out. unsafe_to_cache_prepared ( ) ;
25432543
2544- let not_poi = !self . table . object . is_poi ( ) ;
2545-
25462544 // Construct a query
25472545 // insert into schema.table(column, ...)
25482546 // values
@@ -2568,9 +2566,7 @@ impl<'a> QueryFragment<Pg> for InsertQuery<'a> {
25682566 out. push_sql ( CAUSALITY_REGION_COLUMN ) ;
25692567 } ;
25702568
2571- if not_poi {
2572- out. push_sql ( ", vid" ) ;
2573- }
2569+ out. push_sql ( ", vid" ) ;
25742570 out. push_sql ( ") values\n " ) ;
25752571
25762572 for ( i, row) in self . rows . iter ( ) . enumerate ( ) {
@@ -2588,10 +2584,8 @@ impl<'a> QueryFragment<Pg> for InsertQuery<'a> {
25882584 out. push_sql ( ", " ) ;
25892585 out. push_bind_param :: < Integer , _ > ( & row. causality_region ) ?;
25902586 } ;
2591- if not_poi {
2592- out. push_sql ( ", " ) ;
2593- out. push_bind_param :: < BigInt , _ > ( & row. vid ) ?;
2594- }
2587+ out. push_sql ( ", " ) ;
2588+ out. push_bind_param :: < BigInt , _ > ( & row. vid ) ?;
25952589 out. push_sql ( ")" ) ;
25962590 }
25972591
@@ -5089,8 +5083,6 @@ impl<'a> QueryFragment<Pg> for CopyEntityBatchQuery<'a> {
50895083 fn walk_ast < ' b > ( & ' b self , mut out : AstPass < ' _ , ' b , Pg > ) -> QueryResult < ( ) > {
50905084 out. unsafe_to_cache_prepared ( ) ;
50915085
5092- let not_poi = !self . dst . object . is_poi ( ) ;
5093-
50945086 // Construct a query
50955087 // insert into {dst}({columns})
50965088 // select {columns} from {src}
@@ -5111,9 +5103,7 @@ impl<'a> QueryFragment<Pg> for CopyEntityBatchQuery<'a> {
51115103 out. push_sql ( ", " ) ;
51125104 out. push_sql ( CAUSALITY_REGION_COLUMN ) ;
51135105 } ;
5114- if not_poi {
5115- out. push_sql ( ", vid" ) ;
5116- }
5106+ out. push_sql ( ", vid" ) ;
51175107
51185108 out. push_sql ( ")\n select " ) ;
51195109 for column in & self . columns {
@@ -5179,9 +5169,7 @@ impl<'a> QueryFragment<Pg> for CopyEntityBatchQuery<'a> {
51795169 ) ) ;
51805170 }
51815171 }
5182- if not_poi {
5183- out. push_sql ( ", vid" ) ;
5184- }
5172+ out. push_sql ( ", vid" ) ;
51855173
51865174 out. push_sql ( " from " ) ;
51875175 out. push_sql ( self . src . qualified_name . as_str ( ) ) ;
0 commit comments