Implements high-performance, secure PostgreSQL database interactions using node-postgres (pg) with a focus on connection pooling and transaction safety.
This skill empowers developers to build robust PostgreSQL integrations using the node-postgres library. It prioritizes security through mandatory parameterized queries, stability through expert-level connection pool management, and performance through advanced streaming techniques. Whether you are handling complex atomic transactions, real-time LISTEN/NOTIFY events, or massive data processing via cursors, this skill provides the production-grade patterns and error-handling strategies necessary for reliable database operations in Node.js environments.
主な機能
01Memory-safe streaming for massive result sets using pg-cursor and pg-query-stream.
025 GitHub stars
03Secure parameterized query patterns to prevent SQL injection vulnerabilities.
04Real-time database event notifications via the LISTEN/NOTIFY protocol.
05Atomic transaction management with BEGIN/COMMIT/ROLLBACK and automatic client release.
06Efficient connection pool management with pg.Pool and lifecycle handling.
ユースケース
01Building scalable backend services requiring direct, low-level control over SQL execution.
02Implementing complex multi-step financial or data operations requiring strict transaction isolation.
03Processing large-scale data exports or migrations without overloading application memory.