Richard Huxton <dev@archonet.com> writes:
> It's regclass you're after I think.
A fairly large problem with either regclass or a hypothetical
system-maintained enum is that a table with such a column effectively
has a data dependency on all the tables it mentions. Which pg_dump
won't know about, so it might try to restore that table before it's
finished creating all the mentioned tables.
I think this will actually work alright in existing pg_dump releases
because it does all the table creation DDL before trying to load any
data. You might have some problems with future parallel pg_restores
though.
On the whole I'd recommend staying away from the idea. It doesn't
seem valuable enough to be worth taking risks over.
regards, tom lane