X-Original-To: pgsql-www-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 39069D1B8AE for ; Wed, 28 Apr 2004 09:48:45 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 40711-01 for ; Wed, 28 Apr 2004 09:48:46 -0300 (ADT) Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by svr1.postgresql.org (Postfix) with ESMTP id 8F0ABD1B8A5 for ; Wed, 28 Apr 2004 09:48:42 -0300 (ADT) Received: from mailgate.vale-housing.co.uk ([80.176.1.146] helo=salem.vale-housing.co.uk) by anchor-post-31.mail.demon.net with esmtp (Exim 3.35 #1) id 1BIoUX-000HQt-0V; Wed, 28 Apr 2004 13:48:45 +0100 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Re: Some more questions on DB schema X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Date: Wed, 28 Apr 2004 13:48:45 +0100 Message-ID: <03AF4E498C591348A42FC93DEA9661B889FBA4@mail.vale-housing.co.uk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [pgsql-www] Some more questions on DB schema thread-index: AcQtHd1TmZVwGZ3rS8OKe4mK2owCZwAATsvA From: "Dave Page" To: "Alexey Borzov" Cc: X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/231 X-Sequence-Number: 4335 =20 > -----Original Message----- > From: Alexey Borzov [mailto:borz_off@cs.msu.su]=20 > Sent: 28 April 2004 13:39 > To: Dave Page > Cc: pgsql-www@postgresql.org > Subject: Re: [pgsql-www] Some more questions on DB schema >=20 >=20 > There are some problems with this... Run the following query >=20 > SELECT id, version, file > FROM comments c > WHERE NOT EXISTS ( > SELECT id > FROM docs d > WHERE d.version =3D c.version AND > d.file =3D c.file > ); >=20 > and observe the comments that are linked to non-existant=20 > pages of documentation. Someone'll have to fix these before=20 > adding a foreign key will be possible. Fixed, fkey added. Regards, Dave.