Convert column names to lowercase

I had to convert an old web application using PHP and Mysql to Postgresql. In the process I learned MySQL has case-sensitive columns whereas Postgres converts to lower case and then match against the DB. In my case it was easier to have columns in lower case, so the legacy code with upper case would work as expected. It would have been more work to add quotes in the code, so here is a possible solution for this cases.