pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rikard Pavelic <rikard.pavelic@zg.htnet.hr>
Cc: pgsql-performance@postgresql.org
Subject: Re: self join revisited
Date: Wed, 01 Apr 2009 13:19:10 -0400
Message-ID: <7884.1238606350@sss.pgh.pa.us> (raw)
In-Reply-To: <49D3969F.4030701@zg.htnet.hr>
References: <49D3969F.4030701@zg.htnet.hr>

Rikard Pavelic <rikard.pavelic@zg.htnet.hr> writes:
> It would be great if Postgres could rewrite this query

AFAICS those queries are not going to produce the same results,
so Postgres would be 100% incorrect to rewrite it like that for you.

(If they do produce the same results, it would depend on a bunch
of assumptions you have not stated.)

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <7884.1238606350@sss.pgh.pa.us>
Permalink:  ../7884.1238606350@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7884.1238606350@sss.pgh.pa.us

 · 

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: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, rikard.pavelic@zg.htnet.hr
  Subject: Re: self join revisited
  In-Reply-To: <7884.1238606350@sss.pgh.pa.us>

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

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