Thank you Don. I hadn't remembered that I had to drop the database and create a blank new one before applying postgrsql.sql again.
All seems to work now - fingers crossed.
One extra step that I performed was to use a text editor to search the pg_dump file and replace all occurrences of the truncated function names with the full function names kindly provided by Jun's script. That meant that as soon as I had figured out how to restore the data to my cr_revisions table, all the views were created again automatically.
Time consuming, but a relief now it is done.
Many thanks
Richard