a port of the chemicalinventory system from mysql to postgresql. the rest is the same