mirror of
https://github.com/jackc/pgx.git
synced 2025-09-04 19:37:10 +00:00
Update for pgx v5
parent
3dd765f1e8
commit
2f5e42c8c8
@ -10,10 +10,10 @@ pgx requires a recent version of Go with module support. Use the `go version` co
|
||||
|
||||
```
|
||||
$ go version
|
||||
go version go1.16.4 darwin/amd64
|
||||
go version go1.19.1 darwin/amd64
|
||||
```
|
||||
|
||||
The version should be at least 1.15.
|
||||
The version should be at least 1.18.
|
||||
|
||||
pgx also requires a PostgreSQL database that is accessible from your host. Use `psql` to test your connection.
|
||||
|
||||
@ -22,7 +22,7 @@ $ psql
|
||||
Timing is on.
|
||||
Null display is "∅".
|
||||
Line style is unicode.
|
||||
psql (12.3)
|
||||
psql (14.5 (Homebrew))
|
||||
Type "help" for help.
|
||||
|
||||
jack@[local]:5432 jack=#
|
||||
@ -49,8 +49,7 @@ go: creating new go.mod: module hello
|
||||
Add pgx to your Go modules:
|
||||
|
||||
```
|
||||
$ go get github.com/jackc/pgx/v4
|
||||
go get: added github.com/jackc/pgx/v4 v4.11.0
|
||||
$ go get github.com/jackc/pgx/v5
|
||||
```
|
||||
|
||||
## Hello world from PostgreSQL
|
||||
@ -97,10 +96,3 @@ Use the same connection settings as were used when testing with `psql` above. If
|
||||
$ go run main.go
|
||||
Hello, world!
|
||||
```
|
||||
|
||||
You may see some output from Go when it downloads pgx for the first time.
|
||||
|
||||
```
|
||||
go: finding module for package github.com/jackc/pgx/v4
|
||||
go: found github.com/jackc/pgx/v4 in github.com/jackc/pgx/v4 v4.6.0
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user