pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
GRANT ALL ON TO GROUP failure
7+ messages / 6 participants
[nested] [flat]

* GRANT ALL ON TO GROUP failure
@ 2001-08-24 05:35  Jari Aalto+usenet <jari.aalto@poboxes.com>
  0 siblings, 1 reply; 7+ messages in thread

From: jari.aalto@poboxes.com @ 2001-08-24 05:35 UTC (permalink / raw)
  To: pgsql-sql; +Cc: jari.aalto@poboxes.com


    [Please keep CC]

    Can anyone suggest, what is wrong with the following 
    sql file? SOmehow the semicolon causes error?

    Jari


class=# \i pg-def-group-grant.sql
Granting ALL to ROOT
CHANGE
Granting ALL to USER
psql:pg-def-group-grant.sql:48: ERROR:  parser: parse error at or near "user"
Granting SELECT to READER
psql:pg-def-group-grant.sql:69: ERROR:  non-existent group "reader"



01:-- Postgres create table rights
02:-- $Id: pg-def-group-grant.sql,v 1.1 2001/08/23 19:26:16 jaalto Exp $
03:--
04:--
05:-- GRANT allows the creator of an object to give specific permissions to
06:-- all users (PUBLIC) or to a certain user or group. Users other than the
07:-- creator don't have any access permission unless the creator GRANTs
08:-- permissions, after the object is created.
09:
10:\echo  Granting ALL to ROOT
11:
12:GRANT ALL ON
13: bonus
14: , custid
15: , customer
16: , dept
17: , dual
18: , dummy
19: , emp
20: , item
21: , ordid
22: , ordx
23: , price
24: , prodid
25: , product
26: , sales
27: , salgrade
28: TO GROUP root;
29:
30:\echo  Granting ALL to USER
31:
32:GRANT ALL ON
33: bonus
34: , custid
35: , customer
36: , dept
37: , dual
38: , dummy
39: , emp
40: , item
41: , ordid
42: , ordx
43: , price
44: , prodid
45: , product
46: , sales
47: , salgrade
48: TO GROUP user;
49:
50:
51:\echo  Granting SELECT to READER
52:
53:GRANT SELECT ON
54: bonus
55: , custid
56: , customer
57: , dept
58: , dual
59: , dummy
60: , emp
61: , item
62: , ordid
63: , ordx
64: , price
65: , prodid
66: , product
67: , sales
68: , salgrade
69: TO GROUP reader;
70:
71:-- End of file



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

* Re: GRANT ALL ON TO GROUP failure
@ 2001-08-24 08:51  Thurstan R. McDougle <trmcdougle@my-deja.com>
  parent: Jari Aalto+usenet <jari.aalto@poboxes.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Thurstan R. McDougle @ 2001-08-24 08:51 UTC (permalink / raw)
  To: pgsql-sql

user is an SQL reserved word, use 'user' instead.

You might like to have a look at the list of reserved words at 
http://www.postgresql.org/idocs/index.php?sql-keywords-appendix.html

Jari Aalto+usenet wrote:
> 
>     [Please keep CC]
> 
>     Can anyone suggest, what is wrong with the following
>     sql file? SOmehow the semicolon causes error?
> 
>     Jari
> 
> class=# \i pg-def-group-grant.sql
> Granting ALL to ROOT
> CHANGE
> Granting ALL to USER
> psql:pg-def-group-grant.sql:48: ERROR:  parser: parse error at or near "user"
> Granting SELECT to READER
> psql:pg-def-group-grant.sql:69: ERROR:  non-existent group "reader"
> 
> 01:-- Postgres create table rights
> 02:-- $Id: pg-def-group-grant.sql,v 1.1 2001/08/23 19:26:16 jaalto Exp $
> 03:--
> 04:--
> 05:-- GRANT allows the creator of an object to give specific permissions to
> 06:-- all users (PUBLIC) or to a certain user or group. Users other than the
> 07:-- creator don't have any access permission unless the creator GRANTs
> 08:-- permissions, after the object is created.
> 09:
> 10:\echo  Granting ALL to ROOT
> 11:
> 12:GRANT ALL ON
> 13: bonus
> 14: , custid
> 15: , customer
> 16: , dept
> 17: , dual
> 18: , dummy
> 19: , emp
> 20: , item
> 21: , ordid
> 22: , ordx
> 23: , price
> 24: , prodid
> 25: , product
> 26: , sales
> 27: , salgrade
> 28: TO GROUP root;
> 29:
> 30:\echo  Granting ALL to USER
> 31:
> 32:GRANT ALL ON
> 33: bonus
> 34: , custid
> 35: , customer
> 36: , dept
> 37: , dual
> 38: , dummy
> 39: , emp
> 40: , item
> 41: , ordid
> 42: , ordx
> 43: , price
> 44: , prodid
> 45: , product
> 46: , sales
> 47: , salgrade
> 48: TO GROUP user;
> 49:
> 50:
> 51:\echo  Granting SELECT to READER
> 52:
> 53:GRANT SELECT ON
> 54: bonus
> 55: , custid
> 56: , customer
> 57: , dept
> 58: , dual
> 59: , dummy
> 60: , emp
> 61: , item
> 62: , ordid
> 63: , ordx
> 64: , price
> 65: , prodid
> 66: , product
> 67: , sales
> 68: , salgrade
> 69: TO GROUP reader;
> 70:
> 71:-- End of file

