mirror of
https://github.com/jackc/pgx.git
synced 2025-05-02 13:40:00 +00:00
Locks the `openFromConnPoolCount` counter while formatting the driver name and incrementing to avoid a data race of multiple goroutines modifying the counter and registering the same name. `sql.Register` panics if a driver name has already been registered.