Re: View definition and schema search path bug or expected behaviour?

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Chris Bartlett <c(dot)bartlett(at)paradise(dot)net(dot)nz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: View definition and schema search path bug or expected behaviour?
Date: 2012-07-26 14:14:47
Message-ID: 501150D7.2010809@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 07/25/2012 08:19 PM, Chris Bartlett wrote:

>
> Ah! The bob schema has no access privileges set. I had used pgAdmin3 -
> the schema definition pgAdmin3 reports is:
> CREATE SCHEMA bob AUTHORIZATION bob;
> (i.e., no grants)
>
> So:
> GRANT ALL ON SCHEMA bob TO bob;
> DROP VIEW bob.people;
> CREATE OR REPLACE VIEW bob.people_view AS SELECT people.name FROM people;
>
> SELECT * FROM bob.people_view
> -> returns records from bob.people as expected
>
> I had created the bob schema using pgAdmin3 (connected as bob), but when
> the schema owner is set to bob, there is no option in pgAdmin's New
> Schema... setup to grant privileges on the schema to bob. I guess I
> assumed that if bob owned the schema he would have all privileges on
> that schema.
>
> Thanks for pointing me in the right direction.

There are a lot of dials to play with when creating objects and granting
privileges. For my own sanity I make it a rule to confirm the privileges
on an object when it is created or altered. Helps the blood pressure:)

>
>

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vincent Veyron 2012-07-26 14:34:03 Re: BI tools and postgresql
Previous Message Vincent Veyron 2012-07-26 14:04:31 Re: BI tools and postgresql