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



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to