Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Jan 9, 2021, at 06:22, Markhof, Ingolf <ingolf.markhof@xxxxxxxxxxxxxx> wrote:
> 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.

I think you are approaching this backwards.  The SQL in the repository should be the definitive version.  If you wish to change the view, you change the CREATE OR REPLACE VIEW command that you have stored in the repository, and then apply that to the database so it now has the new view definition.

You may not, in a small independent project, feel the need for a source code repository, but it becomes very useful very quickly.

--
-- Christophe Pettus
   xof@xxxxxxxxxxxx







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux