Fixed pgsql schema/patch