@@ROWCOUNT is a SQL Server global that reflects how many rows the last command affected. In PostgreSQL, inside PL/pgSQL, use the special FOUND variable or GET DIAGNOSTICS.
FOUND after UPDATE/DELETE
SQL Server
UPDATE products SET active = 0 WHERE id = 10; IF @@ROWCOUNT = 0 THROW 50001, 'No rows', 1;
PostgreSQL
UPDATE products SET active = false WHERE id = 10; IF NOT FOUND THEN RAISE EXCEPTION 'No rows'; END IF;