It sounds to me like your index on pg_proc(prosrc) is corrupted, which
unfortunately is pretty easy to do in 6.5 and before --- there weren't
any defenses against overlength index entries, which meant a large
function definition could break it.
Fortunately that index isn't actually used for much of anything (in fact
we took it out of 7.0). So you should be able to limp along until you
can schedule a dump/reload, preferably together with an update to 7.0.
Just don't vacuum pg_proc meanwhile. You can vacuum individual user
tables if you need to, but don't do a system-wide vacuum.
regards, tom lane