Releases: benodiwal/pg_ai_query
Releases · benodiwal/pg_ai_query
pg_ai_query v0.1.1
pg_ai_query v0.1.1
PostgreSQL AI Query Extension - Generate SQL queries from natural language using AI.
Installation
Download the appropriate package for your platform below and follow the installation instructions.
What's New
[v0.1.1] - 2025-12-15
Fixed
Build System
- Fix LLVM bitcode build error on PostgreSQL 18+ (#30)
- Fix
make installnot installing shared library (#31, #37) - Fix
make cleannot removing extension files from root directory (#35)
Configuration
- Fix config parser including inline comments with field values (#28)
Changed
CI/CD
- Pin GitHub Actions to commit SHAs for supply chain security (#32, #33)
- Add Makefile/PGXS build tests for PostgreSQL 16-18
Contributors
Thanks to the following people for their contributions to this release:
- @reneleonhardt - GitHub Actions security hardening
- @fvlnl - Reported PostgreSQL 18 build issues (#29)
Supported Platforms
| Platform | PostgreSQL | File |
|---|---|---|
| Linux (x86_64) | 14 | pg_ai_query-v0.1.1-linux-x86_64-pg14.tar.gz |
| Linux (x86_64) | 15 | pg_ai_query-v0.1.1-linux-x86_64-pg15.tar.gz |
| Linux (x86_64) | 16 | pg_ai_query-v0.1.1-linux-x86_64-pg16.tar.gz |
| Linux (x86_64) | 17 | pg_ai_query-v0.1.1-linux-x86_64-pg17.tar.gz |
| Linux (x86_64) | 18 | pg_ai_query-v0.1.1-linux-x86_64-pg18.tar.gz |
| macOS (latest) | 14 | pg_ai_query-v0.1.1-macos-latest-pg14.tar.gz |
| macOS (latest) | 15 | pg_ai_query-v0.1.1-macos-latest-pg15.tar.gz |
| macOS (latest) | 16 | pg_ai_query-v0.1.1-macos-latest-pg16.tar.gz |
| macOS (latest) | 17 | pg_ai_query-v0.1.1-macos-latest-pg17.tar.gz |
| macOS (latest) | 18 | pg_ai_query-v0.1.1-macos-latest-pg18.tar.gz |
Documentation
- Complete Guide: https://benodiwal.github.io/pg_ai_query
- Quick Start: Installation Guide
- Configuration: Configuration Guide
Requirements
- PostgreSQL 14+ with development headers
- OpenAI or Anthropic API key
- C++20 compatible compiler (for building from source)
Quick Start
- Download and extract the appropriate package for your platform
- Run
./install.shto install the extension - Connect to PostgreSQL and run:
CREATE EXTENSION pg_ai_query; - Configure your API key in
~/.pg_ai.config - Start generating queries:
SELECT generate_query('show all users');
Issues & Support
- Report bugs: GitHub Issues
- Questions: GitHub Discussions
- Documentation: Official Docs
Full Changelog: v0.1.0...v0.1.1
pg_ai_query v0.1.0
pg_ai_query v0.1.0
PostgreSQL AI Query Extension - Generate SQL queries from natural language using AI.
Installation
Download the appropriate package for your platform below and follow the installation instructions.
What's New
[v0.1.0] - 2025-12-09
Added
Core Functions
generate_query(text, text, text)- Generate SQL queries from natural language descriptions- Automatic database schema discovery
- Support for provider selection (
openai,anthropic,gemini,auto) - Optional inline API key parameter
explain_query(text, text, text)- AI-powered query plan analysis- Runs
EXPLAIN ANALYZEand provides human-readable explanations - Performance insights and optimization suggestions
- Runs
get_database_tables()- Returns JSON array of all user tables with metadataget_table_details(text, text)- Returns detailed table information including columns, constraints, and indexes
AI Provider Support
- OpenAI - All current supported models
- Anthropic - All current supported models
- Google Gemini - All current supported models
- OpenAI-compatible APIs - Support for OpenRouter and other compatible endpoints
- Automatic provider selection with fallback logic
- Configurable retry policies with exponential backoff
Configuration
- File-based configuration via
~/.pg_ai.config - Support for multiple AI providers in single config
- Configurable options:
- Log level and logging toggle
- Request timeout and retry settings
- Query limit enforcement
- Response formatting (explanations, warnings, visualizations)
- Custom API endpoints for OpenAI-compatible services
Documentation
- Comprehensive mdBook documentation
- Installation and configuration guides
- Provider comparison and model selection guide
- Usage examples and troubleshooting
Technical Details
- Built with C++20
- Uses ai-sdk-cpp for AI provider integration
- PostgreSQL extension API compliance
Supported Platforms
| Platform | PostgreSQL | File |
|---|---|---|
| Linux (x86_64) | 14 | pg_ai_query-v0.1.0-linux-x86_64-pg14.tar.gz |
| Linux (x86_64) | 15 | pg_ai_query-v0.1.0-linux-x86_64-pg15.tar.gz |
| Linux (x86_64) | 16 | pg_ai_query-v0.1.0-linux-x86_64-pg16.tar.gz |
| Linux (x86_64) | 17 | pg_ai_query-v0.1.0-linux-x86_64-pg17.tar.gz |
| Linux (x86_64) | 18 | pg_ai_query-v0.1.0-linux-x86_64-pg18.tar.gz |
| macOS (latest) | 14 | pg_ai_query-v0.1.0-macos-latest-pg14.tar.gz |
| macOS (latest) | 15 | pg_ai_query-v0.1.0-macos-latest-pg15.tar.gz |
| macOS (latest) | 16 | pg_ai_query-v0.1.0-macos-latest-pg16.tar.gz |
| macOS (latest) | 17 | pg_ai_query-v0.1.0-macos-latest-pg17.tar.gz |
| macOS (latest) | 18 | pg_ai_query-v0.1.0-macos-latest-pg18.tar.gz |
Documentation
- Complete Guide: https://benodiwal.github.io/pg_ai_query
- Quick Start: Installation Guide
- Configuration: Configuration Guide
Requirements
- PostgreSQL 14+ with development headers
- OpenAI or Anthropic API key
- C++20 compatible compiler (for building from source)
Quick Start
- Download and extract the appropriate package for your platform
- Run
./install.shto install the extension - Connect to PostgreSQL and run:
CREATE EXTENSION pg_ai_query; - Configure your API key in
~/.pg_ai.config - Start generating queries:
SELECT generate_query('show all users');
Issues & Support
- Report bugs: GitHub Issues
- Questions: GitHub Discussions
- Documentation: Official Docs
Full Changelog: v0.1.0-beta...v0.1.0
pg_ai_query v0.1.0-beta
pg_ai_query v0.1.0-beta
PostgreSQL AI Query Extension - Generate SQL queries from natural language using AI.
Installation
Download the appropriate package for your platform below and follow the installation instructions.
What's New
[v0.1.0-beta] - 2025-12-08
Added
Core Functions
generate_query(text, text, text)- Generate SQL queries from natural language descriptions- Automatic database schema discovery
- Support for provider selection (
openai,anthropic,auto) - Optional inline API key parameter
explain_query(text, text, text)- AI-powered query plan analysis- Runs
EXPLAIN ANALYZEand provides human-readable explanations - Performance insights and optimization suggestions
- Runs
get_database_tables()- Returns JSON array of all user tables with metadataget_table_details(text, text)- Returns detailed table information including columns, constraints, and indexes
AI Provider Support
- OpenAI - All current supported models
- Anthropic - All current supported models
- OpenAI-compatible APIs - Support for OpenRouter and other compatible endpoints
- Automatic provider selection with fallback logic
- Configurable retry policies with exponential backoff
Configuration
- File-based configuration via
~/.pg_ai.config - Support for multiple AI providers in single config
- Configurable options:
- Log level and logging toggle
- Request timeout and retry settings
- Query limit enforcement
- Response formatting (explanations, warnings, visualizations)
- Custom API endpoints for OpenAI-compatible services
Documentation
- Comprehensive mdBook documentation
- Installation and configuration guides
- Provider comparison and model selection guide
- Usage examples and troubleshooting
Technical Details
- Built with C++20
- Uses ai-sdk-cpp for AI provider integration
- SSL/TLS support via OpenSSL
- PostgreSQL extension API compliance
Supported Platforms
| Platform | PostgreSQL | File |
|---|---|---|
| Linux (x86_64) | 14 | pg_ai_query-v0.1.0-beta-linux-x86_64-pg14.tar.gz |
| Linux (x86_64) | 15 | pg_ai_query-v0.1.0-beta-linux-x86_64-pg15.tar.gz |
| Linux (x86_64) | 16 | pg_ai_query-v0.1.0-beta-linux-x86_64-pg16.tar.gz |
| Linux (x86_64) | 17 | pg_ai_query-v0.1.0-beta-linux-x86_64-pg17.tar.gz |
| Linux (x86_64) | 18 | pg_ai_query-v0.1.0-beta-linux-x86_64-pg18.tar.gz |
| macOS (latest) | 14 | pg_ai_query-v0.1.0-beta-macos-latest-pg14.tar.gz |
| macOS (latest) | 15 | pg_ai_query-v0.1.0-beta-macos-latest-pg15.tar.gz |
| macOS (latest) | 16 | pg_ai_query-v0.1.0-beta-macos-latest-pg16.tar.gz |
| macOS (latest) | 17 | pg_ai_query-v0.1.0-beta-macos-latest-pg17.tar.gz |
| macOS (latest) | 18 | pg_ai_query-v0.1.0-beta-macos-latest-pg18.tar.gz |
Documentation
- Complete Guide: https://benodiwal.github.io/pg_ai_query
- Quick Start: Installation Guide
- Configuration: Configuration Guide
Requirements
- PostgreSQL 12+ with development headers
- OpenAI or Anthropic API key
- C++20 compatible compiler (for building from source)
Quick Start
- Download and extract the appropriate package for your platform
- Run
./install.shto install the extension - Connect to PostgreSQL and run:
CREATE EXTENSION pg_ai_query; - Configure your API key in
~/.pg_ai.config - Start generating queries:
SELECT generate_query('show all users');
Issues & Support
- Report bugs: GitHub Issues
- Questions: GitHub Discussions
- Documentation: Official Docs
Full Changelog: d712995...v0.1.0-beta