3 ms·
You can absolutely encode a UUID in base64, as you can any string of 128 bits.
by pphysch 7mo ago
You can absolutely encode a UUID in base64, as you can any string of 128 bits.
- bastawhiz 7mo ago128 random bits in some random format aren't a uuid. 0.2ml of water isn't a raindrop. If I say "you can provide me with a uuid" and you give me a base64-encoded string, it's getting rejected by validation. If I say "this text needs to be a Unicode string" and you give me a base64-encoded Unicode string's byte array, it's not going to go well.
- pphysch 7mo agoWhy are you implying that converting from base64 to and from standard UUID representation (hyphen-delimited hexadecimal) is more than a trivial operation? Either client or server can do this at any point. Does Postgres not truly support UUID because it internally represents it as 128 bits instead of a huge number of encoded bytes in the standard representation? Of course not.