Search Postgresql Archives

Re: Getting specific partition from the partition name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This helps. Thank you very much.

On Fri, 9 Aug 2024 at 02:15, Greg Sabino Mullane <htamfids@xxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux