Re: Remove unneeded left joins from psql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: Remove unneeded left joins from psql
Date: 2005-04-12 05:59:46
Message-ID: 7427.1113285586@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Greg Sabino Mullane <greg(at)turnstep(dot)com> writes:
> here's a patch that does that and nothing more: removes all
> unnecessary left joins from psql. Done in the theory that we often
> point people to psql -E, so our queries there should be as correct
> as possible: if the joining column is not null, then we don't need
> a left join.

I'm still not happy about this. "Joining column is not null" has
nothing to do with it --- what is at issue is whether there is certain
to be a match. Since we do not have foreign-key enforcement on the
system catalog interrelationships, it is possible for system bugs or
manual intervention to create non-matching situations.

We have seen enough failures associated with "can't happen" missing
links that I think it's just folly to remove error tolerance like this.
I mean, there are *many* thousands of lines of code that we can remove
if the only criterion is readability and robustness means nothing...
who needs WAL for example?

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Rémi Zara 2005-04-12 06:23:19 Re: NetBSD mac68k crashing on union regression test
Previous Message Tom Lane 2005-04-12 05:28:31 Re: Not to to confusing