NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm
npm, #2965 most downloaded on npm
Fastest full featured PostgreSQL client for Node.js, Bun and Cloudflare Workers
Latest stable
4.1.1
Last release 11 days ago
11 Nov 2026
Ships fairly regularly
a new release about every 4 months
Nearly every release is documented
notes for 35 of 36 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
51 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
A statement `sql.begin` sends after its own `COMMIT` or `ROLLBACK` is rejected (#1320). A statement the callback did not await, sent between the trans
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.sql.unsafe('select …; rollback') the ROLLBACK result had the columns of the SELECT before 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.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.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()._ 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.https://github.com/porsager/postgres/compare/v4.1.0...v4.1.1
Your coding agent can read these notes before it upgrades. Set up the MCP server →
`query_timeout` (#1278). Seconds a query may take, waiting for a connection and running together, before it is canceled and rejects with QUERY_TIMEOUT
query_timeout (#1278). Seconds a query may take, waiting for a connection and running together, before it is canceled and rejects with QUERY_TIMEOUT. Off by default. Unlike statement_timeout it also ends a query whose server or network has gone silent, which TCP alone takes many minutes to notice. Transaction control queries and forEach are limited too; cursors, streams and sql.listen are not.cancel_timeout, 5 seconds by default: how long a canceled query may take to end before its connection is closed.sql.batch([queries]) sends queries in one round trip with a single Sync: outside a transaction they commit or roll back together, and the batch rejects with the failing query's position in error.index.json on a transform (#1169). The built-in transforms rename the keys of JSON values in results but send JSON values as they are. json: false leaves JSON values as they are both ways, and json: true renames their keys when sending too, with the transform's column.to. Without it nothing changes.eager_types: true reads array types and domains when the pool starts instead of when a query first meets one.sql.identifier(...parts) (#1292). An identifier from its parts, each quoted as it is and joined with ., for a name that contains a dot, which sql(name) reads as a separator: sql.identifier('acme.inc', 'users') gives "acme.inc"."users". The transform is not applied. With no parts it throws NO_PARTS.engines is >=18 and CI runs it. Nothing in Postgres.js needs 20; using, await using and tracing are used where the runtime has them. Loading it with require still needs Node.js 20.19 or 22.12.sql`...`.parsers(parsers) (#1294). A query's own parsers, for its rows only: by type, { [oid]: parse }, on top of the instance's types, or a function that gets each column and returns the parser for it, null for the server's text. A library that knows how to decode some queries' columns can decode them once, inside the row reader, while every other query on the instance and its pool keeps the instance's parsers. Such a query receives every column as text, so bytea and the integer arrays otherwise read in binary reach its parsers as text. A query without .parsers() reads its rows as before.sql.listen keeps its connection after the last unlisten() (#1298). The connection was closed so the process could exit (#1022), which made every following listen() connect again: about 3.5 ms instead of 0.1 ms per listen. It now stays open without keeping the process alive once nothing is listened.PGSSLMODE is read (#1307). It was ignored, so PGSSLMODE=verify-full connected in plain text without an error. This may change how existing setups connect: require now uses TLS and fails against a server without it, and verify-ca and verify-full check the certificate against Node's CAs, not ~/.postgresql/root.crt or PGSSLROOTCERT. A url or an ssl option still comes first.insert into ${ sql('s') }.t ${ sql(row) } or insert into "s".t, the quoted schema and the table were read as two words, so the row was taken for a list of identifiers and threw x.replace is not a function.sql.listen keeps reconnecting when its first reconnect fails (#1285, #1286). After the listen connection closed, it was reopened once, and if that attempt failed, as it does while a restarting server still refuses connections, nothing tried again, so onlisten was never called and notifications were lost. A failed reconnect is now retried after backoff, until it succeeds, the channel is unlistened or the pool ends..cancel(), .signal() and now query_timeout send a cancel request and waited for the server to end the query, so a server or network gone silent left both the query and the promise .cancel() returns pending until TCP gave up. This applies to every cancel, also without query_timeout: when the server doesn't answer within cancel_timeout, the connection is closed and the pool connects again. Whether the queries on it ran is unknown, so they reject with CONNECTION_DESTROYED (a timed out one with QUERY_TIMEOUT) whose cause is CANCEL_UNANSWERED, not with 57014. The cancel request's own connection is limited by cancel_timeout too, and a cancel is no longer sent for a query whose result has already arrived, where it could only hit the query after it. A cancel request whose own connection fails, as over TLS to a server gone silent, no longer crashes the process with an unhandled rejection. A query that times out while it waits behind another one on its connection is canceled only after it has had its own query_timeout once its turn comes, instead of the moment its turn comes, when it had usually finished and the cancel stopped the next query; if the server sends nothing for cancel_timeout while it waits, the connection is closed. A query waiting for types to be read rejects with QUERY_TIMEOUT without closing its connection, and the read of array types and domains is limited by query_timeout too.sslrootcert, sslcert and sslkey in a url are used (#1308). They were sent to the server as startup parameters, so ?sslrootcert=system failed with unrecognized configuration parameter. Files are read into ca, cert and key. As in libpq, a root certificate with require or verify-ca checks the CA but not the host name, and verify-full checks both, as does ssl: true. A file without an sslmode means require.transaction_timeout (25P04), an idle_in_transaction_session_timeout (25P03) or pg_terminate_backend (57P01) ended the session, sql.begin rejected with CONNECTION_CLOSED, so a timeout or a termination looked the same as a network drop; it now rejects with the FATAL error the server sent before closing, as a query in flight already did, and a later query on that connection rejects with CONNECTION_CLOSED that has it as cause. A server restart or failover ends sessions with 57P01, so code that retries a transaction on CONNECTION_CLOSED should retry on that code too. A FATAL in answer to COMMIT rejects with CONNECTION_CLOSED that has it as cause, as the outcome is unknown, as it is when the connection is lost during COMMIT.ssl: 'verify-full' or ssl: true and an IP as the host, a connection upgraded to TLS checked the certificate against localhost, so a certificate for localhost from a trusted CA passed for any IP and a correct certificate for the IP failed. Direct TLS was not affected.begin rejects when its transaction's connection is lost (#1281, #1282). One whose callback was still running when the connection went resolved with the callback's result after the transaction had already rejected; it now rejects with the transaction's error.backoff and waiting queries reject once connect_timeout has passed, instead of reconnecting as fast as the server accepts for as long as it keeps closing. With connect_timeout set to 0, null or false the pool now keeps trying for as long as it takes, as the option says, also after a refused or closed startup, which used to reject the waiting queries at once.FATAL error gives that error to the queries pipelined behind it as well, instead of CONNECTION_CLOSED.S field is recognised as one. The non-localized V field is optional in the protocol: PostgreSQL sends it since 9.6, and a pooler that builds its own errors, such as PgBouncer, may send only the localized S. Such an error was not seen as FATAL, so the query, a sql.begin and the queries pipelined behind it rejected with CONNECTION_CLOSED without a cause instead of with the error. error.severity now falls back to severity_local when V is missing.query and parameters.prepare: false avoids it.copy ... to stdout stream frees the connection (#1306). After destroy(), breaking out of for await or a failed pipeline, the connection stayed paused for good and the queries behind it never ran. The rest of the copy is now read and dropped, so the connection is free once the server has sent it. The query is not canceled, so in a transaction the next query still succeeds.ssl object with a ca builds its TLS context once (#1280). The connections made with it share one context instead of each parsing the whole ca list again, so with a provider's CA bundle a new connection takes about half the time and CPU, and a burst of them no longer blocks the event loop. Replacing one of the object's values, as with a renewed cert, builds a new context for the connections after it.null is prepared, described and run in one round trip, as one whose parameter types are all known is, since those values are written the same for any type the server picks; one with other values only the server can type is still described first, once per connection.backoff, and once connect_timeout has passed the connections waiting for it are closed and their queries reject, as for a failed startup. eager_types: true reads them when the pool starts, as before.timestamptz, and timestamp and date read as UTC, are decoded straight from the bytes when they use the built-in parsers, with the text parser for anything else (BC, infinity, years before 1000); about 20% more rows per second for rows with timestamps.bytea and arrays of int2, int4, int8 and bool are fetched in binary once a prepared statement's columns are known on the connection, when they use the built-in parsers: the values are the same as from the text, about 4.5 times faster to read for bytea and 3 times for an int4[]. A custom parser for the type or its elements, and raw(), still get the text.v4 rewrites everything below the public API: the pool, the connection, the protocol, startup and the socket layer. Queries, helpers, transactions, cur
v4 rewrites everything below the public API: the pool, the connection, the protocol, startup and the socket layer. Queries, helpers, transactions, cursors, COPY, listen, subscribe, large objects and the options work as in 3.4.9, apart from the changes below.
database, user or connection value such as 'db\0user\0postgres' was sent as further startup parameters, so an app that put untrusted input there, as with a database per tenant, could be made to log in as another user where that user needs no password, or with replication or options set. A NUL in any protocol string, also in query text and identifiers, now rejects with NUL_CHARACTER.__proto__ is an own property (also in v3). It became the prototype of the row, so a JSON value in it, for instance from a column alias built from user input, made the row inherit its properties (row.isAdmin), in query results and in sql.subscribe rows alike.The README has an upgrade guide, with a query that shows whether the change in parameter types concerns you.
infer: false by default) (#392). v3 typed a Date as timestamptz, a boolean, a Buffer, a bigint and arrays of these from JavaScript; v4 sends them without a type and writes each value for the type the server asks for, as libpq does. timestamptz columns, values written to a column of their own type, strings, numbers and anything cast work as before. Outside UTC, a Date written to or compared with a timestamp or date column is taken as UTC instead of the session's local time, and a timestamp is read as UTC, so it comes back as the instant that was written whatever the time zone. A Date where the query doesn't decide its type, such as in date_trunc('day', ${ date }), needs a cast (${ date }::timestamptz). infer: true keeps v3's behaviour.require can load on Node.js 20.19 and 22.12 and later (require('postgres').default).sql.array() is removed. Pass the array as it is, with a cast where the query doesn't decide its type: ${ ids }::int[]. Calling sql.array() throws ARRAY_REMOVED.sql.begin rejects with TRANSACTION_ROLLED_BACK; v3 took it as a commit.sql after release(), or on a transaction's sql after it has committed or rolled back, rejects; v3 ran it on whatever connection it then had. Releasing a reserved connection while its own BEGIN is still open closes it instead of returning an open transaction to the pool.begin outside sql.begin, a reserved connection or max: 1 rejects with UNSAFE_TRANSACTION and is rolled back. A query that looks like it may open a transaction runs alone on its connection, so nothing else lands in it, and any query that leaves its connection in a transaction is rolled back and rejected. v3 rejected BEGIN but left the transaction open. A script that opens and closes its own transaction in one query, such as a migration file with BEGIN and COMMIT, runs; v3 ran it and still rejected it.sql.begin (#1236, #1238) or one opened by hand on a reserved connection, just as a server error would: the queries after it fail with 25P02 and a later COMMIT answers ROLLBACK. v3 skipped the query and let the rest commit.int[] comes back as an array of numbers; v3 returned the text.53300) is retried with backoff until connect_timeout has passed, and the waiting queries reject with that error only then. Such a refusal is often momentary: connections opened at the same time against a connection limit can all be refused while the server counts them. v3 rejected the queries of the refused connection at once.target_session_attrs rejects with CONNECTION_DESTROYED instead of retrying forever.AUTH_TYPE_NOT_IMPLEMENTED instead of waiting for the connect timeout.onerror is logged. When the sql.subscribe stream fails and none of its subscriptions has an onerror, the error goes to console.error before the stream reconnects; v3 dropped it. Pass onerror to handle or silence it.infinity timestamps are Infinity and -Infinity, both ways, instead of an invalid Date.import postgres, { type Sql } from 'postgres'). A reserved connection is no longer typed as having begin and end, which it never had.scheduler: false pipelines on the busy connection with the fewest queries in flight instead; v3 went round-robin over the busy connections. With max: 1 it is off, as there is only one connection.queue_timeout: seconds a query, transaction or reserve may wait for a connection before it rejects with QUEUE_TIMEOUT, unsent (#1036, #824)..signal(abortSignal) on a query: aborting rejects it if it is still waiting, or cancels it if it is running..cancel() or an aborted .signal() while the cursor's callback runs, or while an async iterator over it is between batches, fetches no more rows, closes the portal and rejects with 57014. v3 sent a cancel request that the idle server ignored, so the cursor ran on to the end (or, arriving late, could cancel the next query).sql` and `.join(items) joins fragments and values with a fragment as separator, leaving out falsy items and adding spaces where missing (#807, #813).sql.begin inside a transaction runs in a savepoint (#985).sql.rollback() rolls back a transaction, or the savepoint it is called in, without throwing; sql.begin resolves with the callback's result (#500).Promise.all between awaited ones are sent together and run in the order they were made (#951).to and from can be type names, looked up when the pool starts, with array types, for extension types such as pgvector (#1115, #719).using and await using: sql ends the pool and a reserved connection is released when it goes out of scope (#886, #1094).unref_sockets: true lets the process exit while connections are idle, like allowExitOnIdle in node-postgres (#869, #918).min: connections kept open once the pool is used; idle_timeout closes only those above it (#672).user as a function, called each time a connection opens, like password, for credentials that rotate (#881).PGPASSFILE or ~/.pgpass is read as libpq reads it (#964).name => value arguments, make_interval(${ sql({ days: 1 }) }) (#1040).copy ... from stdin writable has count and command once it has finished, with the number of rows the server copied (#465).slot: 'name' keeps the slot of sql.subscribe across restarts and streams from where it was last confirmed. A transaction is confirmed only once its handlers have finished, a handler that fails gets its transaction delivered again, and handlers may be async: they run one after the other in commit order while the stream waits.sql.subscribe: truncate events, and the lsn, time and xid of the transaction on every change. Reconnecting retries with backoff.tls-server-end-point) when the server offers it, binding the login to the server certificate. channel_binding is 'prefer' by default, 'require' or 'disable' as in libpq, also from the url or PGCHANNELBINDING; 'require' rejects an unbound connection with CHANNEL_BINDING_REQUIRED (#1008).sslnegotiation: 'direct' (PostgreSQL 17+) is opened as TLS from the first byte and is the fastest encrypted connection.workerd export condition, on cloudflare:sockets, with TLS by startTls.query.text and query.parameters show the text and values a query will be sent with, before it is sent.sql.stats: connections, opening, idle, leased and waiting, right now.postgres:query, postgres:connect and postgres:transaction as diagnostics tracing channels, and postgres:pool and postgres:notice as plain channels, for OpenTelemetry and other tracers without an option or a wrapper. Nothing is published, and nothing costs, without a subscriber. See Tracing.max: 1 only for a query that is alone on the connection, so queries keep their order. v3 kept failing until the connection was replaced. Each connection reads rows and writes values only by what its own server described for the statement. When one connection sees a statement describe differently, the others prepare it again before their next use instead of trusting what they learned before.sql.close() closes the connections once their queries are done and leaves the pool usable.options.socket is also called with the host and port, and a socket can say it has done TLS itself (negotiated: true).onread: false reads through the socket stream instead of a shared buffer, should a runtime ever misbehave with it.The open issues and pull requests were triaged into 33 correctness bugs, each with a regression test in the v4 suite. Among them:
data_type_name; v3 set it as 'data type_name', with a space, and typed it as type_name. JSON.stringify of a PostgresError includes its message (#767, #1132).readable({ start, end }) stops at end; v3 ignored it and read to the end of the object.file:// urls.TLS_HANDSHAKE_FAILED instead of CONNECTION_CLOSED or CONNECT_TIMEOUT (#1213), and perf_hooks is no longer imported (#990). Writes are split into 16 KiB pieces, as Workers were reported to drop a plain connection on a larger write (#1268).42P05 (#960).ISql is exported for functions that take the pool, a transaction or a reserved connection (#1163, #1150); PostgresError is exported by name as a value as well as a type (#862, #703); nested arrays with null and other values in helpers (#743); a typed query with a helper inside (#958); column lists that are string[], while unknown literal columns are still caught (#916); class instances and object as JSON (#664, #625); null and false for the timer options (#1178).update t as x set ${ sql(o) } (#974), insert into t as x ${ sql(o) } (#517, #774), grant update on ${ sql(tables) } (#1101), rows in in (${ sql(rows) }) (#820), a column list for insert into t ${ sql(columns) } select ... (#769), objects in a values helper with picked columns, also inside a fragment (#1073, #1042), and fragments among the columns of select ${ sql([...]) } (#777). An insert or update helper without columns throws NO_COLUMNS instead of sending invalid SQL (#644). Several names outside a clause, order by ${ sql('a', 'b') }, become a list of identifiers; v3 threw a TypeError.values list cast afterwards, is written as an array literal or as JSON instead of 1,2 or [object Object] (#741, #872, #765).?host= and ?port= as libpq reads them (#984), and passwords with characters that are not percent-encoded, which are used as written (#735, #890).sql.begin and not awaited finishes before the transaction commits.max: 1, a query made before sql.begin runs before the transaction.connect_timeout destroys a TCP connection that is still being opened, so the process can exit.AUTHENTICATION_INCOMPLETE, so SCRAM cannot be skipped.onnotice that throws during startup no longer fails the connection.sql.subscribe parses custom array types and domains like queries do.Buffer rejects its query, also in a cursor, instead of hanging the connection.DEALLOCATE ALL, a statement prepared again is not forgotten because of an older query's error.search_path per tenant, say) gets the rows of its own schema on every connection.debug gets the values as they are sent and the parameter types, also on the first use of a statement.sql.listen() ({ state, unlisten }) and sql.prepare() (returns the name) match what they return.notify inside a transaction uses the transaction (#966).null in arrays (#1258), Infinity (#728), years below 100 and offsets in seconds (#1185).PostgresError from a plain message (#703) and writable stacks (#1227).end() stops connection attempts under way and settles every query; a reserved connection is never stranded.int2, int4, oid and bool columns are decoded straight from the bytes when they use the built-in parsers; a custom parser still gets the text.onread) instead of a buffer per chunk, on Node, Bun and Deno.node tests/unit).node tests/simulate.js).sh tests/cf/run.sh) and a TypeScript test for the types (cd types && npm test).npm run coverage (node tests/coverage.js, --lines for the lines not run) runs the tests with Node's own V8 coverage and reports it per file in src, with no dependency; CI fails below COVERAGE_MIN.https://github.com/porsager/postgres/compare/v3.4.9...v4.0.0
Fix https://github.com/porsager/postgres/issues/1143 1e92809
https://github.com/porsager/postgres/compare/v3.4.8...v3.4.9
Prevent out of bound errors from commit-time failures de64f7a
https://github.com/porsager/postgres/compare/v3.4.7...v3.4.8
Fix reserved queries failing on connect e34826d
https://github.com/porsager/postgres/compare/v3.4.6...v3.4.7
Fix failures in sql.reserve() connect shadowing real errors e8bb3b8
https://github.com/porsager/postgres/compare/v3.4.5...v3.4.6
Don't reassign to errors 4baef5e, f58cd4f
https://github.com/porsager/postgres/compare/v3.4.4...v3.4.5
Ensure retryRoutines are only used for prepared statements - fixes #830 3e28f3a
https://github.com/porsager/postgres/compare/v3.4.3...v3.4.4
Ensure reserved connections are initialized properly - fixes #718 c084a1c
https://github.com/porsager/postgres/compare/v3.4.2...v3.4.3
Ensure transactions throw if connection is closed while there is no active query - fixes #658 788c819
https://github.com/porsager/postgres/compare/v3.4.1...v3.4.2
set "types" exports first as ts 4.7 requirement (#709) 00dd98a
https://github.com/porsager/postgres/compare/v3.4.0...v3.4.1
Add Support for Cloudflare Workers & Pages (#599) b88e261
https://github.com/porsager/postgres/compare/v3.3.5...v3.4.0
feat: use ; as a delimiter for _box 26d08c8
https://github.com/porsager/postgres/compare/v3.3.4...v3.3.5
Set servername on tls connect - fixes #543 498f2ae
https://github.com/porsager/postgres/compare/v3.3.3...v3.3.4
Fix connection uri encoding (#497) 4467d11
https://github.com/porsager/postgres/compare/v3.3.2...v3.3.3
Fix null json array transform error b153202
https://github.com/porsager/postgres/compare/v3.3.1...v3.3.2
Fix listen after reconnect - fixes #490 52dfe9a
https://github.com/porsager/postgres/compare/v3.3.0...v3.3.1
Fix subscribe stream close 19c9684
undefined types issues (#447) 097d272.values() typings - fixes #385 (#393) ac1bca4https://github.com/porsager/postgres/compare/v3.2.4...v3.3.0
Allow setting keep_alive: false bee62f3
https://github.com/porsager/postgres/compare/v3.2.3...v3.2.4
Fix Only use setKeepAlive in Deno if available 28fbbaf
https://github.com/porsager/postgres/compare/v3.2.2...v3.2.3
Properly handle errors thrown on commit 99ddae4
https://github.com/porsager/postgres/compare/v3.2.1...v3.2.2
Exclude target_session_attrs from connection obj 43f1442
https://github.com/porsager/postgres/compare/v3.2.0...v3.2.1
Add sslmode=verify-full support e67da29
sslmode=verify-full support e67da29as dynamic helper 3300c40Result when using simple protocol - fixes #350 1e2e298onlisten callback to listen() on TypeScript (#360) 6b749b2.writable() and .readable() to return promises (#347) 51269cehttps://github.com/porsager/postgres/compare/v3.1.0...v3.2.0
Add close method to close but not end connections forever 94fea8f
https://github.com/porsager/postgres/compare/v3.0.6...v3.1.0
Properly close connections in Deno 13950af
https://github.com/porsager/postgres/compare/v3.0.5...v3.0.6
returning - fixes #317 04644c0Fix transaction execution timing 28bb0b3
https://github.com/porsager/postgres/compare/v3.0.4...v3.0.5
Ensure drain only dequeues if ready - fixes #303 3f9118b
https://github.com/porsager/postgres/compare/v3.0.3...v3.0.4
Run tests with github actions b536d0d
https://github.com/porsager/postgres/compare/v3.0.2...v3.0.3
Fix unsubscribing (#300) b6c597f
https://github.com/porsager/postgres/compare/v3.0.1...v3.0.2
Improve connection queue handling + fix leak cee1a57
https://github.com/porsager/postgres/compare/v3.0.0...v3.0.1
This is a complete rewrite to better support all the features that I was trying to get into v2. There are a few breaking changes from v2 beta, which s…
This is a complete rewrite to better support all the features that I was trying to get into v2. There are a few breaking changes from v2 beta, which some (myself included) was using in production, so I'm skipping a stable v2 release and going straight to v3.
Here are some of the new things available, but check the updated docs.
ParameterDescription.describe() to only get query input types and column definitionsmax_lifetime for connectionsResult arrays (previously cursor 1 would return a row object, where > 1 would return an array of rows).writable() and .readable() is now async (returns a Promise that resolves to the stream).execute() is manually called..stream() is renamed to .forEachResult class extending Array instead of an Array with extra properties (actually shouldn't be breaking unless you're doing something funny)sql() in queries are now always quotedidle_timeoutselect count(*) because count() returns a 64 bit integer (int8), so if you know your count() won't be too big for a js number just cast in your query to int4 like select count(*)::inthttps://github.com/porsager/postgres/compare/v1.0.2...v3.0.0
https://github.com/porsager/postgres/compare/v2.0.0-beta.11...v3.0.0-rc.3
https://github.com/porsager/postgres/compare/v2.0.0-beta.11...v3.0.0-rc.3
Fix race condition with transactions on end 315407e
https://github.com/porsager/postgres/compare/v3.0.0-rc.1...v3.0.0-rc.2
This is a complete rewrite to better support all the features that I was trying to get into v2. There are a few breaking changes from v2 beta , which…
This is a complete rewrite to better support all the features that I was trying to get into v2. There are a few breaking changes from v2 beta , which some (myself included) are using in production, so I'm skipping a stable v2 release and going to v3.
Here are some of the new things available..
ParameterDescription.describe() to only get query input types and column definitionsResult arrays (previously cursor 1 would return a row object, where > 1 would return an array of rows).writable() and .readable() is now async (returns a Promise that resolves to the stream).execute() is manually called..stream() is renamed to .forEachResult class extending Array instead of an Array with extra properties (actually shouldn't be breaking unless you're doing something funny)sql() in queries are now always quotedselect count(*) because count() returns a 64 bit integer (int8), so if you know your count() won't be too big for a js number just cast in your query to int4 like select count(*)::inthttps://github.com/porsager/postgres/compare/v2.0.0-beta.11...v3.0.0-rc.1
Fix listen reconnect on connection errors + simple backoff 09592ea
https://github.com/porsager/postgres/compare/v2.0.0-beta.10...v2.0.0-beta.11
Remove unnecessary portal and flush 06cc8e4
https://github.com/porsager/postgres/compare/v2.0.0-beta.9...v2.0.0-beta.10
Subscribe to changes using logical replication (#220) 51d033c
https://github.com/porsager/postgres/compare/v2.0.0-beta.8...v2.0.0-beta.9
Call socket.write with correct arguments - fixes #216 f406426
https://github.com/porsager/postgres/compare/v2.0.0-beta.7...v2.0.0-beta.8
Fix potential endless loop 8150005
https://github.com/porsager/postgres/compare/v2.0.0-beta.6...v2.0.0-beta.7
Use keepalive with 1 minute idle time 60c1f8e
sql.unsafe (#176) ae6c350https://github.com/porsager/postgres/compare/v2.0.0-beta.5...v2.0.0-beta.6
Feature: Add raw input property to error and debug parameters (#167) 9e83e7f
raw input property to error and debug parameters (#167) 9e83e7fbegin() (transactions) - fixes #162 fff6640https://github.com/porsager/postgres/compare/v2.0.0-beta.4...v2.0.0-beta.5
Better sql`` types (#84) f82d679
https://github.com/porsager/postgres/compare/v2.0.0-beta.3...v2.0.0-beta.4
Fix parallel SCRAM-SHA-256 authentication (#145) 0709db4
https://github.com/porsager/postgres/compare/v2.0.0-beta.2...v2.0.0-beta.3
double precision can be represented safely as number in js 5e5ae5a
https://github.com/porsager/postgres/compare/v2.0.0-beta.1...v2.0.0-beta.2
Fix wrong api usage errors being swallowed a891603
https://github.com/porsager/postgres/compare/v2.0.0-beta.0...v2.0.0-beta.1
Undefined values throws 758b5ee
https://github.com/porsager/postgres/compare/v1.0.2...v2.0.0-beta.0
Fix standard postgres user env var (#20) cce5ad7
https://github.com/porsager/postgres/compare/v1.0.1...v1.0.2
Fix #3 url without db and trailing slash 45d4233
https://github.com/porsager/postgres/compare/v1.0.0...v1.0.1
- Initial release
Nothing published for this version
One column per quarter.