Re: Declarative partitioning - another take
От | Amit Langote |
---|---|
Тема | Re: Declarative partitioning - another take |
Дата | |
Msg-id | 2c4bfc61-416c-1b6c-695f-b668527164e0@lab.ntt.co.jp обсуждение исходный текст |
Ответ на | Re: Declarative partitioning - another take (Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>) |
Ответы |
Re: Declarative partitioning - another take
|
Список | pgsql-hackers |
Hi, On 2016/09/07 17:56, Rajkumar Raghuwanshi wrote: > Hi, > > I have a query regarding list partitioning, > > For example if I want to store employee data in a table, with "IT" dept > employee in emp_p1 partition, "HR" dept employee in emp_p2 partition and if > employee belongs to other than these two, should come in emp_p3 partition. > > In this case not sure how to create partition table. Do we have something > like we have UNBOUNDED for range partition or oracle have "DEFAULT" for > list partition. > > create table employee (empid int, dept varchar) partition by list(dept); > create table emp_p1 partition of employee for values in ('IT'); > create table emp_p2 partition of employee for values in ('HR'); > create table emp_p3 partition of employee for values in (??); Sorry, no such feature is currently offered. It might be possible to offer something like a "default" list partition which accepts values other than those specified for other existing partitions. However, that means if we add a non-default list partition after a default one has been created, the implementation must make sure that it moves any values from the default partition that now belong to the newly created partition. Thanks, Amit
В списке pgsql-hackers по дате отправления: