This should not happen, I guess:
alvh=> CREATE TABLE test_inh (a int);
CREATE TABLE
alvh=> CREATE TABLE test_inh_child (b int) INHERITS (test_inh);
CREATE TABLE
alvh=> ALTER TABLE test_inh_child RENAME a TO c;
ALTER TABLE
alvh=> SELECT * FROM test_inh;
ERROR: Relation "test_inh_child" has no column "a"
alvh=> ALTER TABLE test_inh_child RENAME c TO a;
ALTER TABLE
alvh=> ALTER TABLE test_inh_child DROP COLUMN a;
ALTER TABLE
alvh=> SELECT * FROM test_inh;
ERROR: Relation "test_inh_child" has no column "a"
I remember Tom suggested adding something like attisinherited and
preventing this kind of operations on such attributes, because one can
do things such as
alvh=> ALTER TABLE test_inh_child ADD COLUMN a TEXT;
ALTER TABLE
alvh=> INSERT INTO test_inh_child VALUES (1, 'hello world');
INSERT 33449 1
alvh=> SELECT * FROM test_inh;
server closed the connection unexpectedly This probably means the server terminated abnormally before or
whileprocessing the request.
The connection to the server was lost. Attempting reset: Failed.
!>
--
Alvaro Herrera (<alvherre[a]atentus.com>)
"Entristecido, Wutra
echa a Freyr a rodar
y a nosotros al mar" (cancion de Las Barreras, Heliconia)