On Wed, Jan 17, 2018 at 9:39 AM, Graham Leggett <minfrin@sharp.fm> wrote:
Would it be true to say that if this query returned more than zero rows the database is not empty?
db=# select distinct s.nspname from pg_class c join pg_namespace s on s.oid = c.relnamespace where s.nspname not in ('pg_toast','information_schema','pg_catalog');
nspname
---------
public
(1 row)
Depends on how you want to define empty. You indicated "after createdb" and createdb creates the public schema.