My small but annoying problem is that the regular backups of a database of ours always list the user-defined casts after those views that would make use of them. For this reason I have to maintain a post-backup healing patch or whatever with the definition of quite a few objects depending on these casts (and, of course, depending on objects depending on ...). This seems to me sub-ideal :) but looking for a solution gave no results so far. Any help or hint will be highly appreciated.
The engine is PostgreSQL 9.1.3 but we observed the same behaviour with previous versions as well. The same error we get either running psql on 'plain' dumps or pg_restore on other types.
On a_horse_with_no_name's suggestion I've reported this on pgsql-bugs.
create cast ...? – gsiems May 8 '12 at 19:46