From: | Matt Beauregard <matt(at)designscape(dot)com(dot)au> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | Bryn Davies <bryn(at)designscape(dot)com(dot)au> |
Subject: | data change violation inside transaction |
Date: | 2001-01-02 05:58:21 |
Message-ID: | 20010102165821.D2835@designscape.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
While running the following set of statements:
create table category (
category_id serial not null primary key,
category_name text not null,
company_id int references company on delete cascade,
cattype_id int not null references cattype,
category_parent_id int not null references category
);
begin work;
insert into category (category_id, category_name, company_id, cattype_id, category_parent_id ) values (300, 'u2', 4, 25, 0 );
delete from category where category_id = 300;
we get the error:
ERROR: triggered data change violation on relation "category"
It goes away when we remove all the references from the table
definition, and isn't a problem outside a transaction, but we'd really
like it to work inside the transaction. What's the reason for the
error and how can we fix it?
--
Matt Beauregard
Information Technology Operations, DesignScape
Ph: +61 2 9361 4233 Fx: +61 2 9361 4633
From | Date | Subject | |
---|---|---|---|
Next Message | GH | 2001-01-02 06:57:46 | Two tables refenceing each other's columns |
Previous Message | Frank Joerdens | 2001-01-01 14:45:09 | unnecessary overhead on process startup |