Re: [SQL] newbie outer-join

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Matlack, Brad" <matlackb(at)ogden(dot)disa(dot)mil>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] newbie outer-join
Date: 1999-11-08 21:26:53
Message-ID: Pine.LNX.4.20.9911082224390.4161-100000@peter-e.yi.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 1999-11-08 21:32:24 Re: [SQL] parser :parse error
Previous Message Bruce Momjian 1999-11-08 20:39:33 Re: [SQL] parser :parse error