Fix explicitly prepared statements with describe statement cache mode
fixes https://github.com/jackc/pgx/issues/1196
This commit is contained in:
@@ -645,7 +645,7 @@ optionLoop:
|
||||
resultFormats = c.eqb.resultFormats
|
||||
}
|
||||
|
||||
if c.stmtcache != nil && c.stmtcache.Mode() == stmtcache.ModeDescribe {
|
||||
if c.stmtcache != nil && c.stmtcache.Mode() == stmtcache.ModeDescribe && !ok {
|
||||
rows.resultReader = c.pgConn.ExecParams(ctx, sql, c.eqb.paramValues, sd.ParamOIDs, c.eqb.paramFormats, resultFormats)
|
||||
} else {
|
||||
rows.resultReader = c.pgConn.ExecPrepared(ctx, sd.Name, c.eqb.paramValues, c.eqb.paramFormats, resultFormats)
|
||||
|
||||
Reference in New Issue
Block a user