Re: [pgadmin-support] DEFAULT PRIVILEGES incorrect

2016-02-18 Thread Dave Page
Oh, urgh. Yeah, that's a much bigger job. The UI doesn't handle granters at all :-(. I've added your notes to Erwin's bug, but I think this is going to have to wait for the time being unless someone else wants to pick it up. The team doesn't have the cycles spare right now unfortunately. On Tue, F

Re: [pgadmin-support] DEFAULT PRIVILEGES incorrect

2016-02-16 Thread Sanket Mehta
Hi, I have evaluated the code and found another issue while trying to resolve this bug. Lets assume we have created 3 roles foo1, foo2 and bar1 and one schema "test". Now using foo1 role we have given SELECT privileges to bar1 as mentioned below: SELECT ROLE foo1; ALTER DEFAULT PRIVILEGES IN SCH

Re: [pgadmin-support] DEFAULT PRIVILEGES incorrect

2016-02-16 Thread Erwin Brandstetter
Hi Sanket! The point is that "FOR ROLE foo" can only be omitted in the DDL command if the *current *role is identical to the role for which it applies. I would strongly advise not to try and build in this syntax shortcut at all. It should be much simpler and less error prone to always add the app

Re: [pgadmin-support] DEFAULT PRIVILEGES incorrect

2016-02-16 Thread Dave Page
On Tue, Feb 16, 2016 at 11:06 AM, Sanket Mehta < sanket.me...@enterprisedb.com> wrote: > > On Tue, Feb 16, 2016 at 4:34 PM, Dave Page wrote: > >> >> >> On Tue, Feb 16, 2016 at 10:53 AM, Sanket Mehta < >> sanket.me...@enterprisedb.com> wrote: >> >>> Hi Dave, >>> >>> Below is my understanding of th

Re: [pgadmin-support] DEFAULT PRIVILEGES incorrect

2016-02-16 Thread Sanket Mehta
On Tue, Feb 16, 2016 at 4:34 PM, Dave Page wrote: > > > On Tue, Feb 16, 2016 at 10:53 AM, Sanket Mehta < > sanket.me...@enterprisedb.com> wrote: > >> Hi Dave, >> >> Below is my understanding of this issue: >> >> In ALTER DEFAULT PRIVLEGES statement, "FOR ROLE "part is >> missing. >> > > That's w

Re: [pgadmin-support] DEFAULT PRIVILEGES incorrect

2016-02-16 Thread Dave Page
On Tue, Feb 16, 2016 at 10:53 AM, Sanket Mehta < sanket.me...@enterprisedb.com> wrote: > Hi Dave, > > Below is my understanding of this issue: > > In ALTER DEFAULT PRIVLEGES statement, "FOR ROLE "part is > missing. > That's what Erwin has reported, yes. > > as per postgresql documentation targ

Re: [pgadmin-support] DEFAULT PRIVILEGES incorrect

2016-02-16 Thread Sanket Mehta
Hi Dave, Below is my understanding of this issue: In ALTER DEFAULT PRIVLEGES statement, "FOR ROLE "part is missing. as per postgresql documentation target_name should follow below rule: target_name: The name of an existing role of which the current role is a member. If FOR ROLE is omitted, the

Re: [pgadmin-support] DEFAULT PRIVILEGES incorrect

2016-02-10 Thread Sanket Mehta
Hi Dave, Sure I will look into it and get back. Regards, Sanket Mehta Sr Software engineer Enterprisedb On Wed, Feb 10, 2016 at 3:03 PM, Dave Page wrote: > Sanket - can you take a look at this when you get a minute please? > > Thanks. > > On Wed, Feb 10, 2016 at 4:23 AM, Erwin Brandstetter >

Re: [pgadmin-support] DEFAULT PRIVILEGES incorrect

2016-02-10 Thread Dave Page
Sanket - can you take a look at this when you get a minute please? Thanks. On Wed, Feb 10, 2016 at 4:23 AM, Erwin Brandstetter wrote: > This bug has not been addressed in pgAdmin 1.22.0, yet. > > If I run this as user postgres: > > ALTER DEFAULT PRIVILEGES FOR ROLE foo IN SCHEMA test > GRANT

Re: [pgadmin-support] DEFAULT PRIVILEGES incorrect

2016-02-10 Thread Erwin Brandstetter
This bug has not been addressed in pgAdmin 1.22.0, yet. If I run this as user postgres: ALTER DEFAULT PRIVILEGES FOR ROLE foo IN SCHEMA test GRANT SELECT ON TABLES TO bar; Then the SQL pane says (still as user postgres): ALTER DEFAULT PRIVILEGES IN SCHEMA test GRANT SELECT ON TABLES

[pgadmin-support] DEFAULT PRIVILEGES incorrect

2015-08-13 Thread Erwin Brandstetter
The display of ALTER DEFAULT PRIVILEGES statements can be incorrect. I reported this bug in 2013, but it seems like it never got through: http://www.postgresql.org/message-id/528c2d00.6010...@falter.at Details, with steps to reproduce: https://redmine.postgresql.org/issues/694 Just tested with v