pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Create & Alter Schema Permissions for a Login role in Postgresql database
2+ messages / 2 participants
[nested] [flat]

* Create & Alter Schema Permissions for a Login role in Postgresql database
@ 2012-01-10 19:33 Tripura <k_tripura@hotmail.com>
  2012-01-13 07:12 ` Re: Create & Alter Schema Permissions for a Login role in Postgresql database Guillaume Lelarge <guillaume@lelarge.info>
  0 siblings, 1 reply; 2+ messages in thread

From: Tripura @ 2012-01-10 19:33 UTC (permalink / raw)
  To: pgsql-admin

I have a Postgresql database with 3 Schemas (2 user defined and 1 public).

I have script that takes backup of the user defined schema's and then drops
the schema's.

Now after doing some operations I want to restore the user defined schemas
from the schema backup(schema_backup.out).

When I execute 
cat schema_backup.out | psql xx_db_name_xx

 I am getting the following error message 
ERROR:  permission denied for database xx_db_name_xx
ERROR:  schema "aaaa" does not exist 
ERROR:  permission denied for database xx_db_name_xx
ERROR:  schema "bbbb" does not exist 
ERROR:  must be owner of database xx_db_name_xx

 When I execute the same command as Admin user its executing just fine. But,
when I execute as a 'xxxxxx' user its failing.

Can someone guide me, what permissions/rights should be added to 'xxxxxx' to
restore the schema?


--
View this message in context: http://postgresql.1045698.n5.nabble.com/Create-Alter-Schema-Permissions-for-a-Login-role-in-Postgres...
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Create & Alter Schema Permissions for a Login role in Postgresql database
  2012-01-10 19:33 Create & Alter Schema Permissions for a Login role in Postgresql database Tripura <k_tripura@hotmail.com>
@ 2012-01-13 07:12 ` Guillaume Lelarge <guillaume@lelarge.info>
  0 siblings, 0 replies; 2+ messages in thread

From: Guillaume Lelarge @ 2012-01-13 07:12 UTC (permalink / raw)
  To: Tripura <k_tripura@hotmail.com>; +Cc: pgsql-admin

On Tue, 2012-01-10 at 11:33 -0800, Tripura wrote:
> I have a Postgresql database with 3 Schemas (2 user defined and 1 public).
> 
> I have script that takes backup of the user defined schema's and then drops
> the schema's.
> 
> Now after doing some operations I want to restore the user defined schemas
> from the schema backup(schema_backup.out).
> 
> When I execute 
> cat schema_backup.out | psql xx_db_name_xx
> 
>  I am getting the following error message 
> ERROR:  permission denied for database xx_db_name_xx
> ERROR:  schema "aaaa" does not exist 
> ERROR:  permission denied for database xx_db_name_xx
> ERROR:  schema "bbbb" does not exist 
> ERROR:  must be owner of database xx_db_name_xx
> 
>  When I execute the same command as Admin user its executing just fine. But,
> when I execute as a 'xxxxxx' user its failing.
> 
> Can someone guide me, what permissions/rights should be added to 'xxxxxx' to
> restore the schema?
> 

He needs CREATE permission on the database.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com
PostgreSQL Sessions #3: http://www.postgresql-sessions.org




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2012-01-13 07:12 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-01-10 19:33 Create & Alter Schema Permissions for a Login role in Postgresql database Tripura <k_tripura@hotmail.com>
2012-01-13 07:12 ` Guillaume Lelarge <guillaume@lelarge.info>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox