Doubt with [ RANGE partition with TEXT datatype ]
От | Prabhat Sahu |
---|---|
Тема | Doubt with [ RANGE partition with TEXT datatype ] |
Дата | |
Msg-id | CANEvxPotKkU8qCFiG9L7KsGQxJA7gqkvuedjHtqUF1CgoJoszQ@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Doubt with [ RANGE partition with TEXT datatype ]
|
Список | pgsql-hackers |
Hi All,
Please help me out with my doubt in RANGE partition with TEXT datatype:
postgres=# create table tab1 (col1 text) PARTITION BY RANGE (col1);
CREATE TABLE
postgres=# create table p1 (col1 text);
CREATE TABLE
-- Partition with range from '5' to '10' shows error:
postgres=# alter table tab1 attach partition p1 for values from ('5') to ('10');
ERROR: empty range bound specified for partition "p1"
LINE 1: ...r table tab1 attach partition p1 for values from ('5') to ('...
^
DETAIL: Specified lower bound ('5') is greater than or equal to upper bound ('10').
-- Whereas, partition with range from '5' to '9' is working fine as below:
postgres=# alter table tab1 attach partition p1 for values from ('5') to ('9');
ALTER TABLE
If this behavior is expected, Kindly let me know, how to represent the range from '5' to '10' with text datatype column?
Is there any specific restriction for RANGE PARTITION table with TEXT datatype column?
Similar test scenario is working fine with INTEGER datatype.
Please help me out with my doubt in RANGE partition with TEXT datatype:
postgres=# create table tab1 (col1 text) PARTITION BY RANGE (col1);
CREATE TABLE
postgres=# create table p1 (col1 text);
CREATE TABLE
-- Partition with range from '5' to '10' shows error:
postgres=# alter table tab1 attach partition p1 for values from ('5') to ('10');
ERROR: empty range bound specified for partition "p1"
LINE 1: ...r table tab1 attach partition p1 for values from ('5') to ('...
^
DETAIL: Specified lower bound ('5') is greater than or equal to upper bound ('10').
-- Whereas, partition with range from '5' to '9' is working fine as below:
postgres=# alter table tab1 attach partition p1 for values from ('5') to ('9');
ALTER TABLE
If this behavior is expected, Kindly let me know, how to represent the range from '5' to '10' with text datatype column?
Is there any specific restriction for RANGE PARTITION table with TEXT datatype column?
Similar test scenario is working fine with INTEGER datatype.
--
With Regards,
Prabhat Kumar Sahu
EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: