Crash caused by CHECK on child

From: Kevin Way <kevin(dot)way(at)overtone(dot)org>
To: Kevin Way <kevin(dot)way(at)overtone(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Crash caused by CHECK on child
Date: 2001-09-24 11:49:36
Message-ID: 20010924114936.A76264@bean.overtone.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Baldvin posted this greatly simplified test case, which also
crashes the server without even using PL/pgSQL on pgsql-sql.

-- Hi Kevin, and everyone!
--
-- I don't think that I only found a minor bug compared to
-- the other you wrote in your last letter: the backend crash
-- is caused by the same CHECK constraint in the child table.
--
-- However, for you without time to analyzing Kevin's huge
-- scheme, here is the very simplified, crash-causing script.
--
------------------------------------

drop table child;
drop table ancestor;

create table ancestor (
node_id int4,
a int4
);

create table child (
b int4 NOT NULL DEFAULT 0 ,
c int4 not null default 3,
CHECK ( child.b = 0 OR child.b = 1 )
) inherits (ancestor);

insert into ancestor values (3,4);
insert into child (node_id, a, b) values (5,6,1);

update ancestor set a=8 where node_id=5;

---------------------------------
--
-- I am hunting it, but I have to learn all what this query-executing
-- about, so probably it takes uncomparable longer for me than for
-- a developer.
--
-- Regards,
-- Baldvin
--

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2001-09-24 13:01:06 Re: Bug #468: psql field separator......
Previous Message Kevin Way 2001-09-24 11:42:33 Re: Server crash caused by CHECK on child