Subject: Some more questions on DB schema

From: Alexey Borzov <[email-masked]>
Date: Tue, 27 Apr 2004 18:34:55 +0400

Greetings.

1) What is the table 'dellog' for?
2) Why 'comments' table does not have a foreign key on 'docs'?

---

From: "Dave Page" <[email-masked]>
Date: Wed, 28 Apr 2004 13:48:45 +0100

> -----Original Message-----
> From: Alexey Borzov [mailto:[email-masked]] 
> Sent: 28 April 2004 13:39
> To: Dave Page
> Cc: [email-masked]
> Subject: Re: [pgsql-www] Some more questions on DB schema
> 
> 
> 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.

Fixed, fkey added.

Regards, Dave.