Re: Extensions - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Extensions
Date
Msg-id 1dfd02cf-ca53-22d9-d2fd-98c7bf75e12a@aklaver.com
Whole thread Raw
In response to Extensions  (bhargav kamineni <bhargavpostgres@gmail.com>)
List pgsql-general
On 7/11/19 6:54 AM, bhargav kamineni wrote:
> Hi Team,
> 
> I have a doubt regarding the extensions.My db has these many extensions >          Name
> -------------------
>   adminpack
>   btree_gist
>   dblink
>   file_fdw
>   fuzzystrmatch
>   hstore
>   insert_username
>   intarray
>   pageinspect
>   pg_buffercache
>   pg_freespacemap
>   pg_repack
>   pg_stat_statements
>   pg_trgm
>   pgcrypto
>   plpgsql
>   unaccent
I'm assuming the above came from using \dx in psql.

> 
> 
> How can i figure out what all extensions are being used ? is there any way ?

One quick and dirty way I know is:

test=# begin ;
BEGIN
test=# drop extension plpgsql ;
ERROR:  cannot drop extension plpgsql because other objects depend on it
DETAIL:  function upgrade_serial_to_identity(regclass,name) depends on 
language plpgsql
function fizzbuzz(integer,integer) depends on language plpgsql
function child_fnc() depends on language plpgsql
function child_fnc(character varying) depends on language plpgsql
function parent_fnc() depends on language plpgsql

...

rollback;

> 
> Thanks,
> Bhargav


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: bhargav kamineni
Date:
Subject: Extensions
Next
From: Tony Shelver
Date:
Subject: Re: DRY up GUI wiki pages