X-Original-To: pgsql-sql@postgresql.org Received: from utrhcs.cs.utwente.nl (utrhcs.cs.utwente.nl [130.89.10.247]) by postgresql.org (Postfix) with ESMTP id 7B166476367 for ; Wed, 12 Mar 2003 15:50:01 -0500 (EST) Received: from zeus.cs.utwente.nl (zeus.cs.utwente.nl [130.89.10.12]) by utrhcs.cs.utwente.nl (8.12.8/8.12.8) with ESMTP id h2CKo0X1005900 for ; Wed, 12 Mar 2003 21:50:00 +0100 (MET) Received: from utip095.dynamic.cs.utwente.nl (utip095 [130.89.11.76]) by zeus.cs.utwente.nl (8.12.8/8.12.8) with ESMTP id h2CKnwo5020263 for ; Wed, 12 Mar 2003 21:49:58 +0100 (MET) Date: Wed, 12 Mar 2003 21:49:59 +0100 From: mila boldareva X-Mailer: The Bat! (v1.61) Educational X-Priority: 3 (Normal) Message-ID: <167817250594.20030312214959@pierro.dds.nl> To: pgsql-sql@postgresql.org Subject: Re: LEFT JOIN and missing values In-Reply-To: <105817169066.20030312214838@pierro.dds.nl> References: <158808514272.20030312192423@pierro.dds.nl> <3E6F80AB.8040709@klaster.net> <147814986879.20030312211215@pierro.dds.nl> <3E6F9B31.7050403@klaster.net> <105817169066.20030312214838@pierro.dds.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS-perl11-milter (http://amavis.org/) X-Archive-Number: 200303/312 X-Sequence-Number: 12351 Tomasz, > I think if you really need to remove your 0.5 values, you need another > table with all possible values of id1. This table will look like: > create table t3 > ( > id1 integer; > ); T1 contains values of id's, The T2 matrix is a matrix of some sort of "distances" between id's from T1, so original T2 is a T1 x T1. (that's what you are proposing right?) So there is no id1, id2 in T2 that don't exists in T1, I checked my test tables and this is indeed the case. In other words T1 is dense, I make a left join on it and I get wrong results! And even wrong number of tuples :-( cheers, Mila