3 ms·
What do they look like when I put it in a url?
by wredcoll 7mo ago
What do they look like when I put it in a url?
- deleted 7mo ago[deleted]
- pphysch 7mo agoUse whatever encoding you want? Base64 is probably one of the most practical, but you're not obligated to use that.
- bastawhiz 7mo agoUUIDs don't use base64
- pphysch 7mo agoYou 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.