BUG #4271: dropped columns conflict with returning rules

From: "Alexey Bashtanov" <bashtanov(at)imap(dot)cc>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4271: dropped columns conflict with returning rules
Date: 2008-06-29 02:07:50
Message-ID: 200806290207.m5T27oxi034909@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 4271
Logged by: Alexey Bashtanov
Email address: bashtanov(at)imap(dot)cc
PostgreSQL version: 8.3.1
Operating system: linux
Description: dropped columns conflict with returning rules
Details:

I have created a partitioned table cache with partitions cache_id_g_4184088
and cache_id_le_4184088 those inherit cache.
I provided insert by the following rule:
CREATE RULE cache_partic AS ON INSERT TO cache DO INSTEAD INSERT INTO
cache_id_g_4184088 VALUES (new.*) RETURNING cache_id_g_4184088.*;

after I ran
ALTER TABLE cache add column foo
ALTER TABLE cache add column bar
ALTER TABLE cache drop column bar
ALTER TABLE cache add column quackquack

this rule started to work incorrectly: it did not store foo and quackquack
values but used nulls instead.

When I tried to ReCREATE this rule, POSTGRESQL said 'ERROR: cannot convert
relation containing dropped columns to view'

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message y.y.chen 2008-06-29 02:21:00 BUG #4272: No password can CREATE & DROP database!!
Previous Message Dave Page 2008-06-28 13:21:18 Re: BUG #4267: initdb fails