Re: Request for new column in pg_namespace
От | Tom Lane |
---|---|
Тема | Re: Request for new column in pg_namespace |
Дата | |
Msg-id | 1753818.1734290423@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Request for new column in pg_namespace (Isaac Morland <isaac.morland@gmail.com>) |
Ответы |
Re: Request for new column in pg_namespace
Re: Request for new column in pg_namespace |
Список | pgsql-general |
Isaac Morland <isaac.morland@gmail.com> writes: > On Sun, 15 Dec 2024 at 12:29, Tom Lane <tgl@sss.pgh.pa.us> 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
В списке pgsql-general по дате отправления: