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

Re: Bug in ALTER COLUMN SET DATA TYPE ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in ALTER COLUMN SET DATA TYPE ?
Date: 2012-11-02 14:41:14
Message-ID: 26992.1351867274@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com> writes:
> I noticed this behavior on master and it seems like a bug to me:

> postgres=# CREATE TABLE test (a float check (a > 10.2));
> CREATE TABLE
> postgres=# CREATE TABLE test_child() INHERITS(test);
> CREATE TABLE
> postgres=# ALTER TABLE test ALTER COLUMN a SET DATA TYPE numeric;
> ERROR:  constraint must be added to child tables too

Interestingly, this works in 8.3 and earlier ... but it fails as
described in all later versions.  So we broke it quite some time back.
It would be good to identify exactly what change broke it.

			regards, tom lane


In response to

Responses

pgsql-hackers by date

Next:From: Dimitri FontaineDate: 2012-11-02 14:50:35
Subject: Re: [9.1] 2 bugs with extensions
Previous:From: John LumbyDate: 2012-11-02 13:59:08
Subject: Re: [PATCH] Prefetch index pages for B-Tree index scans

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