From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Joel Jacobson <joel(at)gluefinance(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: UPDATE pg_catalog.pg_proc.prosrc OK? |
Date: | 2010-12-28 12:11:03 |
Message-ID: | AANLkTiks0SwM-4DYba-GGNjSE99P6daOKc_t_iVtYy5-@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
n Mon, Dec 27, 2010 at 1:23 PM, Joel Jacobson <joel(at)gluefinance(dot)com> wrote:
> 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?
I'm not immediately sure whether it's safe, but it seems like playing
with fire, and I don't see any particular advantage to doing it this
way over using CREATE OR REPLACE FUNCTION.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2010-12-28 12:13:41 | Libpq PGRES_COPY_BOTH - version compatibility |
Previous Message | Robert Haas | 2010-12-28 12:09:14 | Re: "writable CTEs" |