pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Charles Mott <cmott@scientech.com>
To: pgsql-sql@postgresql.org
Subject: Outer Joins
Date: Sat, 19 Feb 2000 12:53:40 -0700 (MST)
Message-ID: <Pine.LNX.4.10.10002191223340.8574-100000@if.scientech.com> (raw)

How are outer joins implemented within PostgreSQL?
I would like to do a query of the form:

    select a.x, b.y from a, b where a.x *= b.x;

The *= operator does not seem to exist.  I've been
able to devise some clumsy workarounds by creating
temporary tables:

    create table temp_table as
       select a.x, b.y from a, b where a.x = b.x;

    insert into temp_table
       select x from a
       except
           select a.x from a, b where a.x = b.x;

Outer joins are apparently quite common, but I haven't
been able to find anything on this in either the users
guide, the draft of Bruce Momjian's upcoming book or the
Deja News archives.

Charles Mott




view thread (38+ messages)  latest in thread

Message-ID: <Pine.LNX.4.10.10002191223340.8574-100000@if.scientech.com>
Permalink:  ../Pine.LNX.4.10.10002191223340.8574-100000@if.scientech.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.10.10002191223340.8574-100000@if.scientech.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: cmott@scientech.com
  Subject: Re: Outer Joins
  In-Reply-To: <Pine.LNX.4.10.10002191223340.8574-100000@if.scientech.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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