Search Postgresql Archives

Re: Need help extripating plpgsql

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

 



Adrian Klaver <adrian.klaver@xxxxxxxxx> wrote:

> At this point I am not sure how to do this with out creating role
> that has superuser privileges.

Something like this?:

-- Set up the template using database superuser.
create database template2;
\c template2
drop extension plpgsql;
vacuum freeze analyze;
\c postgres
update pg_database set datistemplate = true
  where datname = 'template2';
checkpoint;

-- Create a user who can own the database and plpgsql.
create user bob with createdb;
set role bob;
create database bob template template2;
\c bob
create extension plpgsql;

--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
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