pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: Matlack, Brad <matlackb@ogden.disa.mil>
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] newbie outer-join
Date: Mon, 8 Nov 1999 22:26:53 +0100 (CET)
Message-ID: <Pine.LNX.4.20.9911082224390.4161-100000@peter-e.yi.org> (raw)
In-Reply-To: <69730CEEF766D311B4D800902785F90413BE5C@kssgqm01.ogden.disa.mil>

On 1999-11-08, Matlack, Brad mentioned:

> I'm trying to do what I think is an outer-join:
> 
> SELECT 
>  da.datname as database,
>  de.description as comment
> FROM 
>  pg_database as da,
>  pg_description as de
> WHERE 
> (da.oid = de.objoid)
> 
> Obviously, if there are no descriptions, no values will be returned.
> What I want is to display all databases, with comments (valid or null).

SELECT datname, [...,] obj_description(pg_database.oid) FROM pg_database;

is a work-around. Outer joins will appear in the next release, so I hear.


-- 
Peter Eisentraut                  Sernanders vaeg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden




view thread (2+ messages)

Message-ID: <Pine.LNX.4.20.9911082224390.4161-100000@peter-e.yi.org>
Permalink:  ../Pine.LNX.4.20.9911082224390.4161-100000@peter-e.yi.org/
Also on:    postgresql.org/message-id/Pine.LNX.4.20.9911082224390.4161-100000@peter-e.yi.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: peter_e@gmx.net, matlackb@ogden.disa.mil
  Subject: Re: [SQL] newbie outer-join
  In-Reply-To: <Pine.LNX.4.20.9911082224390.4161-100000@peter-e.yi.org>
  References: <69730CEEF766D311B4D800902785F90413BE5C@kssgqm01.ogden.disa.mil> <Pine.LNX.4.20.9911082224390.4161-100000@peter-e.yi.org>

* 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