Don't you love it when you complete a tedious deployment to production but forget to account for the fact that SQL Server has a 2100 parameter limit on queries.
This seems to be one of those bizarre limitations implemented by Microsoft back in the day that they didn't bother to change. Or at least give the option to increase from the configuration.
Anyway, the solution was to run the query in batches of 2000 (within a transaction of course) which was a simple solution. Still, I have yet to run into such a limitation in Postgres.