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

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: How to keep format of views source code as entered?
Дата
Msg-id 33A6B3F2-D21E-4826-9758-282D2AE1B30D@thebuild.com
обсуждение исходный текст
Ответ на RE: How to keep format of views source code as entered?  ("Markhof, Ingolf" <ingolf.markhof@de.verizon.com>)
Список pgsql-general

> On Jan 9, 2021, at 06:22, Markhof, Ingolf <ingolf.markhof@de.verizon.com> wrote:
> What I would like to have is something that would automatically update the SQL code in the software repository when I
runa CREATE OR REPLACE VIEW. 

I think you are approaching this backwards.  The SQL in the repository should be the definitive version.  If you wish
tochange the view, you change the CREATE OR REPLACE VIEW command that you have stored in the repository, and then apply
thatto 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
veryquickly. 

--
-- Christophe Pettus
   xof@thebuild.com




В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Select a column and then apply JSONB_ARRAY_ELEMENTS to it
Следующее
От: Jack Orenstein
Дата:
Сообщение: Static memory, shared memory