X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 5CC9AEFFE2 for ; Thu, 5 Jun 2003 15:07:51 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 13938-05 for ; Thu, 5 Jun 2003 15:07:50 +0000 (GMT) Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by svr1.postgresql.org (Postfix) with ESMTP id A3A50EFFAA for ; Thu, 5 Jun 2003 15:07:49 +0000 (GMT) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 3094309 for pgsql-sql@postgresql.org; Thu, 05 Jun 2003 08:07:55 -0700 Content-Type: text/plain; charset="us-ascii" From: Josh Berkus Organization: Aglio Database Solutions To: "pgsql-sql" Subject: Changing owner of function -- best method? Date: Thu, 5 Jun 2003 08:06:34 -0700 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200306050806.34172.josh@agliodbs.com> X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests=USER_AGENT_KMAIL X-Spam-Level: X-Archive-Number: 200306/28 X-Sequence-Number: 13786 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