
In process of converting a bunch of scripts from sybase to postgresql
I see something that doesn't make much sense..

I can grant a series of privileges (comma separated) on a series of
objects (comma separated) to either a user, group or public NOT a
comma separated list of users or groups.  Yet at the bottom of the
man page for grant

      http://www.postgresql.org/idocs/index.php?sql-grant.html

it says it's allowed in SQL92.  How is it this isn't allowed in
postgresql, is it a real pain to implement or was it just never
needed?

I'm trying to come up with a way to do this:

grant all on xydata09 to vwonly,mngmnt,remusr,supusr,dbmngr,schdlr,intusr

on about 500 tables on the fly.  Not all of them are the same permissions
per table but each file that creates a table has this and a couple of
revoke lines in it.

Workarounds?

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net
         56K Nationwide Dialup from $16.00/mo at Pop4 Networking
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================




Thu, 7 Jun 2001 10:23:51 -0400 (EDT)
Vince Vielhaber <vev@michvhf.com>
grant and SQL92
Vince Vielhaber writes:

> I can grant a series of privileges (comma separated) on a series of
> objects (comma separated) to either a user, group or public NOT a
> comma separated list of users or groups.  Yet at the bottom of the
> man page for grant
>
>       http://www.postgresql.org/idocs/index.php?sql-grant.html
>
> it says it's allowed in SQL92.  How is it this isn't allowed in
> postgresql, is it a real pain to implement or was it just never
> needed?

There is insufficient internal representation of the GRANT parse tree,
which makes this cumbersome to implement.  Not terribly hard to fix, but
someone needs to do it.  (Where were those PostgreSQL hacker newbies?)

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


Thu, 7 Jun 2001 16:44:53 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: grant and SQL92
On Thu, 7 Jun 2001, Peter Eisentraut wrote:

> Vince Vielhaber writes:
>
> > I can grant a series of privileges (comma separated) on a series of
> > objects (comma separated) to either a user, group or public NOT a
> > comma separated list of users or groups.  Yet at the bottom of the
> > man page for grant
> >
> >       http://www.postgresql.org/idocs/index.php?sql-grant.html
> >
> > it says it's allowed in SQL92.  How is it this isn't allowed in
> > postgresql, is it a real pain to implement or was it just never
> > needed?
>
> There is insufficient internal representation of the GRANT parse tree,
> which makes this cumbersome to implement.  Not terribly hard to fix, but
> someone needs to do it.  (Where were those PostgreSQL hacker newbies?)

I figure it'll be easier to fix than to try and redo the scripts.  Have
a direction you can point me in?

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net
         56K Nationwide Dialup from $16.00/mo at Pop4 Networking
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================




Thu, 7 Jun 2001 10:50:54 -0400 (EDT)
Vince Vielhaber <vev@michvhf.com>
Re: grant and SQL92
Vince Vielhaber writes:

> I can grant a series of privileges (comma separated) on a series of
> objects (comma separated) to either a user, group or public NOT a
> comma separated list of users or groups.

I should have this finished today to tomorrow.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


Sat, 9 Jun 2001 18:44:23 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: grant and SQL92
On Sat, 9 Jun 2001, Peter Eisentraut wrote:

> Vince Vielhaber writes:
>
> > I can grant a series of privileges (comma separated) on a series of
> > objects (comma separated) to either a user, group or public NOT a
> > comma separated list of users or groups.
>
> I should have this finished today to tomorrow.

I looked at it but it looked too much like it involved gram.y which I'm
going to happily stay away from for now :)

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net
         56K Nationwide Dialup from $16.00/mo at Pop4 Networking
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================




Sat, 9 Jun 2001 14:42:36 -0400 (EDT)
Vince Vielhaber <vev@michvhf.com>
Re: grant and SQL92
> On Sat, 9 Jun 2001, Peter Eisentraut wrote:
> 
> > Vince Vielhaber writes:
> >
> > > I can grant a series of privileges (comma separated) on a series of
> > > objects (comma separated) to either a user, group or public NOT a
> > > comma separated list of users or groups.
> >
> > I should have this finished today to tomorrow.
> 
> I looked at it but it looked too much like it involved gram.y which I'm
> going to happily stay away from for now :)

