<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pg_matviews on Postgres Scripts</title><link>https://www.postgresscripts.com/tags/pg_matviews/</link><description>Recent content in Pg_matviews on Postgres Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>PostgresScripts.com</copyright><lastBuildDate>Tue, 07 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.postgresscripts.com/tags/pg_matviews/index.xml" rel="self" type="application/rss+xml"/><item><title>List All Views in a PostgreSQL Database with SQL</title><link>https://www.postgresscripts.com/post/list-postgresql-database-views/</link><pubDate>Tue, 07 Apr 2026 00:00:00 +0000</pubDate><guid>https://www.postgresscripts.com/post/list-postgresql-database-views/</guid><description>
&lt;h2 id="how-to-list-all-views-in-a-postgresql-database"&gt;How to List All Views in a PostgreSQL Database&lt;/h2&gt;
&lt;p&gt;Views are saved SQL queries stored in the database. A production database can accumulate dozens or hundreds of views over time — many created by developers, some by tools, and some that are no longer used. Knowing what views exist, which schema they belong to, and what they actually do is essential for documentation, auditing, and cleanup.&lt;/p&gt;
&lt;p&gt;This SQL script queries &lt;code&gt;information_schema.views&lt;/code&gt; to return every view in the current database, along with its schema and full SQL definition.&lt;/p&gt;</description></item></channel></rss>