Re: How to keep format of views source code as entered?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: raf <raf(at)raf(dot)org>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: How to keep format of views source code as entered?
Date: 2021-01-10 00:26:04
Message-ID: CAKFQuwZHb7GG913B2Yjvqo2LWyi=bBEcWUvih12-zrJT4YLRyQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Saturday, January 9, 2021, raf <raf(at)raf(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message raf 2021-01-10 12:57:50 Re: How to keep format of views source code as entered?
Previous Message raf 2021-01-10 00:11:15 Re: How to keep format of views source code as entered?