mirror of
https://github.com/jackc/pgx.git
synced 2025-05-31 11:42:24 +00:00
Delay handling invalidated statements when in transaction
This commit is contained in:
parent
e7aa76ccf9
commit
c31b89a3f2
4
conn.go
4
conn.go
@ -1179,6 +1179,10 @@ order by attnum`,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Conn) deallocateInvalidatedCachedStatements(ctx context.Context) error {
|
func (c *Conn) deallocateInvalidatedCachedStatements(ctx context.Context) error {
|
||||||
|
if c.pgConn.TxStatus() != 'I' {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if c.descriptionCache != nil {
|
if c.descriptionCache != nil {
|
||||||
c.descriptionCache.HandleInvalidated()
|
c.descriptionCache.HandleInvalidated()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user