public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Isaac Morland <[email protected]>
Cc: Pavel Stehule <[email protected]>
Cc: Ron Johnson <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Request for new column in pg_namespace
Date: Sun, 15 Dec 2024 14:20:23 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAMsGm5dmNjPuYAg8V7yutENjgJod5pNXhoQpiWoPH3e7i1RrVg@mail.gmail.com>
References: <CANzqJaCCF9kpfdbWbRR2xuqH_qaBgL+me13w2c-5S=_YATKh+Q@mail.gmail.com>
<CAFj8pRDxMpQv4P3Bi-zEQ+OQ2dsVCZ+g-vbpU-F3qvozZKjUzA@mail.gmail.com>
<[email protected]>
<CAMsGm5dmNjPuYAg8V7yutENjgJod5pNXhoQpiWoPH3e7i1RrVg@mail.gmail.com>
Isaac Morland <[email protected]> writes:
> On Sun, 15 Dec 2024 at 12:29, Tom Lane <[email protected]> wrote:
>> 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)".
> Would it make sense to make the parameter be of type regnamespace?
Meh ... you could, but what the function really needs is the name.
Getting from regnamespace (which is an OID) to the name would incur
an extra syscache lookup. Admittedly, if it removes the need for
the calling query to join to pg_namespace at all, you'd probably
come out about even --- the net effect would be about like a
hashjoin to pg_namespace, I think, since the syscache would act
like the inner hashtable of a hashjoin.
regards, tom lane
view thread (4+ messages) latest in thread
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], [email protected], [email protected], [email protected]
Subject: Re: Request for new column in pg_namespace
In-Reply-To: <[email protected]>
* 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