Re: Getting specific partition from the partition name

From: veem v <veema0000(at)gmail(dot)com>
To: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Getting specific partition from the partition name
Date: 2024-08-09 11:23:09
Message-ID: CAB+=1TWjmD+af_+5MmBL1=VZE3Sw0KHD1kGbtZMNhtzfBe-T+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

This helps. Thank you very much.

On Fri, 9 Aug 2024 at 02:15, Greg Sabino Mullane <htamfids(at)gmail(dot)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
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dominique Devienne 2024-08-09 11:40:00 Re: Building v17 Beta2 on Windows
Previous Message Lok P 2024-08-09 10:39:03 Re: Column type modification in big tables