ALTER composite type does not work, but ALTER TABLE which ROWTYPE is used as a type - works fine - Mailing list pgsql-hackers

From Dmitry Koterov
Subject ALTER composite type does not work, but ALTER TABLE which ROWTYPE is used as a type - works fine
Date
Msg-id d7df81620812040653l45d61499g4c8f45475afe4e68@mail.gmail.com
Whole thread Raw
Responses Re: ALTER composite type does not work, but ALTER TABLE which ROWTYPE is used as a type - works fine  ("Merlin Moncure" <mmoncure@gmail.com>)
List pgsql-hackers
Hello.<br /><br />I can successfully ALTER a NON-EMPTY table (ct) which ROWTYPE is used as a column type for another
table(dt):<br /><br />CREATE TABLE ct (id INTEGER);<br />CREATE TABLE dt (id INTEGER, c ct);<br /><br />INSERT INTO dt
VALUES(1,'(666)');<br /> SELECT * FROM dt;<br />-- (1, '(666)')<br /><br />ALTER TABLE ct ADD COLUMN n INTEGER;<br
/>SELECT* FROM dt;<br /> -- (1, '(666,)')<br /><br />You see, '(666,)' means that the new field is added
successfully.<br/><br /><br />But, if I declare ct as a COMPOSITE type (not a table), it is not permitted to ALTER this
type(Postgres says that there are dependensies on ct).<br /> Why?<br /> 

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: snapshot leak and core dump with serializable transactions
Next
From: Devrim GÜNDÜZ
Date:
Subject: Can't start postmaster on -HEAD