Re: BUG #5950: backend terminating after altering table - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5950: backend terminating after altering table
Date
Msg-id 4619.1301067022@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5950: backend terminating after altering table  ("alex" <perepelica.alex@gmail.com>)
Responses Re: BUG #5950: backend terminating after altering table  (Sergey Burladyan <eshkinkot@gmail.com>)
List pgsql-bugs
"alex" <perepelica.alex@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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5946: Long exclusive lock taken by vacuum (not full)
Next
From: Alex Lai
Date:
Subject: Re: postgres 9 streaming replication