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

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: "Markhof, Ingolf" <ingolf(dot)markhof(at)de(dot)verizon(dot)com>
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-07 16:22:49
Message-ID: E7F5B527-BBA1-4D13-9891-F7B7F1842CE6@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Jan 7, 2021, at 08:19, Markhof, Ingolf <ingolf(dot)markhof(at)de(dot)verizon(dot)com> wrote:
> I want the SLQ code of my views stored as I entered it. Is there any way to achieve this? Or will I be forced to maintain my views SQL code outside of PostgreSQL views?

The text that you get back from the PostgreSQL system catalogs is based on the parsed version of the view definition, rather than the literal text you entered. Generally, you maintain your view definition separately in a source code control system in its original form.

--
-- Christophe Pettus
xof(at)thebuild(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2021-01-07 16:47:20 Re: How to keep format of views source code as entered?
Previous Message Markhof, Ingolf 2021-01-07 16:19:25 How to keep format of views source code as entered?