Re: How to keep format of views source code as entered? - Mailing list pgsql-general

From David G. Johnston
Subject Re: How to keep format of views source code as entered?
Date
Msg-id CAKFQuwZHb7GG913B2Yjvqo2LWyi=bBEcWUvih12-zrJT4YLRyQ@mail.gmail.com
Whole thread Raw
In response to Re: How to keep format of views source code as entered?  (raf <raf@raf.org>)
Responses Re: How to keep format of views source code as entered?  (raf <raf@raf.org>)
List pgsql-general
On Saturday, January 9, 2021, raf <raf@raf.org> wrote:

Actually, I just had a look at the pg_views system
catalog where the source code for views is stored, and
it doesn't seem to contain enough information to
reconstruct a create view statement. It only contains
these columns:

  schemaname
  viewname
  viewowner
  definition

But definition is just the query itself.

There is no list of column names (like there is with
procedures in pg_proc).

Is all of that information stored somewhere else in the
system catalogs?

Views are relation-like and thus are primarily recorded on pg_class.

David J.
 

pgsql-general by date:

Previous
From: raf
Date:
Subject: Re: How to keep format of views source code as entered?
Next
From: raf
Date:
Subject: Re: How to keep format of views source code as entered?