PostgreSQL adds a space in front of the number if not specified
otherwise, to account for a minus sign with negative numbers. As all
short IDs are positive, it can be suppressed here.
This architecture was started when the project still used Diesel.
Now that it uses SQLx, less things are done in Rust and more are done in
SQL. This commit now moves more of the query logic into SQL, which
should lead to more efficient queries and less moving data around.