>>> it is declared as uuid. But how does it occupy only 16 bytes?
>> Because a UUID is internally simply a 128bit number - the dashes you see are 
>> just formatting.

> Sorry if this is silly but if it is a 128 bit number, why do we need 32 
> characters to represent it?

The 36 (or 32 without the dashes) characters are just the default hex 
representation.

If you wanted to, you could convert it to a bigint (or a numeric).

See e.g. here for an example: https://stackoverflow.com/a/27286610



Reply via email to