public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Bruce Momjian <[email protected]>
Cc: PostgreSQL-documentation <[email protected]>
Subject: Re: ANSI join types
Date: Wed, 14 Aug 2002 00:55:53 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

Bruce Momjian <[email protected]> writes:
> Also, I can not find documentation on UNION JOINS in our docs.

There is none because we don't support it.  While I took the trouble
to make the parser take it, there's no implementation.  I'm not now
excited about making it happen ever, because I read this in SQL99:

                                       Annex D
                                 Deprecated features

         It is intended that the following features will be removed at a
         later date from a revised version of this part of ISO/IEC 9075:

         1) The ability to specify UNION JOIN in a <joined table> has been
            deprecated.

BTW, I think the description

>      * Union: This is different than the UNION operator used to merge the
>        output of multiple queries.  This is the inverse of an Inner, only
>        rows are returned when no matches are found

is pretty poor.  As near as I can tell from the SQL92 spec, "x UNION
JOIN y" is supposed to produce the same result as

	(select *,<y.nulls> from x) UNION ALL (select <x.nulls>,* from y)

where <y.nulls> denotes a list of NULLs matching the columnset of y,
and similarly for <x.nulls>.  This behavior has nothing to do with
whether any value matches exist between x and y --- it makes no join
comparisons at all.

			regards, tom lane




view thread (2+ messages)

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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: ANSI join types
  In-Reply-To: <[email protected]>

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

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