Re: Having a problem with RoR-3.1.1 and Pg-9.1 - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Having a problem with RoR-3.1.1 and Pg-9.1
Date
Msg-id 201202271254.49132.adrian.klaver@gmail.com
Whole thread Raw
In response to Re: Having a problem with RoR-3.1.1 and Pg-9.1  ("James B. Byrne" <byrnejb@harte-lyne.ca>)
Responses Re: Having a problem with RoR-3.1.1 and Pg-9.1
Re: Having a problem with RoR-3.1.1 and Pg-9.1
List pgsql-general
On Monday, February 27, 2012 11:44:09 am James B. Byrne wrote:


>
> 3. Why are these dependencies not owned by the database
> owner to begin with?  Surely this code:
>
> CREATE EXTENSION plpgsql
>   SCHEMA pg_catalog
>   VERSION "1.0";
> ALTER EXTENSION plpgsql
>   OWNER TO postgres;
>
> could just as easily specify the actual database owner
> instead?

I have not spent enough time with 9.1, exploring the change over to EXTENSIONs
to manage a language to give you a definitive answer. However it would seem you
can peg a LANGUAGE to a database owner:

http://www.postgresql.org/docs/9.1/interactive/sql-createlanguage.html

"
Ordinarily, the user must have the PostgreSQL superuser privilege to register a
new language. However, the owner of a database can register a new language
within that database if the language is listed in the pg_pltemplate catalog and
is marked as allowed to be created by database owners (tmpldbacreate is true).
The default is that trusted languages can be created by database owners, but
this can be adjusted by superusers by modifying the contents of pg_pltemplate.
The creator of a language becomes its owner and can later drop it, rename it, or
assign it to a new owner.
"

Not sure how that interacts with the EXTENSION mechanism though:(

--
Adrian Klaver
adrian.klaver@gmail.com

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Orphaned temp table
Next
From: Tom Lane
Date:
Subject: Re: pg_class.relnamespace NOT IN pg_namespace.oid