Postgresql Sequences: permission denied on sequence?

Folks,

I’m having trouble inserting a record into a progres table with a serial
int as my id.

The following–>
irb> a_docRecord = Document.new(params[“Document”])
=> #<Document:0x2aaaad1745a8 @new_record=true,
@attributes={“dtype”=>“4”, “title”=>"", “uid”=>nil, “description”=>"",
“notebooknumber”=>"", “pgroup”=>“1”}>
irb> a_docRecord.save

Returns–>
ActiveRecord::StatementInvalid: PGError: ERROR: permission denied for
sequence documents_id_seq
: INSERT INTO documents (“dtype”, “title”, “uid”, “description”,
“notebooknumber”, “pgroup”) VALUES(4, ‘’, NULL, ‘’, ‘’, 1)

The user is not a Superuser but has full permssions to the table.

My table is defined as–>
CREATE TABLE documents
(
id bigserial NOT NULL,
title varchar,
dtype int8,
pgroup int8,
description text,
notebooknumber varchar,
uid int8,
CONSTRAINT id PRIMARY KEY (id)
)
WITHOUT OIDS;
ALTER TABLE documents OWNER TO postgres;
GRANT ALL ON TABLE documents TO postgres;
GRANT ALL ON TABLE documents TO GROUP “webUsers”;

What am I missing?

Thanks,

LarsenMTL

On 2/26/07, Larsenmtl L. [email protected]
wrote:

(
ALTER TABLE documents OWNER TO postgres;
GRANT ALL ON TABLE documents TO postgres;
GRANT ALL ON TABLE documents TO GROUP “webUsers”;

What am I missing?

Probably a grant on the documents_id_seq implicitly created by the
bigserial
column type.

jeremy

Jeremy K. wrote:

Probably a grant on the documents_id_seq implicitly created by the
bigserial
column type.

Dang, that was fast. Thanks.