Added to TODO:

	* Allow GRANT/REVOKE to handle multiple user/group names

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Mon, 9 Jul 2001 15:57:19 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: grant and SQL92
On Mon, 9 Jul 2001, Bruce Momjian wrote:

> > On Sat, 9 Jun 2001, Peter Eisentraut wrote:
> >
> > > Vince Vielhaber writes:
> > >
> > > > I can grant a series of privileges (comma separated) on a series of
> > > > objects (comma separated) to either a user, group or public NOT a
> > > > comma separated list of users or groups.
> > >
> > > I should have this finished today to tomorrow.
> >
> > I looked at it but it looked too much like it involved gram.y which I'm
> > going to happily stay away from for now :)
>
> Added to TODO:
>
> 	* Allow GRANT/REVOKE to handle multiple user/group names

I'm guessing Peter got sidetracked?  If it's still open after I submit
a create user patch (with the help of Tom Lane I'm no longer uncomfortable
with gram.y) I'll take a look at this.

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net
         56K Nationwide Dialup from $16.00/mo at Pop4 Networking
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================




Mon, 9 Jul 2001 16:20:47 -0400 (EDT)
Vince Vielhaber <vev@michvhf.com>
Re: grant and SQL92
Bruce Momjian writes:

> > On Sat, 9 Jun 2001, Peter Eisentraut wrote:
> >
> > > Vince Vielhaber writes:
> > >
> > > > I can grant a series of privileges (comma separated) on a series of
> > > > objects (comma separated) to either a user, group or public NOT a
> > > > comma separated list of users or groups.
> > >
> > > I should have this finished today to tomorrow.
> >
> > I looked at it but it looked too much like it involved gram.y which I'm
> > going to happily stay away from for now :)
>
> Added to TODO:
>
> 	* Allow GRANT/REVOKE to handle multiple user/group names

You must have missed the part about tomorrow.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


Mon, 9 Jul 2001 22:59:10 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: grant and SQL92
On Mon, 9 Jul 2001, Peter Eisentraut wrote:

> Bruce Momjian writes:
>
> > > On Sat, 9 Jun 2001, Peter Eisentraut wrote:
> > >
> > > > Vince Vielhaber writes:
> > > >
> > > > > I can grant a series of privileges (comma separated) on a series of
> > > > > objects (comma separated) to either a user, group or public NOT a
> > > > > comma separated list of users or groups.
> > > >
> > > > I should have this finished today to tomorrow.
> > >
> > > I looked at it but it looked too much like it involved gram.y which I'm
> > > going to happily stay away from for now :)
> >
> > Added to TODO:
> >
> > 	* Allow GRANT/REVOKE to handle multiple user/group names
>
> You must have missed the part about tomorrow.

Did you already commit?  I was watching for it but could very well
have missed it.

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net
         56K Nationwide Dialup from $16.00/mo at Pop4 Networking
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================




Tue, 10 Jul 2001 16:34:16 -0400 (EDT)
Vince Vielhaber <vev@michvhf.com>
Re: grant and SQL92
> On Mon, 9 Jul 2001, Peter Eisentraut wrote:
> 
> > Bruce Momjian writes:
> >
> > > > On Sat, 9 Jun 2001, Peter Eisentraut wrote:
> > > >
> > > > > Vince Vielhaber writes:
> > > > >
> > > > > > I can grant a series of privileges (comma separated) on a series of
> > > > > > objects (comma separated) to either a user, group or public NOT a
> > > > > > comma separated list of users or groups.
> > > > >
> > > > > I should have this finished today to tomorrow.
> > > >
> > > > I looked at it but it looked too much like it involved gram.y which I'm
> > > > going to happily stay away from for now :)
> > >
> > > Added to TODO:
> > >
> > > 	* Allow GRANT/REVOKE to handle multiple user/group names
> >
> > You must have missed the part about tomorrow.
> 
> Did you already commit?  I was watching for it but could very well
> have missed it.

