Postgresql Trigger Function If The Macromolecules