"Joel Jacobson" <j...@compiler.org> writes: > When copying all tables in pg_catalog, to a separate schema with the purpose > of testing if foreign keys could be added for all oid columns, I got an error > for a toast table: > ERROR: insert or update on table "pg_class" violates foreign key constraint > "pg_class_reltype_fkey" > DETAIL: Key (reltype)=(86987582) is not present in table "pg_type".
I'm too lazy to check the code right now, but my recollection is that we do not bother to make composite-type entries for toast tables. However, they should have reltype = 0 if so, so I'm not quite sure where the above failure is coming from. regards, tom lane