Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 369F36328C9 for ; Thu, 1 Oct 2009 03:22:37 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 25857-05 for ; Thu, 1 Oct 2009 06:22:29 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f175.google.com (mail-iw0-f175.google.com [209.85.223.175]) by mail.postgresql.org (Postfix) with ESMTP id 72FB463283E for ; Thu, 1 Oct 2009 03:22:29 -0300 (ADT) Received: by iwn5 with SMTP id 5so3857156iwn.15 for ; Wed, 30 Sep 2009 23:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=O3p2m80JPZY9ORsi/WxaZgwyMMp+vpTxScio5rjC8uw=; b=aEFRTbrr/sGjlwQNiqEKOiYJIBPFM8qbXacmIsef2VIvSUkfpMO67rN1o40sbkiYE5 b7ReaxQpKNpLtK/a3K2Zxv+rIS2SPYvrnTgaQ2W14qjim0Fwc7gl9RertaBP0wysoUYL 8yQs2sIwbGZ4QPe4UmeIQXagweqaGepwO8K7k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=wNfyUC3/wNfOsWbjKW6lHzeOupPT120SjC0KVh80EcJ8NjBemQMekzUnP3YBWtSueN lMCtwi1/fq2AbWvlc5DVauS0iM1EVmTO/7mpkp2fHRJLAtQxcNUi/LEO9ezjwngt2k3P CD8Jt0I1kp8o4+jFUROMWXEHhtFRHg6zlrUAY= MIME-Version: 1.0 Received: by 10.231.124.227 with SMTP id v35mr1564659ibr.18.1254378148083; Wed, 30 Sep 2009 23:22:28 -0700 (PDT) In-Reply-To: <6caee9520909302319w638c4feara4ead3402e5e00c0@mail.gmail.com> References: <6caee9520909302319w638c4feara4ead3402e5e00c0@mail.gmail.com> Date: Thu, 1 Oct 2009 00:22:28 -0600 Message-ID: Subject: Re: Can i customize null-padding for outer joins? From: Scott Marlowe To: Shruthi A Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200910/4 X-Sequence-Number: 33203 On Thu, Oct 1, 2009 at 12:19 AM, Shruthi A wrote: > Hello, > > I have a query where I full-outer-join 2 tables, and all the columns other > than the join column are numerical columns. For my further calculations i > need to pad the unmatched tuples with 0 (zero) instead of NULL so that I can > perform meaningful mathematical calculations on them. Is this currently > possible? something like select a.x, coalesce(b.y,0) from a left join b yada... work?