From 7cbc7cce1bbaaa761e800405feeed3b6383ce17c Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Fri, 10 Aug 2007 10:23:51 -0700 Subject: [PATCH] Minor database schema fix. When constructing the segment_info view, we can no longer do a natural join on the block_index and segments tables, since the segments table recently acquired a checksum column. Now explicitly join on the segmentid column only, which is the desired behavior (and what a natural join used to do). --- schema.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema.sql b/schema.sql index a37b501..2cca99a 100644 --- a/schema.sql +++ b/schema.sql @@ -44,7 +44,7 @@ create unique index snapshot_contents_unique create view segment_info as select * from (select segmentid, max(timestamp) as mtime, sum(size) as size, count(*) as objects - from block_index natural join segments group by segmentid) + from block_index join segments using (segmentid) group by segmentid) natural join (select segmentid, sum(size) as used, count(*) as objects_used from block_index where blockid in -- 2.20.1