How to remove Postgres extension
Asked Answered
A

2

39

I enabled extension pg_stat_statements for PostgreSQL

create EXTENSION pg_stat_statements;

How can I stop using extension pg_stat_statements in PostgreSQL 9.x?

Even original documentation does not contain any examples.

Avigdor answered 11/2, 2015 at 13:48 Comment(0)
A
62
DROP EXTENSION pg_stat_statements;
Avigdor answered 11/2, 2015 at 13:48 Comment(1)
What if the extension is something you install with yum or apt-get and add to shared_preload_libraries such as pg_cron? Is removing it with package manager and deleting it form shared_preload_libraries needed?Lamellirostral
C
13
DROP EXTENSION IF EXISTS <extension name>;

CREATE EXTENSION <extension name>;
Cardoso answered 28/7, 2021 at 13:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.