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

From veem v
Subject Re: Getting specific partition from the partition name
Date
Msg-id CAB+=1TWjmD+af_+5MmBL1=VZE3Sw0KHD1kGbtZMNhtzfBe-T+Q@mail.gmail.com
Whole thread Raw
In response to Re: Getting specific partition from the partition name  (Greg Sabino Mullane <htamfids@gmail.com>)
List pgsql-general
This helps. Thank you very much.

On Fri, 9 Aug 2024 at 02:15, Greg Sabino Mullane <htamfids@gmail.com> wrote:
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: Lok P
Date:
Subject: Re: Column type modification in big tables
Next
From: Dominique Devienne
Date:
Subject: Re: Building v17 Beta2 on Windows