Re: Getting specific partition from the partition name - Mailing list pgsql-general

From Greg Sabino Mullane
Subject Re: Getting specific partition from the partition name
Date
Msg-id CAKAnmmLRnzV2C6XBzu64Let3jtABh1P2sGbHBcfAfKpT22ufVQ@mail.gmail.com
Whole thread Raw
In response to Getting specific partition from the partition name  (veem v <veema0000@gmail.com>)
Responses Re: Getting specific partition from the partition name
Re: Getting specific partition from the partition name
List pgsql-general
YYYY_MM_DD is already setup for sorting, so just do:

SELECT table_name FROM information_schema.tables WHERE table_name ~ 'table_part_p' ORDER BY 1 DESC;

If you need to grab the numbers:

SELECT substring('table_part_p2022_03_04' from '([\d_]+)$');

Cheers,
Greg

pgsql-general by date:

Previous
From: Greg Sabino Mullane
Date:
Subject: Re: Column type modification in big tables
Next
From: David Rowley
Date:
Subject: Re: Vacuum full connection exhaustion