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.96) (envelope-from ) id 1wPDrb-000YkU-20 for pgsql-hackers@arkaria.postgresql.org; Tue, 19 May 2026 06:23:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wPDrZ-003vXD-1v for pgsql-hackers@arkaria.postgresql.org; Tue, 19 May 2026 06:23:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wPDrZ-003vX5-0n for pgsql-hackers@lists.postgresql.org; Tue, 19 May 2026 06:23:34 +0000 Received: from udcm-wwu2.uni-muenster.de ([128.176.118.28]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wPDrW-00000000Hmm-2WTy for pgsql-hackers@lists.postgresql.org; Tue, 19 May 2026 06:23:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uni-muenster.de; i=@uni-muenster.de; q=dns/txt; s=uniout; t=1779171812; x=1810707812; h=message-id:date:mime-version:subject:to:references:from: in-reply-to:content-transfer-encoding; bh=pOU8TY0KP8M0dl9qX5rg8CaUc+wDEU/QZr49D66+cTM=; b=AMOpT/yjglRmp1ylWvJDUfw0EzBpDsQAydtNSDyesiWjY7BK4BE/Z0I7 +VvIXfd0TgSv1CXipJCUGp70f8I924awWZfotHVQPHT3QcBHyjCnm8JGm H+0y+AX7TiE471b1Ktl8TfkffOH4gXm/piGfrqAruOTVa+BvrsYpQ8MB4 3OUnOS5AdbzZNLVu6Oq8YxhqAdhRGSDen4tWewTMWyyyQeVvd3XoX3bMX aorZodo2UAhDSihyDXcuLZGSwMq1/FwrIr6BkwQNbZYENrzhh1WRQMFdp /mVN+yimcttPUhAgqB46O691MhgVY52t7mCmjMAMfJ1woScmMUJfHSh7r Q==; X-CSE-ConnectionGUID: UM2NFRBJTDimxBMAcUYQsg== X-CSE-MsgGUID: c9PJoVVZRR6E7PuQ29Xiaw== X-IronPort-AV: E=Sophos;i="6.23,243,1770591600"; d="scan'208";a="394556479" Received: from secmail.uni-muenster.de ([128.176.118.4]) by UDCM-RELAY2.UNI-MUENSTER.DE with ESMTP; 19 May 2026 08:23:28 +0200 Received: from [192.168.178.49] (dynamic-080-171-252-034.80.171.pool.telefonica.de [80.171.252.34]) by SECMAIL.UNI-MUENSTER.DE (Postfix) with ESMTPSA id 5FCE820ADF00; Tue, 19 May 2026 08:23:27 +0200 (CEST) Message-ID: <5420ddcb-7b55-4a73-b8c5-3602abfac78b@uni-muenster.de> Date: Tue, 19 May 2026 08:23:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: PSQL - prevent describe listing tables that are already in listed schemas To: Peter Smith , PostgreSQL Hackers References: Content-Language: de-DE, en-GB From: Jim Jones In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Peter On 18/05/2026 05:20, Peter Smith wrote: > Here are a couple more reasons why I think this patch is helpful: > > 1. If the specified table had a row filter, then it is confusing to > display that row filter under "Tables:" when at the same time the DOCS > [2] says "The row filter on a table becomes redundant if FOR TABLES IN > SCHEMA is specified and the table belongs to the referred schema." > > 2. The output will become still more confusing after the FOR TABLES IN > SCHEMA EXCEPT gets implemented [1]. Because it is not obvious, you > need to read this a couple of times to be sure what is in and out. > e.g. Output with the EXCEPT patch applied: > Tables: > "myschema2.t2" > Tables from schemas: > "myschema2" > Except tables: > "myschema2.t1" > > ~~~ > > PSA patch v1. Thoughts? +1 I agree that the proposed paatch makes it easier to read the listed tables and better aligns with the docs. CREATE SCHEMA s; CREATE TABLE public.t1(c int); CREATE TABLE s.t2(c int); CREATE TABLE s.t3(c int); CREATE TABLE s.t4(c int); CREATE PUBLICATION pub1 FOR TABLES IN SCHEMA s, TABLE s.t3, s.t4, s.t2 WHERE (c > 42), public.t1; With this patch I get: postgres=# \dRp+ pub1 Publication pub1 Owner | All tables | All sequences | Inserts | Updates | Deletes | Truncates | Generated columns | Via root | Description -------+------------+---------------+---------+---------+---------+-----------+-------------------+----------+------------- jim | f | f | t | t | t | t | none | f | Tables: "public.t1" Tables from schemas: "s" Without it: postgres=# \dRp+ pub1 Publication pub1 Owner | All tables | All sequences | Inserts | Updates | Deletes | Truncates | Generated columns | Via root | Description -------+------------+---------------+---------+---------+---------+-----------+-------------------+----------+------------- jim | f | f | t | t | t | t | none | f | Tables: "public.t1" "s.t2" WHERE (c > 42) "s.t3" "s.t4" Tables from schemas: "s" One nitpick: you forgot a \n at the end of "WHERE pn.pnpubid = '%s')". Best, Jim