How to get the OID of a view - Mailing list pgsql-general

From stan
Subject How to get the OID of a view
Date
Msg-id 20200522161534.GA29059@panix.com
Whole thread Raw
Responses Re: How to get the OID of a view  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: How to get the OID of a view  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: How to get the OID of a view  (Charles Clavadetscher <clavadetscher@swisspug.org>)
Re: How to get the OID of a view  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
I am trying to write a query to return the names, and data types of all the
columns in a view. It has been pointed out to me that the best approach
would be using pg_catalog. OK, so I found pg_view, which I can get the names
of a the views from and pg_attribute which can give me the column names,
but it looks like i need to join this on OID, and pg_table does not have
that data.


-- 
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
                        -- Benjamin Franklin



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: pg_dump crashes
Next
From: Tom Lane
Date:
Subject: Re: How to get the OID of a view