-- 
This is the identity that I use for NewsGroups. Email to 
this will just sit there. If you wish to email me replace
the domain with knightpiesold . co . uk (no spaces).



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

* GRANT ALL ON TO GROUP failure
@ 2001-08-29 21:26  Jari Aalto <posting-list@MailAndNews.com>
  0 siblings, 2 replies; 7+ messages in thread

From: posting-list@MailAndNews.com @ 2001-08-29 21:26 UTC (permalink / raw)
  To: pgsql-sql


    Can anyone suggest, what is wrong with the following 
    sql file? SOmehow the semicolon causes error?

    Jari

class=# \i pg-def-group-grant.sql
Granting ALL to ROOT
CHANGE
Granting ALL to USER
psql:pg-def-group-grant.sql:48: ERROR:  parser: parse error at or near "user"
Granting SELECT to READER
psql:pg-def-group-grant.sql:69: ERROR:  non-existent group "reader"

01:-- Postgres create table rights
02:-- $Id: pg-def-group-grant.sql,v 1.1 2001/08/23 19:26:16 jaalto Exp $
03:--
04:--
05:-- GRANT allows the creator of an object to give specific permissions to
06:-- all users (PUBLIC) or to a certain user or group. Users other than the
07:-- creator don't have any access permission unless the creator GRANTs
08:-- permissions, after the object is created.
09:
10:\echo  Granting ALL to ROOT
11:
12:GRANT ALL ON
13: bonus
14: , custid
15: , customer
16: , dept
17: , dual
18: , dummy
19: , emp
20: , item
21: , ordid
22: , ordx
23: , price
24: , prodid
25: , product
26: , sales
27: , salgrade
28: TO GROUP root;
29:
30:\echo  Granting ALL to USER
31:
32:GRANT ALL ON
33: bonus
34: , custid
35: , customer
36: , dept
37: , dual
38: , dummy
39: , emp
40: , item
41: , ordid
42: , ordx
43: , price
44: , prodid
45: , product
46: , sales
47: , salgrade
48: TO GROUP user;
49:
50:
51:\echo  Granting SELECT to READER
52:
53:GRANT SELECT ON
54: bonus
55: , custid
56: , customer
57: , dept
58: , dual
59: , dummy
60: , emp
61: , item
62: , ordid
63: , ordx
64: , price
65: , prodid
66: , product
67: , sales
68: , salgrade
69: TO GROUP reader;
70:
71:-- End of file

-- 
http://tiny-tools.sourceforge.net/
Swatch  @time http://www.ryanthiessen.com/swatch/resources.htm
Convert @time http://www.mir.com.my/iTime/itime.htm




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

* Re: GRANT ALL ON TO GROUP failure
@ 2001-08-29 21:57  Peter Eisentraut <peter_e@gmx.net>
  parent: Jari Aalto <posting-list@MailAndNews.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Peter Eisentraut @ 2001-08-29 21:57 UTC (permalink / raw)
  To: Jari Aalto <posting-list@mailandnews.com>; +Cc: pgsql-sql

Jari Aalto writes:

> class=# \i pg-def-group-grant.sql
> Granting ALL to ROOT
> CHANGE
> Granting ALL to USER
> psql:pg-def-group-grant.sql:48: ERROR:  parser: parse error at or near "user"

