Trouble with strange OUTER JOIN syntax

From: Farid Hajji <farid(dot)hajji(at)ob(dot)kamp(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Trouble with strange OUTER JOIN syntax
Date: 2001-05-24 15:58:10
Message-ID: 200105241558.f4OFwAi02747@suse-1.meta.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to port a program written in ESQL/C for Informix to
PostgreSQL using ecpg [ecpg is a great helper here, despite its
shortcomings]. Right now, I'm having a hard time with OUTER JOINs,
even when using newest PostgreSQL-7.1.1.

How would you translate the following SELECT statements with
outer joins to PostgreSQL syntax?

SELECT ...
FROM tab1 alias_tab1, OUTER ot1 alias_ot1, OUTER ot2 alias_ot2
WHERE ...

SELECT ...
FROM tab1 alias_tab1, OUTER (ot1 alias_ot1, ot2 alias_ot2)
WHERE ...

It is even possible to have multiple tables specified at FROM
before the OUTER keyword, like here:

SELECT ...
FROM tab1 alias_tab1, tab2 alias_tab2,
OUTER ot1 alias_ot1,
OUTER ot2 alias_ot2
WHERE ...

SELECT
FROM tab1 alias_tab1, tab2 alias_tab2,
OUTER (ot1 alias_ot1, ot2 alias_ot2)
WHERE ...

Another situation is here (same table 'otboth' with two aliases):

SELECT ...
FROM tab1 alias_tab1, OUTER otboth alias1, OUTER otboth alias2
WHERE ...

I didn't find any clue in Bruce's book nor in the postgreSQL docs/faq
as of 7.1.1. If at all possible, I'd like to stick to OUTER JOINs
because they are used extensively throughout the program.

Thank you for your help,

-Farid.

--
Farid Hajji -- Unix Systems and Network Admin | Phone: +49-2131-67-555
Broicherdorfstr. 83, D-41564 Kaarst, Germany | farid(dot)hajji(at)ob(dot)kamp(dot)net
- - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - -
One OS To Rule Them All And In The Darkness Bind Them... --Bill Gates.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thalis A. Kalfigopoulos 2001-05-24 16:05:09 ODBC .ini
Previous Message Denis Chapligin 2001-05-24 15:57:04 Re: ERWin