"Fabio Furia Silva" <ff-@uol.com.br> writes:
> I am having this error when I try to add a foreign key:
> ERROR: Relation n does not exist
What postgres version is this?
> These 3 tables (cep_bairro, cep_logra and cidade) where changed a lot,
> either by being recriated or via alter table.
If it's pre-7.3, I'd imagine that you got burnt by dropping a table that
was still somehow referenced elsewhere (by a trigger or view, say).
In 7.3 that type of mistake shouldn't be possible anymore, however.
You could find out more by looking through the system catalogs to see
where the dangling reference to OID 107890740 is. Consult the docs for
your version to see which columns in which system tables are references
to pg_class.oid.
regards, tom lane