can my SQL Server application code using temporary tables be used for Postgres?
Postgres supports temporary tables but it does not support the #tablename syntax.  You can keep the structure but you will have to modify the code to the new syntax.  Unless you want to download the code for Postgres and modify that but that seems like unrecommended overkill.

http://www.sqlines.com/postgresql/statements/create_temporary_table


  CREATE TEMPORARY TABLE statement creates a temporary table that is
  automatically dropped at the end of a session, or the current
  transaction (ON COMMIT DROP option).
  
  Quick Example:

   -- Create a temporary table
   CREATE TEMPORARY TABLE temp_location
   (
      city VARCHAR(80),
      street VARCHAR(80)
   ) 
   ON COMMIT DELETE ROWS;