Re: Empty Range Bound Specified for Partition

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: Empty Range Bound Specified for Partition
Дата
Msg-id 1E90D2FB-9C3A-4741-8997-A65E77067B34@gmail.com
обсуждение исходный текст
Ответ на Empty Range Bound Specified for Partition  (ramsiddu007 <ramsiddu007@gmail.com>)
Ответы Re: Empty Range Bound Specified for Partition  (ramsiddu007 <ramsiddu007@gmail.com>)
Список pgsql-general
> On 22 Nov 2018, at 7:21, ramsiddu007 <ramsiddu007@gmail.com> wrote:
>
> pgsql>  create table test_upto_100 partition of test_parent_partition
>              for values from ('51') to ('100');
>
>                It was showing error like this..
>
> ERROR:  empty range bound specified for partition "test_upto_100"
> DETAIL:  Specified lower bound ('51') is greater than or equal to upper bound ('100').
> SQL state: 42P17
>
>
>                 I am not getting, please give me cause of this and solution.

Alphabetically, '1' comes before '5', so '100' comes before '51'.
Numerically, you would get what you intended, but you're not partitioning on numbers but on strings instead and those
sortalphabetically: '1', '10', '100', '11', '2', '3', '51', etc. 

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.



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

Предыдущее
От: ramsiddu007
Дата:
Сообщение: Empty Range Bound Specified for Partition
Следующее
От: ramsiddu007
Дата:
Сообщение: Re: Empty Range Bound Specified for Partition