public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ron Johnson <[email protected]>
To: pgsql-general <[email protected]>
Subject: Re: Request for new column in pg_namespace
Date: Sun, 15 Dec 2024 12:46:42 -0500
Message-ID: <CANzqJaBZc8odgkF_Gn6kgp7gaU2dMiGhS34oTk=+7S28CEHeig@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CANzqJaCCF9kpfdbWbRR2xuqH_qaBgL+me13w2c-5S=_YATKh+Q@mail.gmail.com>
<CAFj8pRDxMpQv4P3Bi-zEQ+OQ2dsVCZ+g-vbpU-F3qvozZKjUzA@mail.gmail.com>
<[email protected]>
On Sun, Dec 15, 2024 at 12:29 PM Tom Lane <[email protected]> wrote:
> Pavel Stehule <[email protected]> writes:
> > ne 15. 12. 2024 v 17:59 odesílatel Ron Johnson <[email protected]>
> > 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.
>
In that case, one would explicitly mention pg_catalog, no?
where cl.relnamespace = nsp.oid
and (nsp.indissystem = false or nsp.nspname = '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)".
>
Good idea.
--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
view thread (4+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: Request for new column in pg_namespace
In-Reply-To: <CANzqJaBZc8odgkF_Gn6kgp7gaU2dMiGhS34oTk=+7S28CEHeig@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox