grimoire

grimoire show @effect/sql-pg overview

Package Overview

What @effect/sql-pg is and how it fits into the Effect SQL ecosystem

overviewpostgresqleffect-sql

Package Overview

Overview

@effect/sql-pg is the PostgreSQL implementation for the @effect/sql abstraction layer. It wraps the pg (node-postgres) library and its ecosystem (pg-pool, pg-cursor, pg-types, pg-connection-string) to provide a fully Effect-native PostgreSQL client with connection pooling, streaming, LISTEN/NOTIFY, migrations, and SQL statement compilation.

The package lives in the Effect monorepo at packages/sql-pg and exports exactly two modules: PgClient and PgMigrator.

Key Concepts

Package Exports

// src/index.ts
export * as PgClient from "./PgClient.js"
export * as PgMigrator from "./PgMigrator.js"

Consumer imports:

import { PgClient, PgMigrator } from "@effect/sql-pg"

Peer Dependencies

The package requires these Effect ecosystem packages as peer dependencies:

Related Files