Does postgresql record the schema, table, index, trigger and stored procedure changes? I don’t mean the changes in data, but changes in the structure of the database.
Searching the web I always end up with data auditing solutions, which is not my problem. I do know, however, that tables and SPs are records in master tables somewhere in the database.
Is there such a log in postgresql? If not, how could I create one?
That type of log is not kept by default in any of the postgres tables. The closest I think you will be able to get would be to have postgres log all
ALTERandCREATEstatements. Then you could look in the logs for the timestamp and specific modifications. You should be able to do that by tweaking the log_statement() parameter. More details here: http://www.postgresql.org/docs/9.1/static/runtime-config-logging.html#GUC-LOG-STATEMENT