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 33F7DD1B519 for ; Wed, 28 Apr 2004 09:39:33 -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 33926-04 for ; Wed, 28 Apr 2004 09:39:33 -0300 (ADT) Received: from imap.cs.msu.su (imap.cs.msu.su [158.250.10.39]) by svr1.postgresql.org (Postfix) with ESMTP id 94A94D1B50F for ; Wed, 28 Apr 2004 09:39:28 -0300 (ADT) Received: from cs.msu.su (pc724-lin.cmc.msu.ru [10.3.34.136]) by imap.cs.msu.su (8.12.9p2/8.12.9) with ESMTP id i3SCdSMt043479; Wed, 28 Apr 2004 16:39:30 +0400 (MSD) (envelope-from borz_off@cs.msu.su) Message-ID: <408FA5EA.3020901@cs.msu.su> Date: Wed, 28 Apr 2004 16:39:06 +0400 From: Alexey Borzov User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dave Page Cc: pgsql-www@postgresql.org Subject: Re: Some more questions on DB schema References: <03AF4E498C591348A42FC93DEA9661B889FB6D@mail.vale-housing.co.uk> In-Reply-To: <03AF4E498C591348A42FC93DEA9661B889FB6D@mail.vale-housing.co.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamd / ClamAV version devel-20040402, clamav-milter version 0.70a 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/230 X-Sequence-Number: 4334 Hi! Dave Page wrote: >>1) What is the table 'dellog' for? > > It's a leftover from the old search engine iirc. I assume there's noting > interesting in it? If not, it can go. Yep, the table is empty. >>2) Why 'comments' table does not have a foreign key on 'docs'? > > Oversight I guess. Feel free to add one. There are some problems with this... Run the following query SELECT id, version, file FROM comments c WHERE NOT EXISTS ( SELECT id FROM docs d WHERE d.version = c.version AND d.file = c.file ); and observe the comments that are linked to non-existant pages of documentation. Someone'll have to fix these before adding a foreign key will be possible.