In PostgreSQL on how can one know whether a specific view was created by an extension?
What SQL query must be executed to find out? No manual solutions.
In PostgreSQL on how can one know whether a specific view was created by an extension?
What SQL query must be executed to find out? No manual solutions.
Check if the view shows up in \dx+
output in psql -E
.
This will also show the queries that psql uses to get the result, which will help you construct a query.
Axel Fontaine pays attention to what Laurenz Albe says
with \ dx + output in psql -E. I got the following query (replace pg_stat_statements by your extension ):
SELECT c.relname FROM pg_catalog.pg_depend join pg_class c on (c.oid=pg_depend.objid) WHERE refclassid = 'pg_catalog.pg_extension'::pg_catalog.regclass AND deptype = 'e' AND refobjid = ( SELECT e.oid FROM pg_catalog.pg_extension e WHERE e.extname='pg_stat_statements') and c.relkind='v' ORDER BY 1;
;-)