Re: Request for new column in pg_namespace

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Request for new column in pg_namespace
Date: 2024-12-15 17:29:26
Message-ID: 1627466.1734283766@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> ne 15. 12. 2024 v 17:59 odesílatel Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
> napsal:
>> A new boolean column named "indissystem" that's true only for system
>> relations would make *many* maintenance queries cleaner, since they'd
>> look like:
>> select ...

> oid of all system objects is less then 0x4000

That wouldn't help for excluding temp schemas, and it's not totally
trustworthy for information_schema either.

But I think the real problem with Ron's proposal is that it presumes
there is a one-size-fits-all notion of "system schema". As a
counterexample, for some maintenance activities (such as vacuuming)
you might wish to process pg_catalog.

What I'd suggest as an improvement that could be implemented
immediately is to wrap the checks in a user-defined function
like "is_system_schema(nspname name)".

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Luca Dametto 2024-12-15 17:35:16 Documentation enancement regarding NULL and operators
Previous Message Pavel Stehule 2024-12-15 17:15:57 Re: Request for new column in pg_namespace