Updated Getting started with pgx through database sql (markdown)

Jack Christensen 2021-05-31 07:13:37 -05:00
parent 4bc45cca9d
commit c9f798b4d9

@ -10,10 +10,10 @@ pgx requires a recent version of Go with module support. Use the `go version` co
```
$ go version
go version go1.14.2 darwin/amd64
go version go1.16.4 darwin/amd64
```
The version should be at least 1.13.
The version should be at least 1.15.
pgx also requires a PostgreSQL database that is accessible from your host. Use `psql` to test your connection.
@ -46,6 +46,13 @@ $ go mod init hello
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
```
## Hello world from PostgreSQL
Create the file `main.go` and copy and paste the following: