()
| 436 | } |
| 437 | |
| 438 | func (c *Conn) die() { |
| 439 | if c.IsClosed() { |
| 440 | return |
| 441 | } |
| 442 | |
| 443 | ctx, cancel := context.WithCancel(context.Background()) |
| 444 | cancel() // force immediate hard cancel |
| 445 | c.pgConn.Close(ctx) |
| 446 | } |
| 447 | |
| 448 | func quoteIdentifier(s string) string { |
| 449 | return `"` + strings.ReplaceAll(s, `"`, `""`) + `"` |