(result *ResultReader, statementDescription *StatementDescription, resultFormats []int16)
| 1356 | } |
| 1357 | |
| 1358 | func (pgConn *PgConn) execExtendedSuffix(result *ResultReader, statementDescription *StatementDescription, resultFormats []int16) { |
| 1359 | if statementDescription == nil { |
| 1360 | pgConn.frontend.SendDescribe(&pgproto3.Describe{ObjectType: 'P'}) |
| 1361 | } |
| 1362 | pgConn.frontend.SendExecute(&pgproto3.Execute{}) |
| 1363 | pgConn.frontend.SendSync(&pgproto3.Sync{}) |
| 1364 | |
| 1365 | err := pgConn.flushWithPotentialWriteReadDeadlock() |
| 1366 | if err != nil { |
| 1367 | pgConn.asyncClose() |
| 1368 | result.concludeCommand(CommandTag{}, err) |
| 1369 | pgConn.contextWatcher.Unwatch() |
| 1370 | result.closed = true |
| 1371 | pgConn.unlock() |
| 1372 | return |
| 1373 | } |
| 1374 | |
| 1375 | result.readUntilRowDescription(statementDescription, resultFormats) |
| 1376 | } |
| 1377 | |
| 1378 | // CopyTo executes the copy command sql and copies the results to w. |
| 1379 | func (pgConn *PgConn) CopyTo(ctx context.Context, w io.Writer, sql string) (CommandTag, error) { |
no test coverage detected