[bugfix] update postgresqlstmt to correctly use postgres err hook (#2711)

This commit is contained in:
kim 2024-03-03 10:21:25 +00:00 committed by GitHub
parent 40ba93654e
commit ea0efb8094
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
}