"John P. Looney" <valen(at)tuatha(dot)org> writes:
> OK; is there an already existing table that should have those entries
> in it ? As a postgres novice, does that mean that these broken tables
> aren't accessible ?
pg_database *is* the table that should have those entries in it. I'm
not real sure how you got into this state, but given that you are in it,
the "SetDatabaseEncoding" failure will probably occur when you try to
connect to any of the databases with the bad pg_database rows.
Fortunately, since that table is shared across databases, you can fix it
from a connection to any of the non-broken databases (like template1).
regards, tom lane