public inbox for [email protected]  
help / color / mirror / Atom feed
Some more questions on DB schema
4+ messages / 2 participants
[nested] [flat]

* Some more questions on DB schema
@ 2004-04-27 14:34 Alexey Borzov <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Alexey Borzov @ 2004-04-27 14:34 UTC (permalink / raw)
  To: pgsql-www

Greetings.

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





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Some more questions on DB schema
@ 2004-04-27 15:03 Dave Page <[email protected]>
  2004-04-28 12:39 ` Re: Some more questions on DB schema Alexey Borzov <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Dave Page @ 2004-04-27 15:03 UTC (permalink / raw)
  To: Alexey Borzov <[email protected]>; pgsql-www

 

> -----Original Message-----
> From: Alexey Borzov [mailto:[email protected]] 
> Sent: 27 April 2004 15:35
> To: [email protected]
> Subject: [pgsql-www] Some more questions on DB schema
> 
> Greetings.
> 
> 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.

> 2) Why 'comments' table does not have a foreign key on 'docs'?

Oversight I guess. Feel free to add one.

Regards, Dave.



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Some more questions on DB schema
  2004-04-27 15:03 Re: Some more questions on DB schema Dave Page <[email protected]>
@ 2004-04-28 12:39 ` Alexey Borzov <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Alexey Borzov @ 2004-04-28 12:39 UTC (permalink / raw)
  To: Dave Page <[email protected]>; +Cc: pgsql-www

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.






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Some more questions on DB schema
@ 2004-04-28 12:48 Dave Page <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Dave Page @ 2004-04-28 12:48 UTC (permalink / raw)
  To: Alexey Borzov <[email protected]>; +Cc: pgsql-www

 

> -----Original Message-----
> From: Alexey Borzov [mailto:[email protected]] 
> Sent: 28 April 2004 13:39
> To: Dave Page
> Cc: [email protected]
> 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.




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2004-04-28 12:48 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-04-27 14:34 Some more questions on DB schema Alexey Borzov <[email protected]>
2004-04-27 15:03 Re: Some more questions on DB schema Dave Page <[email protected]>
2004-04-28 12:39 ` Alexey Borzov <[email protected]>
2004-04-28 12:48 Re: Some more questions on DB schema Dave Page <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox