UPDATE pg_catalog.pg_proc.prosrc OK?

From: Joel Jacobson <joel(at)gluefinance(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: UPDATE pg_catalog.pg_proc.prosrc OK?
Date: 2010-12-27 18:23:06
Message-ID: AANLkTinEsQxbT_DYBUd9qOgh+XJNtqF7y3Hse3qsYX0m@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-12-27 18:33:02 Re: Reduce lock levels for ADD and DROP COLUMN
Previous Message Tom Lane 2010-12-27 18:21:37 Re: C++ keywords in headers (was Re: [GENERAL] #include <funcapi.h>)