Impossible de récupérer les colonnes pour les vues matérialisées
Le problème vient du faite que les colonnes des vues matérialisées ne sont pas stocké dans information_schema.
Requête alternative:
SELECT a.attname,
pg_catalog.format_type(a.atttypid, a.atttypmod),
a.attnotnull
FROM pg_attribute a
JOIN pg_class t on a.attrelid = t.oid
JOIN pg_namespace s on t.relnamespace = s.oid
WHERE a.attnum > 0
AND NOT a.attisdropped
AND t.relname = 'tableviewmv' --<< replace with the name of the MV
AND s.nspname = 'schema' --<< change to the schema your MV is in
ORDER BY a.attnum;