pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Joseph Krogh <andreas@visena.com>
To: Markhof, Ingolf <ingolf.markhof@de.verizon.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: raf <raf@raf.org>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: RE: How to keep format of views source code as entered?
Date: Fri, 8 Jan 2021 09:43:37 +0100 (CET)
Message-ID: <VisenaEmail.7c.98aa87a78524e919.176e127b1ed@tc7-visena> (raw)
In-Reply-To: <eb20f1477a0f442cb58678530b0e31fa@MS-FRA-E13EX02.intl.ad.vzwcorp.com>
References: <eb20f1477a0f442cb58678530b0e31fa@MS-FRA-E13EX02.intl.ad.vzwcorp.com>


På fredag 08. januar 2021 kl. 09:38:29, skrev Markhof, Ingolf <
ingolf.markhof@de.verizon.com <mailto:ingolf.markhof@de.verizon.com>>: 




Thanks for your comments and thoughts.



I am really surprised that PostgreSQL is unable to keep the source text of a 
view. Honestly, for me the looks like an implementation gap. Consider software 
development. You are writing code in C++ maybe on a UNIX host. And whenever you 
feed you source code into the compiler, it will delete it, keeping the 
resulting executable, only. And you could not even store your source code on 
the UNIX system. Instead, you'd be forced to do so in a separate system, like 
GitHub. Stupid, isn't it? Right. There are good reasons to store the source 
code on GitHub or alike anyhow. Especially when working on larger project and 
when collaborating with many people. But in case of rather small project with a 
few people only, this might be an overkill.



It shouldn't be rocket science to enable PostgreSQL to store the original 
source code as well. It's weird PostgreSQL is not doing it.

It isn't rocket-science, of couse, but I'm pretty sure it is implemented like 
this on purpose. PG doesn't store queries you feed it either, nor any other
command. It stores the resulting structure. SQL-scripts, containing DDL/DML 
should be versioned using scm like Git, not rely on the DB to store it. 




-- 
Andreas Joseph Krogh 

view thread (31+ messages)  latest in thread

Message-ID: <VisenaEmail.7c.98aa87a78524e919.176e127b1ed@tc7-visena>
Permalink:  ../VisenaEmail.7c.98aa87a78524e919.176e127b1ed@tc7-visena/
Also on:    postgresql.org/message-id/VisenaEmail.7c.98aa87a78524e919.176e127b1ed@tc7-visena

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: andreas@visena.com, ingolf.markhof@de.verizon.com, david.g.johnston@gmail.com, raf@raf.org
  Subject: Re: How to keep format of views source code as entered?
  In-Reply-To: <VisenaEmail.7c.98aa87a78524e919.176e127b1ed@tc7-visena>
  References: <eb20f1477a0f442cb58678530b0e31fa@MS-FRA-E13EX02.intl.ad.vzwcorp.com> <VisenaEmail.7c.98aa87a78524e919.176e127b1ed@tc7-visena>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox