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 BF8FAEFEC0 for ; Fri, 6 Jun 2003 14:40:47 +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 17381-05 for ; Fri, 6 Jun 2003 14:40:43 +0000 (GMT) Received: from exchange.hq.openratings.com (unknown [141.149.165.226]) by svr1.postgresql.org (Postfix) with ESMTP id 0B37DEFEAD for ; Fri, 6 Jun 2003 14:40:43 +0000 (GMT) Received: from openratings.com (cancun.hq.openratings.com [10.0.0.225]) by exchange.hq.openratings.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id M1TG4Z9N; Fri, 6 Jun 2003 10:40:43 -0400 Message-ID: <3EE0A854.1080605@openratings.com> Date: Fri, 06 Jun 2003 10:42:28 -0400 From: Dmitry Tkach User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Josh Berkus Cc: pgsql-sql Subject: Re: Changing owner of function -- best method? References: <200306050806.34172.josh@agliodbs.com> In-Reply-To: <200306050806.34172.josh@agliodbs.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200306/47 X-Sequence-Number: 13805 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