Bug reference: 4271
Logged by: Alexey Bashtanov
Email address: bashtanov@imap.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'
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
No comments:
Post a Comment