2
0

pgconn.CommandTag is now an opaque type

It now makes a copy instead of retaining driver memory. This is in
preparation to reuse the driver read buffer.
This commit is contained in:
Jack Christensen
2022-02-12 10:26:26 -06:00
parent e6680127e3
commit 9c5dfbdfb3
14 changed files with 246 additions and 225 deletions
+2 -2
View File
@@ -470,7 +470,7 @@ func (p *Pool) Stat() *Stat {
func (p *Pool) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error) {
c, err := p.Acquire(ctx)
if err != nil {
return nil, err
return pgconn.CommandTag{}, err
}
defer c.Release()
@@ -527,7 +527,7 @@ func (p *Pool) QueryRow(ctx context.Context, sql string, args ...interface{}) pg
func (p *Pool) QueryFunc(ctx context.Context, sql string, args []interface{}, scans []interface{}, f func(pgx.QueryFuncRow) error) (pgconn.CommandTag, error) {
c, err := p.Acquire(ctx)
if err != nil {
return nil, err
return pgconn.CommandTag{}, err
}
defer c.Release()