public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ron Johnson <[email protected]>
To: pgsql-general <[email protected]>
Subject: Re: Getting specific partition from the partition name
Date: Fri, 9 Aug 2024 00:20:04 -0400
Message-ID: <CANzqJaCs9ZBQvHsu3AhpdoQpry7qTg8KU2JNE-XyFZfO3cq3tg@mail.gmail.com> (raw)
In-Reply-To: <CAKAnmmLRnzV2C6XBzu64Let3jtABh1P2sGbHBcfAfKpT22ufVQ@mail.gmail.com>
References: <CAB+=1TUgzD7CfGbgiBAgcuttN06X11787WvJSeCPs=ek5qCgxw@mail.gmail.com>
<CAKAnmmLRnzV2C6XBzu64Let3jtABh1P2sGbHBcfAfKpT22ufVQ@mail.gmail.com>
On Thu, Aug 8, 2024 at 4:46 PM Greg Sabino Mullane <[email protected]>
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_]+)$');
>
What if the partitions aren't all rationally named? There *must* be a pg_*
table out there which contains the partition boundaries...
--
Death to America, and butter sauce.
Iraq lobster!
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Getting specific partition from the partition name
In-Reply-To: <CANzqJaCs9ZBQvHsu3AhpdoQpry7qTg8KU2JNE-XyFZfO3cq3tg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox