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