From 82db1e47460ad54461c0e9f2dccab897cb7d2f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hitalo=20de=20Jesus=20do=20Ros=C3=A1rio=20Souza?= <63821277+enghitalo@users.noreply.github.com> Date: Mon, 25 Jul 2022 02:32:21 -0300 Subject: [PATCH] pg: improve pg README.md (#15206) --- vlib/pg/README.md | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/vlib/pg/README.md b/vlib/pg/README.md index 1d1fce277..551dadc77 100644 --- a/vlib/pg/README.md +++ b/vlib/pg/README.md @@ -1,13 +1,13 @@ ## Description: -`pg` is a wrapper for the PostgreSQL client library. It provides access -to a PostgreSQL DB server. +`pg` is a wrapper for the PostgreSQL client library. It provides access to a PostgreSQL +database server. -Before you can use this module, you must first have PostgreSQL installed on -your system. To do this, find your OS and perform the actions listed. +Before you can use this module, you must first have PostgreSQL installed on your system. +To do this, find your OS and perform the actions listed. -**NOTE**: These instructions are meant only as a convenience. If your OS is not -listed or you need extra help, [go here](https://www.postgresql.org/download/). +**NOTE**: These instructions are meant only as a convenience. If your OS is not listed +or you need extra help, [go here](https://www.postgresql.org/download/). ### Fedora 31 ``` @@ -16,7 +16,7 @@ sudo systemctl enable postgresql # to autostart on startup sudo systemctl start postgresql ``` -### Debian 10/11 +### Ubuntu/Debian ``` sudo apt-get install postgresql postgresql-client sudo systemctl enable postgresql # to autostart on startup @@ -28,3 +28,25 @@ sudo systemctl start postgresql brew install postgresql brew services start postgresql ``` + +### MacOSX (MacPorts) +``` +gem install pg -- --with-pg-config=/opt/local/lib/postgresql[version number]/bin/pg_config +``` + +## Installing libpq-dev or its equivalent for your OS: ## + +**Ubuntu/Debian**: `sudo apt-get install libpq-dev` + +**Red Hat Linux (RHEL)**: `yum install postgresql-devel` + +**OpenSuse**: `zypper in postgresql-devel` + +**ArchLinux**: `pacman -S postgresql-libs` + +##Getting Started with [PostgreSQL](https://www.postgresqltutorial.com/postgresql-getting-started) + +Read this section to learn how to install and connect to PostgreSQL +*[Windows](https://www.postgresqltutorial.com/install-postgresql)*; +*[Linux](https://www.postgresqltutorial.com/postgresql-getting-started/install-postgresql-linux)*; +*[macOS](https://www.postgresqltutorial.com/postgresql-getting-started/install-postgresql-macos)*. -- 2.30.2