Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group