From: Josh Berkus <josh@agliodbs.com>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Changing owner of function -- best method?
Date: Thu, 5 Jun 2003 08:06:34 -0700
Message-ID: <200306050806.34172.josh@agliodbs.com> (raw)
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.
BTW, is there a neater method to deal with this in 7.4? 7.2 and 7.3 have
ALTER TABLE ... CHANGE OWNER, but other types of objects don't seem to have a
CHANGE OWNER option.
--
Josh Berkus
Aglio Database Solutions
San Francisco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com
Subject: Re: Changing owner of function -- best method?
In-Reply-To: <200306050806.34172.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox