Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove Postgres extension

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.

like image 851
Sergiy Seletskyy Avatar asked Feb 11 '15 13:02

Sergiy Seletskyy


People also ask

What is PostgreSQL file extension?

Each PSQL database table is a separate file with a default file extension of . mkd.

How do I see PostgreSQL extensions?

Get a list of all the extensions installed on a database by using the \dx command. For example, the output for \dx when run on the Databases for PostgreSQL default database shows the only installed extension.

What is Pg_stat_statements?

The pg_stat_statements module provides a means for tracking planning and execution statistics of all SQL statements executed by a server. The module must be loaded by adding pg_stat_statements to shared_preload_libraries in postgresql. conf , because it requires additional shared memory.


2 Answers

DROP EXTENSION pg_stat_statements; 
like image 79
Sergiy Seletskyy Avatar answered Nov 12 '22 07:11

Sergiy Seletskyy


DROP EXTENSION IF EXISTS <extension name>;  CREATE EXTENSION <extension name>; 
like image 32
Jhonny Ramirez Zeballos Avatar answered Nov 12 '22 06:11

Jhonny Ramirez Zeballos