Re: [HACKERS] drop operator class..using .. left dependency behind.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] drop operator class..using .. left dependency behind.
Дата
Msg-id 27704.1497881841@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [HACKERS] drop operator class..using .. left dependency behind.  (Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>)
Список pgsql-hackers
Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com> writes:
> I have observed that even after dropping operator class, not able to drop
> schema containing it. below is a example.

You didn't read the error message closely:

> *postgres=# DROP SCHEMA sch_test;ERROR:  cannot drop schema sch_test
> because other objects depend on itDETAIL:  operator family
> sch_test.custom_opclass_test for access method hash depends on schema
> sch_testHINT:  Use DROP ... CASCADE to drop the dependent objects too.*

The operator class is gone, but the operator family that contained it
still exists.  CREATE OPERATOR CLASS will create a containing family
if you don't specify one, but DROP OPERATOR CLASS won't automatically
remove such a family.  (If it did, it might destroy other operator
classes that had been added to that family later.)

Probably the easiest answer is to use DROP OPERATOR FAMILY instead.
        regards, tom lane



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

Предыдущее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: [HACKERS] Directory pg_replslot is not properly cleaned
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Setting pd_lower in GIN metapage