[HACKERS] RENAME RULE doesn't work with partitioned tables - Mailing list pgsql-hackers

From Amit Langote
Subject [HACKERS] RENAME RULE doesn't work with partitioned tables
Date
Msg-id 52d9c443-ec78-5c8a-7a77-0f34aad12b82@lab.ntt.co.jp
Whole thread Raw
Responses Re: [HACKERS] RENAME RULE doesn't work with partitioned tables
List pgsql-hackers
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.

Thanks,
Amit

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] [sqlsmith] ERROR: badly formatted node string "RESTRICTINFO...
Next
From: Heikki Linnakangas
Date:
Subject: Re: [HACKERS] Letting the client choose the protocol to use during aSASL exchange