From 56633b3d51abf6253b8cb11d0d57023b2990bb8b Mon Sep 17 00:00:00 2001 From: Bodo Kaiser Date: Thu, 17 Nov 2022 09:46:39 +0100 Subject: [PATCH] removed unnecessary name argument from DeallocateAll --- conn.go | 2 +- conn_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conn.go b/conn.go index 91b917cb..fd859965 100644 --- a/conn.go +++ b/conn.go @@ -327,7 +327,7 @@ func (c *Conn) Deallocate(ctx context.Context, name string) error { } // DeallocateAll releases all previously prepared statements from the server and client, where it also resets the statement and description cache. -func (c *Conn) DeallocateAll(ctx context.Context, name string) error { +func (c *Conn) DeallocateAll(ctx context.Context) error { c.preparedStatements = map[string]*pgconn.StatementDescription{} if c.config.StatementCacheCapacity > 0 { c.statementCache = stmtcache.NewLRUCache(c.config.StatementCacheCapacity) diff --git a/conn_test.go b/conn_test.go index 0fafeb18..3a23caa3 100644 --- a/conn_test.go +++ b/conn_test.go @@ -424,7 +424,7 @@ func TestPrepare(t *testing.T) { t.Errorf("Prepared statement did not return expected value: %v", s) } - err = conn.DeallocateAll(context.Background(), "test") + err = conn.DeallocateAll(context.Background()) if err != nil { t.Errorf("conn.Deallocate failed: %v", err) }