Re: self-join on subselect - Mailing list pgsql-general

From Jim C. Nasby
Subject Re: self-join on subselect
Date
Msg-id 20050127012436.GL67721@decibel.org
Whole thread Raw
In response to self-join on subselect  (PFC <lists@boutiquenumerique.com>)
List pgsql-general
It's not at all clear what you're asking. Do you have a real example,
preferably with EXPLAIN output?

On Wed, Jan 26, 2005 at 11:12:25PM +0100, PFC wrote:
>
>     How do you do a self-join on a subselect ?
>
>     like
>     SELECT a.x+b.x FROM (subselect) a, (subselect) b WHERE a.id = b.id+10
>
>     but without performing the subselect twice
> ..................................?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>      joining column's datatypes do not match
>

--
Jim C. Nasby, Database Consultant               decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

pgsql-general by date:

Previous
From: phil campaigne
Date:
Subject: Numeric type
Next
From: "Jim C. Nasby"
Date:
Subject: Re: difficult JOIN