You need to double quote "user".  It's a reserved word.

> Granting SELECT to READER
> psql:pg-def-group-grant.sql:69: ERROR:  non-existent group "reader"

Did you create a group named "reader"?

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




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

* Re: GRANT ALL ON TO GROUP failure
@ 2001-08-29 22:20  Oliver Elphick <olly@lfix.co.uk>
  parent: Jari Aalto <posting-list@MailAndNews.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Oliver Elphick @ 2001-08-29 22:20 UTC (permalink / raw)
  To: posting-list@MailAndNews.com; +Cc: pgsql-sql

Jari Aalto wrote:
  >
  >    Can anyone suggest, what is wrong with the following 
  >    sql file? SOmehow the semicolon causes error?
 ...
  >Granting ALL to USER
  >psql:pg-def-group-grant.sql:48: ERROR:  parser: parse error at or near "user
      >"
...
  >32:GRANT ALL ON
  >33: bonus
  >34: , custid
  >35: , customer
  >36: , dept
  >37: , dual
  >38: , dummy
  >39: , emp
  >40: , item
  >41: , ordid
  >42: , ordx
  >43: , price
  >44: , prodid
  >45: , product
  >46: , sales
  >47: , salgrade
  >48: TO GROUP user;

user is a reserved word; it should not have been accepted as a group name
unless double-quoted, in which case you need to double-quote it every time
you mention it.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Preach the word; be instant in season, out of season; 
      reprove, rebuke, exhort with all longsuffering and 
      doctrine."          II Timothy 4:2 





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

* GRANT ALL ON TO GROUP failure
@ 2001-09-03 16:34  Jari Aalto <posting-list@MailAndNews.com>
  0 siblings, 0 replies; 7+ messages in thread

From: posting-list@MailAndNews.com @ 2001-09-03 16:34 UTC (permalink / raw)
  To: pgsql-sql


    Can anyone suggest, what is wrong with the following 
    sql file? SOmehow the semicolon causes error?

    Jari

class=# \i pg-def-group-grant.sql
Granting ALL to ROOT
CHANGE
Granting ALL to USER
psql:pg-def-group-grant.sql:48: ERROR:  parser: parse error at or near "user"
Granting SELECT to READER
psql:pg-def-group-grant.sql:69: ERROR:  non-existent group "reader"

01:-- Postgres create table rights
02:-- $Id: pg-def-group-grant.sql,v 1.1 2001/08/23 19:26:16 jaalto Exp $
03:--
04:--
05:-- GRANT allows the creator of an object to give specific permissions to
06:-- all users (PUBLIC) or to a certain user or group. Users other than the
07:-- creator don't have any access permission unless the creator GRANTs
08:-- permissions, after the object is created.
09:
10:\echo  Granting ALL to ROOT
11:
12:GRANT ALL ON
13: bonus
14: , custid
15: , customer
16: , dept
17: , dual
18: , dummy
19: , emp
20: , item
21: , ordid
22: , ordx
23: , price
24: , prodid
25: , product
26: , sales
27: , salgrade
28: TO GROUP root;
29:
30:\echo  Granting ALL to USER
31:
32:GRANT ALL ON
33: bonus
34: , custid
35: , customer
36: , dept
37: , dual
38: , dummy
39: , emp
40: , item
41: , ordid
42: , ordx
43: , price
44: , prodid
45: , product
46: , sales
47: , salgrade
48: TO GROUP user;
49:
50:
51:\echo  Granting SELECT to READER
52:
53:GRANT SELECT ON
54: bonus
55: , custid
56: , customer
57: , dept
58: , dual
59: , dummy
60: , emp
61: , item
62: , ordid
63: , ordx
64: , price
65: , prodid
66: , product
67: , sales
68: , salgrade
69: TO GROUP reader;
70:
71:-- End of file

----------


-- 
http://tiny-tools.sourceforge.net/
Swatch  @time http://www.ryanthiessen.com/swatch/resources.htm
Convert @time http://www.mir.com.my/iTime/itime.htm




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

* Re: GRANT ALL ON TO GROUP failure
@ 2001-09-04 09:53  Henshall, Stuart - WCP <SHenshall@westcountrypublications.co.uk>
  0 siblings, 0 replies; 7+ messages in thread

