Query goal: | Make sure that you do not drop INFORMATION_SCHEMA schema. In this case most of the design checking queries will not work. This schema automatically exists in all databases. |
Query type: | Problem detection (Each row in the result could represent a flaw in the design) |
Query reliability: | High (Few or no false-positive results) |
Query license: | MIT License |
Fixing suggestion: | Make the dump of the database, create a new database, and restore your database objects and data based on the dump in the new database. |
Data source: | INFORMATION_SCHEMA+system catalog |
SQL query: | Click on query to copy it
SELECT 'INFORMATION_SCHEMA has been deleted' AS comment
WHERE NOT EXISTS (SELECT *
FROM pg_namespace AS n INNER JOIN pg_authid AS a ON n.nspowner=a.oid
WHERE (n.nspname='information_schema' AND a.rolname='postgres')); |