Porting applications to SQL Server is not the usual direction. Developers are more likely to port SQL Server to Postgres because it is open source, supports more ANSI features, runs on more platforms, uses a different ACID model and has a great optimizer.
If you live in a Microsoft world and need to move Postgres code to SQL Server, don’t expect the port to be easy. You might luck up, but that’s not the way the smart money bets. The pure SQL part will not hard if the original Postgres is clean and simple; you will have to write the extra ANSI features with complicated T-SQL. The hard part is that Postgres assumes a non-Microsoft environment and a different concurrency model."