Re: [HACKERS] UPDATE of partition key

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: [HACKERS] UPDATE of partition key
Дата
Msg-id 036cf89c-9865-fbcb-dd07-75f55216514b@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: [HACKERS] UPDATE of partition key  (Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>)
Список pgsql-hackers
On 2017/07/25 21:55, Rajkumar Raghuwanshi wrote:
> Got one more observation :  update... returning is not working with whole
> row reference. please take a look.
> 
> postgres=# create table part (a int, b int) partition by range(a);
> CREATE TABLE
> postgres=# create table part_p1 partition of part for values from
> (minvalue) to (0);
> CREATE TABLE
> postgres=# create table part_p2 partition of part for values from (0) to
> (maxvalue);
> CREATE TABLE
> postgres=# insert into part values (10,1);
> INSERT 0 1
> postgres=# insert into part values (20,2);
> INSERT 0 1
> postgres=# update part t1 set a = b returning t1;
> ERROR:  unexpected whole-row reference found in partition key

That looks like a bug which exists in HEAD too.  I posted a patch in a
dedicated thread to address the same [1].

Thanks,
Amit

[1]
https://www.postgresql.org/message-id/9a39df80-871e-6212-0684-f93c83be4097%40lab.ntt.co.jp




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

Предыдущее
От: Amit Langote
Дата:
Сообщение: [HACKERS] map_partition_varattnos() and whole-row vars
Следующее
От: Thomas Munro
Дата:
Сообщение: [HACKERS] Parallel Hash take II