Tweaks to the way Postgres SQL is generated.