From: Henshall, Stuart - WCP @ 2001-09-04 09:53 UTC (permalink / raw)
  To: 'posting-list@MailAndNews.com' <posting-list@MailAndNews.com>; pgsql-sql

	You need to user is a reserved word so you need to quote it (ie:
"user" rather than user) whenever you reference it.Does group reader exist?
If it does then it might be a case issue as presumably you must have quoted
user user to create it which also preserves case, so if you did the same for
group reader and included any caps reader will need to be quoted and in the
same case.
- Stuart


> -----Original Message-----
> From:	posting-list@MailAndNews.com [SMTP:posting-list@MailAndNews.com]
> Sent:	Monday, September 03, 2001 5:35 PM
> To:	pgsql-sql@postgresql.org
> Subject:	GRANT ALL ON TO GROUP failure 
> 
> 
>     Can anyone suggest, what is wrong with the following 
>     sql file? SOmehow the semicolon causes error?
> 
>     Jari
> 
> class=# \i pg-def-group-grant.sql
> Granting ALL to ROOT
> CHANGE
> Granting ALL to USER
> psql:pg-def-group-grant.sql:48: ERROR:  parser: parse error at or near
> "user"
> Granting SELECT to READER
> psql:pg-def-group-grant.sql:69: ERROR:  non-existent group "reader"
> 
> 01:-- Postgres create table rights
> 02:-- $Id: pg-def-group-grant.sql,v 1.1 2001/08/23 19:26:16 jaalto Exp $
> 03:--
> 04:--
> 05:-- GRANT allows the creator of an object to give specific permissions
> to
> 06:-- all users (PUBLIC) or to a certain user or group. Users other than
> the
> 07:-- creator don't have any access permission unless the creator GRANTs
> 08:-- permissions, after the object is created.
> 09:
> 10:\echo  Granting ALL to ROOT
> 11:
> 12:GRANT ALL ON
> 13: bonus
> 14: , custid
> 15: , customer
> 16: , dept
> 17: , dual
> 18: , dummy
> 19: , emp
> 20: , item
> 21: , ordid
> 22: , ordx
> 23: , price
> 24: , prodid
> 25: , product
> 26: , sales
> 27: , salgrade
> 28: TO GROUP root;
> 29:
> 30:\echo  Granting ALL to USER
> 31:
> 32:GRANT ALL ON
> 33: bonus
> 34: , custid
> 35: , customer
> 36: , dept
> 37: , dual
> 38: , dummy
> 39: , emp
> 40: , item
> 41: , ordid
> 42: , ordx
> 43: , price
> 44: , prodid
> 45: , product
> 46: , sales
> 47: , salgrade
> 48: TO GROUP user;
> 49:
> 50:
> 51:\echo  Granting SELECT to READER
> 52:
> 53:GRANT SELECT ON
> 54: bonus
> 55: , custid
> 56: , customer
> 57: , dept
> 58: , dual
> 59: , dummy
> 60: , emp
> 61: , item
> 62: , ordid
> 63: , ordx
> 64: , price
> 65: , prodid
> 66: , product
> 67: , sales
> 68: , salgrade
> 69: TO GROUP reader;
> 70:
> 71:-- End of file
> 
> ----------
> 
> 
> -- 
> http://tiny-tools.sourceforge.net/
> Swatch  @time http://www.ryanthiessen.com/swatch/resources.htm
> Convert @time http://www.mir.com.my/iTime/itime.htm
> 



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


end of thread, other threads:[~2001-09-04 09:53 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-08-24 05:35 GRANT ALL ON TO GROUP failure Jari Aalto+usenet <jari.aalto@poboxes.com>
2001-08-24 08:51 ` Thurstan R. McDougle <trmcdougle@my-deja.com>
2001-08-29 21:26 GRANT ALL ON TO GROUP failure Jari Aalto <posting-list@MailAndNews.com>
2001-08-29 21:57 ` Peter Eisentraut <peter_e@gmx.net>
2001-08-29 22:20 ` Oliver Elphick <olly@lfix.co.uk>
2001-09-03 16:34 GRANT ALL ON TO GROUP failure Jari Aalto <posting-list@MailAndNews.com>
2001-09-04 09:53 Re: GRANT ALL ON TO GROUP failure Henshall, Stuart - WCP <SHenshall@westcountrypublications.co.uk>

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