Re: uncataloged tables are a vestigial husk
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2012-06-13T17:13:43Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > While working on some code today, I noticed that RELKIND_UNCATALOGED > appears to serve no useful purpose. In the few places where we check > for it at all, we treat it in exactly the same way as > RELKIND_RELATION. It seems that it's only purpose is to serve as a > placeholder inside each newly-created relcache entry until the real > relkind is filled in. I suspect that it had some actual usefulness back in Berkeley days. But now that catalogs are created with the correct relkind to start with during initdb, I agree it's probably just inertia keeping that around. > The attached patch cleans it up by removing RELKIND_UNCATALOGED and > teaching RelationBuildLocalRelation() to set the relkind itself. I think there are probably some places to fix in the docs too. regards, tom lane