[NOVICE] Old solutions for listing tables by tablespace broken in PG 10 forpartitions. - Mailing list pgsql-novice

From Stephen Froehlich
Subject [NOVICE] Old solutions for listing tables by tablespace broken in PG 10 forpartitions.
Date
Msg-id CY1PR0601MB1927F785C949E782DF34F477E5520@CY1PR0601MB1927.namprd06.prod.outlook.com
Whole thread Raw
Responses [NOVICE] Re: Old solutions for listing tables by tablespace broken in PG 10for partitions.  (Stephen Froehlich <s.froehlich@cablelabs.com>)
List pgsql-novice

I have tried the solutions for listing tables in a tablespace here:

https://www.postgresql.org/message-id/FA6A2975AD158C4A850EE96CF41AB63B3ED9FA6F%40BL2PRD0103MB041.prod.exchangelabs.com

select relname from pg_class where reltablespace=(select oid from pg_tablespace where spcname='xyz');

 

and here:

https://stackoverflow.com/questions/4970966/how-can-i-tell-what-is-in-a-postgresql-tablespace

SELECT

  c.relname,

  t.spcname

FROM

  pg_class c

    JOIN pg_tablespace t ON c.reltablespace = t.oid

WHERE

  t.spcname = 'indexes_old';

 

I don’t see partitioned tables in the list.  How do I get a list of tables including partitions by tablespace?

 

 

Stephen Froehlich
Sr. Strategist, CableLabs®


s.froehlich@cablelabs.com

Tel: +1 (303) 661-3708

 

pgsql-novice by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: [NOVICE] How to list partitions of a table in PostgreSQL 10
Next
From: Stephen Froehlich
Date:
Subject: [NOVICE] Re: Old solutions for listing tables by tablespace broken in PG 10for partitions.