Skip to content

Instantly share code, notes, and snippets.

@dianjuar
Created September 17, 2021 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dianjuar/2d3685169e6ed36174765ecd15c0fd63 to your computer and use it in GitHub Desktop.
Save dianjuar/2d3685169e6ed36174765ecd15c0fd63 to your computer and use it in GitHub Desktop.
Check which extension belongs to which schema

Verify what Postgres extension belongs to what schema

SELECT
    e.extname AS "Name",
    e.extversion AS "Version",
    n.nspname AS "Schema",
    c.description AS "Description" 
FROM pg_catalog.pg_extension e 
LEFT JOIN pg_catalog.pg_namespace n 
    ON n.oid = e.extnamespace 
LEFT JOIN pg_catalog.pg_description c 
    ON c.objoid = e.oid 
    AND c.classoid = 'pg_catalog.pg_extension'::pg_catalog.regclass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment