"Jules Alberts" <jules(dot)alberts(at)arbodienst-limburg(dot)nl> writes:
> BTW in between I do a dropdb mydb
You probably defined plpgsql in template1, so that when you do "createdb
mydb" there's already a plpgsql definition in mydb. This confuses
pg_restore, which is expecting to restore into a virgin database.
Try "createdb -T template0 mydb" to make a database with no local
additions, and then restore into that.
regards, tom lane