Re: RENAME RULE doesn't work with partitioned tables

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RENAME RULE doesn't work with partitioned tables
Date: 2017-04-12 01:17:52
Message-ID: 0c498511-a412-61ed-e5f3-abd0035f7bb0@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2017/04/12 2:20, Robert Haas wrote:
> On Tue, Apr 11, 2017 at 5:54 AM, Amit Langote
> <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>> Just noticed that RangeVarCallbackForRenameRule() was not updated to
>> handle partitioned tables, causing the following bug:
>>
>> create table parted_table (a int) partition by list (a);
>> create table part partition of parted_table for values in (1);
>> create rule parted_table_insert as on insert to parted_table
>> do instead insert into part values (new.*);
>> alter rule parted_table_insert on parted_table
>> rename to parted_table_insert_redirect;
>> -- ERROR: "parted_table" is not a table or view
>>
>> Attached fixes this and adds a test. Added to open items list.
>
> Committed.

Thanks.

Regards,
Amit

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2017-04-12 01:25:32 Re: Some thoughts about SCRAM implementation
Previous Message Amit Langote 2017-04-12 01:13:16 Re: dropping a partition may cause deadlock