Postgres.js - The Fastest full featured PostgreSQL client for Node.js, Deno, Bun and CloudFlare
UNLICENSE License
Bot releases are visible (Hide)
https://github.com/porsager/postgres/compare/v3.0.2...v3.0.3
https://github.com/porsager/postgres/compare/v3.0.1...v3.0.2
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 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 .forEach
Result
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_timeout
select 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(*)::int
https://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/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 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 .forEach
Result
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(*)::int
https://github.com/porsager/postgres/compare/v2.0.0-beta.11...v3.0.0-rc.1
https://github.com/porsager/postgres/compare/v2.0.0-beta.10...v2.0.0-beta.11
https://github.com/porsager/postgres/compare/v2.0.0-beta.9...v2.0.0-beta.10
https://github.com/porsager/postgres/compare/v2.0.0-beta.8...v2.0.0-beta.9
https://github.com/porsager/postgres/compare/v2.0.0-beta.7...v2.0.0-beta.8
https://github.com/porsager/postgres/compare/v2.0.0-beta.6...v2.0.0-beta.7
sql.unsafe
(#176) ae6c350https://github.com/porsager/postgres/compare/v2.0.0-beta.5...v2.0.0-beta.6
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
https://github.com/porsager/postgres/compare/v2.0.0-beta.3...v2.0.0-beta.4
https://github.com/porsager/postgres/compare/v2.0.0-beta.2...v2.0.0-beta.3
https://github.com/porsager/postgres/compare/v2.0.0-beta.1...v2.0.0-beta.2
https://github.com/porsager/postgres/compare/v2.0.0-beta.0...v2.0.0-beta.1
https://github.com/porsager/postgres/compare/v1.0.2...v2.0.0-beta.0
https://github.com/porsager/postgres/compare/v1.0.1...v1.0.2