UPDATE pg_catalog.pg_proc.prosrc OK? - Mailing list pgsql-hackers

From Joel Jacobson
Subject UPDATE pg_catalog.pg_proc.prosrc OK?
Date
Msg-id AANLkTinEsQxbT_DYBUd9qOgh+XJNtqF7y3Hse3qsYX0m@mail.gmail.com
Whole thread Raw
Responses Re: UPDATE pg_catalog.pg_proc.prosrc OK?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
I'm working on a tool to simplify updating the source code of database functions.
To do a "revert" my plan is to store the values of pg_proc.* before updating, and then to restore pg_proc for the given oid if a revert is necessary.
This raises the question,

Is it "safe" to do,
UPDATE pg_proc SET <column> = <new source code> WHERE oid = <function's oid>;
instead of using the "CREATE OR REPLACE FUNCTION" command?

(Using pg_dump -s + pg_restore isn't feasible since it operates on the entire schema, and not just a subset of functions, important in my case.)

Thanks for any advise.

--
Best regards,

Joel Jacobson
Glue Finance

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: C++ keywords in headers (was Re: [GENERAL] #include )
Next
From: Tom Lane
Date:
Subject: Re: Reduce lock levels for ADD and DROP COLUMN