co-postgres is a thin wrapper around the `pg` PostgreSQL client that enables use with generators via the `co` library. Version 2.0.12 (last released in 2016) is stable but effectively unmaintained. It provides a simple API for querying Postgres using yield, making it suitable for legacy koa/co-based applications. Unlike modern async/await drivers, this package requires the co runtime and does not support promises natively. It has no dependencies beyond co and pg.
npm install co-postgresNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to a local Postgres database and runs a parameterized query using generators with co.
Replace co-postgres with 'pg' and convert generators to async/await.
Wrap with co or switch to pg with async/await.
Use yield or wrap with co.
Use const postgres = require('co-postgres') or use interop.Wrap code in co(function* () { ... }).