Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.4) with SMTP id f7UEmhf43847 for ; Thu, 30 Aug 2001 10:48:43 -0400 (EDT) (envelope-from pgsql-sql-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7O93QP70910 for ; Fri, 24 Aug 2001 05:03:26 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f7O8q1h08685 for pgsql-sql@postgresql.org; Fri, 24 Aug 2001 04:52:01 -0400 (EDT) (envelope-from news) From: "Thurstan R. McDougle" X-Newsgroups: comp.databases.postgresql.sql Subject: Re: GRANT ALL ON TO GROUP failure Date: Fri, 24 Aug 2001 09:51:10 +0100 Message-ID: <3B86157E.B4181DE7@my-deja.com> References: X-NNTP-Posting-Host: no-dns-yet.demon.co.uk:193.195.66.176 X-Complaints-To: abuse@demon.net X-Mailer: Mozilla 4.77 [en] (Win98; U) X-Accept-Language: en,pdf MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 98 To: pgsql-sql@postgresql.org X-Archive-Number: 200108/367 X-Sequence-Number: 4622 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).