From: Tod McQuillin <devin@spamcop.net>
To: Ian Pulsford <ianjp@optusnet.com.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: nobody user can't nextval('phone_id_seq')
Date: Sat, 14 Apr 2001 03:17:27 -0500 (CDT)
Message-ID: <Pine.GSO.4.31.0104140311540.3306-100000@sysadmin> (raw)
In-Reply-To: <3AD7D623.E0D37494@optusnet.com.au>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: devin@spamcop.net, ianjp@optusnet.com.au
Subject: Re: nobody user can't nextval('phone_id_seq')
In-Reply-To: <Pine.GSO.4.31.0104140311540.3306-100000@sysadmin>
References: <3AD7D623.E0D37494@optusnet.com.au> <Pine.GSO.4.31.0104140311540.3306-100000@sysadmin>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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