Fix pipelineBatchResults.Exec() not returning error from ResultReader

pull/1579/head
Jack Christensen 2023-04-20 21:19:41 -05:00
parent 09371981f9
commit a23a423f55
1 changed files with 2 additions and 2 deletions

View File

@ -287,7 +287,7 @@ func (br *pipelineBatchResults) Exec() (pgconn.CommandTag, error) {
results, err := br.pipeline.GetResults()
if err != nil {
br.err = err
return pgconn.CommandTag{}, err
return pgconn.CommandTag{}, br.err
}
var commandTag pgconn.CommandTag
switch results := results.(type) {
@ -306,7 +306,7 @@ func (br *pipelineBatchResults) Exec() (pgconn.CommandTag, error) {
})
}
return commandTag, err
return commandTag, br.err
}
// Query reads the results from the next query in the batch as if the query has been sent with Query.