UUID Field Type or Formula

Thanks for your response.

A couple of comments:

  • uuid_generate_v4 is supported in PG 11, in theuuid-ossp official extension
  • PG 11 end of life (end of official support) is 9 Nov 2023 (Postgres policy is to do this 5 years after the initial release (2018 in the case of PG 11)

Hi @glarrain-cdd, I realize that there are extensions that can help with generating UUIDs, but unfortunately, we can’t depend on PostgreSQL extensions. This is because we allow users to self-host, and we never know whether they can access to installing extensions.

We’re soon going to make PG 12 as minimum requirement for Baserow. Unfortunately, the native uuid functions were included in PG 13.

A minor comment that might be useful for others interested in the details, or for future reference:

  • Postgres SQL function random (part of the math functions) returns pseudo-random values, which means those values can not be used for crypto-secure purposes
  • Postgres UUID (v4) SQL functions do return values that have been calculated using crypto-secure tools (true random number generators (RNGs))

Thus, the aforementioned custom formula is supposed to be appropriate for most cases, but it is not entirely equivalent to Postgres UUID (v4) generation SQL functions. For most people, that detail would be insignificant.

Thank you for explaining that @glarrain-cdd. Would you mind sharing more about your use-case for the UUID field so that I have a better understanding of what you need true random values for?

Sure. We have many databases in disparate systems. We refactor and move tables a lot, and for that has been extremely valuable to have a globally unique ID per record.

We’ve been wanting to use baserow in our company for some time, and have been waiting until all our non-functional requirements are fulfilled. The UUID v4 data type (and random value generation on record creation) is one of those.

Version 1.22 is now available and with it this feature. :blush:

5 Likes