X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id C886411F6004 for ; Sat, 29 Apr 2006 05:33:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 02327-10 for ; Sat, 29 Apr 2006 05:33:01 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.233]) by postgresql.org (Postfix) with ESMTP id 8614411F6003 for ; Sat, 29 Apr 2006 05:33:00 -0300 (ADT) Received: by wproxy.gmail.com with SMTP id 57so2309314wri for ; Sat, 29 Apr 2006 01:33:00 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Fg52M3Uhn+pr4YLjv0uHo2n/o/cJmZol9IlL2Yu7GtxExtgTQ78z1Nl9A7O1P2sEFPNaabFHRg+DwtJmbAMb3sNioniJL+1CLpFV8Dr9UI8X+f1CCPEISNdZBul3Iwv6psJGrIyzHJXU5gWkEIulO/6Ntb+6XqHFwf+5SWycQBo= Received: by 10.65.160.9 with SMTP id m9mr404420qbo; Sat, 29 Apr 2006 01:33:00 -0700 (PDT) Received: by 10.65.241.14 with HTTP; Sat, 29 Apr 2006 01:33:00 -0700 (PDT) Message-ID: <9dcb6fa40604290133l47b67930n@mail.gmail.com> Date: Sat, 29 Apr 2006 11:33:00 +0300 From: Emils Reply-To: emils.klotins@gmail.com To: pgsql-sql@postgresql.org Subject: Re: Outer joins MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/212 X-Sequence-Number: 25021 (damn gmail, sorry about priv mail earlier) > Stephan Szabo : > I think putting a test in an ON clause associated with the join (using > something like ... left join object_values ov1 ON(ov.obj_id =3D ov1.obj_i= d > and ov1.att_id=3D8) rather than where will consider both as part of the j= oin > and null extend even if there are obj_id matches if none of those have > att_id=3D8. Thanks, that worked! 2006/4/28, Tom Lane : > Emils writes: > > The table structure is: > > > object_values > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > This isn't an outer-join problem, it's a crosstab problem. Try the > crosstab functions in contrib/tablefunc. > Thanks, I looked into it, unfortunately I might have to have also a solution for where installing contrib stuff is not possible. Emils