can't set sequence

From: "Keith Worthington" <keithw(at)narrowpathinc(dot)com>
To: "PostgreSQL Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: can't set sequence
Date: 2004-12-10 20:47:19
Message-ID: 20041210204719.M37555@narrowpathinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi All,

In our database we have a table as described below. When we attempt to write
to the table from our visual basic program we receive an error. "ERROR:
tbl_receiving_receipt_number_seq.nextval: You don't have permissions to set
sequence tbl_receiving_receipt_number_seq" Can someone please explain how to
correct this error? TIA

-- Table: purchase_order.tbl_receiving

-- DROP TABLE purchase_order.tbl_receiving;

CREATE TABLE purchase_order.tbl_receiving
(
po_number int4 NOT NULL,
po_line int2 NOT NULL,
receipt_number serial NOT NULL,
quantity float4 NOT NULL,
receipt_timestamp timestamp NOT NULL DEFAULT ('now'::text)::timestamp(6)
with time zone,
CONSTRAINT tbl_receiving_pkey PRIMARY KEY (po_number, po_line, receipt_number),
CONSTRAINT tbl_receiving_fkey1 FOREIGN KEY (po_number, po_line) REFERENCES
purchase_order.tbl_line_item (po_number, po_line) ON UPDATE CASCADE ON DELETE
RESTRICT
) WITH OIDS;
GRANT ALL ON TABLE purchase_order.tbl_receiving TO public;
GRANT ALL ON TABLE purchase_order.tbl_receiving TO postgres;
GRANT UPDATE, INSERT ON TABLE purchase_order.tbl_receiving TO GROUP loaders;
COMMENT ON TABLE purchase_order.tbl_receiving IS 'Purchase order item
receiving data.';

______________________________________________
99main Internet Services http://www.99main.com

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2004-12-10 23:42:18 Re: Indexing Strategy
Previous Message Douglas 2004-12-10 11:16:06 Get comment