Re: BUG #5950: backend terminating after altering table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "alex" <perepelica(dot)alex(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5950: backend terminating after altering table
Date: 2011-03-25 15:30:22
Message-ID: 4619.1301067022@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"alex" <perepelica(dot)alex(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alex Lai 2011-03-25 15:34:20 Re: postgres 9 streaming replication
Previous Message Jim Woodworth 2011-03-25 15:27:31 checking on bug #5917