Re: UPDATE pg_catalog.pg_proc.prosrc OK?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: UPDATE pg_catalog.pg_proc.prosrc OK?
Дата
Msg-id AANLkTiks0SwM-4DYba-GGNjSE99P6daOKc_t_iVtYy5-@mail.gmail.com
обсуждение исходный текст
Ответ на UPDATE pg_catalog.pg_proc.prosrc OK?  (Joel Jacobson <joel@gluefinance.com>)
Ответы Re: UPDATE pg_catalog.pg_proc.prosrc OK?  (Joel Jacobson <joel@gluefinance.com>)
Список pgsql-hackers
n Mon, Dec 27, 2010 at 1:23 PM, Joel Jacobson <joel@gluefinance.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


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: "writable CTEs"
Следующее
От: Magnus Hagander
Дата:
Сообщение: Libpq PGRES_COPY_BOTH - version compatibility