tokio-postgres
A native, asynchronous PostgreSQL client
0.7.18
62M downloads/mo
#1086 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 4 months
Most releases are documented
notes for 22 of 33 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
38 releases · first in 2016
5 releases in the last 12 months
see the full history below
Release timeline
38 releases · Dec 2016 to Jun 2026Releases
latest 38-
0.7.1812 Jun 2026Release notes
Open source →Fixed
- Error instead of panicking on DataRow field/column count mismatch.
Release notes
Open source →Fixed
- Error instead of panicking on DataRow field/column count mismatch.
-
0.7.1730 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
randto 0.10. - 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
randto 0.10. - Upgraded to Rust edition 2024, minimum Rust version 1.85.
- Added
-
0.7.1614 Jan 2026Release notes
Open source →Added
- Added
Client::query_scalar,Client::query_one_scalar, andClient::query_opt_scalarmethods. - Added
Row::raw_size_bytesmethod. - Added
Column::type_modifiermethod.
Changed
- Upgraded
whoamito v2.
- Added
-
0.7.1508 Oct 2025Release notes
Open source →Added
- Added
Client::check_connectionAPI. - Added
Client::simple_query_rawAPI.
Changed
- Improved the effectiveness of
Client::is_closed. - Stop including error chain in
Displayimpl ofError
- Added
-
0.7.1425 Sep 2025Release notes
Open source →Added
- Added support for
jiffv0.2. - Added support for
bit-vecversions v0.7 and v0.8. - Re-exported
fallible-iterator - Expose sync rollback as a private API method
Fixes
- Changed
set_tcp_user_timeoutto only be called when enabled
Changed
- Updated repository links to use
rust-postgresorganization. - Upgraded to Rust 2021 edition.
- Upgraded
phfto v0.13 - Upgraded
socket2to v0.6 - Disabled default features of
futures-util
- Added support for
-
0.7.1302 Feb 2025Release notes
Open source →Added
- Added support for direct TLS negotiation.
- Added support for
cidr0.3 via thewith-cidr-0_3feature.
Fixes
- Added
load_balance_hoststoConfig'sDebugimplementation.
Changes
- Upgraded
rand.
-
0.7.1216 Sep 2024Release notes
Open source →Fixed
- Fixed
query_typedqueries that return no rows.
Added
- Added support for
jiff0.1 via thewith-jiff-01feature. - Added support for TCP keepalive on AIX.
- Fixed
-
0.7.1122 Jul 2024Release notes
Open source →Fixed
- Fixed handling of non-UTF8 error fields which can be sent after failed handshakes.
- Fixed cancellation handling of
TransactionBuilder::startfutures.
Added
- Added
table_oidandfield_idfields toColumnsstruct of prepared statements. - Added
GenericClient::simple_query. - Added
#[track_caller]toRow::getandSimpleQueryRow::get. - Added
TargetSessionAttrs::ReadOnly. - Added
Debugimplementation forStatement. - Added
Cloneimplementation forRow. - Added
SimpleQueryMessage::RowDescription. - Added
{Client, Transaction, GenericClient}::query_typed.
Changed
- Disable
rustc-serializecompatibility ofeui48-1dependency - Config setters now take
impl Into<String>.
-
0.7.1025 Aug 2023Nothing published for this version
-
0.7.920 Aug 2023Nothing published for this version
-
0.7.827 Mar 2023Nothing published for this version
-
0.7.721 Aug 2022Nothing published for this version
-
0.7.630 Apr 2022Release notes
Open source →Added
- Added support for
uuid1.0 via thewith-uuid-1feature.
Changed
- Upgraded to
tokio-util0.7. - Upgraded to
parking_lot0.12.
- Added support for
-
0.7.530 Oct 2021Release notes
Open source →Fixed
- Fixed a bug where the client could enter into a transaction if the
Client::transactionfuture was dropped before completion.
- Fixed a bug where the client could enter into a transaction if the
-
0.7.419 Oct 2021Release notes
Open source →Fixed
- Fixed reporting of commit-time errors triggered by deferred constraints.
-
0.7.329 Sep 2021Release notes
Open source →Fixed
- Fixed a deadlock when pipelined requests concurrently prepare cached typeinfo queries.
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.
-
0.7.225 Apr 2021 -
0.7.103 Apr 2021Release notes
Open source →Added
- Added support for
geo-types0.7 viawith-geo-types-0_7feature. - Added
Client::clear_type_cache. - Added
Error::as_db_errorandError::is_closed.
- Added support for
-
0.7.025 Dec 2020Release notes
Open source →Changed
- Upgraded to
tokio1.0. - Upgraded to
postgres-types0.2.
Added
- Methods taking iterators of
ToSqlvalues can now take both&dyn ToSqlandT: ToSqlvalues.
- Upgraded to
-
0.6.017 Oct 2020Release notes
Open source →Changed
- Upgraded to
tokio0.3. - Added the detail and hint fields to
DbError'sDisplayimplementation.
- Upgraded to
-
0.5.503 Jul 2020 -
0.5.401 May 2020Release notes
Open source →Added
- Added
Transaction::savepoint, which can be used to create a savepoint with a custom name.
- Added
-
0.5.306 Mar 2020Release notes
Open source →Added
- Added
Debugimplementations forClient,Row, andColumn. - Added
time0.2 support.
- Added
-
0.5.201 Feb 2020Release notes
Open source →Fixed
- Notice messages sent during the initial connection process are now collected and returned first from
Connection::poll_message.
Deprecated
- Deprecated
Client::cancel_queryandClient::cancel_query_rawin favor ofClient::cancel_token.
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.
- Notice messages sent during the initial connection process are now collected and returned first from
-
0.5.125 Dec 2019 -
0.5.023 Dec 2019Release notes
Open source →Changed
Client::copy_innow returns aSinkrather than taking in aStream.CopyStreamhas been renamed toCopyOutStream.Client::copy_inandClient::copy_outno longer take query parameters as PostgreSQL doesn't support parameters in COPY queries.TargetSessionAttrs,SslMode, andChannelBindingare now true non-exhaustive enums.
Added
- Added
Client::query_optfor queries expected to return zero or one rows. - Added binary copy format support to the
binary_copymodule. - Added back query logging.
Removed
- Removed
uuid0.7 support.
-
0.5.0-alpha.228 Nov 2019 pre-releaseRelease notes
Open source →Changed
- Upgraded
bytesto 0.5. - Upgraded
tokioto 0.2. - The TLS interface uses a trait to obtain channel binding information rather than returning it after the handshake.
- Changed the value of the
timezoneproperty fromGMTtoUTC. - Returned
Streamimplementations are now!Unpin.
Added
- Added support for
uuid0.8. - Added the column to
Row::try_geterrors.
- Upgraded
-
0.5.0-alpha.115 Oct 2019 pre-releaseRelease notes
Open source →Changed
- The library now uses
std::futures::Futureand async/await syntax. - Most methods now take
&selfrather than&mut self. - The transaction API has changed to more closely resemble the synchronous API and is significantly more ergonomic.
- Methods now take
&[&(dyn ToSql + Sync)]rather than&[&dyn ToSql]to allow futures to beSend. - Methods are now "normal" async functions that no longer do work up-front.
- Statements are no longer required to be prepared explicitly before use. Methods taking
&Statementcan now also take&str, and will internally prepare the statement. ToSqlnow serializes its value into aBytesMutrather thanVec<u8>.- Methods that previously returned
Streams now returnVec<T>. New*_rawmethods still provide aStreaminterface.
Added
- Added the
channel_binding=disable/allow/requireconfiguration to control use of channel binding. - Added the
Client::query_onemethod to cover the common case of a query that returns exactly one row.
- The library now uses
-
0.4.0-rc.330 Jun 2019 pre-releaseRelease notes
Open source →Fixed
- Significantly improved the performance of
queryandcopy_in.
Changed
- The items of the stream passed to
copy_inmust be'static.
- Significantly improved the performance of
-
0.4.0-rc.206 Mar 2019 pre-releaseRelease notes
Open source →Fixed
- Fixed Cargo features to actually enable the functionality they claim to.
-
0.4.0-rc.106 Mar 2019 pre-releaseRelease notes
Open source →Changed
- The client API has been significantly overhauled. It now resembles
hyper's, with separateConnectionandClientobjects. See the crate-level documentation for more details. - The TLS connection mode (e.g.
prefer) is now part of the connection configuration rather than being passed in separately. - 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. - Upgraded from
tokio-coretotokio.
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.
- The client now supports query pipelining, which can be used as a latency hiding measure.
- While the crate uses
tokioby default, the base API can be used with any asynchronous stream type on any reactor. - Added support for simple query requests returning row data.
Removed
- The
with-opensslfeature has been removed. Use thetokio-postgres-opensslcrate instead. - The
with-rustc_serializeandwith-timefeatures have been removed. UseserdeandSystemTimeorchronoinstead.
- The client API has been significantly overhauled. It now resembles
-
0.3.030 Sep 2017Nothing published for this version
-
0.2.311 Jun 2017Nothing published for this version
-
0.2.202 May 2017Nothing published for this version
-
0.2.124 Feb 2017Nothing published for this version
-
0.2.021 Feb 2017Nothing published for this version
-
0.1.104 Feb 2017Nothing published for this version
-
0.1.026 Dec 2016Nothing published for this version