some tweaks to make postgres schemas work.  no mysql regression tested