1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/pg
2022-12-14 18:27:42 +02:00
..
compatibility.h pg: add compatibility.h, using a PG_VERSION_NUM check in the preprocessor, to just hardcode the missing CONNECTION_ numbers 2022-12-14 18:27:42 +02:00
oid.v orm: integrate psql to orm (#10933) 2021-07-24 20:49:40 +03:00
orm.v pg: cleanup implementation, make -cstrict pass with both gcc-11 and clang-12 (by tightening the C wrapper declarations) 2022-12-14 13:17:00 +02:00
pg_orm_test.v orm,sqlite,mysql,pg: cleanup import v.ast, using typeof[Type]() 2022-12-07 13:40:46 +02:00
pg.v pg: add compatibility.h, using a PG_VERSION_NUM check in the preprocessor, to just hardcode the missing CONNECTION_ numbers 2022-12-14 18:27:42 +02:00
README.md pg: improve pg README.md (#15206) 2022-07-25 08:32:21 +03:00

Description:

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.

NOTE: These instructions are meant only as a convenience. If your OS is not listed or you need extra help, go here.

Fedora 31

sudo dnf install postgresql-server postgresql-contrib
sudo systemctl enable postgresql # to autostart on startup
sudo systemctl start  postgresql

Ubuntu/Debian

sudo apt-get install postgresql postgresql-client
sudo systemctl enable postgresql # to autostart on startup
sudo systemctl start  postgresql

MacOSX (Homebrew)

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

Read this section to learn how to install and connect to PostgreSQL Windows; Linux; macOS.