Re: Request for new column in pg_namespace

2024-12-15 Thread Ron Johnson
On Sun, Dec 15, 2024 at 2:20 PM Tom Lane wrote: > Isaac Morland writes: > > On Sun, 15 Dec 2024 at 12:29, Tom Lane 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)

Re: Request for new column in pg_namespace

2024-12-15 Thread Isaac Morland
On Sun, 15 Dec 2024 at 14:20, Tom Lane wrote: > Isaac Morland writes: > > On Sun, 15 Dec 2024 at 12:29, Tom Lane 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)".

Re: Request for new column in pg_namespace

2024-12-15 Thread Tom Lane
Isaac Morland writes: > On Sun, 15 Dec 2024 at 12:29, Tom Lane 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 r

Re: Request for new column in pg_namespace

2024-12-15 Thread Ron Johnson
On Sun, Dec 15, 2024 at 12:29 PM Tom Lane wrote: > Pavel Stehule writes: > > ne 15. 12. 2024 v 17:59 odesílatel Ron Johnson > > napsal: > >> A new boolean column named "indissystem" that's true only for system > >> relations would make *many* maintenance queries cleaner, since they'd > >> look

Re: Request for new column in pg_namespace

2024-12-15 Thread Isaac Morland
On Sun, 15 Dec 2024 at 12:29, Tom Lane 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?

Re: Request for new column in pg_namespace

2024-12-15 Thread Tom Lane
Pavel Stehule writes: > ne 15. 12. 2024 v 17:59 odesílatel Ron Johnson > 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 0

Re: Request for new column in pg_namespace

2024-12-15 Thread Pavel Stehule
Hi ne 15. 12. 2024 v 17:59 odesílatel Ron Johnson napsal: > 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 >