Received: from ural2.hszk.bme.hu (ural2.hszk.bme.hu [152.66.130.2]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f8NNtie57433; Sun, 23 Sep 2001 19:55:44 -0400 (EDT) (envelope-from kb136@hszk.bme.hu) Received: (from kb136@localhost) by ural2.hszk.bme.hu (8.11.3/8.11.3) id f8NNtch19339; Mon, 24 Sep 2001 01:55:38 +0200 (MEST) Date: Mon, 24 Sep 2001 01:55:38 +0200 (MEST) From: Kovacs Baldvin X-X-Sender: To: , , Kevin Way Subject: Bug?: Update on ancestor for a row of a child Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200109/616 X-Sequence-Number: 13495 Hello (mainly developer) folks! Probably Kevin really found a bug. When I saw his words in $50, I immediately started to look around his problem... You probably don't think that as a student here, in Hungary I live half a month for $50 :-)))) So I simplified his given schema as much as I needed, and found out what exactly the problem is. (Kevin, if you badly need a workaround, I can give you one, but quite an ugly one.) The problem is: when updating a row in an ancestor table, which is really belongs to a child, there's something wrong with the CHECK system. Here's the simple schema, producing the error: ---------------- drop table child; drop table ancestor; create table ancestor ( node_id int4, a int4 ); create table child ( b int4 NOT NULL DEFAULT 0 CHECK ( b = 0 OR b = 1) ) inherits (ancestor); insert into ancestor values (3,4); insert into child values (5,6,1); update ancestor set a=8 where node_id=5; ---------------- If one leaves out the CHECK condition, the UPDATE works just fine, and __the final result meets the check condition__. So it seems to me that the system 1. either tries to check the CHECK condition of the child on the ancestor 2. or only uses a wrong time to check against it. Best regards, Baldvin