Skip to content

Instantly share code, notes, and snippets.

@raspi
Created July 18, 2023 13:43
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 raspi/34f6ea3f41fe0433d28365347e2a969e to your computer and use it in GitHub Desktop.
Save raspi/34f6ea3f41fe0433d28365347e2a969e to your computer and use it in GitHub Desktop.
SELECT
d.datname db
FROM
pg_catalog.pg_database d
WHERE
d.datname NOT LIKE ALL (ARRAY ['template%', 'postgres'])
ORDER BY 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment