Early during the development of the PostgreSQL backend for FlashMQ.com—that is our amazing managed MQTT hosting service!—, I decided on using UUIDs rather than auto-incrementing integers wherever I needed or wanted surrogate keys. I am one of those people who prefers the use of natural keys where their use is … natural, but I certainly have nothing _against_ surrogate keys, only to their overuse, which usually results from an over-reliance on ORMs (which I do have something against). There are a couple of advantages to using UUIDs over auto-incrementing integers (available in PostgreSQL via sequences):
Tag: uuid
Often, Linux software configurations define partitions by there UUID as opposed to their /dev device. You can find out what the UUID is with:
blkid /dev/sdx
Or, you can do:
ls -l /dev/disk/by-uuid
Recent Comments