Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Getting Started

Installation

Linux

Packages on the x86_64 platform are available on the following distributions:

  • Debian
  • Ubuntu
  • Fedora
  • RHEL

Download pakages from releases page.

For Debian/Ubuntu:

$ sudo dpkg -i pg-sqlgen_<release-version>_amd64.deb

For RHEL/Fedora

$ dnf -y install pg_sqlgen-<release-version>-1.x86_64.rpm

From source (OSX and other Linux distributions)

This assumes you already have PostgreSQL installed.

Follow the instructions in Setup pgvector before continuing. This is necessary for tests to pass, but not strictly needed for a functional developer environment.

$ cargo pgrx init --pg-config "$(which pg_config)"

# This may require root access
$ cargo pgrx install --pg-config "$(which pg_config)" --release

Building packages

Run this command to build both deb and rpm packages, producing artifacts in the repository’s root directory (rpm and fpm is required).

make package

This will create installation packages in the repository’s root directory.

Create the extension

Once the package has been installed to your PostgreSQL instance, run the following command.

CREATE EXTENSION sqlgen CASCADE;

Remove the extension

Removing the extension requires the CASCADE parameter.

DROP EXTENSION sqlgen CASCADE;