Listing views - Mailing list pgsql-general

From Olivier Guilyardi
Subject Listing views
Date
Msg-id 41182180.6090800@xung.org
Whole thread Raw
Responses Re: Listing views
Re: Listing views
List pgsql-general
Hi,

I'm trying to list views, eliminating internal ones from the output.
Using 7.2, I found this simple statement :
   SELECT viewname FROM pg_views WHERE viewname !~ '^pg_';

It works fine, ignoring 23 pg_* tables. And I get my actual views returned.

But, with 7.4, I get many (about 30) more system views, as table_constraints,
table_privileges, tables, etc... And these do not have any 'pg' prefix.

Do you know of some query that would properly list views, wether it's running
on Postgresql 7.4 or 7.2 and lower ?
--
    og

pgsql-general by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: PostgreSQL 8.0.0 Officially Goes Beta
Next
From: lec
Date:
Subject: Re: Losing records when server hang