1
SELECT row_number() OVER () AS id,
2
d.schema_name,
3
d.table_name
4
FROM (pgmetadata.dataset d
5
LEFT JOIN information_schema.tables t ON (((d.schema_name = (t.table_schema)::text) AND (d.table_name = (t.table_name)::text))))
6
WHERE (t.table_name IS NULL)
7
ORDER BY d.schema_name, d.table_name;