This is a set of Linux scripts and PostgreSQL 9.4 queries by Melvin Davidson. They were shared on the pgsql-general mailing list on 26 May 2015.
CAVEAT EMPTOR! Please DO NOT write to me asking me why I did things one way when you think it should be done another way, or way I chose specific values for a query. There are several available editors you can use to make your own changes.
IOW: Do not peer into the oral cavity of an equestrian present!