From ea0efb809475bc84f24ad4959d86259222d2ace2 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Sun, 3 Mar 2024 10:21:25 +0000 Subject: [PATCH] [bugfix] update postgresqlstmt to correctly use postgres err hook (#2711) --- internal/db/bundb/drivers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/db/bundb/drivers.go b/internal/db/bundb/drivers.go index 3050a13a0..1811ad533 100644 --- a/internal/db/bundb/drivers.go +++ b/internal/db/bundb/drivers.go @@ -136,7 +136,7 @@ func (stmt *PostgreSQLStmt) Exec(args []driver.Value) (driver.Result, error) { func (stmt *PostgreSQLStmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) { res, err := stmt.stmt.ExecContext(ctx, args) - err = processSQLiteError(err) + err = processPostgresError(err) return res, err } @@ -146,7 +146,7 @@ func (stmt *PostgreSQLStmt) Query(args []driver.Value) (driver.Rows, error) { func (stmt *PostgreSQLStmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) { rows, err := stmt.stmt.QueryContext(ctx, args) - err = processSQLiteError(err) + err = processPostgresError(err) return rows, err }