what are the best practices in Postgres for globally converting UUIDs into IDs. I'm currently using both UUIDs and IDs in my schema. The intent is for UUIDs to be exposed to the public (for URLs et.) and IDs for internal systems.
I've looked at the following methods but am unsure of the best practices.
- a custom function that does a UUID/ID lookup on the target table
- using a BEFORE trigger that does the conversion and keeps all postgres functions clean
Can someone provide some wisdom/suggestions here?