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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers