News for hackers. Stuff that matters.
Re:Postgres rewritten in Rust, now passing 100% of the Postg... by f311a on Friday July 10, 2026 @01:54AM (#48856239)
The code is so weird, people will have a hard time reading it when they need to check for correctness.

There are much better ways to write it in Rust: https://github.com/malisper/pgrust/blob/14ffab7d31a31e5ab667...

Re:Postgres rewritten in Rust, now passing 100% of the Postg... by wavemode on Friday July 10, 2026 @02:08AM (#48856322)
I mean, you've linked to a function performing md5 hashing. That's pretty much exactly what I would expect such code to look like.

Case in point: https://github.com/postgres/postgres/blob/master/src/common/...

Re:Postgres rewritten in Rust, now passing 100% of the Postg... by f311a on Friday July 10, 2026 @02:12AM (#48856339)
It's not idiomatic implementation in Rust, just translation from C. A few Rust macros simplify implementation and cut the code in half.