Re: Conditional JOINs ?

From: Erik Jones <erik(at)myemma(dot)com>
To: Leon Mergen <leon(at)solatis(dot)com>
Cc: "Alban Hertroys" <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>, pgsql-general(at)postgresql(dot)org
Subject: Re: Conditional JOINs ?
Date: 2008-03-19 14:12:50
Message-ID: EF30AEAE-03E9-4161-9993-46A137A1AEC5@myemma.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Mar 19, 2008, at 9:01 AM, Leon Mergen wrote:

> On 3/19/08, Leon Mergen <leon(at)solatis(dot)com> wrote:
>> Excuse me for bumping this up again, but I still don't understand how
>> to use this approach to sequentially walk through all different child
>> tables in one select, without having to JOIN these tables all the
>> time
>
> Apparently a UNION all solved this problem -- sorry for the noise.

If you have the child tables INHERITing from the parent, then a simple

SELECT parent.* FROM parent;

would be equivalent to manually spelling out a UNION ALL that
explicitly lists all of the tables.

Erik Jones

DBA | Emma®
erik(at)myemma(dot)com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Leon Mergen 2008-03-19 15:01:06 Re: Conditional JOINs ?
Previous Message Ondřej Fafejta 2008-03-19 14:05:06 array_cat without duplicity