Received: from sysadmin.chi.wdr.com (sysadmin.chi.ubswarburg.com [146.180.1.66]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3E8Hh879377 for ; Sat, 14 Apr 2001 04:17:43 -0400 (EDT) (envelope-from devin@sysadmin.chi.wdr.com) Received: from devin by sysadmin.chi.wdr.com with local (Exim 3.12 #2) id 14oLFM-00013G-00; Sat, 14 Apr 2001 03:17:32 -0500 Date: Sat, 14 Apr 2001 03:17:27 -0500 (CDT) From: Tod McQuillin X-X-Sender: To: Ian Pulsford cc: Subject: Re: nobody user can't nextval('phone_id_seq') In-Reply-To: <3AD7D623.E0D37494@optusnet.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200104/222 X-Sequence-Number: 2572 On Sat, 14 Apr 2001, Ian Pulsford wrote: > Newbie needs help. I have a small web-based phonebook app using php and > postgresql 7.02. It seems the nobody (apache) user can delete, update, > add anything except increment the 'id' sequence. I don't think it's the > code (cut and pasted from a tutorial) because the pgsql user can > increment it. You need to grant access to the sequence. test=# \d foo Table "foo" Attribute | Type | Modifier -----------+-------------+--------------------------------------------------- key | integer | not null default nextval('foo_key_seq'::text) name | varchar(40) | not null test=# GRANT ALL ON foo_key_seq TO nobody; CHANGE -- Tod McQuillin