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

From: "Markhof, Ingolf" <ingolf(dot)markhof(at)de(dot)verizon(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, raf <raf(at)raf(dot)org>, pgsql-generallists(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-09 14:22:25
Message-ID: bf7a72d344b04c198a16cecb4621708e@MS-FRA-E13EX02.intl.ad.vzwcorp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom, all,

when I change a tables column name in Oracle SQL , SQLdeveloper (a SQL client) marks views that refer to the table using the old column name as erroneous. So, I can easily identify these cases. And of course I, as a user, I am acting in my context, i.e. my schema. So it is perfectly clear what table I am referring to.

Please note: I am not developing any PL/SQL code. I don't have big development projects. I have more the role of an data analyst. I just create rather complex SQL queries which, from time to time, may need to be adopted to some new requirements. Or peers want to (re-) use (part of) my SQL queries. There is not really much versioning required.

What I understood so far is: I can use e.g. DBeaver to interact with PostgreSQL, to develop my SQL code. But I finally need to copy the SQL code into e.g. Github. Which is a manual process. I'd mark the SQL code in the DBeaver editor window and copy&paste it into some file in e.g. GitHub. Using Github, I'd get version control and other enhanced collaboration features which I don't really need. At the price that code transfer from SQL (DBeaver) to the code repository and vice versa is complete manually?! This doesn't really look like an enhancement.

Most likely, there are more professional ways to do that. I'd be glad to get advice.

What I would like to have is something that would automatically update the SQL code in the software repository when I run a CREATE OR REPLACE VIEW.

Ingolf

Verizon Deutschland GmbH - Sebrathweg 20, 44149 Dortmund, Germany - Amtsgericht Dortmund, HRB 14952 - Geschäftsführer: Detlef Eppig - Vorsitzender des Aufsichtsrats: Francesco de Maio

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2021-01-09 14:49:04 Select a column and then apply JSONB_ARRAY_ELEMENTS to it
Previous Message Alexander Farber 2021-01-09 13:31:57 Select a column and then apply JSONB_ARRAY_ELEMENTS to it