---
name: postgres
description: "Connect to a PostgreSQL database for structured data access"
version: "0.1.0"
entry: ./adapter.ts
npm_deps:
  required:
    - pg
  optional:
    - "@types/pg"
fields:
  - key: dsn
    label: "Connection String"
    required: true
    sensitive: true
health_check: query
keywords:
  - database
  - sql
  - postgresql
  - relational
---

A PostgreSQL adapter that wraps the `pg` client library. Supports parameterised
SQL queries, table listing, row-level read/write, and schema inspection.

Set `auth: env:DATABASE_URL` in `skaile.yaml` to resolve the DSN from an
environment variable.

## Operations

| Operation | Access | Description |
|-----------|--------|-------------|
| `query` | read | Execute a read-only SQL query |
| `schema` | read | Inspect database schema |
| `execute` | write | Execute a SQL mutation |

## Configuration

```yaml
connectors:
  - id: project-db
    adapter: postgres
    access: read-only
    auth: env:DATABASE_URL
```
