From: | Rod Taylor <rbt(at)zort(dot)ca> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: CREATE/DROP OPERATOR CLASS |
Date: | 2002-07-22 02:00:39 |
Message-ID: | 1027303244.230.82.camel@jester |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, 2002-07-21 at 21:20, Christopher Kings-Lynne wrote:
> > Now that we have dependencies implemented, it would be a real good idea
> > if operator classes could be included in the web of dependencies.
> > However, the pg_depends code implicitly assumes that it can do a DROP,
> > if demanded, for any entity referenced by a dependency link.
>
> Hmmm...does this mean that there is any situation in which there would be a
> cascade delete of a _column_?
>
> ie. If you drop the domain a column is using with the cascade option, will
> the column get dropped automatically? That doesn't sound like very nice
> behaviour...?
If you drop the domain a column is using, the column has become
completely useless -- and the table broken.
More obvious if you drop a user defined type that a column was using. Or
the functions that the user defined type depended on to import / export
data then there is no method to insert or extract information from that
column -- or more to the point any tuple within that table.
This is what CASCADE does. Ensures the structure is clean much like
foreign keys and constraints help keep data clean.
RESTRICT is there for those who don't fully understand the structure.
Cautiously test the waters to see what else you may be affecting first.
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2002-07-22 02:13:31 | Re: CREATE/DROP OPERATOR CLASS |
Previous Message | Christopher Kings-Lynne | 2002-07-22 01:20:05 | Re: CREATE/DROP OPERATOR CLASS |