Skip to content

chore(postgres): update rand to 0.9.0#3946

Closed
ryanseipp wants to merge 1 commit intolaunchbadge:mainfrom
ryanseipp:sql-postgres-rand
Closed

chore(postgres): update rand to 0.9.0#3946
ryanseipp wants to merge 1 commit intolaunchbadge:mainfrom
ryanseipp:sql-postgres-rand

Conversation

@ryanseipp
Copy link
Copy Markdown

Does your PR solve an issue?

No linked issues, but resolves duplicate versions of rand and its dependent crates for me.

Is this a breaking change?

No. sqlx-postgres does not export the types of rand, and sasl connection behavior should be equivalent after this upgrade.

Copy link
Copy Markdown
Collaborator

@abonander abonander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are other places in the project (namely the examples) that also use rand. Can you please update those as well?

@abonander
Copy link
Copy Markdown
Collaborator

However, there's also this issue: #3931 (comment)

@ryanseipp
Copy link
Copy Markdown
Author

However, there's also this issue: #3931 (comment)

If we want to wait until we can update across the board, we'll have to wait for those RustCrypto crates to be updated, as sqlx-mysql depends on rsa which depends on rand.

@raimannma
Copy link
Copy Markdown

raimannma commented Nov 2, 2025

RSA has updated rand to 0.9

Edit: Just saw it's still only a RC :(

@platy
Copy link
Copy Markdown

platy commented Apr 13, 2026

This now seems to be a fix for RUSTSEC-2026-0097 as there are no patched versions of rand 0.8.

Is it that the examples are the reason this isn't accepted yet? I see that the rsa update is still only an RC but at least this PR would fix that advisory for users of sqlx-postgres

CertainLach added a commit to deltarocks/immigrant that referenced this pull request Apr 24, 2026
sqlx uses outdated rand dependency, causing problems across the stack:
launchbadge/sqlx#3946

Realistically, there is no need for any of those libraries, as they are
only used to perform raw sql requests, but as those libraries are mostly
used across all the stacks with immigrant, it would just be easier to
not use anything simplier than them.
@abonander
Copy link
Copy Markdown
Collaborator

I've just gone ahead and updated rand to 0.10 in #4256

@abonander abonander closed this May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants