Re: [NOVICE] How to list partitions of a table in PostgreSQL 10 - Mailing list pgsql-novice

From Stephen Froehlich
Subject Re: [NOVICE] How to list partitions of a table in PostgreSQL 10
Date
Msg-id CY1PR0601MB19273A4035E6D24B025ED459E55E0@CY1PR0601MB1927.namprd06.prod.outlook.com
Whole thread Raw
In response to [NOVICE] How to list partitions of a table in PostgreSQL 10  (Stephen Froehlich <s.froehlich@cablelabs.com>)
Responses Re: [NOVICE] How to list partitions of a table in PostgreSQL 10  (Thomas Kellerer <spam_eater@gmx.net>)
Re: [NOVICE] How to list partitions of a table in PostgreSQL 10  (Aleksey Tsalolikhin <atsaloli.tech@gmail.com>)
List pgsql-novice

I have discovered a simple query that will tell me if a table is a registered partition or not, which meets my purposes for now, but a list of partitions of a given table would be better:

 

SELECT 1 FROM pg_class WHERE relname = '[attached_partition_name_here]' AND relpartbound IS NOT NULL;

 

--Stephen

 

From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Stephen Froehlich
Sent: Tuesday, October 31, 2017 1:02 PM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] How to list partitions of a table in PostgreSQL 10

 

This sender failed our fraud detection checks and may not be who they appear to be. Learn about spoofing

Feedback

CableLabs WARNING: The sender of this email could not be validated and may not match the person in the "From" field.

What is the syntax to get a list of the partitions of a table in PostgreSQL 10?

 

Thanks,

Stephen

 

Stephen Froehlich
Sr. Strategist, CableLabs®


s.froehlich@cablelabs.com

Tel: +1 (303) 661-3708

 

pgsql-novice by date:

Previous
From: Stephen Froehlich
Date:
Subject: [NOVICE] How to list partitions of a table in PostgreSQL 10
Next
From: Thomas Kellerer
Date:
Subject: Re: [NOVICE] How to list partitions of a table in PostgreSQL 10