Skip to content

Commit f908403

Browse files
authored
0.8.4 release (#3819)
* chore: prepare 0.8.4 release * fix(postgres): send `limit: 0` for all `Execute` messages fixes #3673 * fix: let `CertificateInput::from` infer any PEM-encoded document #3809 (comment) * doc: improve documentation of `PgConnectOptions` fixes #3740 * chore: update CHANGELOG from PR
1 parent 1548785 commit f908403

File tree

9 files changed

+383
-134
lines changed

9 files changed

+383
-134
lines changed

CHANGELOG.md

+152
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,134 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 0.8.4 - 2025-04-13
9+
10+
50 pull requests were merged this release cycle.
11+
12+
As of this release, development of `0.9.0` has begun on `main`.
13+
Barring urgent hotfixes, this is expected to be the last release of `0.8.x`.
14+
15+
### Added
16+
* [[#3603]]: Added missing special casing for encoding embedded arrays of custom types [[@nico-incubiq]]
17+
* [[#3625]]: feat(sqlite): add preupdate hook [[@aschey]]
18+
* [[#3655]]: docs: add example for postgres enums with type TEXT [[@tisonkun]]
19+
* [[#3677]]: Add json(nullable) macro attribute [[@seanaye]]
20+
* [[#3687]]: Derive clone and debug for postgresql arguments [[@remysaissy]]
21+
* [[#3690]]: feat: add postres geometry line segment [[@jayy-lmao]]
22+
* [[#3707]]: feat(Sqlite): add LockedSqliteHandle::last_error [[@joeydewaal]]
23+
* [[#3710]]: feat: add ipnet support [[@BeauGieskens]]
24+
* [[#3711]]: feat(postgres): add geometry box [[@jayy-lmao]]
25+
* [[#3714]]: chore: expose bstr feature [[@joeydewaal]]
26+
* [[#3716]]: feat(postgres): add geometry path [[@jayy-lmao]]
27+
* [[#3724]]: feat(sqlx-cli): Add flag to disable automatic loading of .env files [[@benwilber]]
28+
* [[#3734]]: QueryBuilder: add debug_assert when `push_values` is passed an empty set of tuples [[@chanmaoganda]]
29+
* [[#3745]]: feat: sqlx sqlite expose de/serialize [[@mattrighetti]]
30+
* [[#3765]]: Merge of #3427 (by @mpyw) and #3614 (by @bonsairobo) [[@abonander]]
31+
* [[#3427]] Expose `transaction_depth` through `get_transaction_depth()` method [[@mpyw]]
32+
* Changed to `Connection::is_in_transaction` in [[#3765]]
33+
* [[#3614]] Add `begin_with` methods to support database-specific transaction options [[@bonsairobo]]
34+
* [[#3769]]: feat(postgres): add geometry polygon [[@jayy-lmao]]
35+
* [[#3773]]: feat(postgres): add geometry circle [[@jayy-lmao]]
36+
37+
### Changed
38+
* [[#3665]]: build(deps): bump semver compatible dependencies [[@paolobarbolini]]
39+
* [[#3669]]: refactor(cli): replace promptly with dialoguer [[@paolobarbolini]]
40+
* [[#3672]]: add `#[track_caller]` to `Row::get()` [[@karambarakat]]
41+
* [[#3708]]: chore(MySql): Remove unnecessary box [[@joeydewaal]]
42+
* [[#3715]]: chore: add pg_copy regression tests [[@joeydewaal]]
43+
* [[#3721]]: Replace some `futures-core` / `futures-util` APIs with `std` variants [[@paolobarbolini]]
44+
* [[#3725]]: chore: replace rustls-pemfile with rustls-pki-types [[@tottoto]]
45+
* [[#3754]]: chore(cli): remove unused async-trait crate from dependencies [[@tottoto]]
46+
* [[#3762]]: docs(pool): recommend actix-web ThinData over Data to avoid two Arcs [[@jonasmalacofilho]]
47+
48+
### Fixed
49+
* [[#3289]]: Always set `SQLITE_OPEN_URI` on in-memory sqlite [[@LecrisUT]]
50+
* [[#3334]]: Fix: nextest cleanup race condition [[@bonega]]
51+
* [[#3666]]: fix(cli): running tests on 32bit platforms [[@paolobarbolini]]
52+
* [[#3686]]: fix: handle nullable values by printing NULL instead of panicking [[@joeydewaal]]
53+
* [[#3700]]: fix(Sqlite): stop sending rows after first error [[@joeydewaal]]
54+
* [[#3701]]: fix(postgres) use signed int for length prefix in `PgCopyIn` [[@joeydewaal]]
55+
* [[#3703]]: fix(Postgres) chunk pg_copy data [[@joeydewaal]]
56+
* [[#3712]]: FromRow: Fix documentation order [[@Turbo87]]
57+
* [[#3720]]: Fix readme: uuid feature is gating for all repos [[@jthacker]]
58+
* [[#3728]]: postgres: Fix tracing span when dropping PgListener [[@chitoku-k]]
59+
* [[#3741]]: Fix example calculation in docs [[@dns2utf8]]
60+
* [[#3749]]: docs: add some missing backticks [[@soulwa]]
61+
* [[#3753]]: Avoid privilege requirements by using an advisory lock in test setup (postgres). [[@kildrens]]
62+
* [[#3755]]: Fix FromRow docs for tuples [[@xvapx]]
63+
* [[#3768]]: chore(Sqlite): remove ci.db from repo [[@joeydewaal]]
64+
* [[#3771]]: fix(ci): breakage from Rustup 1.28 [[@abonander]]
65+
* [[#3786]]: Fix a copy-paste error on get_username docs [[@sulami]]
66+
* [[#3801]]: Fix: Enable Json type when db feature isn't enabled [[@thriller08]]
67+
* [[#3809]]: fix: PgConnectOptions docs [[@mbj]]
68+
* [[#3811]]: Fix error message typo in PgPoint::from_str [[@TeCHiScy]]
69+
* [[#3812]]: mysql: Fix panic on invalid text row length field [[@0xdeafbeef]]
70+
* [[#3815]]: fix(macros): cache macro metadata based on `CARGO_MANIFEST_DIR` [[@joeydewaal]]
71+
* Fixes in release PR [[#3819]] [[@abonander]]:
72+
* fix(postgres): send `limit: 0` for all `Execute` messages
73+
* Addresses [[#3673]]: Parallel workers not used on Postgres
74+
* fix: let `CertificateInput::from` infer any PEM-encoded document
75+
* Fixes `PGSSLKEY` not being parsed correctly when containing a PEM-encoded private key.
76+
* doc: improve documentation of `PgConnectOptions`
77+
* `PGHOSTADDR` now can be used to override `PGHOST`.
78+
* Addresses [[#3740]]: Document the URL syntax for Unix-domain sockets when connecting to postgres
79+
80+
[#3819]: https://github.com/launchbadge/sqlx/pull/3819
81+
82+
[#3673]: https://github.com/launchbadge/sqlx/issues/3673
83+
[#3740]: https://github.com/launchbadge/sqlx/issues/3740
84+
85+
[#3289]: https://github.com/launchbadge/sqlx/pull/3289
86+
[#3334]: https://github.com/launchbadge/sqlx/pull/3334
87+
[#3427]: https://github.com/launchbadge/sqlx/pull/3427
88+
[#3603]: https://github.com/launchbadge/sqlx/pull/3603
89+
[#3614]: https://github.com/launchbadge/sqlx/pull/3614
90+
[#3625]: https://github.com/launchbadge/sqlx/pull/3625
91+
[#3655]: https://github.com/launchbadge/sqlx/pull/3655
92+
[#3665]: https://github.com/launchbadge/sqlx/pull/3665
93+
[#3666]: https://github.com/launchbadge/sqlx/pull/3666
94+
[#3669]: https://github.com/launchbadge/sqlx/pull/3669
95+
[#3672]: https://github.com/launchbadge/sqlx/pull/3672
96+
[#3677]: https://github.com/launchbadge/sqlx/pull/3677
97+
[#3686]: https://github.com/launchbadge/sqlx/pull/3686
98+
[#3687]: https://github.com/launchbadge/sqlx/pull/3687
99+
[#3690]: https://github.com/launchbadge/sqlx/pull/3690
100+
[#3700]: https://github.com/launchbadge/sqlx/pull/3700
101+
[#3701]: https://github.com/launchbadge/sqlx/pull/3701
102+
[#3703]: https://github.com/launchbadge/sqlx/pull/3703
103+
[#3707]: https://github.com/launchbadge/sqlx/pull/3707
104+
[#3708]: https://github.com/launchbadge/sqlx/pull/3708
105+
[#3710]: https://github.com/launchbadge/sqlx/pull/3710
106+
[#3711]: https://github.com/launchbadge/sqlx/pull/3711
107+
[#3712]: https://github.com/launchbadge/sqlx/pull/3712
108+
[#3714]: https://github.com/launchbadge/sqlx/pull/3714
109+
[#3715]: https://github.com/launchbadge/sqlx/pull/3715
110+
[#3716]: https://github.com/launchbadge/sqlx/pull/3716
111+
[#3720]: https://github.com/launchbadge/sqlx/pull/3720
112+
[#3721]: https://github.com/launchbadge/sqlx/pull/3721
113+
[#3724]: https://github.com/launchbadge/sqlx/pull/3724
114+
[#3725]: https://github.com/launchbadge/sqlx/pull/3725
115+
[#3728]: https://github.com/launchbadge/sqlx/pull/3728
116+
[#3734]: https://github.com/launchbadge/sqlx/pull/3734
117+
[#3741]: https://github.com/launchbadge/sqlx/pull/3741
118+
[#3745]: https://github.com/launchbadge/sqlx/pull/3745
119+
[#3749]: https://github.com/launchbadge/sqlx/pull/3749
120+
[#3753]: https://github.com/launchbadge/sqlx/pull/3753
121+
[#3754]: https://github.com/launchbadge/sqlx/pull/3754
122+
[#3755]: https://github.com/launchbadge/sqlx/pull/3755
123+
[#3762]: https://github.com/launchbadge/sqlx/pull/3762
124+
[#3765]: https://github.com/launchbadge/sqlx/pull/3765
125+
[#3768]: https://github.com/launchbadge/sqlx/pull/3768
126+
[#3769]: https://github.com/launchbadge/sqlx/pull/3769
127+
[#3771]: https://github.com/launchbadge/sqlx/pull/3771
128+
[#3773]: https://github.com/launchbadge/sqlx/pull/3773
129+
[#3786]: https://github.com/launchbadge/sqlx/pull/3786
130+
[#3801]: https://github.com/launchbadge/sqlx/pull/3801
131+
[#3809]: https://github.com/launchbadge/sqlx/pull/3809
132+
[#3811]: https://github.com/launchbadge/sqlx/pull/3811
133+
[#3812]: https://github.com/launchbadge/sqlx/pull/3812
134+
[#3815]: https://github.com/launchbadge/sqlx/pull/3815
135+
8136
## 0.8.3 - 2025-01-03
9137

10138
41 pull requests were merged this release cycle.
@@ -2700,3 +2828,27 @@ Fix docs.rs build by enabling a runtime feature in the docs.rs metadata in `Carg
27002828
[@hsivonen]: https://github.com/hsivonen
27012829
[@andreweggleston]: https://github.com/andreweggleston
27022830
[@Suficio]: https://github.com/Suficio
2831+
[@bonega]: https://github.com/bonega
2832+
[@nico-incubiq]: https://github.com/nico-incubiq
2833+
[@tisonkun]: https://github.com/tisonkun
2834+
[@karambarakat]: https://github.com/karambarakat
2835+
[@seanaye]: https://github.com/seanaye
2836+
[@remysaissy]: https://github.com/remysaissy
2837+
[@BeauGieskens]: https://github.com/BeauGieskens
2838+
[@Turbo87]: https://github.com/Turbo87
2839+
[@jthacker]: https://github.com/jthacker
2840+
[@benwilber]: https://github.com/benwilber
2841+
[@chitoku-k]: https://github.com/chitoku-k
2842+
[@chanmaoganda]: https://github.com/chanmaoganda
2843+
[@dns2utf8]: https://github.com/dns2utf8
2844+
[@mattrighetti]: https://github.com/mattrighetti
2845+
[@soulwa]: https://github.com/soulwa
2846+
[@kildrens]: https://github.com/kildrens
2847+
[@xvapx]: https://github.com/xvapx
2848+
[@jonasmalacofilho]: https://github.com/jonasmalacofilho
2849+
[@sulami]: https://github.com/sulami
2850+
[@thriller08]: https://github.com/thriller08
2851+
[@mbj]: https://github.com/mbj
2852+
[@TeCHiScy]: https://github.com/TeCHiScy
2853+
[@mpyw]: https://github.com/mpyw
2854+
[@bonsairobo]: https://github.com/bonsairobo

Cargo.lock

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ members = [
2323
]
2424

2525
[workspace.package]
26-
version = "0.8.3"
26+
version = "0.8.4"
2727
license = "MIT OR Apache-2.0"
2828
edition = "2021"
2929
repository = "https://github.com/launchbadge/sqlx"
@@ -129,17 +129,17 @@ bstr = ["sqlx-core/bstr"]
129129

130130
[workspace.dependencies]
131131
# Core Crates
132-
sqlx-core = { version = "=0.8.3", path = "sqlx-core" }
133-
sqlx-macros-core = { version = "=0.8.3", path = "sqlx-macros-core" }
134-
sqlx-macros = { version = "=0.8.3", path = "sqlx-macros" }
132+
sqlx-core = { version = "=0.8.4", path = "sqlx-core" }
133+
sqlx-macros-core = { version = "=0.8.4", path = "sqlx-macros-core" }
134+
sqlx-macros = { version = "=0.8.4", path = "sqlx-macros" }
135135

136136
# Driver crates
137-
sqlx-mysql = { version = "=0.8.3", path = "sqlx-mysql" }
138-
sqlx-postgres = { version = "=0.8.3", path = "sqlx-postgres" }
139-
sqlx-sqlite = { version = "=0.8.3", path = "sqlx-sqlite" }
137+
sqlx-mysql = { version = "=0.8.4", path = "sqlx-mysql" }
138+
sqlx-postgres = { version = "=0.8.4", path = "sqlx-postgres" }
139+
sqlx-sqlite = { version = "=0.8.4", path = "sqlx-sqlite" }
140140

141141
# Facade crate (for reference from sqlx-cli)
142-
sqlx = { version = "=0.8.3", path = ".", default-features = false }
142+
sqlx = { version = "=0.8.4", path = ".", default-features = false }
143143

144144
# Common type integrations shared by multiple driver crates.
145145
# These are optional unless enabled in a workspace crate.

sqlx-core/src/net/tls/mod.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ pub enum CertificateInput {
2525

2626
impl From<String> for CertificateInput {
2727
fn from(value: String) -> Self {
28+
// Leading and trailing whitespace/newlines
2829
let trimmed = value.trim();
29-
// Some heuristics according to https://tools.ietf.org/html/rfc7468
30-
if trimmed.starts_with("-----BEGIN CERTIFICATE-----")
31-
&& trimmed.contains("-----END CERTIFICATE-----")
32-
{
30+
31+
// Heuristic for PEM encoded inputs:
32+
// https://tools.ietf.org/html/rfc7468
33+
if trimmed.starts_with("-----BEGIN") && trimmed.ends_with("-----") {
3334
CertificateInput::Inline(value.as_bytes().to_vec())
3435
} else {
3536
CertificateInput::File(PathBuf::from(value))

sqlx-postgres/src/any.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl AnyConnectionBackend for PgConnection {
9797
};
9898

9999
Box::pin(
100-
self.run(query, arguments, 0, persistent, None)
100+
self.run(query, arguments, persistent, None)
101101
.try_flatten_stream()
102102
.map(
103103
move |res: sqlx_core::Result<Either<PgQueryResult, PgRow>>| match res? {
@@ -123,7 +123,7 @@ impl AnyConnectionBackend for PgConnection {
123123

124124
Box::pin(async move {
125125
let arguments = arguments?;
126-
let mut stream = pin!(self.run(query, arguments, 1, persistent, None).await?);
126+
let mut stream = pin!(self.run(query, arguments, persistent, None).await?);
127127

128128
if let Some(Either::Right(row)) = stream.try_next().await? {
129129
return Ok(Some(AnyRow::try_from(&row)?));

sqlx-postgres/src/connection/executor.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ impl PgConnection {
194194
&'c mut self,
195195
query: &'q str,
196196
arguments: Option<PgArguments>,
197-
limit: u8,
198197
persistent: bool,
199198
metadata_opt: Option<Arc<PgStatementMetadata>>,
200199
) -> Result<impl Stream<Item = Result<Either<PgQueryResult, PgRow>, Error>> + 'e, Error> {
@@ -247,7 +246,9 @@ impl PgConnection {
247246
// the protocol-level limit acts nearly identically to the `LIMIT` in SQL
248247
self.inner.stream.write_msg(message::Execute {
249248
portal: PortalId::UNNAMED,
250-
limit: limit.into(),
249+
// Non-zero limits cause query plan pessimization by disabling parallel workers:
250+
// https://github.com/launchbadge/sqlx/issues/3673
251+
limit: 0,
251252
})?;
252253
// From https://www.postgresql.org/docs/current/protocol-flow.html:
253254
//
@@ -393,7 +394,7 @@ impl<'c> Executor<'c> for &'c mut PgConnection {
393394

394395
Box::pin(try_stream! {
395396
let arguments = arguments?;
396-
let mut s = pin!(self.run(sql, arguments, 0, persistent, metadata).await?);
397+
let mut s = pin!(self.run(sql, arguments, persistent, metadata).await?);
397398

398399
while let Some(v) = s.try_next().await? {
399400
r#yield!(v);
@@ -419,7 +420,7 @@ impl<'c> Executor<'c> for &'c mut PgConnection {
419420

420421
Box::pin(async move {
421422
let arguments = arguments?;
422-
let mut s = pin!(self.run(sql, arguments, 1, persistent, metadata).await?);
423+
let mut s = pin!(self.run(sql, arguments, persistent, metadata).await?);
423424

424425
// With deferred constraints we need to check all responses as we
425426
// could get a OK response (with uncommitted data), only to get an

sqlx-postgres/src/connection/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ mod stream;
3131
mod tls;
3232

3333
/// A connection to a PostgreSQL database.
34+
///
35+
/// See [`PgConnectOptions`] for connection URL reference.
3436
pub struct PgConnection {
3537
pub(crate) inner: Box<PgConnectionInner>,
3638
}

0 commit comments

Comments
 (0)