On 02/28/2012 10:23 AM, James B. Byrne wrote:
>
> On Tue, February 28, 2012 12:17, Adrian Klaver wrote:
>
>>
>> I guess the options are either do as I did above or
>> create a new template database as the owner you want
>> and use that as the template for your CREATE
>> DATABASE.
>
>
> Why does this not work?
>
> => \c test
> You are now connected to database "test" as user "devl".
> ALTER EXTENSION plpgsql OWNER TO devl;
> ERROR: syntax error at or near "OWNER"
> LINE 1: ALTER EXTENSION plpgsql OWNER TO devl;
> => \c - postgres
> You are now connected to database "test" as user "postgres".
> ALTER EXTENSION plpgsql OWNER TO devl;
> ERROR: syntax error at or near "OWNER"
> LINE 1: ALTER EXTENSION plpgsql OWNER TO devl;
>
There is no OWNER clause in ALTER EXTENSION.
If you are trying to do what I showed, you need to as the'postgres' user
DROP EXTENSION plpgsl in database 'test' and then become owner 'dev1'
and CREATE EXTENSION plpgsl
--
Adrian Klaver
adrian.klaver@gmail.com