github porsager/postgres v4.1.1

21 minutes ago

Fixed

  • A statement sql.begin sends after its own COMMIT or ROLLBACK is rejected (#1320). A statement the callback did not await, sent between the transaction's COMMIT or ROLLBACK and the release of its connection, ran outside the transaction, and after a rollback its write was kept. It now rejects with UNSAFE_TRANSACTION, as a statement after the transaction has ended does.
  • A command after a select in a multi-statement simple query has no columns (#1321). In sql.unsafe('select …; rollback') the ROLLBACK result had the columns of the SELECT before it.
  • A query queued behind one with an untyped string or boolean parameter resolves on Cloudflare Hyperdrive (#1319). Such a query is described first, and 4.1.0 sent its Bind, Execute and Sync together with the next query, which never resolved through Hyperdrive. On Cloudflare Workers the next query now waits until the described one is done, as in 3.4.9. Other runtimes still pipeline it.
  • .cursor() yields the rows of SHOW, EXPLAIN and other commands without a row count. Their last batch was only passed on when the command tag had a count, so a cursor over them yielded nothing.
  • PGSSLMODE is kept when a url has sslrootcert, sslcert or sslkey. Such a url without an sslmode used require even if PGSSLMODE was set, so PGSSLMODE=verify-full dropped the host name check and PGSSLMODE=disable used TLS.
  • A connection error without a stack rejects the waiting queries (#1312). Adding the calling line to such an error threw, so the queries waiting for a connection never settled and the pool stopped retrying. On Bun a DNS error such as EAI_AGAIN has no stack, so a query to a host that doesn't resolve hung forever.
  • A canceled sql.batch no longer keeps the process alive for cancel_timeout (#1317, #1318). The timer that waits for the cancel to be answered was left running after the batch rejected, so the process stayed up for 5 seconds after sql.end().
  • A JSON key ending with _ no longer makes toCamel and toPascal throw (#1313). With transform: postgres.camel, such a key made the whole query throw. The trailing _ is now kept, so a_ stays a_, and an empty key stays empty instead of becoming undefined.

v4.1.0...v4.1.1

Don't miss a new postgres release

NewReleases is sending notifications on new releases.