From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Bug of ALTER TABLE DROP CONSTRAINT |
Date: | 2009-04-07 14:45:13 |
Message-ID: | 200904071445.n37EjD015354@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Nikhil Sontakke wrote:
> Hi,
>
>
> > We've discussed before the idea that NOT NULL constraints should be
> > explicitly represented in pg_constraint, just like general CHECK
> > constraints (this would allow them to be named, have sane inheritance
> > behavior, etc). If we had that, then pg_attribute.attnotnull could
> > indicate the OR of "there is a NOT NULL on this column" and "there is
> > a pkey constraint on this column", and you'd just have to recompute it
> > properly after dropping either kind of constraint.
> >
> > Not happening for 8.4, but maybe someday someone will get around to it.
> >
>
> Warrants an entry in the TODO items list:
>
> * make NOT NULL constraints have pg_constraint entries, just like CHECK
> constraints
This is now a TODO item (I just updated the description):
Store the constraint names of NOT NULL constraints
Currently NOT NULL constraints are stored in pg_attribute without
any designation of their origins, e.g. primary keys. One manifest
problem is that dropping a PRIMARY KEY constraint does not remove the
NOT NULL constraint designation.
* http://archives.postgresql.org/message-id/19768.1238680878@sss.pgh.pa.us
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-04-07 14:53:39 | Re: Bug of ALTER TABLE DROP CONSTRAINT |
Previous Message | Tom Lane | 2009-04-07 14:39:54 | Re: Path separator |