X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F02203A41A5 for ; Wed, 5 Jan 2005 13:29:48 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 82621-05 for ; Wed, 5 Jan 2005 13:29:26 +0000 (GMT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id C77BC3A1A08 for ; Wed, 5 Jan 2005 13:29:29 +0000 (GMT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 34601359C3; Wed, 5 Jan 2005 05:29:29 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 32E8D3599F; Wed, 5 Jan 2005 05:29:29 -0800 (PST) Date: Wed, 5 Jan 2005 05:29:29 -0800 (PST) From: Stephan Szabo To: "=?iso-8859-2?Q?BARTKO,_Zolt=E1n?=" Cc: pgsql-sql@postgresql.org Subject: Re: foreign key problems In-Reply-To: <200501050930.j059U27s019437@www7.pobox.sk> Message-ID: <20050105052001.T60967@megazone.bigpanda.com> References: <200501050930.j059U27s019437@www7.pobox.sk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-2 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/14 X-Sequence-Number: 19802 On Wed, 5 Jan 2005, [iso-8859-2] BARTKO, Zolt=E1n wrote: > Ok, so I made some changes (manual "inheritance" of PK and FK > constraints), but nevertheless I get still the same dumb error. I made > a dump of the DB via pg_dump, it is available at > > http://de.geocities.com/bartkozo/dump.tgz > > DRecord was dropped, the columns moved into DObject. I still have no > idea why foreign keys work on other tables and do not on this one. > > I have three users, superaspiramus, aspiramus and aspiramusadmin. The > first is the owner of the db. > > After loading, the contents of the DObject table are: > > aspiramus=3D> select * from DObject; Do select * from ONLY DObject. The constraint currently only goes to DObject, records that are actually in DObject and not any tables derived from it. This is one of the deficiencies I was trying to refer to in the previous message. As a note, your primary keys will also not work to prevent duplicates of objectid between subclasses of DObject currently, and I'm not sure whether that matters to you: insert into dmessage (who, privilege, objectid, objecttype, status, aname,sender,receiver) values (-2,-2,33,13,301,'name',-2,-2); select objectid from dobject; objectid ---------- 34 35 33 33 (4 rows) Inheritance needs alot of work. :(