I believe that upate pg_class can only be done by superuser, right?
Yes,it's requires superuser privileges.
Besides, if I need the whole schema's foreign keys to be disabled and then enabled later.
Is there a simple command could do it? Similar to mysql's "set FOREIGN_KEY_CHECKS = false/true"?
No. The main goal for PG is to secure data integrity, and you can't switch off this feature.
Disable the constraints:
alter table <tablename> disable trigger all;
You can use this command inside your transaction too, but don't forget to reactivate the triggers because this change will become global after the transaction ends!