"alex" <perepelica.a...@gmail.com> writes:
> 1. create table t (
> );
> 2. alter table t add childs t;
> 3. alter table t add id serial not null primary key;
> server closed the connection unexpectedly

Hmm.  This seems to be fixed in HEAD:

regression=# create table t (
regression(# );
CREATE TABLE
regression=# alter table t add childs t;
ALTER TABLE
regression=#  alter table t add id serial not null primary key;
NOTICE:  ALTER TABLE will create implicit sequence "t_id_seq" for serial column 
"t.id"
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "t_pkey" for 
table "t"
ERROR:  cannot alter table "t" because column "t"."childs" uses its rowtype

Interestingly, 8.2 also says the same --- but 8.3, 8.4, and 9.0 crash.
Looks like we broke the error check somewhere along the way, and whoever
fixed it neglected to back-patch.

                        regards, tom lane

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

Reply via email to