mysql to pg part 1