About UUID and generators in PostgreSQL

I’m thinking to use UUID as PK for all tables into my new PostgreSQL database, for such a goal I will be using uuid_generate_v5 and uuid_ns_dns or uuid_ns_url functions, but I have some doubts:

  • is there any problems using UUIDs only in a database (i.e. performance)?
  • is there any pros and cons respect to use uuid_generate_v4?
  • When to use uuid_ns_dns or uuid_ns_url? (I haven’t found info about it)
  • can name parameter for uuid_generate_v5 function be any string (even an empty string) or it depends on namespace parameter? Examples, please.