Re: nobody user can't nextval('phone_id_seq')

Поиск
Список
Период
Сортировка
От Tod McQuillin
Тема Re: nobody user can't nextval('phone_id_seq')
Дата
Msg-id Pine.GSO.4.31.0104140311540.3306-100000@sysadmin
обсуждение исходный текст
Ответ на nobody user can't nextval('phone_id_seq')  (Ian Pulsford <ianjp@optusnet.com.au>)
Список pgsql-sql
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




В списке pgsql-sql по дате отправления:

Предыдущее
От: Ian Pulsford
Дата:
Сообщение: nobody user can't nextval('phone_id_seq')
Следующее
От: Kovacs Zoltan
Дата:
Сообщение: Re: enumerating rows