The easiest way to create a database abstraction interface is to use views to access the data. In this case, if one wants to change the table structure, it can be done without changing the code of the external applications. The only thing necessary is to update the definitions of the interface views. Moreover, if one would, for example, remove a column from a table that is used in a view, PostgreSQL will not allow this. This way, the objects in the database that are used by applications will be protected.
Nevertheless, if the database structure was changed and the view definitions were updated accordingly, it is important to check whether the new views return the same data as the old.
Sometimes it is possible to implement ...