I worked on the pg_dump source code to add remap schema functionality to use it internally where I work. This is a first version that allows to remap tables, views and sequences (only to export schema). Is this development likely to interest the PG community and to continue this development further?
People have asked for such a thing before, but it'd be quite difficult to do reliably --- particularly inside function bodies, which aren't normally parsed at all during a dump/restore. If you're willing to accept a 95% solution, running the pg_restore output through "sed" would likely work fairly well. I'd personally want to diff the before-and-after scripts before applying though :-)