I need to find all view based on table my_table. I try query
select *
from information_schema.views
where view_definition ilike '%my_table%'
and get empty table. That means I have no view based on my_table. But after trying to delete my_table I get an error "cannot drop table my_table because other objects depend on it". I look more carefully with
select *
from information_schema.views
where table_name = 'my_view'
and find row with view based on my table with NULL in view_definition.
Why definition can be NULL? Is there any another way to find view depends on table?