Request for new column in pg_namespace

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Request for new column in pg_namespace
Date: 2024-12-15 16:58:49
Message-ID: CANzqJaCCF9kpfdbWbRR2xuqH_qaBgL+me13w2c-5S=_YATKh+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

https://www.postgresql.org/docs/current/catalog-pg-namespace.html

Currently, when I want to query all "userland" tables, I write something
like:
select ...
from pg_class cl, pg_namespace nsp
where cl.relnamespace = nsp.oid
and nsp.nspname not like 'pg_%
and nsp.nspname != 'information_schema';

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 ...
from pg_class cl, pg_namespace nsp
where cl.relnamespace = nsp.oid
and nsp.indissystem = false;

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2024-12-15 17:15:57 Re: Request for new column in pg_namespace
Previous Message Tom Lane 2024-12-14 21:37:30 Re: Allowed to return possibly TOASTed datums?