Re: On partitioning

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: On partitioning
Дата
Msg-id CA+Tgmob5EvcVH73p8pCLsjkwvVe1dHEnkjk2K-fG1GJjvhcTvw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: On partitioning  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: On partitioning  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Mon, Dec 8, 2014 at 10:59 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> Yeah and also how would user specify the values, as an example
> assume that table is partitioned on monthly_salary, so partition
> definition would look:
>
> PARTITION BY LIST(monthly_salary)
> (
> PARTITION salary_less_than_thousand VALUES(300, 900),
> PARTITION salary_less_than_two_thousand VALUES (500,1000,1500),
> ...
> )
>
> Now if user wants to define multi-column Partition based on
> monthly_salary and annual_salary, how do we want him to
> specify the values.  Basically how to distinguish which values
> belong to first column key and which one's belong to second
> column key.

I assume you just add some parentheses.

PARTITION BY LIST (colA, colB) (PARTITION VALUES ((valA1, valB1),
(valA2, valB2), (valA3, valB3))

Multi-column list partitioning may or may not be worth implementing,
but the syntax is not a real problem.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: On partitioning
Следующее
От: Robert Haas
Дата:
Сообщение: Re: advance local xmin more aggressively