Re: CREATE/DROP OPERATOR CLASS

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: CREATE/DROP OPERATOR CLASS
Дата
Msg-id 1027303244.230.82.camel@jester
обсуждение исходный текст
Ответ на Re: CREATE/DROP OPERATOR CLASS  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Ответы Re: CREATE/DROP OPERATOR CLASS  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Список 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.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: CREATE/DROP OPERATOR CLASS
Следующее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: CREATE/DROP OPERATOR CLASS