The npub data should be the same as a uuid. To your database it shouldnt make a difference but according to nip-1 of the protocol it should be HEX.
“pubkey": <32-bytes lowercase hex-encoded public key of the event creator>
https://github.com/nostr-protocol/nips/blob/master/01.md#events-and-signatures
I would imagine a native json db like mongodb or duckdb would have better performance than postgres