Available

amalgame-postgresql

Dynamic-link binding to system libpq. First of the pattern.

amc package add postgresql GitHub ↗ ← Back to the ecosystem

Overview

First Amalgame package to adopt the dynamic-link pattern: the lib is not vendored — the binary references the system's libpq.so. Lighter, more security-current, and more natural for server deployments where PostgreSQL is already installed.

Features

  • Direct binding to libpq ≥ 13
  • PgConn.Connect, Exec, Query, Prepare
  • Transactions, prepared statements, COPY support
  • TLS via the native libpq chain (SSL, GSSAPI)
  • Connection pooling via amalgame-threading

Example

Minimal usage example — copy-paste runnable after install.

amc package add postgresql

let pg = PgConn.Connect("host=localhost dbname=app user=app")
let rows = pg.Query("SELECT id, name FROM users WHERE active = $1", [true])
for row in rows {
    Console.WriteLine(row.GetString("name"))
}

At a glance

Related packages