From: | Stephen Froehlich <s(dot)froehlich(at)cablelabs(dot)com> |
---|---|
To: | Stephen Froehlich <s(dot)froehlich(at)cablelabs(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Old solutions for listing tables by tablespace broken in PG 10 for partitions. |
Date: | 2017-11-04 18:41:49 |
Message-ID: | CY1PR0601MB192701202D53A9DABA0121A8E5520@CY1PR0601MB1927.namprd06.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Found it:
SELECT tablename from pg_tables WHERE tablespace = 'foo';
--Stephen
From: pgsql-novice-owner(at)postgresql(dot)org [mailto:pgsql-novice-owner(at)postgresql(dot)org] On Behalf Of Stephen Froehlich
Sent: Saturday, November 04, 2017 12:35 PM
To: pgsql-novice(at)postgresql(dot)org
Subject: [NOVICE] Old solutions for listing tables by tablespace broken in PG 10 for partitions.
This sender failed our fraud detection checks and may not be who they appear to be. Learn about spoofing<http://aka.ms/LearnAboutSpoofing>
Feedback<http://aka.ms/SafetyTipsFeedback>
CableLabs WARNING: The sender of this email could not be validated and may not match the person in the "From" field.
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(r)
s(dot)froehlich(at)cablelabs(dot)com<mailto:s(dot)froehlich(at)cablelabs(dot)com>
Tel: +1 (303) 661-3708
From | Date | Subject | |
---|---|---|---|
Next Message | Garry Chen | 2017-11-07 19:42:41 | Using set role inside a function question |
Previous Message | Stephen Froehlich | 2017-11-04 18:35:20 | Old solutions for listing tables by tablespace broken in PG 10 for partitions. |