From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Markhof, Ingolf <ingolf.markhof@de.verizon.com>
To: David G. Johnston <david.g.johnston@gmail.com>
To: 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 08:15:16 -0800
Message-ID: <3347dc64-853f-ea7f-6256-06967248bf05@aklaver.com> (raw)
In-Reply-To: <eb20f1477a0f442cb58678530b0e31fa@MS-FRA-E13EX02.intl.ad.vzwcorp.com>
References: <eb20f1477a0f442cb58678530b0e31fa@MS-FRA-E13EX02.intl.ad.vzwcorp.com>
On 1/8/21 12:38 AM, Markhof, Ingolf wrote:
> 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.
The projects I work on are my own personal ones and I find an
independent version control solution the way to go for the following
reasons:
1) It is easy.
a) mkdir project_src
b) cd project_src
c) git init
Now you are set.
2) Even my simple projects generally have multiple layers.
a) Database
b) Middleware
c) UI
And also multiple languages. It makes sense to me to keep all
that information in one repo then having each layer operate independently.
3) It allows me to work on test and production code without stepping on
each other.
4) It serves as an aid to memory. Answers the question; What was I
thinking when I did that? More important it helps anyone else that might
have to deal with the code.
FYI, the program I use to manage database changes is
Sqitch(https://sqitch.org/).
>
> 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.
>
> Regards,
>
> Ingolf
>
>
> *Verizon Deutschland GmbH* - Sebrathweg 20, 44149 Dortmund, Germany -
> Amtsgericht Dortmund, HRB 14952 - Geschäftsführer: Detlef Eppig -
> Vorsitzender des Aufsichtsrats: Francesco de Maio
>
--
Adrian Klaver
adrian.klaver@aklaver.com
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: adrian.klaver@aklaver.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: <3347dc64-853f-ea7f-6256-06967248bf05@aklaver.com>
References: <eb20f1477a0f442cb58678530b0e31fa@MS-FRA-E13EX02.intl.ad.vzwcorp.com> <3347dc64-853f-ea7f-6256-06967248bf05@aklaver.com>
* 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