Re: Relation n does not exist when trying to ad a foregin key - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Relation n does not exist when trying to ad a foregin key
Date
Msg-id 5294.1049054604@sss.pgh.pa.us
Whole thread Raw
In response to Relation n does not exist when trying to ad a foregin key  ("Fabio Furia Silva" <ff-@uol.com.br>)
List pgsql-bugs
"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

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #927: Hardcoded paths in windows install (731a1)
Next
From: Tom Lane
Date:
Subject: Re: Bug #922: PANIC: open of /scratch/production_2/pg_clog/0996 failed: No such file or directory