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