Re: Issues with pg_dump command - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: Issues with pg_dump command
Date
Msg-id 20201118145211.GB13825@momjian.us
Whole thread Raw
In response to RE: Issues with pg_dump command  (Lior Dahan <liord@qmasters.co>)
List pgsql-bugs
On Wed, Nov 18, 2020 at 02:37:50PM +0000, Lior Dahan wrote:
> Is there a way we can tell which tables are under this parent one? Perhaps we can dump them instead.

Well, in psql, \d will show you the children:

    CREATE TABLE parent (x int);
    
    CREATE TABLE child (y int) INHERITS (parent);
    
    \d parent
        Table "public.parent"
     Column |  Type   | Modifiers
    --------+---------+-----------
     x      | integer |
-->    Number of child tables: 1 (Use \d+ to list them.)

    test=> \d+ parent
                            Table "public.parent"
     Column |  Type   | Modifiers | Storage | Stats target | Description
    --------+---------+-----------+---------+--------------+-------------
     x      | integer |           | plain   |              |
-->    Child tables: child

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee




pgsql-bugs by date:

Previous
From: Lior Dahan
Date:
Subject: RE: Issues with pg_dump command
Next
From: "David G. Johnston"
Date:
Subject: Re: Issues with pg_dump command