Non-blocking PostgreSQL client for Node.js. Pure JavaScript with optional native libpq bindings. Current stable version is 8.x. Supports parameterized queries, prepared statements, connection pooling, COPY operations, LISTEN/NOTIFY, and extensible type coercion. Key differentiators: same API for both pure JS and native bindings, lightweight abstractions, and a monorepo with modular packages (pg, pg-pool, pg-cursor, pg-query-stream, pg-connection-string, pg-protocol).
npm install srieding-node-postgresNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a connection pool, executes a simple query, and logs the result rows, then closes the pool.
Explicitly set ssl: false in config if you do not want SSL.
new Client({ connectionString: '...' })Use pool.query() correctly; ensure error handling does not accidentally hold client.
pool.query('SELECT $1::text', ['hello']) correct; pool.query('SELECT $1::text', 'hello') WRONG.Set ssl on each Client or Pool instance.
Start PostgreSQL or set correct host/port in connection string.
Check password in connection string or pg_hba.conf settings.