pgx icon indicating copy to clipboard operation
pgx copied to clipboard

Add public constant with value "pgx"

Open mirrorru opened this issue 6 months ago • 0 comments

Enter a constant for the driver name so that it can be used when connecting to the database via "database/sql" in the standard connection command.

import "github.com/jackc/pgx/v5/stdlib" 
...
// stdlib.DriverName = "pgx"
db, err := sql.Open(stdlib.DriverName, os.Getenv("DATABASE_URL"))
...

The string "pgx" is used several times in the library, the introduction of a constant seems appropriate.

mirrorru avatar Jun 18 '25 22:06 mirrorru