Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tMrxV-0074lz-JR for pgsql-general@arkaria.postgresql.org; Sun, 15 Dec 2024 16:59:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tMrxR-00F4mL-A8 for pgsql-general@arkaria.postgresql.org; Sun, 15 Dec 2024 16:59:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tMrxQ-00F4hN-R7 for pgsql-general@lists.postgresql.org; Sun, 15 Dec 2024 16:59:06 +0000 Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tMrxP-00309R-8m for pgsql-general@postgresql.org; Sun, 15 Dec 2024 16:59:05 +0000 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-29e70c9dc72so1653831fac.0 for ; Sun, 15 Dec 2024 08:59:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734281941; x=1734886741; darn=postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=cM/mjEDrY02DLjrdAPuCW+Jj6OffGBHf7MgZszGT1so=; b=HADWfzHhsRbKfhCF/2cfWRVJeCivqwnd9NRlDl2gIviCtZ4afrwyIbDLi608ANhYz8 TNVQPQajQ9kfbUV5MRwSj6o6g3Nsh3BdwxfGPFoQQtpCi6JCksam5miYFHi1G+TIbciy MYDDDevEi2J8j3T3HB81ctV0LaSZxOYQD3MtjZEjQtN9jB2jDa7lQjvVclEWrMCV4VuO k4NQHyirtAqotYiDmEKncaKufBvA8BLpYfs+F458IdUSw7q6EqhrpQfFcbyqQzA6R8oD wPBGMrIkitSUwOfb37i7UAEFnMHnLvlTk/q6bNvJv7PQ1JTGY+WXb1hNNSL4n+Tye5K2 3rbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734281941; x=1734886741; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=cM/mjEDrY02DLjrdAPuCW+Jj6OffGBHf7MgZszGT1so=; b=gNwEBnfggKCg+z7Y68jRgLgK0Erj8hn85MlS/c+Eo4mGvlRDbgTAjDbq/kcOYHAI7s B81APcq46bc/inrdk+g79kAN4UEWEAN9W11NCRFua1fk5VUhy3TQedxIMZcxAUF/kGuX LfjJ6QLujk3BsSe6Ai//XnlEExJZccdfhjwVTpjpMJS7pQ8Lo5DyMrvdktcj/KPIy95m GDb6zcvptA9Kgx/vI98gwup/i1dmQT/fYjGvQEiW0yg0NYMU9KxuOJbWvS5OfGj8muD3 ZysjozrVGgOsYWdnByxKqkqEUetcCAg0isomASBCQ2M8IR74Xc56+RCbAi7OeSyK3mGy ayjQ== X-Gm-Message-State: AOJu0YypcOG1Jc8jAPr5CBWaOo15wd6QkOx5WJmyF3fSZi94/LvfISmb 442tlK0wHmvgefSQ9ugG8gDNlLXstsB8si2IOcCyOXKFEivFsAaFs7ld6A7/genP8AB4qjaNN36 QOWNO9NBB1Jsyyr7zwJbZGHCpJtuZRHGy X-Gm-Gg: ASbGnctfkYLg8Pq5sSxZKlaSTnyBtedkQgOs446PGWNYC4Gfc7YAbdGA4+MhbWUo2as Ydts09HeYR1ZPtmBXQ5GGc1gi+D5huX7mgZ9UcNw= X-Google-Smtp-Source: AGHT+IEzphmg0y6pAhN26NuOBQZ3RP0vlnmm/fYeEGbKXAv0p03qP6Hswk8HofuI6hrU0Se1gSVvvwvKTvv0042lohM= X-Received: by 2002:a05:6870:7b48:b0:29d:c764:f873 with SMTP id 586e51a60fabf-2a3ac99721cmr5227757fac.31.1734281940751; Sun, 15 Dec 2024 08:59:00 -0800 (PST) MIME-Version: 1.0 From: Ron Johnson Date: Sun, 15 Dec 2024 11:58:49 -0500 Message-ID: Subject: Request for new column in pg_namespace To: pgsql-general Content-Type: multipart/alternative; boundary="00000000000004e28c062951fbbe" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000004e28c062951fbbe Content-Type: text/plain; charset="UTF-8" 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 , and butter sauce. Don't boil me, I'm still alive. lobster! --00000000000004e28c062951fbbe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Currently, when I want to quer= y all "userland" tables, I write something like:
select ...
from pg_class cl, pg_namespace nsp
wher= e cl.relnamespace =3D nsp.oid
=C2=A0 and nsp.nspname not like 'pg_%<= /font>
=C2=A0 and=C2=A0nsp.nspname=C2=A0!=3D=C2=A0'information_schema';

A new boolean column named "indissystem&quo= t; that's true only for system relations would make many=C2=A0ma= intenance queries cleaner, since they'd look like:
select ...
from pg_class cl, pg_namespace nsp
whe= re cl.relnamespace =3D nsp.oid
=C2=A0 and nsp.indissystem =3D false;

--
Death to <Redacted>, and butter sauce.Don't boil me, I'm still alive.
<Redacted> lob= ster!
--00000000000004e28c062951fbbe--