I don't see it.  The tomorrow Vince was talking about was quite a few
weeks ago.  Also, I thought he said he was going to skip it because it
dealt with gram.y.  I do have a pending patch from him that arrived
today that deals with the CREATEDB/CREATEUSER ordering.  I have not
applied it because it hasn't appeared on patches yet for people to
comment.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Tue, 10 Jul 2001 17:15:06 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: grant and SQL92
On Tue, 10 Jul 2001, Bruce Momjian wrote:

> > On Mon, 9 Jul 2001, Peter Eisentraut wrote:
> >
> > > Bruce Momjian writes:
> > >
> > > > > On Sat, 9 Jun 2001, Peter Eisentraut wrote:
> > > > >
> > > > > > Vince Vielhaber writes:
> > > > > >
> > > > > > > I can grant a series of privileges (comma separated) on a series of
> > > > > > > objects (comma separated) to either a user, group or public NOT a
> > > > > > > comma separated list of users or groups.
> > > > > >
> > > > > > I should have this finished today to tomorrow.
> > > > >
> > > > > I looked at it but it looked too much like it involved gram.y which I'm
> > > > > going to happily stay away from for now :)
> > > >
> > > > Added to TODO:
> > > >
> > > > 	* Allow GRANT/REVOKE to handle multiple user/group names
> > >
> > > You must have missed the part about tomorrow.
> >
> > Did you already commit?  I was watching for it but could very well
> > have missed it.
>
> I don't see it.  The tomorrow Vince was talking about was quite a few
> weeks ago.  Also, I thought he said he was going to skip it because it
> dealt with gram.y.  I do have a pending patch from him that arrived
> today that deals with the CREATEDB/CREATEUSER ordering.  I have not
> applied it because it hasn't appeared on patches yet for people to
> comment.

That was Peter saying he was going to have it finished 'today or
tomorrow'.  gram.y wasn't as bad as it at first looked as evidenced
by the patch I submitted today.

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net
         56K Nationwide Dialup from $16.00/mo at Pop4 Networking
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================




Tue, 10 Jul 2001 17:31:32 -0400 (EDT)
Vince Vielhaber <vev@michvhf.com>
Re: grant and SQL92
> > > > > Added to TODO:
> > > > >
> > > > > 	* Allow GRANT/REVOKE to handle multiple user/group names
> > > >
> > > > You must have missed the part about tomorrow.
> > >
> > > Did you already commit?  I was watching for it but could very well
> > > have missed it.
> >
> > I don't see it.  The tomorrow Vince was talking about was quite a few
> > weeks ago.  Also, I thought he said he was going to skip it because it
> > dealt with gram.y.  I do have a pending patch from him that arrived
> > today that deals with the CREATEDB/CREATEUSER ordering.  I have not
> > applied it because it hasn't appeared on patches yet for people to
> > comment.
> 
> That was Peter saying he was going to have it finished 'today or
> tomorrow'.  gram.y wasn't as bad as it at first looked as evidenced
> by the patch I submitted today.

Oh, sorry.  OK.

Yes, that was a sizable patch!

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Tue, 10 Jul 2001 17:33:12 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: grant and SQL92
On Tue, 10 Jul 2001, Bruce Momjian wrote:

