Re: Possible bug with ALTER LANGUAGE ... OWNER TO ...

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Erik Jones <ejones(at)engineyard(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Possible bug with ALTER LANGUAGE ... OWNER TO ...
Date: 2008-12-09 23:40:45
Message-ID: 20081209234045.GQ4053@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Erik Jones wrote:
>
> On Dec 8, 2008, at 1:42 PM, Tom Lane wrote:
>
>> Erik Jones <ejones(at)engineyard(dot)com> writes:
>>> I've just run up against a problem with ALTER LANGUAGE ... OWNER
>>> TO ... wherein the change of ownership does not propagate to a
>>> language's handler and validator functions preventing you from
>>> dropping the role if it created a language. I'm assuming a valid
>>> workaround is manually change the owner of the handler and validator
>>> functions but I'd think that changing a languages owning role should
>>> propagate to any other objects created when the language was created.
>>
>> Why? The underlying functions are independent objects, in the general
>> case.
>
> While I understand what you're saying, in the general case, in this
> specific case I have a hard time grokking it. I guess I was thinking in
> terms of a language owning it's handler and validator functions but I now
> see that dropping a language doesn't also drop the underlying functions,
> which I also find unintuitive.

Well, since CREATE LANGUAGE creates the functions internally, it does
make a certain amount of sense that the functions are also handled
internally when you do stuff to the language.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-12-09 23:50:31 Re: Possible bug with ALTER LANGUAGE ... OWNER TO ...
Previous Message Scott Marlowe 2008-12-09 23:25:43 Re: unstable SELECT performance under load