Canonical Replacement for OIDs in PostgreSQL 12 Onwards

postgresqlpostgresql-12

I have an application which relies totally on postgresql OIDs for its operation. It's currently at postgresql 9.6.1, but I'm looking to upgrade to 13. Is there a recommended/standard mechanism (using triggers?) to recreate the OID functionality in newer versions of postgresql?

For background, the reason the application uses OIDs is because the app knows nothing about the database schema and is intended to be used on any random database schema, using reverse engineering to navigate. For this reason, a suggestion along the lines of "just add a primary key" won't work for me. Currently the app is running against 6 separate databases, each with its own schema.

Best Answer