Re: CREATE OR REPLACE FUNCTION vs ownership - Mailing list pgsql-hackers

From Euler Taveira de Oliveira
Subject Re: CREATE OR REPLACE FUNCTION vs ownership
Date
Msg-id 4AC54ECF.7050804@timbira.com
Whole thread Raw
In response to Re: CREATE OR REPLACE FUNCTION vs ownership  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: CREATE OR REPLACE FUNCTION vs ownership
List pgsql-hackers
David E. Wheeler escreveu:
> On Oct 1, 2009, at 3:42 PM, Tom Lane wrote:
> 
>> My inclination is to think that the right behavior for REPLACE FUNCTION
>> is to keep the old proowner and proacl values, because that's what it
>> always has done and nobody's complained.  But I suppose a case could
>> be made that you're completely replacing the function and so you should
>> replace its ownership/permissions too.  The CREATE FUNCTION reference
>> page fails to specify either way, which is a documentation bug as well.
>>
>> Comments?
> 
> The latter, I think. If I replace a function, I should be the new owner.
> To me it makes no sense for someone else to own it.
> 
Hmm... Using the same logic, if I add a new column should I be the table
owner? If you're changing the function that is because you have permission.

IMHO the owner should be preserved. In my mind, REPLACE is for changing the
content and not the properties (name, owner, etc).


--  Euler Taveira de Oliveira http://www.timbira.com/


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Buffer usage in EXPLAIN and pg_stat_statements (review)
Next
From: Alvaro Herrera
Date:
Subject: Re: Buffer usage in EXPLAIN and pg_stat_statements (review)