Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kxnN4-0006W0-Rh for pgsql-general@arkaria.postgresql.org; Fri, 08 Jan 2021 08:43:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kxnN3-0000up-ME for pgsql-general@arkaria.postgresql.org; Fri, 08 Jan 2021 08:43:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kxnN3-0000uc-Bb for pgsql-general@lists.postgresql.org; Fri, 08 Jan 2021 08:43:45 +0000 Received: from post.visena.com ([46.226.10.50]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.92) (envelope-from ) id 1kxnN0-0002ta-J4 for pgsql-general@lists.postgresql.org; Fri, 08 Jan 2021 08:43:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=visena.com; s=20141101.wh; h=Content-Type:MIME-Version:Subject:References:In-Reply-To:Message-ID:Cc:To:From:Date; bh=Hc39DAnmKgfmR/u86kj9TaURaBzVwMVkosas5XPMI7U=; b=QBhweOCFjgXqkh9KmLATTdK8SQrnxzUTVK0Qm63I3cSGDPH/VIYP+YmID+AMNqVj8eePp4yzrp8J6qgTSPb0FCr53BflT1bnqMwg5pD+E8+nAIWzooYq00Qdq8kFzcFEGhM9Yqg3u8p7z0vi1Iv0NHVZjm5dVF+gwByoieC0o0E=; Received: from tc7-visena.wh.internal.visena.com ([10.0.1.10]) by post.visena.com with esmtp (Exim 4.82) (envelope-from ) id 1kxnMv-0006Pn-F8; Fri, 08 Jan 2021 09:43:37 +0100 Received: from localhost ([127.0.0.1] helo=tc7-visena.wh.internal.visena.com) by tc7-visena.wh.internal.visena.com with esmtp (Exim 4.90_1) (envelope-from ) id 1kxnMv-00047P-DA; Fri, 08 Jan 2021 09:43:37 +0100 Date: Fri, 8 Jan 2021 09:43:37 +0100 (CET) From: Andreas Joseph Krogh To: "Markhof, Ingolf" Cc: "David G. Johnston" , raf , "pgsql-generallists.postgresql.org" Message-ID: In-Reply-To: References: Subject: RE: How to keep format of views source code as entered? MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_608_1750208366.1610095417246" X-Mailer: Visena Mail 2.2.514 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_608_1750208366.1610095417246 Content-Type: multipart/related; boundary="----=_Part_609_288641355.1610095417246" ------=_Part_609_288641355.1610095417246 Content-Type: multipart/alternative; boundary="----=_Part_610_1418671415.1610095417339" ------=_Part_610_1418671415.1610095417339 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable P=C3=A5 fredag 08. januar 2021 kl. 09:38:29, skrev Markhof, Ingolf < ingolf.markhof@de.verizon.com >:=20 Thanks for your comments and thoughts. I am really surprised that PostgreSQL is unable to keep the source text of = a=20 view. Honestly, for me the looks like an implementation gap. Consider softw= are=20 development. You are writing code in C++ maybe on a UNIX host. And whenever= you=20 feed you source code into the compiler, it will delete it, keeping the=20 resulting executable, only. And you could not even store your source code o= n=20 the UNIX system. Instead, you'd be forced to do so in a separate system, li= ke=20 GitHub. Stupid, isn't it? Right. There are good reasons to store the source= =20 code on GitHub or alike anyhow. Especially when working on larger project a= nd=20 when collaborating with many people. But in case of rather small project wi= th a=20 few people only, this might be an overkill. It shouldn't be rocket science to enable PostgreSQL to store the original= =20 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 li= ke=20 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= =20 should be versioned using scm like Git, not rely on the DB to store it.=20 --=20 Andreas Joseph Krogh=20 ------=_Part_610_1418671415.1610095417339 Content-Type: text/html;charset=UTF-8 Content-Transfer-Encoding: quoted-printable
P=C3=A5 fredag 08. januar 2021 kl. 09:38:29, skrev Markhof, Ingolf <= ;ingolf.markhof@de.verizon= .com>:

Thanks for your comments and thoughts.

=C2=A0

I am really surprised that PostgreSQL is unable to = keep the source text of a view. Honestly, for me the looks like an implemen= tation gap. Consider software development. You are writing code in C++ mayb= e 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 no= t 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. Especi= ally 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.

=C2=A0

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

It isn't rocket-science, of couse, but I'm pretty sure it is implement= ed like this on purpose. PG doesn't store queries you feed it either, nor a= ny other=C2=A0command. It stores the resulting structure. SQL-scri= pts, containing DDL/DML should be versioned using scm like Git, not rely on= the DB to store it.
=C2=A0
">
=C2=A0
--
Andrea= s Joseph Krogh
=C2=A0
------=_Part_610_1418671415.1610095417339-- ------=_Part_609_288641355.1610095417246-- ------=_Part_608_1750208366.1610095417246--