I find a bug (IMHO)

Started by ddabout 22 years ago4 messagesbugs
Jump to latest
#1dd
rigalkin@luch.podolsk.ru

Sorry for my bad English.
The report in the attach

Attachments:

bug.templatetext/plain; name=bug.templateDownload
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: dd (#1)
Re: I find a bug (IMHO)

Danger Dancer <rigalkin@luch.podolsk.ru> writes:

#little example
create table a (d int check (d<5));
create table b () inherits (a);
alter table b drop constraint "a_d";

I think the bug is that it allowed you to do this. You should not be
able to drop an inherited constraint, any more than you can drop an
inherited column.

regards, tom lane

#3ezra epstein
ee_newsgroup_post@prajnait.com
In reply to: dd (#1)
Re: I find a bug (IMHO)

This *might* be a case where you want to define table B using the LIKE
clause, rather than inheritance. Then you could modify table B as you
please: dropping constraints or columns, etc.

== Ezra Epstein

#4Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
Re: I find a bug (IMHO)

Tom Lane wrote:

Danger Dancer <rigalkin@luch.podolsk.ru> writes:

#little example
create table a (d int check (d<5));
create table b () inherits (a);
alter table b drop constraint "a_d";

I think the bug is that it allowed you to do this. You should not be
able to drop an inherited constraint, any more than you can drop an
inherited column.

Added to TODO:

o Disallow dropping of an inherited constraint

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073