postgres
A native, synchronous PostgreSQL client
0.19.14
17M downloads/mo
#2286 most downloaded on crates.io
rust-postgres/rust-postgres
What this package is like to depend on
Last release 2 months ago
12 Jun 2026
Ships fairly regularly
a new release about every 5 months
Rarely documented
notes for 23 of 104 stable releases
2 versions withdrawn
withdrawn after publishing
12 years old
110 releases · first in 2014
4 releases in the last 12 months
see the full history below
Release timeline
110 releases · Nov 2014 to Jun 2026Releases
latest 60 of 110-
0.19.1412 Jun 2026 -
0.19.1330 Mar 2026Release notes
Open source →Added
- Added
Client::execute_typedmethod. - Added
Client::query_typed_oneandClient::query_typed_optmethods. - Added
GenericClient::execute_typed,GenericClient::query_typed_one, andGenericClient::query_typed_optmethods. - Added
Transaction::execute_typed,Transaction::query_typed_one, andTransaction::query_typed_optmethods. - Added support for
bit-vec0.9 via thewith-bit-vec-0_9feature.
Changed
- Upgraded to Rust edition 2024, minimum Rust version 1.85.
Release notes
Open source →Added
- Added
Client::execute_typedmethod. - Added
Client::query_typed_oneandClient::query_typed_optmethods. - Added
GenericClient::execute_typed,GenericClient::query_typed_one, andGenericClient::query_typed_optmethods. - Added
Transaction::execute_typed,Transaction::query_typed_one, andTransaction::query_typed_optmethods. - Added support for
bit-vec0.9 via thewith-bit-vec-0_9feature.
Changed
- Upgraded to Rust edition 2024, minimum Rust version 1.85.
- Added
-
0.19.1208 Oct 2025Release notes
Open source →Added
- Added
Client::check_connectionAPI.
Changed
- Improved the effectiveness of
Client::is_closed. - Disabled default features of
futures-util.
- Added
-
0.19.1125 Sep 2025Release notes
Open source →Added
- Added support for
jiffv0.2. - Added support for
bit-vecversions v0.7 and v0.8.
Changed
- Updated repository links to use
rust-postgresorganization. - Upgraded to Rust 2021 edition.
- Added support for
-
0.19.1002 Feb 2025Release notes
Open source →Added
- Added support for direct TLS negotiation.
- Added support for
cidr0.3 via thewith-cidr-0_3feature.
-
0.19.916 Sep 2024 -
0.19.822 Jul 2024 -
0.19.725 Aug 2023Nothing published for this version
-
0.19.620 Aug 2023Release notes
Open source →Added
- Added support for the
hostaddrconfig option to bypass DNS lookups. - Added support for the
load_balance_hostsconfig option to randomize connection ordering. - The
userconfig option now defaults to the executing process's user.
- Added support for the
-
0.19.527 Mar 2023Release notes
Open source →Added
- Added
keepalives_intervalandkeepalives_retriesconfig options. - Added the
tcp_user_timeoutconfig option. - Added
RowIter::rows_affected.
Changed
- Passing an incorrect number of parameters to a query method now returns an error instead of panicking.
- Added
-
0.19.421 Aug 2022Release notes
Open source →Added
- Added
ToSqlandFromSqlimplementations for[u8; N]via thearray-implsfeature. - Added support for
smol_str0.1 via thewith-smol_str-01feature. - Added
ToSql::encode_formatto support text encodings of parameters.
- Added
-
0.19.330 Apr 2022 -
0.19.229 Sep 2021Release notes
Open source →Added
- Added
SimpleQueryRow::columns. - Added support for
eui481.0 via thewith-eui48-1feature. - Added
FromSqlandToSqlimplementations for arrays via thearray-implsfeature. - Added support for
time0.3 via thewith-time-0_3feature.
- Added
-
0.19.103 Apr 2021Release notes
Open source →Added
- Added support for
geo-types0.7 viawith-geo-types-0_7feature. - Added
Client::clear_type_cache.
- Added support for
-
0.19.025 Dec 2020Release notes
Open source →Changed
- Upgraded to
tokio-postgres0.7. - Methods taking iterators of
ToSqlvalues can now take both&dyn ToSqlandT: ToSqlvalues.
Added
- Added
Client::is_validwhich can be used to check that the connection is still alive with a timeout.
- Upgraded to
-
0.18.120 Oct 2020 -
0.18.017 Oct 2020Release notes
Open source →Changed
- Upgraded to
tokio-postgres0.6.
Added
- Added
Config::notice_callback, which can be used to provide a custom callback for notices.
Fixed
- Fixed client shutdown to explicitly terminate the database session.
- Upgraded to
-
0.17.519 Jul 2020 -
0.17.403 Jul 2020 -
0.17.301 May 2020Release notes
Open source →Fixed
- Errors sent by the server will now be returned from
Clientmethods rather than just being logged.
Added
- Added
Transaction::savepoint, which can be used to create a savepoint with a custom name. - Added
Client::notifications, which returns an interface to the notifications sent by the server.
- Errors sent by the server will now be returned from
-
0.17.206 Mar 2020Release notes
Open source →Added
- Added
Debugimplementations forClient,Row, andColumn. - Added
time0.2 support.
- Added
-
0.17.101 Feb 2020Release notes
Open source →Added
- Added
Client::build_transactionto allow configuration of various transaction options. - Added
Client::cancel_token, which returns a separate owned object that can be used to cancel queries. - Added accessors for
Configfields. - Added a
GenericClienttrait implemented forClientandTransactionand covering shared functionality.
- Added
-
0.17.023 Dec 2019Release notes
Open source →Changed
- Each
Clientnow has its own non-threaded tokioRuntimerather than sharing a global threadedRuntime. This significantly improves performance by minimizing context switches and cross-thread synchronization. Client::copy_innow returns a writer rather than taking in a reader.Client::query_rawnow returns a named type.Client::copy_inandClient::copy_outno longer take query parameters as PostgreSQL doesn't support them in COPY queries.
Removed
- Removed support for
uuid0.7.
Added
- Added
Client::query_optfor queries that are expected to return zero or one rows. - Added binary copy support in the
binary_copymodule. - The
fallible-iteratorcrate is now publicly reexported.
- Each
-
0.17.0-alpha.228 Nov 2019 pre-releaseRelease notes
Open source →Changed
- Changed
Config::executortoConfig::spawner.
Added
- Added support for
uuid0.8. - Added
Transaction::query_one.
- Changed
-
0.17.0-alpha.115 Oct 2019 pre-release -
0.16.0-rc.230 Jun 2019 pre-release -
0.16.0-rc.107 Apr 2019 pre-releaseRelease notes
Open source →Changed
-
Connectionhas been renamed toClient. -
The
Clienttype is now a thin wrapper around the tokio-postgres nonblocking client. By default, this is handled transparently by spawning connections onto an internal tokioRuntime, but this can also be controlled explicitly. -
The
ConnectParamstype andIntoConnectParamstrait have been replaced by a builder-styleConfigtype.Before:
let params = ConnectParams::builder() .user("postgres", None) .build(Host::Tcp("localhost".to_string())) .build(); let conn = Connection::connect(params, &TlsMode::None)?;After:
let client = Client::configure() .user("postgres") .host("localhost") .connect(NoTls)?; -
The TLS connection mode (e.g.
prefer) is now part of the connection configuration instead of being passed in separately.Before:
let conn = Connection::connect("postgres://postgres@localhost", &TlsMode::Prefer(connector))?;After:
let client = Client::connect("postgres://postgres@localhost?sslmode=prefer", connector)?; -
ClientandTransactionmethods take&mut selfrather than&self, and correct use of the active transaction is verified at compile time rather than runtime. -
Rowno longer borrows any data. -
Statementis now a "token" which is passed into methods onClientandTransactionand does not borrow the client:Before:
let statement = conn.prepare("SELECT * FROM foo WHERE bar = $1")?; let rows = statement.query(&[&1i32])?;After:
let statement = client.prepare("SELECT * FROM foo WHERE bar = $1")?; let rows = client.query(&statement, &[1i32])?; -
Statement::lazy_queryhas been replaced withTransaction::bind, which returns aPortaltype that can be used withTransaction::query_portal. -
Statement::copy_inandStatement::copy_outhave been moved toClientandTransaction. -
Client::copy_outandTransaction::copy_outnow return aReader rather than consuming in aWriter. -
Connection::batch_executeandTransaction::batch_executehave been replaced withClient::simple_queryandTransaction::simple_query. -
The Cargo features enabling
ToSqlandFromSqlimplementations for external crates are now versioned. For example,with-uuidis nowwith-uuid-0_7. This enables us to add support for new major versions of the crates in parallel without breaking backwards compatibility.
Added
- Connection string configuration now more fully mirrors libpq's syntax, and supports both URL-style and key-value style strings.
FromSqlimplementations can now borrow from the data buffer. In particular, this means that you can deserialize values as&str. TheFromSqlOwnedtrait can be used as a bound to restrict code to deserializing owned values.- Added support for channel binding with SCRAM authentication.
- Added multi-host support in connection configuration.
- Added support for simple query requests returning row data.
- Added variants of query methods which return fallible iterators of values and avoid fully buffering the response in memory.
Removed
- The
with-opensslandwith-native-tlsCargo features have been removed. Use thetokio-postgres-opensslandtokio-postgres-native-tlscrates instead. - The
with-rustc_serializeandwith-timeCargo features have been removed. UseserdeandSystemTimeorchronoinstead. - The
Transaction::set_commitandTransaction::set_rollbackmethods have been removed. The only way to commit a transaction is to explicitly consume it viaTransaction::commit. - The
Rowstype has been removed; methods now returnVec<Row>instead. Connection::prepare_cachehas been removed, asStatementis now'staticand can be more easily cached externally.- Some other slightly more obscure features have been removed in the initial release. If you depended on them, please file an issue and we can find the right design to add them back!
-
-
0.15.212 Feb 2018Nothing published for this version
-
0.15.123 Jul 2017Nothing published for this version
-
0.15.023 Jul 2017Nothing published for this version
-
0.14.211 Jun 2017Nothing published for this version
-
0.14.102 May 2017Nothing published for this version
-
0.14.021 Feb 2017Nothing published for this version
-
0.13.604 Feb 2017Nothing published for this version
-
0.13.513 Jan 2017Nothing published for this version
-
0.13.419 Dec 2016Nothing published for this version
-
0.13.330 Nov 2016Nothing published for this version
-
0.13.227 Nov 2016Nothing published for this version
-
0.13.112 Nov 2016Nothing published for this version
-
0.13.006 Nov 2016Nothing published for this version
-
0.12.010 Oct 2016Nothing published for this version
-
0.11.1210 Apr 2017Nothing published for this version
-
0.11.1129 Aug 2016Nothing published for this version
-
0.11.1005 Aug 2016Nothing published for this version
-
0.11.916 Jun 2016Nothing published for this version
-
0.11.827 May 2016Nothing published for this version
-
0.11.712 Apr 2016Nothing published for this version
-
0.11.631 Mar 2016Nothing published for this version
-
0.11.530 Mar 2016Nothing published for this version
-
0.11.410 Mar 2016Nothing published for this version
-
0.11.318 Feb 2016Nothing published for this version
-
0.11.218 Feb 2016 withdrawnNothing published for this version
-
0.11.101 Feb 2016Nothing published for this version
-
0.11.003 Jan 2016Nothing published for this version
-
0.10.203 Dec 2015Nothing published for this version
-
0.10.108 Nov 2015Nothing published for this version
-
0.10.019 Sep 2015Nothing published for this version
-
0.9.629 Aug 2015Nothing published for this version
-
0.9.504 Aug 2015Nothing published for this version
-
0.9.431 Jul 2015Nothing published for this version