UUIDs are often used as database table primary keys. They are easy to generate, easy to share between distributed systems and guarantee uniqueness. Considering the size of UUID it is questionable if it is a right choice, but often it is not up to us to decide. This article does not focus on "if UUID is the right format for a key", but how to use UUID as a primary key with PostgreSQL efficiently. P