Re: Can pg_restore produce create or replace commands

Поиск
Список
Период
Сортировка
От Berend Tober
Тема Re: Can pg_restore produce create or replace commands
Дата
Msg-id 54BB13E8.8090502@computer.org
обсуждение исходный текст
Ответ на Re: Can pg_restore produce create or replace commands  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: Can pg_restore produce create or replace commands  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
Thomas Kellerer wrote:
> Berend Tober wrote on 17.01.2015 19:05:
>> I often work with the output of pg_restore from a custom format dump
>> file. ...
>>
>> Most often, I'm refactoring functions and so don't really want to
>> drop the function but rather want to do a "create or replace
>> function" ...
>>
>
> To me this sounds as if you are doing it the wrong way round.


Possibly. But if the revision control system and the production data
base disagree, then which one do you believe?


>
> To manage (refactor) your functions, you should have the current code
> stored
> in a version control system, update the code there an then apply it to the
> target database.
>
> Extracting the code from the database in order to do refactoring is
> like disassembling a program each time you want to apply a bugfix.
>
> The code in the vcs would then contain the necessary "create or replace"
> (btw you still need to drop the function if you change the parameters)
>



---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com



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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: Can pg_restore produce create or replace commands
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: WAL supported extension