You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Refine our definition of what constitutes a system relation.
Although user-defined relations can't be directly created inpg_catalog, it's possible for them to end up there, because you cancreate them in some other schema and then use ALTER TABLE .. SET SCHEMAto move them there. Previously, such relations couldn't afterwardsbe manipulated, because IsSystemRelation()/IsSystemClass() rejectedall attempts to modify objects in the pg_catalog schema, regardlessof their origin. With this patch, they now reject only thoseobjects in pg_catalog which were created at initdb-time, allowingmost operations on user-created tables in pg_catalog to proceednormally.This patch also adds new functions IsCatalogRelation() andIsCatalogClass(), which is similar to IsSystemRelation() andIsSystemClass() but with a slightly narrower definition: only TOASTtables of system catalogs are included, rather than *all* TOAST tables.This is currently used only for making decisions about wheninvalidation messages need to be sent, but upcoming logical decodingpatches will find other uses for this information.Andres Freund, with some modifications by me.