DDL Postgres Macros

In postgres you may find yourself repeating common operations on all your tables. For example adding an audit log , created times, modified user etc. This can be tedious to add everywhere. Instead, you can create a postgres “macro” to update your DDL for you Example Created CREATE OR REPLACE FUNCTION public .add_created_columns( table_type regclass ) RETURNS void LANGUAGE plpgsql SET search_path…