Re: Partition with check constraint with "like"

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: Partition with check constraint with "like"
Дата
Msg-id CAHOFxGo9Ep2aP5Mtye64NAZjYxyk0ugj0-Ohs_sFz6got+rZOg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Partition with check constraint with "like"  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-performance
On Thu, May 20, 2021, 8:38 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
On Fri, May 21, 2021 at 02:36:14AM +0000, Nagaraj Raj wrote:
>  Thank you. This is a great help. 
> But "a" have some records with alpha and numeric. 

So then you should make one or more partitions FROM ('1')TO('9').

What about 0? Sorry.

Seriously though, this seems like a dumb question but if I wanted a partition for each numeric digit and each alpha character (upper and lowercase?) And wanted to avoid using a default partition, how would I use minvalue and maxvalue and determine which partition of
A to B
B to C
...
a to b
b to c
...
0 to 1
Etc... And how to figure out the gaps between 9 and A or z and A or what?

I hope the nature of my question makes sense. What is the ordering of the characters as far as partitioning goes? Or rather, how would I figure that out?

В списке pgsql-performance по дате отправления:

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: Partition with check constraint with "like"
Следующее
От: Nagaraj Raj
Дата:
Сообщение: Re: Partition with check constraint with "like"