Search Postgresql Archives

Re: 9.0: plpgsql eror when restoring a database as a non superuser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday, October 22, 2011 12:06:25 pm stefan wrote:
> >> Therefore the only solution I see is to drop plpgsql from template1, or
> >> writing a wrapper script that exploits the -l and -L options of
> >> pg_restore.
> > 
> > Yes. Though I could see an option to create a template database without
> > plpgsql in it for use by non-superuser users and leave template1 as is.
> 
> Adrian,
> 
> Thanks for suggesting that. I had not thought about that option and it
> may just be the best.

Actually I was going to suggest something more. In the new template CREATE a 
non-superuser ROLE and then as super user change ownership of the plpgsql to 
that ROLE for that template and databases derived from it. That actually works 
until you do the dump when it reverts ownership back to the postgres user. Not 
quite sure why that is? At any rate a dead end.

> 
> Cheers,
> Stefan.

-- 
Adrian Klaver
adrian.klaver@xxxxxxxxx

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux