core: psql: better error message for insert/delete
(cherry picked from commit b76e04a294ce172880a057414dc4fbc282ddc1e1)
mod_base: remove all zmodal masks when removing existing zmodals.
(cherry picked from commit f17bdf1aa6d314df85a2127fb02dc1e0c310487f)