{"id":50111,"library":"jackc-pgx-v4","title":"pgx v4 - PostgreSQL Driver","description":"Package pgx is a PostgreSQL database driver for Go.","status":"active","version":"4.18.3","language":"go","source_language":null,"source_url":"https://github.com/jackc/pgx","tags":["postgresql","database","sql","driver","pgx"],"install":[{"cmd":"go get github.com/jackc/pgx/v4","lang":"bash","label":"Install github.com/jackc/pgx/v4"}],"dependencies":[],"imports":[{"symbol":"pgx","correct":"github.com/jackc/pgx/v4"}],"quickstart":{"code":"package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"github.com/jackc/pgx/v4\"\n)\n\nfunc main() {\n\tconn, err := pgx.Connect(context.Background(), \"postgres://user:password@localhost/dbname\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer conn.Close(context.Background())\n\n\tvar greeting string\n\terr = conn.QueryRow(context.Background(), \"select 'Hello, world!'\").Scan(&greeting)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(greeting)\n}","lang":"go","description":"Connect to PostgreSQL and run a simple query."},"warnings":[{"fix":"Migrate to github.com/jackc/pgx/v5","message":"pgx v4 is in maintenance mode; consider upgrading to v5 for new features.","severity":"breaking","affected_versions":">=4.0.0 <5.0.0"}],"env_vars":null,"search_vec":"'databas':10,15 'driver':4,11,17 'go':13 'packag':5 'pgx':1,6,18 'postgresql':3,9,14 'sql':16 'v4':2","created_at":"2026-06-15T04:40:52.791698+00:00","updated_at":"2026-06-15T04:40:52.791698+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/jackc/pgx","github":"https://github.com/jackc/pgx","docs":"https://pkg.go.dev/github.com/jackc/pgx/v4#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}