Re: [HACKERS] UPDATE of partition key

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] UPDATE of partition key
Дата
Msg-id CA+TgmoauhXEgZCKALU_V6DCRtDEpw5xY38xTtd+DMeO2mySyDA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] UPDATE of partition key  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Thu, May 11, 2017 at 7:54 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> Few comments:
> 1.
> Operating directly on partition doesn't allow update to move row.
> Refer below example:
> create table t1(c1 int) partition by range(c1);
> create table t1_part_1 partition of t1 for values from (1) to (100);
> create table t1_part_2 partition of t1 for values from (100) to (200);
> insert into t1 values(generate_series(1,11));
> insert into t1 values(generate_series(110,120));
>
> postgres=# update t1_part_1 set c1=122 where c1=11;
> ERROR:  new row for relation "t1_part_1" violates partition constraint
> DETAIL:  Failing row contains (122).

I think that's correct behavior.

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



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] UPDATE of partition key
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [HACKERS] feature wish: filter log_min_duration_statementaccording to the context (parse|bind|execute|...)