There is no 1:1 "conversion" from MS SQL to PostgreSQL.
The concepts are totally different.
I highly recommend to simply re-implement the functionality and exploit the features that PostgreSQL has, instead of trying to imitage SQL Server.
When people try to port the technical solution of one DBMS to another they usually wind up with something that is slow and does not scale (this is true for Oracle -> SQL Serve, SQL Server -> Oracle, DB2 -> Oracle and SQL Server -> PostgreSQL just as well).
Read the manual about stored functions (PG does not have "procedures") re-read the specification for your current solution and then simply implement it using the possibilities Postgres offers.
I'm sure this is not the answer you were looking for, but I strongly believe that this is the only viable way to go.