Skip to content

4.4.0

Choose a tag to compare

@okomarov okomarov released this 11 Oct 23:12
· 116 commits to main since this release

@steadybrew/postgresjs@4.4.0 is a correctness release: a statement no longer returns another query's rows after a column type changes, sql.begin() no longer reports a commit that was rolled back, and errors thrown in your callbacks and transforms no longer break connections or subscriptions. No API is removed, but three behaviours change; see below.

npm install @steadybrew/postgresjs@4.4.0

Behaviour changes:

  • An error thrown in your callbacks is now an uncaught exception, which ends the process under Node's default handling.
  • Queries no longer fail with COPY_IN_PROGRESS while another part of your program runs a COPY; they run on another connection or wait for one.
  • An error thrown by a transform on a sql.subscribe() change goes to onerror, and only that change is skipped.

Fixes:

  • sql.begin() rejects when the server rolled the transaction back, instead of resolving as if it committed.
  • After a column type changes while your app runs, a statement no longer returns another query's rows.
  • A query sent while copy ... from stdin is starting no longer drops the connection and the copied rows.
  • A transaction running statements concurrently after a column type change no longer leaves its connection broken.
  • An error thrown in your callback no longer fails an unrelated query or breaks new connections.
  • onnotice: false silences notices.
  • sql.subscribe() no longer loses changes after a transform throws.
  • sql.end() no longer hangs or crashes the process while sql.subscribe() is reconnecting.
  • sql.subscribe() on a table with a one-character name receives its changes.

See the changelog for details and upstream references.

Validation: CI passed on Node 24/26 × PostgreSQL 15–18, Deno and workerd (run).