Обсуждение: Change owner of function in 7.2.4?

Поиск
Список
Период
Сортировка

Change owner of function in 7.2.4?

От
Josh Berkus
Дата:
Folks,

I have a 7.2.4 database where I accidentally replaced a bunch of functions
while logged in as the superuser.   Now the normal applicaiton user can't
modify them.  While I can fix them by dropping the functions as the superuser
and re-creating them as the regular user, I can't see how to do this in a
transaction to avoid disrupting the database users.

Are there any dangers I don't know about in either of the options below?
1) updating "proowner" in pg_proc
2) making the regular user a superuser temporarily, replacing the functions,
and then switching them back.

Thoughts?

--
-Josh BerkusAglio Database SolutionsSan Francisco