fix type with postgresql switch