> > > > > > Added to TODO:
> > > > > >
> > > > > > 	* Allow GRANT/REVOKE to handle multiple user/group names
> > > > >
> > > > > You must have missed the part about tomorrow.
> > > >
> > > > Did you already commit?  I was watching for it but could very well
> > > > have missed it.
> > >
> > > I don't see it.  The tomorrow Vince was talking about was quite a few
> > > weeks ago.  Also, I thought he said he was going to skip it because it
> > > dealt with gram.y.  I do have a pending patch from him that arrived
> > > today that deals with the CREATEDB/CREATEUSER ordering.  I have not
> > > applied it because it hasn't appeared on patches yet for people to
> > > comment.
> >
> > That was Peter saying he was going to have it finished 'today or
> > tomorrow'.  gram.y wasn't as bad as it at first looked as evidenced
> > by the patch I submitted today.
>
> Oh, sorry.  OK.
>
> Yes, that was a sizable patch!

It's a sizable change :)

Vince.
-- 
==========================================================================
Vince Vielhaber -- KA8CSH    email: vev@michvhf.com    http://www.pop4.net
         56K Nationwide Dialup from $16.00/mo at Pop4 Networking
        Online Campground Directory    http://www.camping-usa.com
       Online Giftshop Superstore    http://www.cloudninegifts.com
==========================================================================




Tue, 10 Jul 2001 17:33:56 -0400 (EDT)
Vince Vielhaber <vev@michvhf.com>
Re: grant and SQL92
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I do have a pending patch from him that arrived
> today that deals with the CREATEDB/CREATEUSER ordering.  I have not
> applied it because it hasn't appeared on patches yet for people to
> comment.

I already applied his CREATE/ALTER USER patch, because he'd passed it by
me for review several times previously (I forget if any of that mail was
cc'd to the lists).  I had some other changes to make in the same files
and figured it might as well go in all at once instead of risking merge
problems.

AFAIK, no one has touched the GRANT/REVOKE issue yet.

			regards, tom lane

Tue, 10 Jul 2001 18:47:13 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: grant and SQL92 
Bruce Momjian writes:

> > On Sat, 9 Jun 2001, Peter Eisentraut wrote:
> >
> > > Vince Vielhaber writes:
> > >
> > > > I can grant a series of privileges (comma separated) on a series of
> > > > objects (comma separated) to either a user, group or public NOT a
> > > > comma separated list of users or groups.
> > >
> > > I should have this finished today to tomorrow.
> >
> > I looked at it but it looked too much like it involved gram.y which I'm
> > going to happily stay away from for now :)
>
> Added to TODO:
>
> 	* Allow GRANT/REVOKE to handle multiple user/group names

You're still not getting that part about tomorrow. ;-)

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


Fri, 13 Jul 2001 18:27:46 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: grant and SQL92
> Bruce Momjian writes:
> 
> > > On Sat, 9 Jun 2001, Peter Eisentraut wrote:
> > >
> > > > Vince Vielhaber writes:
> > > >
> > > > > I can grant a series of privileges (comma separated) on a series of
> > > > > objects (comma separated) to either a user, group or public NOT a
> > > > > comma separated list of users or groups.
> > > >
> > > > I should have this finished today to tomorrow.
> > >
> > > I looked at it but it looked too much like it involved gram.y which I'm
> > > going to happily stay away from for now :)
> >
> > Added to TODO:
> >
> > 	* Allow GRANT/REVOKE to handle multiple user/group names
> 
> You're still not getting that part about tomorrow. ;-)

Can't I keep it on the TODO until it is done?  And wasn't yesterday
tomorrow?  :-)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Fri, 13 Jul 2001 12:37:55 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: grant and SQL92
> Bruce Momjian writes:
> 
> > Can't I keep it on the TODO until it is done?  And wasn't yesterday
> > tomorrow?  :-)
> 
> No, tomorrow was the day after June 9th.

Are you saying you did it already?  I see it in CVS now.  TODO updated.


-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Fri, 13 Jul 2001 14:21:53 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: grant and SQL92
Bruce Momjian writes:

> Can't I keep it on the TODO until it is done?  And wasn't yesterday
> tomorrow?  :-)

No, tomorrow was the day after June 9th.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


Fri, 13 Jul 2001 20:22:55 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: grant and SQL92