Re: Changing owner of function -- best method?

From: Dmitry Tkach <dmitry(at)openratings(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Changing owner of function -- best method?
Date: 2003-06-06 14:42:28
Message-ID: 3EE0A854.1080605@openratings.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Josh Berkus wrote:

>Folks,
>
>I have several functions in a 7.2.4 database that I accidentally REPLACEd
>while logged in as the superuser, instead of the db owner. As a result, the
>db owner can no longer modify those functions -- they belong to the
>superuser.
>
>As this is a production database, I can't drop the functions and re-create
>them as a different user ... the interruption in service would not be
>acceptable. I was wondering whether there were any problems with either of
>the following methods:
>
>A) Updating the pg_proc table to change the function owner;
>B) Making the db_owner a superuser, replacing the functions, and then making
>the db_owner a non-superuser again.
>
>
I believe, either of two should work. I have done it many times in the
past...

Dima

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Damien Dougan 2003-06-06 14:59:40 Creating Views with Column Names based on Distinct Row Data
Previous Message Tom Lane 2003-06-06 13:52:25 Re: Changing owner of function -- best method?