卸除延伸模組
適用於: 適用於 PostgreSQL 的 Azure 資料庫 - 彈性伺服器
在卸除 適用於 PostgreSQL 的 Azure 資料庫 彈性伺服器中的擴充功能之前,您必須允許將其列出。
卸除延伸模組的步驟
Allowlist 擴充功能。
卸除擴充功能的用戶必須是角色的成員
azure_pg_admin
。執行DROP EXTENSION 命令以卸除或卸載特定擴充功能。 此命令會從您的資料庫卸載封裝在延伸模組中的物件。
DROP EXTENSION <extension>;
某些延伸模組可能會散發其他擴充功能所需的物件。 例如,
vector
pg_diskann
擴充功能相依於擴充功能的情況。 若要卸除這類擴充功能,您可以透過兩種方式繼續進行:-
Allowlist 並
DROP EXTENSION
針對所有相依於您嘗試卸除的延伸模塊執行。 然後,allowlist,並在其他延伸模組相依的擴充功能上執行DROP EXTENSION
。
DROP EXTENSION <dependent_extension>; DROP EXTENSION <depending_extension>;
-
Allowlist 和 run
DROP EXTENSION
on the extension that you want drop, that other extensions depend on, but addCASCADE
the clause, so it automatically drops all extensions that it depends.
DROP EXTENSION <depending_extension> CASCADE;
-
Allowlist 並