some fixes to schema for postgres specific problems