How are you querying users names? Does the database store that info? I thought it was just npubs in hex? Or are you manually adding user names?
Discussion
The relay provides a table for users that broadcast metadata update on the relay.
What I did is to fetch the username if the npub did an update of the metadata on the relay, otherwise the pubkey of the user is displayed as hex.
