From: | "James B(dot) Byrne" <byrnejb(at)harte-lyne(dot)ca> |
---|---|
To: | "Adrian Klaver" <adrian(dot)klaver(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Having a problem with RoR-3.1.1 and Pg-9.1 |
Date: | 2012-02-27 21:45:13 |
Message-ID: | 714080b0ff5880f5e200d581c1bbdd46.squirrel@webmail.harte-lyne.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, February 27, 2012 16:37, Adrian Klaver wrote:
> On Monday, February 27, 2012 1:23:22 pm James B. Byrne
> wrote:
>> Obviously, I am missing something important here. The
>> database in question is created thusly:
>>
>> CREATE DATABASE test
>> WITH OWNER = devl
>> ENCODING = 'UTF8'
>> TABLESPACE = pg_default
>> LC_COLLATE = 'en_US.UTF-8'
>> LC_CTYPE = 'en_US.UTF-8'
>> CONNECTION LIMIT = -1;
>
> When you run the above are you doing it as user dev1 or
> the postgres user?
>
>>
>>
>> The manual says this:
>>
>> Loading an extension requires the same privileges that
>> would be required to create its component objects. For
>> most extensions this means superuser or database owner
>> privileges are needed. The user who runs CREATE
>> EXTENSION
>> becomes the owner of the extension for purposes of later
>> privilege checks, as well as the owner of any objects
>> created by the extension's script.
>>
>> However, looking at the extension properties shows this:
>>
>> -- Extension: plpgsql
>>
>> -- DROP EXTENSION plpgsql;
>>
>> CREATE EXTENSION plpgsql
>> SCHEMA pg_catalog
>> VERSION "1.0";
>> ALTER EXTENSION plpgsql
>> OWNER TO postgres;
>>
>> So, why is the plpgsql extension in test owned by
>> postgres and not by devl to begin with?
>
> Is plpgsql in template1 and you are running the CREATE
> DATABASE script as postgres?
If template1 has plpgsql as a language extension by
default then I have not removed it. If it does not then I
have not added it either.
It is likely that I created the database initially in
PGAdmin3 while connected to the server as the postgres
user. Why would creating a database with a specified
owner result in critical bits of it not being owned by the
specified owner? That strikes me as bizarre.
--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB(at)Harte-Lyne(dot)ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3
From | Date | Subject | |
---|---|---|---|
Next Message | Ireneusz Pluta | 2012-02-27 21:57:04 | Re: pg_class.relnamespace NOT IN pg_namespace.oid |
Previous Message | Donald Kerr | 2012-02-27 21:38:50 | advice on Replication for a Specific Scenario |