File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -274,8 +274,13 @@ func (ci *copyin) Exec(v []driver.Value) (r driver.Result, err error) {
274
274
return driver .RowsAffected (0 ), nil
275
275
}
276
276
277
- // CopyData executes a raw CopyData command using the PostgreSQL Frontend/Backend
278
- // protocol. Use Exec(nil) to finish the command.
277
+ // CopyData inserts a raw string into the COPY stream. The insert is
278
+ // asynchronous and CopyData can return errors from previous CopyData calls to
279
+ // the same COPY stmt.
280
+ //
281
+ // You need to call Exec(nil) to sync the COPY stream and to get any
282
+ // errors from pending data, since Stmt.Close() doesn't return errors
283
+ // to the user.
279
284
func (ci * copyin ) CopyData (ctx context.Context , line string ) (r driver.Result , err error ) {
280
285
if ci .closed {
281
286
return nil , errCopyInClosed
You can’t perform that action at this time.
0 commit comments