Result (cost=1.49..36.97 rows=1 width=96) One-Time Filter: (current_database() = 'app'::name) -> Nested Loop Left Join (cost=1.49..36.97 rows=1 width=128) -> Hash Join (cost=1.08..35.97 rows=1 width=132) Hash Cond: (c.relnamespace = nc.oid) Join Filter: ((CASE WHEN (nc.oid = pg_my_temp_schema()) THEN 'LOCAL TEMPORARY'::text WHEN (c.relkind = ANY ('{r,p}'::"char"[])) THEN 'BASE TABLE'::text WHEN (c.relkind = 'v'::"char") THEN 'VIEW'::text WHEN (c.relkind = 'f'::"char") THEN 'FOREIGN'::text ELSE NULL::text END)::text = 'BASE TABLE'::text COLLATE "C") -> Seq Scan on pg_class c (cost=0.00..34.50 rows=146 width=73) Filter: ((relname <> 'geometry_columns'::name) AND (relname <> 'spatial_ref_sys'::name) AND (relkind = ANY ('{r,v,f,p}'::"char"[])) AND (pg_has_role(relowner, 'USAGE'::text) OR has_table_privilege(oid, 'SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER'::text) OR has_any_column_privilege(oid, 'SELECT, INSERT, UPDATE, REFERENCES'::text))) -> Hash (cost=1.07..1.07 rows=1 width=68) -> Seq Scan on pg_namespace nc (cost=0.00..1.07 rows=1 width=68) Filter: ((NOT pg_is_other_temp_schema(oid)) AND (nspname !~~ 'pg\_%'::text) AND (nspname <> 'information_schema'::name)) -> Nested Loop (cost=0.41..0.99 rows=1 width=4) -> Index Scan using pg_type_oid_index on pg_type t (cost=0.28..0.81 rows=1 width=8) Index Cond: (oid = c.reloftype) -> Index Only Scan using pg_namespace_oid_index on pg_namespace nt (cost=0.13..0.16 rows=1 width=4) Index Cond: (oid = t.typnamespace)