From a7e07650544ccecc230a64cf5ae84241e2f95a49 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Tue, 20 Dec 2022 20:17:44 -0600 Subject: [PATCH] Fix: pgxpool.New() instead of pgxpool.Connect() --- Getting-started-with-pgx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Getting-started-with-pgx.md b/Getting-started-with-pgx.md index ce13a93..95d6aad 100644 --- a/Getting-started-with-pgx.md +++ b/Getting-started-with-pgx.md @@ -98,7 +98,7 @@ Hello, world! ## Using a Connection Pool -The `*pgx.Conn` returned by `pgx.Connect()` represents a single connection and is not concurrency safe. This is entirely appropriate for a simple command line example such as above. However, for many uses, such as a web application server, concurrency is required. To use a connection pool replace the import `github.com/jackc/pgx/v5` with `github.com/jackc/pgx/v5/pgxpool` and connect with `pgxpool.Connect()` instead of `pgx.Connect()`. +The `*pgx.Conn` returned by `pgx.Connect()` represents a single connection and is not concurrency safe. This is entirely appropriate for a simple command line example such as above. However, for many uses, such as a web application server, concurrency is required. To use a connection pool replace the import `github.com/jackc/pgx/v5` with `github.com/jackc/pgx/v5/pgxpool` and connect with `pgxpool.New()` instead of `pgx.Connect()`. You may need to run `go get` for the `pgxpool` package.