I am trying retrieve all tables and views created by a user using the following query:
SELECT table_name FROM information_schema.tables WHERE table_schema='public'
and table_catalog='testdb' and (table_type='BASE TABLE' OR table_type='VIEW')
and table_name <> 'spatial_ref_sys'
The above query does return all tables and views but in case of a PostGIS database, there are additional views created automatically like the geometry_columns view. I don't want those views to be returned from the query. Even querying information_schema.views returns the same result.
I have a similar problem with tables as well where I'm suppressing the 'spatial_ref_sys' table but I'd like to do this in a more aesthetic way. Any suggestions?