Re: Error 42501 permission denied for schema

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: akp geek <akpgeek(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Error 42501 permission denied for schema
Date: 2010-03-26 15:45:54
Message-ID: 14158.1269618354@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

akp geek <akpgeek(at)gmail(dot)com> writes:
> I have 2 schemas , schema1 and schema 2.

> 1. GRANT USAGE ON SCHEMA schema1 TO schema2;

You seem to be confusing schemas and users --- they are not the same
thing at all. The above grants the right to lookup objects in schema1
to the user (a/k/a role) named schema2; who doesn't necessarily have
anything to do with objects in schema2.

Also, although you failed to show the specific command that was failing,
I suspect what you are actually running into is lack of CREATE
permission not USAGE permission.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message akp geek 2010-03-26 15:59:35 Re: Error 42501 permission denied for schema
Previous Message Ozz Nixon 2010-03-26 15:43:49 Re: Does anyone use in ram postgres database?