mirror of
https://github.com/jackc/pgx.git
synced 2025-09-04 19:37:10 +00:00
Updated Getting started with pgx through database sql (markdown)
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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user