public inbox for [email protected]  
help / color / mirror / Atom feed
From: vignesh C <[email protected]>
To: Peter Smith <[email protected]>
Cc: Nisha Moond <[email protected]>
Cc: Jim Jones <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: PSQL - prevent describe listing tables that are already in listed schemas
Date: Wed, 8 Jul 2026 16:36:20 +0530
Message-ID: <CALDaNm3Cf9vYAFa3XYHMjJSaaXaZygKxgc7bahMrC2JBvA7pKg@mail.gmail.com> (raw)
In-Reply-To: <CAHut+Pt0v3v6BBUhh774ScpzqCaXu-LXwZd_1tMh_0Ftktv3vg@mail.gmail.com>
References: <CAHut+PvSOmRrQX+VrFYHtFipV9hM=p99FeOwYCzkuU2BOaLu7Q@mail.gmail.com>
	<[email protected]>
	<CAHut+Pturr_EY3WgVMT5+rrcKLm9HcRCk5X0WH8zvwtD2K2ixA@mail.gmail.com>
	<[email protected]>
	<CAHut+PvfAQQTaV4qQzivBx_LLhveA0h=ugy_MRRR+NjwndNPgg@mail.gmail.com>
	<CABdArM6Ls0DRkqmpg5oDjwJhkrC9rvUQ9+y1jNmwRG+cq57cVQ@mail.gmail.com>
	<[email protected]>
	<CABdArM4_=HZjkQAxy5OA2u0h+ZLCacQGNQREot8-nXJ2QNTgbA@mail.gmail.com>
	<CAHut+PtecJnFckGxEMT0-yhW=nTDR9aVcWpn_G+rFWTLTkP=YA@mail.gmail.com>
	<CAHut+Pt0v3v6BBUhh774ScpzqCaXu-LXwZd_1tMh_0Ftktv3vg@mail.gmail.com>

On Wed, 8 Jul 2026 at 04:58, Peter Smith <[email protected]> wrote:
>
> A rebase was needed.
>
> PSA v7.

One minor comment:
Can we add a comment here too, similar to how you have added for
describe publications:
@@ -3048,7 +3048,12 @@ describeOneTableDetails(const char *schemaname,
                                                          "FROM
pg_catalog.pg_publication p\n"
                                                          "     JOIN
pg_catalog.pg_publication_rel pr ON p.oid = pr.prpubid\n"
                                                          "     JOIN
pg_catalog.pg_class c ON c.oid = pr.prrelid\n"
-                                                         "WHERE
pr.prrelid = '%s'\n",
+                                                         "WHERE
pr.prrelid = '%s'\n"
+                                                         "  AND NOT EXISTS (\n"
+                                                         "     SELECT 1\n"
+                                                         "     FROM
pg_catalog.pg_publication_namespace pn\n"
+                                                         "     WHERE
pn.pnpubid = p.oid\n"
+                                                         "       AND
pn.pnnspid = c.relnamespace)\n",
                                                          oid, oid, oid);

Regards,
Vignesh






view thread (20+ 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], [email protected]
  Subject: Re: PSQL - prevent describe listing tables that are already in listed schemas
  In-Reply-To: <CALDaNm3Cf9vYAFa3XYHMjJSaaXaZygKxgc7bahMrC2JBvA7pKg@mail.gmail.com>

* 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