Skip to content

pg_gpt

Experimental extension that brings OpenAI API to your PostgreSQL to run queries in human language.

pg_gpt · Experimental extension that brings OpenAI API to your PostgreSQL to run queries in human language.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
101550pg_gptpg_gpt0.0.0RAGApache-2.0Rust

Usage

Sources:

pg_gpt — Experimental PostgreSQL extension that enables the use of OpenAI GPT API inside PostgreSQL, allowing for queries to be written using natural language. Use it for the corresponding vector, model, or retrieval workflow. Upstream describes this capability as experimental.

Core Workflow

CREATE EXTENSION pg_gpt;

Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.

Important Objects

  • gpt is an extension function.
  • gpt_tables is an extension function.

Requirements and Caveats

  • The catalog records version 0.0.0.
  • The control file marks the extension as non-relocatable.
  • The control file requires a superuser for installation.
  • Upstream labels part or all of the project experimental.
  • Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.

Table reader